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 file uploading!

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

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old August 25th, 2004, 5:31 PM   #1 (permalink)
Registered User
Seasoned Poster
 
Joined in Aug 2004
44 posts
Gave thanks: 0
Thanked 0 times
Question php file uploading!

Hi.

Please can you help I've just transfered my site to this hosting from another hosting company and I'm trying to fix up a php script for uploading a file but I'm not sure what I put on this line

copy($zipfile, "/hsphere/local/home/sharonq2/creaturesinc.com/downloads/creatures/$Uzipfile");

What do I replace the path with on this server? so my downloads will go to the correct folder?
SharonQ25 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 25th, 2004, 5:39 PM   #2 (permalink)
Surpass Fan
Seasoned Poster
 
klasiphyd's Avatar
 
Joined in Jul 2004
Hosted on Sync
65 posts
Gave thanks: 0
Thanked 2 times
Your $home is /home/<username>. Your webfiles are in /home/<username>/public_html. So maybe:
/home/sharonq2/public_html/downloads/creatures/$Uzipfile
If sharonq2 is your username, and the rest of the path is where you want it.
__________________
The early bird may get the worm, but the second mouse gets the cheese.
.:. Sync .:. OC5 .:.
klasiphyd is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 25th, 2004, 5:42 PM   #3 (permalink)
Registered User
Seasoned Poster
 
Joined in Aug 2004
44 posts
Gave thanks: 0
Thanked 0 times
Quote:
Originally Posted by klasiphyd
Your $home is /home/<username>.
Sorry if this sounds dumb but I don't quite get what you mean.
SharonQ25 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 25th, 2004, 5:44 PM   #4 (permalink)
Surpass Fan
Seasoned Poster
 
klasiphyd's Avatar
 
Joined in Jul 2004
Hosted on Sync
65 posts
Gave thanks: 0
Thanked 2 times
I assume your wanting to know what your home directory path is, since it's different then what it was with your last host. Your home directory path is /home/<yourusername> and your website files are in /home/<username>/public_html. Does that help?
__________________
The early bird may get the worm, but the second mouse gets the cheese.
.:. Sync .:. OC5 .:.
klasiphyd is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 25th, 2004, 5:48 PM   #5 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
Quote:
Originally Posted by SharonQ25
Hi.

Please can you help I've just transfered my site to this hosting from another hosting company and I'm trying to fix up a php script for uploading a file but I'm not sure what I put on this line

copy($zipfile, "/hsphere/local/home/sharonq2/creaturesinc.com/downloads/creatures/$Uzipfile");

What do I replace the path with on this server? so my downloads will go to the correct folder?
try this:

copy($zipfile, "/home/sharonq2/public_html/downloads/creatures/$Uzipfile")

That should work if:

your user name is sharonq2, and you have ONE domain on the server, located in the Public_Html directory.

John
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 25th, 2004, 5:55 PM   #6 (permalink)
Registered User
Seasoned Poster
 
Joined in Aug 2004
44 posts
Gave thanks: 0
Thanked 0 times
Ok, thanks guys, I'll go give it a go right now.
SharonQ25 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 25th, 2004, 7:35 PM   #7 (permalink)
Registered User
Seasoned Poster
 
Joined in Aug 2004
44 posts
Gave thanks: 0
Thanked 0 times
It's me again.

What does this mean I got it when I tried to upload a file with the above path

Warning: copy(/home/simsbou/public_html/downloads/7f4eaad8_PinkTracksuit.zip): failed to open stream: Permission denied in /home/simsbou/public_html/filestored.php on line 59

Warning: copy(/home/simsbou/public_html/downloads/7f4eaad8_PinkTracksuit.jpg): failed to open stream: Permission denied in /home/simsbou/public_html/filestored.php on line 68
SharonQ25 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 25th, 2004, 7:38 PM   #8 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
That means that you have to set the proper permissions on the downloads directory - or perhaps there is no downloads directory yet?
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 25th, 2004, 7:39 PM   #9 (permalink)
Registered User
Seasoned Poster
 
Joined in Aug 2004
44 posts
Gave thanks: 0
Thanked 0 times
There is a downloads directory and it's set at 755 is that the wrong setting?
SharonQ25 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