PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 5th, 1999, 06:05 AM
skunkel
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hello all,

I can't get the fileupload to work and I have no further idea.

my form looks like the standard example:


<form enctype="multipart/form-data" action="upload2_2.php3" method=POST>
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
Filename:
<input name="userfile" type="file">

<input type="submit" value=" Send File ">
</form>

and in upload2_2 the variable $userfile has the value /temp/phpxxxxxxx.

the upload2_2.php3 site looks like this:


<?
print"$userfile";
print"$userfile_name";
print"$userfile_size";
print"$userfile_type";
$dest="tmp/test.jpg";
copy($userfile, $dest);

?>

so far seems everything o.k. But I get the following Error:

Warning: SAFE MODE Restriction in effect. The script whose uid is 501 is not
allowed to access /tmp/php00508baa owned by uid 0 in
/usr/local/httpd/htdocs/bisoag/album/upload2_2.php3 on line 8

How can I solve this ? Im running apache on linux (SuSE 6.1) and the /temp
directory has 777 rights.


please help :-(


best regards
Sascha

eMail: skunkel@bisoag.de



Reply With Quote
  #2  
Old August 29th, 1999, 01:14 AM
esconsult1
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I had some crappy problem like that too.
Make sure the the ownerships on the tmp directory is the same as that run by the web server.

If that does not work, edit your php.ini file and select your own tmp directory!

Reply With Quote
  #3  
Old August 29th, 1999, 03:56 PM
Paul Cotton
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I had problems, mine were down to disk quota for the user 'web'.

Why is your setup running SAFE MODE though, I think that may be the problem as I think I read somewhere there are limitations when in this mode.

Reply With Quote
  #4  
Old September 12th, 1999, 12:57 PM
lacey
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
You can easily switch out of safe mode by editing your php.ini. Also, I doubt it makes any difference, but I use the line:

exec("cp $userfile /home/$usr/public_html/$userfile_name");

to save the file.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > php + file-upload

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap