Reputation: 6196
I have created APIs using SLIM framework. These APIs are running correct when i run these APIs in PHP 5.3 But when i run these on a system which has PHP 5.2 then these do not work.
These is a file named .htaccess which is creating problem in PHP 5.2.
This following is code of .htaccess file
RewriteEngine On
# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-d
Please tell me what should i do to run my APIs in PHP 5.2 also
Thank you in advance.
Upvotes: 0
Views: 1441
Reputation: 21541
Are you 100% sure it's the .htaccess file that is the problem?
It sounds to me like its a PHP problem as you say it doesn't work when using a lower version.
Slim uses anonymous functions a lot in it's examples, if your using them in your application then they won't be supported in PHP < 5.3.
http://www.slimframework.com/read/hello-world
Edit
Judging from your previous question and sample code, this is the actual case.
Upvotes: 1