Website php error

hi there,

i have a problem with a client website. there is a php error:

Warning: file_exists(): open_basedir restriction in effect. File(/definition.php) is not within the allowed path(s): (/home/.sites/778/site699/web:/home/.sites/778/site699/tmp:/usr/share/pear:/usr/bin/php_safemode) in /home/.sites/778/site699/web/wp-content/themes/pro/cornerstone/includes/classes/classic/elements/class-element-orchestrator.php on line 218 Warning: file_exists(): open_basedir restriction in effect. File(/definition.php) is not within the allowed path(s): (/home/.sites/778/site699/web:/home/.sites/778/site699/tmp:/usr/share/pear:/usr/bin/php_safemode) in /home/.sites/778/site699/web/wp-content/themes/pro/cornerstone/includes/classes/classic/elements/class-element-orchestrator.php on line 218 Warning: file_exists(): open_basedir restriction in effect. File(/definition.php) is not within the allowed path(s): (/home/.sites/778/site699/web:/home/.sites/778/site699/tmp:/usr/share/pear:/usr/bin/php_safemode) in /home/.sites/778/site699/web/wp-content/themes/pro/cornerstone/includes/classes/classic/elements/class-element-orchestrator.php on line 218 Warning: file_exists(): open_basedir restriction in effect. File(/definition.php) is not within the allowed path(s): (/home/.sites/778/site699/web:/home/.sites/778/site699/tmp:/usr/share/pear:/usr/bin/php_safemode) in /home/.sites/778/site699/web/wp-content/themes/pro/cornerstone/includes/classes/classic/elements/class-element-orchestrator.php on line 218 Warning: file_exists(): open_basedir restriction in effect. File(/definition.php) is not within the allowed path(s): (/home/.sites/778/site699/web:/home/.sites/778/site699/tmp:/usr/share/pear:/usr/bin/php_safemode)

i disabled all plugins => does not work
i changed the php version to 7.4 => does not work
i deleted pro (then error was gone) reinstalled the theme => error back

i added credentials for ftp and website in secure note.

thanks in advance for your help

Hello @deranaloge,

Thanks for writing to us.

The issue has been already addressed in the following thread.

You can follow what my colleague said in the above thread or you can follow this one. Base on your error, this is just a PHP warning and it would not harm your website. You are seeing that code because the WP_DEBUG was set to true. Please set the WP_DEBUG to false on your wp-config.php files to hide the warnings because it is just intended for debugging some code.

Hope that helps.
Thanks

hi prakash_s,

the wp_debug is allready false. i did read the thread allready and did look there. it is false.
can you help me further?

thanks

i know tried to import the backup that worked the first time.
the strange thing is: it does not work on the live server but it does work on my staging server

it is the same config.

i no wdid a clean isntall on the webserver and the website is working again. really strange
(deleting old site and database, made new db and installed the same backup that did not work before)

Hello @deranaloge,

I have added these codes to your wp-config.php file to disable the PHP warning.

define('WP_DEBUG', false);
define('WP_DEBUG_LOG', false);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);   

Please check your website now.

Thanks

ah okay so it was in the same minute. thanks it works now.
your lines of code did it.
so you know why this extra lines are necessary?

tanks again

Hey @deranaloge,

It is good to know that it is working now. The extra lines force the error not to display on the frontend and only display it on the file log.

Cheers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.