shopimport.nl Posted January 9, 2012 Share Posted January 9, 2012 I installed prestashop 1.5 beta 2 and in admin couldn't get Ajax working. The symptom is that it keeps showing 'Loading...' when for example trying to show categories caused by open_basedir. I isolated the issue to a warning which corrupted the ajax output. file_exists() [<a href='function.file-exists'>function.file-exists</a>]: open_basedir restriction in effect. File(/home/demo/domains/demo.com/public_html/shop15/admin-dev/themes/index.php/admin.css) is not within the allowed path(s): (/home/demo/:/tmp:/var/tmp:/usr/local/lib/php/) in <b>/home/demo/domains/demo.com/public_html/shop15/admin-dev/init.php</b> on line <b>71</b><br /> It's related to open_openbase setting in directadmin. I don't want to switch off open_basedir! As you can see it looks ok that the file is within the /home/demo/ HOWEVER prestashop init.php tries to open a file (index.php) as a directory! Which is wrong (and took me some time before I noticed). I modified admin-dev/init.php line 72: foreach (scandir($path) as $theme) if ($theme[0] != '.' AND file_exists($path.$theme.'/admin.css')) { $employee->bo_theme = $theme; break; } and added the test is_dir($path.$theme), so the code is: foreach (scandir($path) as $theme) if ($theme[0] != '.' AND is_dir($path.$theme) AND file_exists($path.$theme.'/admin.css')) { $employee->bo_theme = $theme; break; } I couldn't make a bugfix account so I hope it's ok to report this PS1.5 beta issue here. Link to comment Share on other sites More sharing options...
Carl Favre Posted January 9, 2012 Share Posted January 9, 2012 Hi shopimport.nl, Thanks for your report. What would be even better is to also report it in the bug tracker, this way it is automatically assigned to a developper . Link to comment Share on other sites More sharing options...
Recommended Posts