403 Error with PHP JavaBridge and Apache
When I try to reach a test php page, I'm getting the following error on a PHP debug screen:
Fatal error: HTTP Status 403 – Forbidden
Can you help me find a solution?
I haven't tried running JavaBridge with Apache myself, but I've done some research on this issue and found some resources that might be helpful.
403 Errors on Apache
Hey there, you might find the troubleshooting steps in this Stack Overflow post helpful:
You want to ensure that:
- Apache can physically access the file (the user that run apache, probably www-data or apache, can access the file in the filesystem).
- Apache can list the content of the folder (read permission).
- Apache has a "Allow" directive for that folder. There should be one for /var/www/, you can check default vhost for example.
- Additionally, you can look at the error.log file (usually located at /var/log/apache2/error.log) which will describe why you get the 403 error exactly.
Finally, you may want to restart apache. This can be generally done with:
On some systems, the script will be called httpd. For example, on a distribution using systemd:
sudo systemctl restart httpd.service
I also found these resources regarding JavaBridge which would likely help you find a solution beyond the above troubleshooting steps:
- Make sure your version of PHP is supported