Hi, I have some problems with using the mkdir() function on my LAMP stack. When I use it, the function does not work (i.e. it does not create any folder). It does not show any error message as well. Also, when I tried using the mkdir shell using the shell_exec() in PHP, it did not work. I thought it could be because of Permissions on the Apache directory folder and my project folder. I changed the permission of /var/www/html/PHP (my project folder) to 0777 and it still didn't work. Need help urgently!
Hi netload, I did as you said and got the following error: Warning: mkdir(): Permission denied in /var/www/html/cut/index.php on line 39 After this I changed the ownership and the group ownership of the /var/www/html/cut folder to apache. It still does not work.
Have you tried chmod the folder to 777? Maybe your webserver doesn't use the user "apache", sometimes it can be "http".
I tried chmod 777 and I also checked the user by executing the whoami command through the shell_exec(). It says its apache. Also, I changed the ownership and group ownership of the directory to apache. It still doesn't work.