Damian2Cubed

Member
Sep 28, 2018
13
1
3
Ireland
cPanel Access Level
Root Administrator
Hi all,

I have strange issue with one of the accounts on my WHM.

This is the only account affected.

Issue:
I am running Wordpress 5.2.2 (just like other accounts on this server) - I have some custom work to do with the site and it requires to create custom .php files. These files which I need to use across the site are returning 404 not found. I tested the same files on other accounts on this server and this is only happening on this account.

Things I tried:
- Update permalinks in wordpress
- Rename htaccess
- Revert htaccess to default
- Change settings in php.ini
- Move the file around inc. root directory

cPanel error:
SoftException in Application.cpp:267: File "/home/tackpackaging/public_html/phpinfo.php" is writeable by group


HTACCESS:
Code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /
   RewriteRule ^index\.php$ - [L]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule . /index.php [L]
</IfModule>

# END WordPress


# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
   AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation)
<IfModule php7_module>
   php_flag display_errors Off
   php_value max_execution_time 30
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 32M
   php_value post_max_size 8M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php72"
   php_value upload_max_filesize 2M
   php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors Off
   php_value max_execution_time 30
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 32M
   php_value post_max_size 8M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php72"
   php_value upload_max_filesize 2M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit
PHP.ini
Code:
; cPanel-generated php ini directives, do not edit
; Manual editing of this file may result in unexpected behavior.
; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
; For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation)

allow_url_fopen = Off
allow_url_include = Off
display_errors = Off
enable_dl = Off
file_uploads = On
max_execution_time = 30
max_input_time = 60
max_input_vars = 1000
memory_limit = 32M
post_max_size = 8M
session.gc_maxlifetime = 1440
session.save_path = "/var/cpanel/php/sessions/ea-php72"
upload_max_filesize = 2M
zlib.output_compression = Off
.user.ini
Code:
; cPanel-generated php ini directives, do not edit
; Manual editing of this file may result in unexpected behavior.
; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
; For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation)


display_errors = Off
max_execution_time = 30
max_input_time = 60
max_input_vars = 1000
memory_limit = 32M
post_max_size = 8M
session.gc_maxlifetime = 1440
session.save_path = "/var/cpanel/php/sessions/ea-php72"
upload_max_filesize = 2M
zlib.output_compression = Off
 
Last edited by a moderator:

Cake

Registered
Jun 25, 2019
2
2
3
Austin, TX
cPanel Access Level
DataCenter Provider
This has to due with how the wordpress redirects are handled. Adding a "ErrorDocument 401 default" to the top of your .htaccess can fix the issue sometimes. If that does not do it, you can add a rewrite condition to allow the custom files to exit the redirect rule.

As for -
SoftException in Application.cpp:267: File "/home/tackpackaging/public_html/phpinfo.php" is writeable by group

This typically means that you're using permissions higher than 644 for the file.
 

nixuser

Well-Known Member
May 30, 2014
149
37
28
nixuser.com
cPanel Access Level
Root Administrator
Twitter
I am running Wordpress 5.2.2 (just like other accounts on this server) - I have some custom work to do with the site and it requires to create custom .php files. These files which I need to use across the site are returning 404 not found. I tested the same files on other accounts on this server and this is only happening on this account.
Other accounts have wordpress installed in them?