HELP! Error - Fatal error: Unknown: Failed opening required

Hi everyone,

I’m new to this forum, and new to all things websites for that matter! I’ve got a website that has suddenly started giving me the following 3 error messages, but was working fine before, no coding changes have happened from this end (changed the username in the path, otherwise errors are as they appear):

[i][b]Warning: Unknown: open_basedir restriction in effect. File(/home/username/public_html/framework/main.php) is not within the allowed path(s): (0) in Unknown on line 0

Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0

Fatal error: Unknown: Failed opening required ‘/home/username/public_html/framework/main.php’ (include_path=’.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php’) in Unknown on line 0[/b][/i]

I have checked the permissions on the main.php file - they are set as 0644. I have downloaded via FTP and am able to view/edit main.php. Unfortunately I have no idea where to go from here. The person who originally setup the website for us is no longer contactable and we don’t know what to do! Any suggestions would be MUCH appreciated, just be mindful you are dealing with an absolute beginner!

Thanks in advance!

Sounds like a suexec error. If so, it’s telling you that the path $HOME/ is not permitted in its configuration. Check /etc/ for suexec directory or a config file starting with suexec and read the file and place your web directories in the correct paths.

Or disable/uninstall suexec, but make sure you’re sure of what you’d be doing.

Thanks for the reply. There was no suexec directory or any config file with suexec at all. Can I turn off suexec in cPanel? I believe there is reference to PHP suexec and Apache suexec.

Is this issue likely due to a server upgrade or other issue at the host end?

Just for future reference in case it helps someone else, the issue was in an environment.php file, it had these two flags:

ini_set(‘safe_mode’, ‘Off’);
ini_set(‘open_basedir’, ‘Off’);

having open_basedir set to off meant it wasn’t able to use any of the PHP files.

Sponsor our Newsletter | Privacy Policy | Terms of Service