Page 1 of 1

File deletion trouble

PostPosted: 12. March 2024 15:02
by musicmaster
I have some trouble with the installation routine of Prestashop. It works with Xampp and PHP 7 and I get an error with PHP 8.

The problematic code is:
unlink(getcwd() . '/index.php');
unlink(getcwd() . '/prestashop.zip');
rename(getcwd() . '/index.php.temp', getcwd() . '/index.php');


The first line deletes a file and the third line renames a file to that name. Under PHP 8 the third line gets an "access denied" error. When I look afterwards in the file system the file has been deleted and the third line hasn't been executed.

Does anyone have an explanation for what is happening here?

Re: File deletion trouble

PostPosted: 12. March 2024 20:18
by Nobbie
Did you ask Prestashop Support? Is Prestashop tested and qualified for PHP 8.x?