I just deployed my Zend project in a hosting service. I upload my project as archive then extracted in public_html folder. so I have this directory:
public_hmtl
->application (folder)
->libary (folder)
->public (folder)
->test (folder)
->cgi-bin (folder) (this not belong to me in the first place)
->buildpath
->htaccess (this not belong to me in the first place)
->project
->zfproject.xml
->index.php (this is for redirecting to /public)
When I run the site, it shows :
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I did the project in localhost using xampp and it works fine. But when I uploaded in cPanel, it became like that.
I have set the chmod for folder to 755 and file to 644. I think it has to do with the htaccess but I don't quite understand how to deal with that in cPanel.
What should I do?
The error log shows something like this:
[Sat Sep 10 15:10:39 2011] [error] [client 125.163.228.77] File does not exist: /home/publicusername/public_html/404.shtml
[Sat Sep 10 15:10:39 2011] [error] [client 125.163.228.77] File does not exist: /home/publicusername/public_html/favicon.ico
[Sat Sep 10 15:10:39 2011] [error] [client 125.163.228.77] File does not exist: /home/publicusername/public_html/500.shtml
[Sat Sep 10 15:10:39 2011] [alert] [client 125.163.228.77] /home/publicusername/public_html/public/.htaccess: Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration
[Sat Sep 10 15:09:58 2011] [error] [client 125.163.228.77] File does not exist: /home/publicusername/public_html/404.shtml
my public/htaccess
SetEnv APPLICATION_ENV production
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
I have set the SetEnv APPLICATION_ENV to SetEnv APPLICATION_ENV production in public/htaccess, but still failed.