sofree Posted August 11, 2014 Share Posted August 11, 2014 (edited) Hello! I upgraded Prestashop 1.6.0.6 -> 1.6.0.9 and now on every page load I saw in error.log file: [Mon Aug 11 23:32:01.520296 2014] [:error] [pid 29189] PHP Warning: tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/html/prestashop) in /var/www/html/prestashop/www/classes/PrestaShopAutoload.php on line 151[Mon Aug 11 23:32:01.520560 2014] [:error] [pid 29189] Cannot write temporary file[Mon Aug 11 23:32:02.116625 2014] [:error] [pid 29215] PHP Warning: tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/html/prestashop) in /var/www/html/prestashop/www/classes/PrestaShopAutoload.php on line 151[Mon Aug 11 23:32:02.116823 2014] [:error] [pid 29215] Cannot write temporary file[Mon Aug 11 23:38:23.750937 2014] [:error] [pid 30307] PHP Warning: tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/html/prestashop) in /var/www/html/prestashop/www/classes/PrestaShopAutoload.php on line 151[Mon Aug 11 23:38:23.751080 2014] [:error] [pid 30307] Cannot write temporary file[Mon Aug 11 23:38:24.180804 2014] [:error] [pid 30308] PHP Warning: tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/html/prestashop) in /var/www/html/prestashop/www/classes/PrestaShopAutoload.php on line 151 I examined source code and I think I found a bug. For example I added after 151 line: error_log($filename);error_log(dirname($filename)); And log now looks: [Mon Aug 11 23:43:48.392805 2014] [:error] [pid 31257] PHP Warning: tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/html/prestashop) in /var/www/html/prestashop/www/classes/PrestaShopAutoload.php on line 151[Mon Aug 11 23:43:48.393787 2014] [:error] [pid 31257] /var/www/html/prestashop/wwwcache/class_index.php[Mon Aug 11 23:43:48.394011 2014] [:error] [pid 31257] /var/www/html/prestashop/wwwcache[Mon Aug 11 23:43:48.394172 2014] [:error] [pid 31257] Cannot write temporary file WARNING! no slash after www. Actual: /var/www/html/prestashop/wwwcache/class_index.php Expected: /var/www/html/prestashop/www/cache/class_index.php I found related bug in bug tracking system: https://github.com/PrestaShop/PrestaShop/commit/664705149641661c494779ac197749239d916b42 Why you do not fixed? If this persist in many installations, error.log file grow and grow... And unfortunately file class_index.php doesn't created anymore. Edited August 12, 2014 by sofree (see edit history) 1 Link to comment Share on other sites More sharing options...
benjamin utterback Posted August 13, 2014 Share Posted August 13, 2014 Hi Sofree, this thread should solve your issue. If so, please update this thread so we can mark as solved. Thank you! http://www.prestashop.com/forums/topic/349796-solved-1609-class-indexphp-has-disappeared/ 2 Link to comment Share on other sites More sharing options...
sofree Posted August 13, 2014 Author Share Posted August 13, 2014 Hello. I confirm. No spam in error.log anymore. But, why so complicated function normalizeDirectory? Simplest variant: private function normalizeDirectory($directory) { return rtrim($directory, "/\"") . DIRECTORY_SEPARATOR; } Think about it! Link to comment Share on other sites More sharing options...
Recommended Posts