Notice: CMSB v3.05 Beta 1 (May 23, 2016) - Free (Powered By) Version & New Admin Menus

12 posts by 4 authors in: Forums > CMS Builder
Last Post: May 26, 2016   (RSS)

  • Archived  

By northernpenguin - May 23, 2016

Hi Dave

I just installed the beta version and right away I got the following error (multiple times):

E_WARNING: is_file(): open_basedir restriction in effect. File(/usr/local/lib//php.exe) is not within the allowed path(s): (/home/sekaly:/usr/lib/php:/usr/local/lib/php:/tmp)

with the following backtrace info

#0  _errorlog_logErrorRecord() called at [/home/sekaly/public_html/cmsb/lib/errorlog_functions.php:60]
#1  _errorlog_catchRuntimeErrors()
#2  is_file() called at [/home/sekaly/public_html/cmsb/lib/menus/admin/backgroundTasks.php:85]
#3  _getPhpExecutablePath() called at [/home/sekaly/public_html/cmsb/lib/menus/admin/backgroundTasks.php:128]
#4  _getContent()
#5  call_user_func_array() called at [/home/sekaly/public_html/cmsb/lib/common.php:1877]
#6  ob_capture() called at [/home/sekaly/public_html/cmsb/lib/menus/admin/backgroundTasks.php:26]
#7  include(/home/sekaly/public_html/cmsb/lib/menus/admin/backgroundTasks.php) called at [/home/sekaly/public_html/cmsb/lib/admin_functions.php:441]
#8  showInterface() called at [/home/sekaly/public_html/cmsb/lib/menus/admin/actionHandler.php:407]
#9  admin_saveSettings() called at [/home/sekaly/public_html/cmsb/lib/menus/admin/actionHandler.php:38]
#10 admin_dispatchAction() called at [/home/sekaly/public_html/cmsb/lib/menus/admin/actionHandler.php:25]
#11 include(/home/sekaly/public_html/cmsb/lib/menus/admin/actionHandler.php) called at [/home/sekaly/public_html/cmsb/lib/menus/default/actionHandler.php:143]
#12 _redirectForCustomMenus() called at [/home/sekaly/public_html/cmsb/lib/menus/default/actionHandler.php:30]
#13 include(/home/sekaly/public_html/cmsb/lib/menus/default/actionHandler.php) called at [/home/sekaly/public_html/cmsb/admin.php:40]

Not exactly sure what is going on.

Ragi

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
  • Archived  

By Dave - May 23, 2016

Good catch, Ragi!

We added some code to the "Admin > Background Tasks" menu to display the full path the php executable to make it easier to setup cron jobs on systems with multiple installations of PHP.  We're checking if the PHP file exists so that's likely what's triggering the error.

open_basedir is a PHP feature that prevents php code from accessing files above a certain directory.  It can usually be disabled in php.ini, .htaccess, or .user.ini, but it looks like those may be being ignored on your server.

Can you try editing this file cmsb/lib/menus/admin/backgroundTasks.php and inside this function _getPhpExecutablePath() find this line (just search for "is_file") add the code in red: 

        if (@is_file($testPath) && @is_executable($testPath)) {

Let me know if that prevents the error from occurring.  Also, if you can email me CMS/FTP login details to dave@interactivetools.com I can see if we can add something for your specific server configuration that still detects the correct path (email, don't post login details to the forum).

Thanks!

Dave Edis - Senior Developer
interactivetools.com
  • Archived  

By northernpenguin - May 23, 2016

Dave:

Done.  No errors so far.  I have emailed you as requested.

Ragi

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
  • Archived  

By northernpenguin - May 23, 2016

Famous last words!  Logged in again and got the following:

E_WARNING: is_file(): open_basedir restriction in effect. File(///bin/php.exe) is not within the allowed path(s): (/home/sekaly:/usr/lib/php:/usr/local/lib/php:/tmp)

#0  _errorlog_logErrorRecord() called at [/home/sekaly/public_html/cmsb/lib/errorlog_functions.php:60]
#1  _errorlog_catchRuntimeErrors()
#2  is_file() called at [/home/sekaly/public_html/cmsb/lib/menus/admin/general.php:59]
#3  _getPhpExecutablePath() called at [/home/sekaly/public_html/cmsb/lib/menus/admin/general.php:952]
#4  _getContent()
#5  call_user_func_array() called at [/home/sekaly/public_html/cmsb/lib/common.php:1877]
#6  ob_capture() called at [/home/sekaly/public_html/cmsb/lib/menus/admin/general.php:22]
#7  include(/home/sekaly/public_html/cmsb/lib/menus/admin/general.php) called at [/home/sekaly/public_html/cmsb/lib/admin_functions.php:441]
#8  showInterface() called at [/home/sekaly/public_html/cmsb/lib/menus/admin/actionHandler.php:30]
#9  admin_dispatchAction() called at [/home/sekaly/public_html/cmsb/lib/menus/admin/actionHandler.php:25]
#10 include(/home/sekaly/public_html/cmsb/lib/menus/admin/actionHandler.php) called at [/home/sekaly/public_html/cmsb/lib/menus/default/actionHandler.php:143]
#11 _redirectForCustomMenus() called at [/home/sekaly/public_html/cmsb/lib/menus/default/actionHandler.php:30]
#12 include(/home/sekaly/public_html/cmsb/lib/menus/default/actionHandler.php) called at [/home/sekaly/public_html/cmsb/admin.php:40]

Ragi

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
  • Archived  

By Maurice - May 24, 2016

Works great,

We already worked that way! nice would be if we could give the buttons een different colour!

Greetz Maurice 

-------------------------------------------

Dropmonkey.nl
  • Archived  

By Dave - May 24, 2016 - edited: May 24, 2016

Hi Ragi, 

Thanks!  This code was duplicated in both general.php and backgroundTasks.php so I added the code in red to both places and it fixed it.  And for anyone else with this issue, just search for "is_executable" in those two files and add the code in red below: 

 if (@is_file($testPath) && @is_executable($testPath)) {

Your server is pretty locked down in that it has many PHP functions disabled (shell, exec, etc) and has open_basedir hardcoded to prevent accessing anything on the server outside of your user folder from PHP.  This should be fine for common usage, but will mean you can't use add-ons like CreatePDF that execute linux binaries.   You can see those issues in red here: admin.php?menu=admin&action=general#server-info

Thanks again, I'll get this patch in the next release.

Dave Edis - Senior Developer
interactivetools.com
  • Archived  

By Dave - May 24, 2016

Hi Maurice,

nice would be if we could give the buttons een different colour!

Like individually? How do you mean? 

Dave Edis - Senior Developer
interactivetools.com
  • Archived  

By northernpenguin - May 24, 2016

Thanks Dave

As for my server, that is not an issue as my provider is very accommodating.  Since my clients are the only ones on this server, I can request changes if needed.

Ragi

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
  • Archived  

By Maurice - May 25, 2016

Just 1 colour for the system buttons.

-------------------------------------------

Dropmonkey.nl