File deletion trouble

Problems with the Windows version of XAMPP, questions, comments, and anything related.

File deletion trouble

Postby musicmaster » 12. March 2024 15:02

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?
musicmaster
 
Posts: 34
Joined: 07. July 2016 19:47
XAMPP version: latest
Operating System: Windows

Re: File deletion trouble

Postby Nobbie » 12. March 2024 20:18

Did you ask Prestashop Support? Is Prestashop tested and qualified for PHP 8.x?
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 188 guests