Error when loading PHP script
We are trying to get a php application running on cpanel and running into an error and the page is not loading and we are at a loss on how to resolve it.
In the CPanel Web server error log messages we are getting this error:
[proxy_fcgi:error] AH01071:Got error 'Unable to open primary script: /home/USER/public_html/webcalandar/html/portal/index.php (no such file or directory)'
After looking into this, we have attempted to create an include.conf file with an alias to point /portal to the path we need it to be which is /home/USER/public_html/webcalandar/html/portal/
/etc/apache2/conf.d/userdata/std/2_4/CPANELUSERNAME/DOMAIN.TLD/include.conf
We then realized FPM needs to be pointed to the path as well, and followed this guide to edit the yaml file https://support.cpanel.net/hc/en-us/articles/4403256459543-How-to-update-the-PHP-FPM-document-root-for-the-primary-domain
we edited the .yaml file for the domain to look like this:
---_is_present: 1
php_admin_value_doc_root: { name: 'php_admin_value[doc_root]', value: /home/USER/public_html/webcalandar/html/portal/ }
But that didn't help either.
Any assistance with how to resolve this error would be much appreciated.
-
Hey there! I'm a bit confused on why you would need an include file or any other customizations to get a PHP file working on a cPanel system. Does the index.php file at /home/USER/public_html/webcalandar/html/portal/ exist? That is the primary error that the script is detecting, so that's the first thing I would check. But in general, I wouldn't expect any custom work to be necessary to get a PHP script running in a cPanel environment.
0
Please sign in to leave a comment.
Comments
1 comment