I've been trying to configure the FRAPI framework for the last three day on AWS. I have configured the admin panel without errors, but, for some reason, the API portion isn't work. I can, however, access the API homepage, which is pulling actions created in the admin panel. (See http://www.serverstars.net/)
Here's the odd thing: If I enter a non-existent action url, I get the FRAPI "ERROR_INVALID_ACTION_REQUEST" error. However, if I enter a real action url, I get a 500 error. (See http://www.serverstars.net/get/banned/36.json)
The Api virtual host config:
<VirtualHost *:80>
ServerName serverstars.net
ServerAlias www.serverstars.net
ServerAdmin [email protected]
DocumentRoot /var/www/frapi/src/frapi/public
<Directory /var/www/frapi/src/frapi/public>
AllowOverride All
Order deny,allow
Allow from All
</Directory>
</VirtualHost>
The .htaccess rewrite for /var/www/frapi/src/frapi/public
RewriteEngine On
RewriteRule ^.*$ index.php [QSA,NC,L]
I suspect that the RewriteRule is causing the problem, or maybe the MySQL conn, but I doubt the SQL connection would throw a 500 error.
Your help is greatly appreciated!!
By looking at other parts of your API, mainly the default API calls that are set, we can see that the rewrite-rules are working fine.
The problem is likely to reside in the model that is either selecting data from the mysql-query and puts it into the $this->data variable, or the problem resides between PHP and MySQL.
Whilst I can't give you a direct answer, I would suggest you look at the following:
If all fails, make sure you have logs on the apache side, and also look at the PHP error log. If you don't have php-error-logs enabled, add this to your php.ini:
error_log = /tmp/php_error_log
Now, this doesn't directly answer your question but hopefully it'll help you reach the answer you are looking for :-)