1

so I've been using Zend framework to develop the site locally and everything works just fine....but then after I upload everything into a remote server, zend framework did not work even though I changed none of the source code.....

so here's what I know...

  1. the remote server supports PHP, MySQL, etc just fine and they are of the latest versions
  2. remote server supports .htaccess and mod rewrite just fine and they are enabled and I've tested them
  3. I did not change any of the source code and the source code works perfectly on the local server...
  4. Zend Framework is not boostrapping properly...whenever I go to a controller page such as http://mysite.com/controller/action <---not a real url, it would instead display a 404 error....so I know that it's not being redirected to index.php as it should....

any idea on what could possibly be wrong and on how and where I should start to tackle solving this problem?

thanks in advance

Charles
  • 50,943
  • 13
  • 104
  • 142
kamikaze_pilot
  • 14,304
  • 35
  • 111
  • 171
  • is it working in your local server? – S L Jan 20 '11 at 08:03
  • Does your document root in Apache point to 'public' folder of your application? – Marcin Jan 20 '11 at 10:30
  • check as well every absolute path that you could have set in your application.ini or index.php boostrap or .htaccess – regilero Jan 20 '11 at 12:24
  • Apart from all remarks/answers and since nobody mentioned it before : are you sure you're using the correct version of PHP on the server? But checking the logs (as @Nanne said) should be first on your list. That will probably point out what is going wrong. – wimvds Jan 20 '11 at 12:44
  • yes it's working in my local server....also just to highlight a reply to an answer below: " directory rights are the standard 755 and file rights are the standard 644...PHP version is correct (5.2.14)...there are no absolute paths in my application.ini or index.php....also it's a shared hosting so I'm not sure if I can check their apache error logs...the error log available through cpanel is highly uninformative" – kamikaze_pilot Jan 20 '11 at 17:08

3 Answers3

1

Is the server you're connecting to a shared hosting account? If so, that ended up being an issue for me. If you don't have access to your hosting root (godaddy or like hosting), you may need to just restructure your directory layout to work completely within the public_html. Not quite as secure unless you do some extra work here an there, but the 404 error reminded me of why I dropped hosting for my own actual server.

Corey C
  • 11
  • 1
0

I'd start by checking the error logs. If its a Linux server you'd be checking somewhere in /var/log, probably even /var/log/apache2/.

Check the access and the error logs.

Possible causes

  • Directory/file read/write rights.
  • PHP version difference
  • User (apache? the user running the script) rights.
  • Path troubles -> different path, maybe using some absolute paths still?
Nanne
  • 64,065
  • 16
  • 119
  • 163
  • directory rights are the standard 755 and file rights are the standard 644...PHP version is correct (5.2.14)...there are no absolute paths in my application.ini or index.php....also it's a shared hosting so I'm not sure if I can check their apache error logs...the error log available through cpanel is highly uninformative – kamikaze_pilot Jan 20 '11 at 17:06
0

You could tell us the error but... here are some issues that can make it not to work:

  • mod_rewrite is off
  • .htaccess file still points you to localhost (or wherever you hosted it first)
  • incorrect configuration for php.ini file (if you have a static include you should change it so it sends to the correct include folder)
  • directory/file rights

If you send the error maybe we can help you more

zozo
  • 8,230
  • 19
  • 79
  • 134