Jump to content
henkbart

Errors after installing Prestashop 1.5.6.1

Recommended Posts

After installing PS 1.5.6.1 i got the following errors:

 

[Wed Nov 20 00:10:06 2013] PHP Warning:  is_dir(): open_basedir restriction in effect. File/httpdocs/modules/.htaccess/) is not within the allowed path(s): (/httpdocs/:/tmp/) in /httpdocs/classes/module/Module.php on line 1261, referer: http://shop3.signalsoft.nl/admin9197/index.php?controller=AdminModules&token=9222af6f57063109da1331d2861d8200
[Wed Nov 20 00:10:06 2013] PHP Warning:  is_dir(): open_basedir restriction in effect. File(/httpdocs/modules/index.php/) is not within the allowed path(s): (/shop3/httpdocs/:/tmp/) in /httpdocs/classes/module/Module.php on line 1261, referer: http://shop3.signalsoft.nl/admin9197/index.php?controller=AdminModules&token=9222af6f57063109da1331d2861d8200

 

I didn't had them in 1.5.6.0

 

Is this a bug or......
 

Edited by henkbart (see edit history)

Share this post


Link to post
Share on other sites

Edit classes/module/Module.php on line 1261 and add @

 

if (@is_dir(_PS_MODULE_DIR_.$name.DIRECTORY_SEPARATOR) && Tools::file_exists_cache(_PS_MODULE_DIR_.$name.'/'.$name.'.php'))

  • Like 2

Share this post


Link to post
Share on other sites

In PHP, prefixing a function call with '@' hides any errors returned by that call.  This is not good practice.  Better practice is to handle the error in the code.  However in this case, I believe the problem is with settings in your php.ini.  Some webhosts sadly do not allow you to maintain a php.ini in your domain.

Edited by JayBEE (see edit history)

Share this post


Link to post
Share on other sites

I think it's an error :

 

line with problem in  1.5.6.1 :

 

            if (is_dir(_PS_MODULE_DIR_.$name.DIRECTORY_SEPARATOR) && Tools::file_exists_cache(_PS_MODULE_DIR_.$name.'/'.$name.'.php'))

 

same line on 1.5.6.0

 

            if (is_dir(_PS_MODULE_DIR_.$name) && Tools::file_exists_cache(_PS_MODULE_DIR_.$name.'/'.$name.'.php'))

 

Le .DIRECTORY_SEPARATOR (/) appliqué au fichier .htaccess pose problème !!

 

 

So, as JayBEE said, it's not a good idea to put @, because it only hide the error

I think it's better to take back the line in 1.5.6.0

Share this post


Link to post
Share on other sites

Hello, I have the same problem after updating from 1.5.1 to 1.5.6.

 

I correct the problem by adding the following line on classes/module/Module.php :

// Line 1261
// Start Patch
if(is_file(_PS_MODULE_DIR_.$name)){
    continue;
}
// End of Patch

if (is_dir(_PS_MODULE_DIR_.$name.DIRECTORY_SEPARATOR) && Tools::file_exists_cache(_PS_MODULE_DIR_.$name.'/'.$name.'.php'))
  • Like 1

Share this post


Link to post
Share on other sites

Had the same problem, went back to 1.5.6.0 and now it works again

Share this post


Link to post
Share on other sites

The question is: if this is an error, will it be fixed in PS 1.5.6.2 or 1.5.7 ....?

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More