|
|||
|
Hi all,
This is my first post so forgive me if this is a simple question with a simple answer. I have a ZF 1.5 MVC app that I have developed and it works fine on my local machine where php5 is running as an apache module. However, when I try to deploy to my staging server where php5 is running as cgi-fcgi I get the following error: invalid controller specified (error) I've recreated the directory structure and settings for the staging server on my local machine and the app. works great there. I've also gone through the phpinfo information on both machines and there doesn't seem to be any significant differences in the php configurations. Has anyone else encountered problems running ZF when php is running as cgi-fcgi? I've tried everything I know, but nothing seems to be working and I can't see what the problem is. Any help would be very much appreciated. Thanks. J. |
|
|||
|
After doing a lot of testing I've come to the conclusion that the php set up isn't the problem. That's good news since it means I will actually be able to deploy on the server I need to, but it's also bad news because now I have no idea what the problem might be. I have exactly the same set up on my local machine and it works perfectly. Same files. Same directory structure. Same url (minus the server name). For some reason the rewrite router isn't recognizing any of my controllers. I've checked all the permissions and they are ok. Also checked to make sure module controller directory is being set correctly and it is. Really at a loss here. Could use some help.
J. |
|
||||
|
jsahleen,
Maybe, this tip help you: routing doesn't work properly ps: I couldn't make it work before this. ![]() regards,
__________________
Lucas Mauricio C. e Martins CR Vasco da Gama, my biggest passion! Ajude a Combater o Spam! - Help fighting spam! |
|
|||
|
I tried what Lucasm suggested to no avail. Thanks anyway. I don't think it is an apache or mod_rewrite problem. It's seems like something internal.
I'm going to try messing with my bootstrap file some more. Maybe that will solve the problem. Really can't understand why it works on my machine and not on the server. J. |
|
||||
|
jsahleen,
Make sure your links to your controller's links are right. If this is your problem, I suggest you to use something like url helper (see this tip) and base url helper. regards,
__________________
Lucas Mauricio C. e Martins CR Vasco da Gama, my biggest passion! Ajude a Combater o Spam! - Help fighting spam! |
|
|||
|
Lucasm,
I am using the url helper for all my urls and the base url helper. However, it's not even getting to my script files. The error is somewhere in the bootstrap, I think, though my bootstrap is pretty simple and I've been over the code a million times. I've tested every stage in the process and the only place where I am getting the error is in the $front->dispatch() call. The fact that my application can't even find the error controller makes me think there is something wrong with the router, but I'm just using the standard rewrite router so I can't understand why that would be happening. I've checked to make sure my custom routes are being read from my config.ini file and they are. Any other ideas? J. |
|
|||
|
Got some feedback from one of the guys over at Zend and he says he has experienced some routing problems when deploying the framework on servers running PHP as FastCGI. I sent him some of my code and he is running tests. In the meantime, if anyone else has successfully run the framework on a server running PHP as FastCGI, please share your insights.
Thanks. J. |
|
|||
|
According to the php manual, when php is running as cgi or fastcgi, certain server supplied environmental variables simply are not available. I suspect (though I have not checked the code yet) that the router or dispatcher in ZF relies on one or more of these variables, and that is why my application is not working. If anyone knows a way to get around this issue, please post. Otherwise, I think I will have to rewrite my application without using ZF.
Here is the relevant section of the php manual: PHP: CGI and command line setups - Manual Look under user variables. I will write the people at Zend and let them know about this issue. Better days, J. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|