RE: [fw-general] Configuring Zend Framework with IIS
> This would definitely have to fall under the "hack" area, > because it is > a feature that would require additional configuration, and in other > words, is not a "pure" PHP implementation. Therefore, it is > unable to > be resolved solely through the Zend Framework. I don't know > if this is > a requirement, but I'm sure finding a solution solely through > ZF would > be superior... Well Apache requires configuration to get URL rewriting working too, so I don't think its likely that a pure PHP implementation is possible for Apache or IIS. Using a module like Isapi Rewrite seems the best option, especially since it uses the same syntax as Apache mod_rewrite. Though I was wondering if making use of the Error404 system in IIS was a valid way to get the basic re-routing to work in IIS without having to depend on third-party software. best wishes, Si
[fw-general] Zend_Config_Ini Inheritance Issue?
I've been tinkering with ZF since 0.2.0 came out (woohoo, how many hours has it been out? ;) ) so forgive me if this way off base on the intended behavior of Zend_Config(_Ini). It seems that when using the 'dot' notation and extending another section of the .ini file (see the example .ini file and PHP source below) not all "properties" (for lack of a better word) are being extended as I would expect. Please see the bottom of the email for the PHP source that better illustrates what I mean. I've added the Zend::dump() output to the comments to show what I am seeing on my setup. I can create an issue if this is actually an issue, just point me to the proper site (http://framework.zend.com/issues/secure/ Dashboard.jspa ?). From Example 3.3 on: http://framework.zend.com/manual/en/ zend.config.classes.ini.html#zend.config.classes.ini.introduction Using this .ini file from the example: ; Production site configuration data [production] webhost = www.example.com database.type = pdo_mysql database.host = db.example.com database.username = dbuser database.password = secret database.name = dbname ; Staging site configuration data inherits from production and ; overrides values as necessary [staging] extends = production database.host = dev.example.com database.username = devuser database.password = devsecret Slightly modified excerpt from PHP source the example (please assume I'm using __autoload()): $config = new Zend_Config_Ini('/path/to/example.ini', 'staging'); Zend::dump($config->database->host); // prints string(15) "dev.example.com" (from [staging]) Zend::dump($config->database->type); // prints NULL; should be printing string(9) "pdo_mysql" (from [production]) Zend::dump($config->database->name); // prints NULL; should be printing string(6) "dbname" (from [production]) Zend::dump($config->database->username); // prints string(7) "devuser" (from [staging]) smime.p7s Description: S/MIME cryptographic signature
Re: [fw-general] Zend_Db Bug
-- David Rinaldi <[EMAIL PROTECTED]> wrote (on Tuesday, 31 October 2006, 06:54 PM -0800): > Using ZF 0.2.0 and PDO MySQL, I run into a peculiar case: > > $sql = $db->quote('SELECT * FROM ORDER BY date DESC LIMIT 10'); Your problem is with the above statement. quote() should be used to quote scalar values to use *in* SQL statements, not the entire statement itself; typically, you'll only use it to quote data you're selecting against or pushing into an insert or update statement. In the example you have above, there's really no reason to do any quoting. Try $sql = 'SELECT * FROM ORDER BY date DESC LIMIT 10'; and use that with the rest of the code you have below. > $result = $db->query($sql); > $rows = $result->fetchAll(); > > returns 0 rows. > > using the select object doing the same thing: > > $select->from('', '*'); > $select->order('date DESC'); > $select->limit(10); > $rows= $db->fetchAll($select); > > returns up to 10 rows... > > These should be the same queries, so why the difference in return? -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
Re: [fw-general] Strange array bug?
I consider this a bug in PHP itself, personally. The solution is changing __get to something more like this: // Zend_View_Abstract::__get() public function __get($key) { if ($key[0] != '_') { if (!isset($this->_vars[$key])) { $this->_vars[$key] = null; } return $this->_vars[$key]; } } This is because when you call $this->a[] = 1, PHP actually calls __get instead of __set. There is no warning, error, or anything. It just silently fails. -Matt - Original Message - From: "Carolina Feher da Silva" <[EMAIL PROTECTED]> To: Sent: Tuesday, October 31, 2006 7:32 PM Subject: [fw-general] Strange array bug? Please paste this code in a view: $this->a = array(); $this->a[] = 1; print_r($this->a); What do you get? I get an *empty* array. How come? I don't understand it.
[fw-general] Strange array bug?
Please paste this code in a view: $this->a = array(); $this->a[] = 1; print_r($this->a); What do you get? I get an *empty* array. How come? I don't understand it.
[fw-general] Zend_Db Bug
Using ZF 0.2.0 and PDO MySQL, I run into a peculiar case: $sql = $db->quote('SELECT * FROM ORDER BY date DESC LIMIT 10'); $result = $db->query($sql); $rows = $result->fetchAll(); returns 0 rows. using the select object doing the same thing: $select->from('', '*'); $select->order('date DESC'); $select->limit(10); $rows= $db->fetchAll($select); returns up to 10 rows... These should be the same queries, so why the difference in return? David
[fw-general] WordPress + Zend Framework
Hey, I seem to be having trouble incorporating WP and ZF together. Each work individually, so I'm wondering if I'm approaching the integration incorrectly. What I want to do is have ZF be responsible for all paths, setting up the layout and using Zend_View to render what I need. As a result, I only need WP loaded when a certain path (in my case, the index page) is requested - or I could manipulate the controllers to provide nicer path access to WP rather than use their mod_rewrite for categories, permalinks, etc. In using Zend_View however, it appears that a class for the db set up by WP is not maintained in memory (I get a fatal error that a function call is used on a non-object, though tracing WP code shows it should operate correctly). I do not want to have a path where Wordpress operates independently, but if that is the best way, I guess I'll have to do that... has anyone worked through a similar integration and can understand what may be going on here? For reference: I'm using the latest releases (WP 2.0.5 and ZF 0.2.0). Thanks! David
Re: [fw-general] Zend Conference BOF on Framework
After Andi's announcement at the conference I changed my exam time to Wednesday at 4pm from my original time of today at 4:30. Then I checked my e-mail and saw it was on Wednesday, not today--argh! Luckily the ladies at the registration booth are helpful and friendly and had no problem with me doing that. -Matt - Original Message - From: "Richard Thomas" <[EMAIL PROTECTED]> To: "Bill Karwin" <[EMAIL PROTECTED]> Cc: "Zend Framework General" Sent: Tuesday, October 31, 2006 10:48 AM Subject: Re: [fw-general] Zend Conference BOF on Framework At the conference they reference the time but not the date so there is going to be some confusion on if this is today or tommorow? I would assume they meant to say Wednesday. Bill Karwin wrote: Hi to folks who are here in San Jose this week, attending the Zend Conference. We have scheduled an informal "BOF" style gathering of Zend Framework contributors at the Conference. Where: the Board Room at the Doubletree Hotel When: Wednesday 11/1 at 4:45-5:30 (before the happy hour event). The gathering is to give us all a chance to meet face to face, and talk about the state of the Framework and where it's going next. Andi and I will be there, and we'd be glad to see you there! Regards, Bill Karwin Product Engineering Manager Zend Technologies
Re: [fw-general] Configuring Zend Framework with IIS
Here's a tutorial that's a little more in-depth on deploying ZF on IIS using Isapi Rewrite.http://framework.zend.com/wiki/display/ZFUSER/Using+ZF+with+IIS On 10/30/06, Manu Goel <[EMAIL PROTECTED]> wrote: Hi all,I was recently facing an issue while configuring Zend Framework with IIS. I was searching for an apache style mod-rewrite property in IIS but was unable to find any such thing. So, my question is, how can we enable the Rewrite Engine in IIS to use Zend Framework, or anything else to make it work? Any idea guys?? I Have:1) PHP 5.1.62) Windows 20003) IIS 5.0Thanx in advanceRegards,Manu Goel
Re: [fw-general] Zend Conference BOF on Framework
At the conference they reference the time but not the date so there is going to be some confusion on if this is today or tommorow? I would assume they meant to say Wednesday. Bill Karwin wrote: Hi to folks who are here in San Jose this week, attending the Zend Conference. We have scheduled an informal "BOF" style gathering of Zend Framework contributors at the Conference. Where: the Board Room at the Doubletree Hotel When: Wednesday 11/1 at 4:45-5:30 (before the happy hour event). The gathering is to give us all a chance to meet face to face, and talk about the state of the Framework and where it's going next. Andi and I will be there, and we'd be glad to see you there! Regards, Bill Karwin Product Engineering Manager Zend Technologies
Re: [fw-general] Configuring Zend Framework with IIS
This would definitely have to fall under the "hack" area, because it is a feature that would require additional configuration, and in other words, is not a "pure" PHP implementation. Therefore, it is unable to be resolved solely through the Zend Framework. I don't know if this is a requirement, but I'm sure finding a solution solely through ZF would be superior... Simon R Jones wrote: hi The URL format http://www.domain.com/index.php/test/my/vars works fine in IIS and copies the value "/index.php/test/my/vars" to $_SERVER['REQUEST_URI'] so I guess the standard *without rewrite* implementation should work without a hitch. Apart from using an ISAPI module (or ASP.NET for which you can code a simple rewrite apparently relatively easily from the tutorials I've seen around) one idea would be to hook into the use of an Error 404 page. I did a quick test on IIS 6.0 and for one test folder I set the Error 404 page to be sent to the absolute URL: /test/router.php So a fictional URL within my test folder: http://www.domain.com/test/view/apples/5 Resolves happily to the /test/router.php file and populates $_SERVER['REQUEST_URI'] with: /test/router.php?404;http://www.domain.com:80/test/view/apples/5 This may be an option, though I don't know if others would consider this too much of a hack in IIS? best wishes, Si
Re: [fw-general] Zend Conference BOF on Framework
At the conference they reference the time but not the date so there is going to be some confusion on if this is today or tommorow? I would assume they meant to say Wednesday. Bill Karwin wrote: Hi to folks who are here in San Jose this week, attending the Zend Conference. We have scheduled an informal "BOF" style gathering of Zend Framework contributors at the Conference. Where: the Board Room at the Doubletree Hotel When: Wednesday 11/1 at 4:45-5:30 (before the happy hour event). The gathering is to give us all a chance to meet face to face, and talk about the state of the Framework and where it's going next. Andi and I will be there, and we'd be glad to see you there! Regards, Bill Karwin Product Engineering Manager Zend Technologies
RE: [fw-general] Configuring Zend Framework with IIS
hi The URL format http://www.domain.com/index.php/test/my/vars works fine in IIS and copies the value "/index.php/test/my/vars" to $_SERVER['REQUEST_URI'] so I guess the standard *without rewrite* implementation should work without a hitch. Apart from using an ISAPI module (or ASP.NET for which you can code a simple rewrite apparently relatively easily from the tutorials I've seen around) one idea would be to hook into the use of an Error 404 page. I did a quick test on IIS 6.0 and for one test folder I set the Error 404 page to be sent to the absolute URL: /test/router.php So a fictional URL within my test folder: http://www.domain.com/test/view/apples/5 Resolves happily to the /test/router.php file and populates $_SERVER['REQUEST_URI'] with: /test/router.php?404;http://www.domain.com:80/test/view/apples/5 This may be an option, though I don't know if others would consider this too much of a hack in IIS? best wishes, Si
Re: [fw-general] Configuring Zend Framework with IIS
As do I! I know that PHP on Apache works fine without using any kind of rewriting as long as you have an explicit filename in the URL. For example, the following is a perfectly legitimate URL that can be parsed from within PHP without anything done on Apache: http://www.example.com/index.php/some/additional/parameters If you know the location of your index.php inside the URL, then you can split off the additional parameters. Of course, you have to have a filename inside there, but it works! Some examples of sites running the MediaWiki software (the software that runs Wikipedia) use this as opposed to rewriting all URLs to use the wiki file, which doesn't work without a rewrite rule (because it is not recognized solely as a file). I imagine that the implementation will be something along these lines. Whether or not this is true for IIS, I don't know. I suppose you could always try! P.S. (to the list manager) The default setting of this list is getting troublesome! I find myself replying directly to the sender and not to the list. Is this setting intentional? Manu Goel wrote: I hope it happens soon :) On 10/31/06, Abu Hurayrah (FW) <[EMAIL PROTECTED]> wrote: Manu, I know for a fact that one of the previously-stated goals on the framework site is to make the rewriter to be platform independent. HOW this is going to happen is going to be an interesting challenge. Maybe one of the more experienced Ziffers can elaborate or correct my assertion. Abu Hurayrah [EMAIL PROTECTED] Hidayah Online - Guidance According to the Qur'an and Sunnah `A'isha, the wife of Allah's Apostle (may peace be upon him), reported Allah's Apostle (may peace be upon him) as saying: Kindness is not to be found in anything but that it adds to its beauty and it is not withdrawn from anything but it makes it defective. narrated in Sahih Muslim, Book 3, Number 6274 Manu Goel wrote: Hi all, I was recently facing an issue while configuring Zend Framework with IIS. I was searching for an apache style mod-rewrite property in IIS but was unable to find any such thing. So, my question is, how can we enable the Rewrite Engine in IIS to use Zend Framework, or anything else to make it work? Any idea guys?? I Have: 1) PHP 5.1.6 2) Windows 2000 3) IIS 5.0 Thanx in advance Regards, Manu Goel -- Manu Goel --- Visit me at [www.manugoel.blogspot.com] [ www.orkut.com/Profile.aspx?uid=6505992462906698128]
Re: [fw-general] Configuring Zend Framework with IIS
Hi Manu, I'm not using windows, but there's some info in the wiki: http://framework.zend.com/wiki/display/ZFUSER/Installing+ZF+on+Windows Cheers, Johannes Manu Goel wrote: Hi all, I was recently facing an issue while configuring Zend Framework with IIS. I was searching for an apache style mod-rewrite property in IIS but was unable to find any such thing. So, my question is, how can we enable the Rewrite Engine in IIS to use Zend Framework, or anything else to make it work? Any idea guys?? I Have: 1) PHP 5.1.6 2) Windows 2000 3) IIS 5.0 Thanx in advance Regards, Manu Goel
[fw-general] Configuring Zend Framework with IIS
Hi all,I was recently facing an issue while configuring Zend Framework with IIS. I was searching for an apache style mod-rewrite property in IIS but was unable to find any such thing. So, my question is, how can we enable the Rewrite Engine in IIS to use Zend Framework, or anything else to make it work? Any idea guys?? I Have:1) PHP 5.1.62) Windows 20003) IIS 5.0Thanx in advanceRegards,Manu Goel
Re: [fw-general] Configuring Zend Framework with IIS
I was recently facing an issue while configuring Zend Framework with IIS. I was searching for an apache style mod-rewrite property in IIS but was unable to find any such thing. So, my question is, how can we There's no standard rewrite engine for IIS but there are third-party modules, e.g. ISAPI_Rewrite which IIRC also has free version. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/
[fw-general] MVC Changes; WAS Re: [fw-general] Component Level Changelog
-- Kevin McArthur <[EMAIL PROTECTED]> wrote (on Monday, 30 October 2006, 10:23 AM -0700): > P.S. > > What exactly is new in the MVC and what will be needed to upgrade to the > new 0.2.0 from 0.1.5 Nothing, initially. All MVC changes went into the incubator for this release so that early adopters can start testing and so we can start creating good migration documentation. That said, the MVC changes were fairly extensive... and yet for those using only the basic features, it will work exactly the same. The biggest changes were the introduction of Request and Response objects into the chain (and the removal of the Dispatcher Token). The Request object encapsulates the entire request environment and is pushed throughout the controller chain. If a router is used (routers are now optional), it will use the request object to try and determine the route, and set the request object's controller and action names. The Response object can be used by your action controllers to aggregate headers and content; it also will be the location that application exceptions are registered. As it implements __toString(), it can be directly echoed at the end of the controller chain to deliver your response. What the two in combination offer is something pretty powerful: the ability to test your applications *without* using a webserver. Simply craft a request object representing some user input, and pass it through the application; then check the response on the other side to see if you get the expected results. Additionally, request and response objects allow developers to target other MVC environments, such as the CLI or PHP-GTK applications. Besides adding request and response objects, here's a laundry list of other changes: * You can now register arbitrary data with the front controller to pass through to the dispatcher, router, and action controllers * Routers are now optional. The dispatcher will pull the controller and action directly from the request object and, if none found, use defaults as registered with itself. * Action controllers now have their own pre/postDispatch() methods that are invoked to bookend the actual action call. * The action controller run() method is now never invoked by the dispatcher, and instead exists simply to allow usage in a Page Controller environment. Additionally, it is no longer marked final. * Addition of fluid interfaces for all setter methods. This allows for method chaining when doing common tasks like setting up the front controller environment. * The entire controller tree is now fully unit tested. I will likely be putting together some tutorials in the coming weeks indicating how to use the new architecture; stay tuned! -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
Re: [fw-general] Zend Conference BOF on Framework
Wish I could be there. Have fun everyone overthere! :)On 10/31/06, Bill Karwin <[EMAIL PROTECTED]> wrote: Hi to folks who are here in San Jose this week, attending the ZendConference.We have scheduled an informal "BOF" style gathering of Zend Framework contributors at the Conference.Where: the Board Room at the Doubletree HotelWhen: Wednesday 11/1 at 4:45-5:30 (before the happy hour event).The gathering is to give us all a chance to meet face to face, and talk about the state of the Framework and where it's going next.Andi and I will be there, and we'd be glad to see you there!Regards,Bill KarwinProduct Engineering ManagerZend Technologies -- Stefan Koopmanschaphttp://www.stefankoopmanschap.nl/http://www.leftontheweb.com/