Check my script?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

I'm on a "shared IP" as well
User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

If the shared IP is a bad thing... I can always dedicate it..
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I see no harm in it........ why dont u try changing the directory to your root directory... see if that works
Last edited by John Cartwright on Wed Feb 18, 2004 11:07 pm, edited 1 time in total.
User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

Say again?

Be more specific.. I really do hate to delete/move things when they set them up.. o.o

cause
in the same "home directory"
theres
MonkeyBlast.com
and StickToons.com

both the sites i have on the server..
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

the root directory refers to

monkeyblastj.com/

and in most cases monkeyblastj.com/public_html
User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

so... You wan't me to add public_html to the monkeyblast.com folder??
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

if its not there dont worry.. there are usually public_html/ private/ etc but its there not there its fine..
User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

Ok, I know what you mean...But..
theres not..
Not with a shared IP...

So, How's the PHP script looking?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

im making my own gimme a few min..[/pg_man]
User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

take your time :D

thx btw :D
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

ill give u a better script that fits ur needs tommorow i cant keep my eyes open sorry... night'
User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

hey, If you get on tomorrow

Try and reach me on AIM or something..


s/n = monkeyj123


I'll try and find my way back here though lol


Night man
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

try setting your folder to copt to to something like:

Code: Select all

$dir = $_SERVER['DOCUMENT_ROOT'] . "/home/hsphere/local/home/monkeyj/monkeyblast.com/anims/upload";
and edit the path:

/home/hsphere/local/home/monkeyj/monkeyblast.com/anims/upload

to whatever it should be.
User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

am i reading u correctly?

Post by monkeyj »

So my PHP code should then look like...?

Code: Select all

<?php 
if (is_uploaded_file($_FILES&#1111;'userfile']&#1111;'tmp_name'])) &#123; 
    copy($_FILES&#1111;'userfile']&#1111;'tmp_name'], "$dir = $_SERVER&#1111;'DOCUMENT_ROOT'] . "/home/hsphere/local/home/monkeyj/monkeyblast.com/anims/upload"; "); 
&#125; else &#123; 
    echo "Possible file upload attack. Filename: " . $_FILES&#1111;'userfile']&#1111;'name']; 
&#125; 
/* ...or... */ 
move_uploaded_file($_FILES&#1111;'userfile']&#1111;'tmp_name'], "$dir = $_SERVER&#1111;'DOCUMENT_ROOT'] . "/home/hsphere/local/home/monkeyj/monkeyblast.com/anims/upload"; "); 
?>
After setting that.. I get a parse error

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/hsphere/local/home/monkeyj/monkeyblast.com/submit.php on line 3
?>
User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

somehow I think I've officially confused myself..

I never work with $_files o.o lol
Post Reply