PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today.

ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!
Download and Activate to enter!

Intel® Graphics Performance Analyzers is a powerful tool suite for analyzing and optimizing your games, media, and graphics-intensive applications. Used by some of the best developers on the planet, Intel GPA lets you maximize your app’s performance.


Tutorials
| Forums

Download to Enter
| Contest Rules

DOWNLOAD INTEL® GPA FOR FREE

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 December 9th, 2003, 09:53 AM
georgeatef's Avatar
georgeatef georgeatef is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 385 georgeatef User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 3 h 57 m 49 sec
Reputation Power: 9
did anyone see my up-loaded files?!!

I have an upload problem, and here is my code:

PHP Code:
<form enctype="multipart/form-data" action="upload.php" method="POST">
<
input type="hidden" name="MAX_FILE_SIZE" value="30000">
Send this file: <input name="userfile" type="file">
<
input type="submit" value="Send File">
</
form>
 
<?
php
        
print "Information about your file: <pre>";
        
print_r ($_FILES['userfile']);
        print 
"</pre>";
?> 


after submitting it shows:

Code:

Information about your file: 

Array
(
    [name] => Jesus.jpg
    [type] => image/pjpeg
    [tmp_name] => /var/tmp/phpgYkScI
    [error] => 0
    [size] => 4649
)


and in my php.ini the setup is as follows:

Code:

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = /tmp

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M


and i went to either /tmp folder or /var/tmp/ and find nothing,
CHMOD for both is 711

where could be the files loaded?

Thanks
__________________
yours,
George

Last edited by georgeatef : December 10th, 2003 at 10:02 AM.

Reply With Quote
  #2  
Old December 9th, 2003, 10:27 AM
Stew_McGruff's Avatar
Stew_McGruff Stew_McGruff is offline
PHP Wacko
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Sep 2003
Location: Washington DC
Posts: 1,310 Stew_McGruff User rank is Major (30000 - 40000 Reputation Level)Stew_McGruff User rank is Major (30000 - 40000 Reputation Level)Stew_McGruff User rank is Major (30000 - 40000 Reputation Level)Stew_McGruff User rank is Major (30000 - 40000 Reputation Level)Stew_McGruff User rank is Major (30000 - 40000 Reputation Level)Stew_McGruff User rank is Major (30000 - 40000 Reputation Level)Stew_McGruff User rank is Major (30000 - 40000 Reputation Level)Stew_McGruff User rank is Major (30000 - 40000 Reputation Level)Stew_McGruff User rank is Major (30000 - 40000 Reputation Level)Stew_McGruff User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 2 Weeks 6 Days 14 h 8 m 15 sec
Reputation Power: 334
After the script is done running, the uploaded file is removed from the temporary directory, that is why you cannot find it.

Read this page on how to handle file uploads.
__________________
"I'm working so I won't have to try so hard" - the strokes

security articles I recommend:
SQL Injection Attacks
XSS
CSRF
Little Bobby Tables

Reply With Quote
  #3  
Old December 10th, 2003, 03:01 AM
georgeatef's Avatar
georgeatef georgeatef is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 385 georgeatef User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 3 h 57 m 49 sec
Reputation Power: 9
Thanks for the reply,

I've read that link before i start, but i want to make sure that what i did is right? why it is removed from the temp directory, and why the variable $_FILE[tmp_name] => /var/tmp/phpgYkScI points to another path?

can any one answer me please?

Reply With Quote
  #4  
Old December 10th, 2003, 06:28 AM
georgeatef's Avatar
georgeatef georgeatef is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 385 georgeatef User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 3 h 57 m 49 sec
Reputation Power: 9
I did modification but also, i can't find my uploaded files!

PHP Code:
if (isset($_FILES['userfile'])){
                
chmod("/usr/local/etc/httpd/htdocs/leila/uploaded"'0644');
                
move_uploaded_file($_FILES['userfile']['tmp_name'], "/usr/local/etc/httpd/htdocs/leila/uploaded");
                print 
"loaded";
                }
                else {
                    print 
"not loaded";
                } 


any ideas?

Reply With Quote
  #5  
Old December 10th, 2003, 10:05 AM
georgeatef's Avatar
georgeatef georgeatef is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 385 georgeatef User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 3 h 57 m 49 sec
Reputation Power: 9
what is the mistake i've done? where should my uploaded files be?

can any one help me?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > upload_tmp_dir = /tmp


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 - 2012, Jelsoft Enterprises Ltd.

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