Hi, perhaps someone around here can help me.
I created a Slim project on my mac, which is an API which provides some data from MySql Database.
On my development machine (mac) it works find. I can request the API from front end Applications (which is an Android / IOs app) by sending a HTTP request to my mac’s IP address and add the route I defined via Slim Framework. To that point everything is fine.
Problem
To test the project on a server I chose a raspbian on a raspberry pi. I have set up apache web server, php and mysql on the debian machine. I can show a phpinfo(). Therefore I know that php and apache works fine.
Then I copied my project to the raspbians /var/www/html/ folder. But my API is not available now.
I enabled mod_rewrite. My .htaccess file looks like the one in the installation guide of the slim framework. In my apache2.conf file I changes AllowOverride option to “All” in the /var/www/ directory entry. Then restarted apache service.
My project structure is “pojectname/src/public/index.php” for the index file.
So the complete route to my index file is /var/www/html/pojectname/src/public/index.php.
It seems that Slim is not able to route to my methods…The code should be correct, due to the fact that same code works on dev machine. It seems to be a permission or configuration problem. Can someone provide some help?
Greetings