i am developing a simple RESTful API on slim framework. I had no problem installing the slim framework on my local wamp server and it works just fine, but as I do the same on my website I get an 500 internal server error.
My httaccess file
RewriteEngine On
RewriteBase /slim/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
php_flag register_globals on
I need help, could someone please enlighten me on how to fix this problem?
If your web host is a CPanel one (a pretty good chance), it’s probably using SuPHP in which case any
php_flagorphp_valuedirectives in.htaccesswill trigger a 500 error.See http://blog.philipbrown.id.au/2009/08/php-suexec-and-custom-php-ini-files/
register_globalsis a terrible hack and one you definitely should not be using. If the framework requires it, choose a better framework.Update
The syntax on line #40 is using a PHP 5.3 anonymous function. Your web host is probably using a lower PHP version.
See the advice under Step 3: Define Routes section on this page.