Reputation: 47
I try to move my Phalcon project from localhost(everything working there) to production server and I see 500 Internal Server Error. There is probably problem with .htaccess file
htaccess in base dir
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
htaccess in /public
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
</IfModule>
Edit: In error_log there are PHP Fatal error: Class 'Category' not found
$menu = new Category();
$this->view->menu = Category::find(array(
"order" => "cat_order ASC"
));
But in models directory I have category class. So every query is fatal error, because controller can not found models class.
Upvotes: 1
Views: 298
Reputation: 47
Solved. The problem was in case sensitivity.
On localhost I have latest version of Phalcon but on production server there was old version which is case sensitive
Upvotes: 1
Reputation: 482
When a class has not be found, then it could be that you need to run the composer install
, or composer dump-autoload
from the terminal. It could very well be that it will solve the problem.
Upvotes: 0