Control Web Panel

WebPanel => PHP => Topic started by: polodon242 on February 22, 2020, 07:47:57 PM

Title: PHP Not Working
Post by: polodon242 on February 22, 2020, 07:47:57 PM
Im not sure if missed something but with everything on default im able to view .html files with no problem but when i try to view a .php file extension im just getting a white blank page. Can someone help me with what maybe causing this issue or what to enable or install?

Title: Re: PHP Not Working
Post by: Sandeep on February 22, 2020, 08:08:46 PM
check the apache error log for the domain
http://wiki.centos-webpanel.com/service-log-paths
Title: Re: PHP Not Working
Post by: polodon242 on February 22, 2020, 08:19:45 PM
Okay will do this now
Title: Re: PHP Not Working
Post by: polodon242 on February 22, 2020, 08:24:36 PM
in my error_log is the below message

[Fri Feb 21 16:43:54.214346 2020] [mpm_event:notice] [pid 2145:tid 139752354682752] AH00489: Apache/2.4.39 (Unix) configured -- resuming normal operations
[Fri Feb 21 16:43:54.264129 2020] [core:notice] [pid 2145:tid 139752354682752] AH00094: Command line: '/usr/local/apache/bin/httpd'
[Fri Feb 21 22:26:54.391154 2020] [mpm_event:notice] [pid 2145:tid 139752354682752] AH00491: caught SIGTERM, shutting down
Title: Re: PHP Not Working
Post by: Sandeep on February 22, 2020, 08:29:58 PM
check
/usr/local/apache/domlogs/DOMAIN.COM.error.log
Title: Re: PHP Not Working
Post by: polodon242 on February 22, 2020, 10:18:21 PM
Okay ive managed to get everything sorted but now im facing a 403 Forbidden Error "You don't have permission to access / on this server.". What would be the best way to fix and correct this?
Title: Re: PHP Not Working
Post by: pixelpadre on February 22, 2020, 11:00:35 PM
you can turn off mod sec and firewall and that will tell you if that is the problem

Also, have you tried user accounts. Fix permissions.?
Title: Re: PHP Not Working
Post by: pixelpadre on February 22, 2020, 11:02:46 PM
Also most likely htaccess is your problem.  rename it and try loading the page.
Title: Re: PHP Not Working
Post by: polodon242 on February 22, 2020, 11:29:44 PM
When fixing the permission, should i leave it set to nobody with the options checked?
    User: nobody or nextuser
    Fix Account Permission: Checked
    Internal Server Error: Checked
    Remove AddHandler: Unchecked

I've disabled Mod Security via uninstall and left OWASP old to on.
Title: Re: PHP Not Working
Post by: polodon242 on February 22, 2020, 11:34:36 PM
Now im facing a 404 Not Found Error if i disable the .htaccess file but if i enable it im facing a 500 Internal Server Error.
Title: Re: PHP Not Working
Post by: pixelpadre on February 23, 2020, 12:01:02 AM
do the fix permissions again but do not use nobody.  and click on the first box.
Title: Re: PHP Not Working
Post by: polodon242 on February 23, 2020, 12:07:56 AM
Okay ive managed to get everything up 100% now thanks!