GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 07-Apr-2005, 04:36
dmadd9 dmadd9 is offline
New Member
 
Join Date: Apr 2005
Posts: 1
dmadd9 is on a distinguished road

Uploading error: permission problems


Hi, it's my first post here.
Thanx for this forum.

I need to upload a file to my home site. Now I'm trying it locally with apache 1.3.29 on win xp, php 4.1.3 and mysql

The server tells me that:

Warning: Unable to create 'upload/': Permission denied in e:\programmi\apache group\apache\websites\dalla\sito\do_upload.php on line 18

Warning: Unable to create 'upload/': Permission denied in e:\programmi\apache group\apache\websites\dalla\sito\do_upload.php on line 23

Warning: Unable to move '/tmp\phpAC.tmp' to 'upload/' in e:\programmi\apache group\apache\websites\dalla\sito\do_upload.php on line 23

The code is:

PHP Code:

<?php 

//mkdir ("upload/", 0777);
chmod("upload/", 0777);
print_r($HTTP_POST_FILES['scheda']['tmp_name']);

// In PHP 4.1.0 or later, $_FILES should be used instead of $HTTP_POST_FILES.
if (is_uploaded_file($HTTP_POST_FILES['scheda']['tmp_name'])) {
    copy($HTTP_POST_FILES['scheda']['tmp_name'], "upload/");
} else {
    echo "Possible file upload attack. Filename: " . $HTTP_POST_FILES['scheda']['name'];
}
/* ...or... */
move_uploaded_file($HTTP_POST_FILES['scheda']['tmp_name'], "upload/");
?>


I tried to create with php and before launching php script the upload/ dir, but the same error occurs.

do you know why?

best regards

dm
  #2  
Old 23-Apr-2005, 14:56
cyner cyner is offline
New Member
 
Join Date: Apr 2005
Posts: 4
cyner is on a distinguished road
You need to set the access rights outside of your php script first. Make sure the directory in which you want to create a new directory has writing access for every user (or at least your web server user).
 
 

Recent GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Made program in Java, trying C++ now, file i/o problems technickel C++ Forum 4 19-Feb-2005 00:32
More Reading in problems swayp C++ Forum 7 27-Jan-2005 13:27
GeForce FX 5600 problems Peacemaker Computer Hardware Forum 24 18-Jul-2004 05:50
Chaintech Geforce 5600 FX problems bartster74 Computer Hardware Forum 8 04-May-2004 13:16
CD Burner problems dan_wood Computer Hardware Forum 3 27-Nov-2003 19:12

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:28.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.