3.60 open_basedir error

3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 25, 2023   (RSS)

By KennyH - July 24, 2023 - edited: July 24, 2023

I am updating installations to 3.60 and this error (x6) is showing up in the developer log. I don't see any adverse impact to the website or CMSB, but I am wondering if I can safely delete/ ignore these or do I need to make an adjustment to the server settings. - After further review, I get another 6 pack of errors every time I visit General Settings 

The error message specifically states that the file /usr/local/cpanel is not within the allowed paths defined in the open_basedir setting.

I am not using cPanel any longer - we switched to DirectAdmin about a year ago.

Warning: is_dir(): open_basedir restriction in effect. File(/usr/local/cpanel) is not within the allowed path(s): (/home/xxxxxxx/:/tmp/:/var/tmp/:/opt/alt/php81/usr/share/pear/:/dev/urandom:/usr/local/php81/lib/:/usr/local/php81/lib/:/usr/local/php74/lib/:/usr/local/php73/lib/:/usr/local/lib/php/)
/home/xxxxxxx/domains/xxxxxxxxx.com/public_html/webadmin/admin.php (line 46)
https://www.xxxxxxxxx.com/webadmin/admin.php?menu=admin&action=general

I noticed in 3.59 that the error/warning is under General Settings >> PHP Version

  • open_basedir restrictions: /home/xxxxxxx/:/tmp/:/var/tmp/:/opt/alt/php81/usr/share/pear/:/dev/urandom:/usr/local/php81/lib/:/usr/local/php81/lib/:/usr/local/php74/lib/:/usr/local/php73/lib/:/usr/local/lib/php/

Kenny

By Dave - July 24, 2023

Hi Kenny, 

Yea, that's a bug we'll have fixed in the next release.  The Admin > General screen checks for common server configurations so it can display helpful information.

You can disable that as follows:

  • Open cmsb/lib/serverInfo_functions.php
  • Search for is_dir
  • Add @ in front of is_dir like this: 
  • if (!@is_dir($dir)) { continue; } // suppress errors when directory is blocked by open_basedir restrictions

And/or feel free to ignore those errors.

Thanks for reporting this and sorry for any hassle! 

Dave Edis - Senior Developer
interactivetools.com