icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » PHP FTP Help

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old November 14th, 2005, 6:06 PM   #10 (permalink)
Demontech Hosting CEO
Excelling Contributor
 
demontech's Avatar
 
Joined in Oct 2004
Lives in Stockholm, Sweden
Hosted on PASS39
744 posts
Gave thanks: 0
Thanked 3 times
Hey, I use /tmp as temp dir for upload without any problems. You shoud check your php settings maybe one or another setting is wrong.
__________________
Sincerely,
Demon

High Quality Hosting Service Provided By
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
demontech is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 14th, 2005, 6:33 PM   #11 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
Well if the ftp_username for each user doesn't have an existing folder within the uploadsystem folder, that might be why you get the error in the case with "brandon". Maybe you could create a folder temp_uploads, and the destination could be

$destination = $workingdir . "/temp_uploads/" . $_SESSION['ftp_username'] ."_". basename($tmpname);

that would append the username to the new filename instead of tmpname being a file in the username folder (which doesn't exist, I'm assuming)
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 14th, 2005, 8:49 PM   #12 (permalink)
Surpass Fan
Comfy Contributor
 
HostGlory's Avatar
 
Joined in May 2004
Lives in South Dakota
Hosted on Liquid
132 posts
Gave thanks: 0
Thanked 0 times
Yes, I do have a folder created for that username. And all users of this program will have their own folder for their username. And, I am using my /tmp folder for uploads, so that shouldn't be a problem.
__________________
Thanks!
Brandon

Dedicated Servers:
liquid.hostglory.com

www.modmyspace.com
www.uploadsystem.com
HostGlory is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 14th, 2005, 9:25 PM   #13 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
I just noticed something...

"/home/phpconsu/uploadsystem/brandon/phpnZS4UC" is where it's trying to move the file to instead of "/home/phpconsu/public_html/uploadsystem/brandon/phpnZS4UC"

minor path error
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 14th, 2005, 10:11 PM   #14 (permalink)
is scientific.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,117 posts
Gave thanks: 8
Thanked 34 times
yeah, you left out the /public_html/ part

good eye
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 14th, 2005, 10:31 PM   #15 (permalink)
Surpass Fan
Comfy Contributor
 
HostGlory's Avatar
 
Joined in May 2004
Lives in South Dakota
Hosted on Liquid
132 posts
Gave thanks: 0
Thanked 0 times
Ok, it all finally works! Thanks for all the help!
__________________
Thanks!
Brandon

Dedicated Servers:
liquid.hostglory.com

www.modmyspace.com
www.uploadsystem.com
HostGlory is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 14th, 2005, 10:44 PM   #16 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
Great, glad you got that resolved.
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 17th, 2005, 5:59 PM   #17 (permalink)
Surpass Fan
Comfy Contributor
 
HostGlory's Avatar
 
Joined in May 2004
Lives in South Dakota
Hosted on Liquid
132 posts
Gave thanks: 0
Thanked 0 times
I'm resurrecting this post again. I now need help on chmodding a directory, since now I can't upload files to my folders unless the users have correct folder permissions.

Here's the warning I'm getting:
Warning: ftp_site(): Could not change perms on /home/phpconsu/public_html/uploadsystem/brandon/pictures: No such file or directory in /home/phpconsu/public_html/uploadsystem/include/classes.inc.php on line 327

And here is the code:
PHP Code:
function ftpmkdir($directory$fullpath)
        {
        if(
ftp_mkdir($this->CONN_IDftp_pwd($this->CONN_ID) . "/" $directory))
            {
            if(
ftp_site($this->CONN_ID"CHMOD 0777 "$fullpath $directory))
                    {
                    
message("Successfully created directory: " .  ftp_pwd($this->CONN_ID) . "/" $directorynull);
                    }
                else
                    {
                    
message("Directory was created, but unable to chmod.  Please contact support!", @$php_errormsg);
                    }
            }
        else
            {
             
message("Couldn't create directory: " .  ftp_pwd($this->CONN_ID) . "/" $directory, @$php_errormsg);
            }
        } 
__________________
Thanks!
Brandon

Dedicated Servers:
liquid.hostglory.com

www.modmyspace.com
www.uploadsystem.com
HostGlory is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 17th, 2005, 6:09 PM   #18 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
Out of your 3 custom response messages, which one are you receiving?

Also, is the working directory in ftp_pwd($connection) the same as the full path?
i.e. ftp_pwd($this->CONN_ID) .'/' == $fullpath ?
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On