My problem is that when I send my php file as root to the htdocs directory it appears as this.
root mustafa # sudo cp programa.php /opt/lampp/htdocs/archivos
The php file appears with a big X on top, and when I try to execute it from XAMPP it says:
Warning: Unknown: failed to open stream: Permiso denegado in Unknown on line 0
Fatal error: Unknown: Failed opening required '/opt/lampp/htdocs/Examen/registro.php' (include_path='.:/opt/lampp/lib/php') in Unknown on line 0
I bet that it is the issue with permissions. Since you are using sudo to copy, i will assume that it is your home directory that you are copying it from and you've created the file with your user.
There are several ways to resolve this, the quickest would be to make the file world readable. You can do that by running
chmod a+r progma.php
A better way would be to find out what group does the server run under, often that would be group 'web', and then you would do:
chgrp web progma.php && chmod g+r progma.php
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments