[PHP] File upload problem - permission denied
Hello everybody, I am relatively new to PHP and for quite some days I am trying to get a file upload system going through a standard html form. To test it I use an html page called Test2.php with a form in it with enctype=\"multipart/form-data\". Here is the source code: Web site - pages form "; ?> It is a standard straight forward image upload situation. You see that the form directs to itself (action=\"Test2.php\") and on top of the page a simple instruction to see if the file uploads correctly. As far as I can see, this is correct code. Note that the any \\ are to escape "" and further \\ (necesary in echo "" statements). However, when I execute the page, I get the following error messages: Warning: Unable to create '/Web/Images/cartel_feria1.jpg': Permission denied in /Web/Test2.php on line 6 Warning: Unable to move '/tmp/php0jHeNE' to '/Web/Images/cartel_feria1.jpg' in /Web/Test2.php on line 6 It seems to say that I don't have permission to execute a file upload on that page. As you can see by the directory specifications this script runs on a Linux. However, I also tried the same script on a Windows machine, with the corresponding directory specifications of course, and with the same result: permission denied. What is wrong here, where do I set what type of permissions in order to get the file upload to work? By the way, in the php.ini FileUpload is set at yes. Kind regards, FRANS BAKKER -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] File upload problem - permission denied
All right then. ¿Where do I set that permission for PHP? On my local Windows machine it is usually in IIS. However the whole ..\inetpub\wwwroot\.. directory already has read and write permissions. Apart from PHP I use Cold Fusion. With Cold Fusion I don't have any permission problems... "Niklas lampén" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] Seems that php does not have write access to that directory. Set it right and it should work. Niklas P.S. Tip: It's much quicker to create plain html without echo. Just do it like , not like "; ?> :) -Original Message- From: Frans Bakker [mailto:[EMAIL PROTECTED] Sent: 27. helmikuuta 2003 15:43 To: [EMAIL PROTECTED] Subject: [PHP] File upload problem - permission denied Hello everybody, I am relatively new to PHP and for quite some days I am trying to get a file upload system going through a standard html form. To test it I use an html page called Test2.php with a form in it with enctype=\"multipart/form-data\". Here is the source code: Web site - pages form "; ?> It is a standard straight forward image upload situation. You see that the form directs to itself (action=\"Test2.php\") and on top of the page a simple instruction to see if the file uploads correctly. As far as I can see, this is correct code. Note that the any \\ are to escape "" and further \\ (necesary in echo "" statements). However, when I execute the page, I get the following error messages: Warning: Unable to create '/Web/Images/cartel_feria1.jpg': Permission denied in /Web/Test2.php on line 6 Warning: Unable to move '/tmp/php0jHeNE' to '/Web/Images/cartel_feria1.jpg' in /Web/Test2.php on line 6 It seems to say that I don't have permission to execute a file upload on that page. As you can see by the directory specifications this script runs on a Linux. However, I also tried the same script on a Windows machine, with the corresponding directory specifications of course, and with the same result: permission denied. What is wrong here, where do I set what type of permissions in order to get the file upload to work? By the way, in the php.ini FileUpload is set at yes. Kind regards, FRANS BAKKER -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL, Apache and UPDATE, INSERT and DELETE
Hello friends, Thanks for the help with the file upload, that has been solved by simply setting the write permissions on the corresponding directories. Another thing: I have developed my PHP application on a Windows machine with a MySQL server database. However, it was meant for a Linux server running Apache. Now it turns out that the results of SQL statements including UPDATE, DELETE or INSERT are not shown on the PHP page. To say it in another way: I have a form which after submitting performs an UPDATE, INSERT or DELETE, and I don't see their effects on the database on the results page. I have already checked that the mentioned database operations are carried out, but it is as if the pages are cashed in someway or that the server does not allow database updates to be shown on the browser. What phenomenon is this? I know that Apache has some peculiarities which has to do with setting security. I am not an expert in Apache, not to say I am a complete nitwit in Apache. Also, my script works perfectly on my Windows machine. Can somebody help me out please? Thank you, FRANS BAKKER -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL, Apache, SELECT, UPDATE etc. 2
Hello, In addition to my previous message the following: I have developed a PHP application on a Windows machine with a MySQL server database. However, it was meant for a Linux server running Apache, where it runs now. After checking with the server administrator it turns out that pages with SELECT statements are executed normally, while UPDATE, DELETE and INSERT statements are ignored. Contrarily to my previous message on this problem, it is not a cache problem or anything like that: the server simply doesn't accept UPDATE, DELETE and INSERT statements, though the server administrator assures me to have given the right permissions on the database. Is there anybody who can tell me what is wrong here? Kind regards, FRANS BAKKER -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php