Jump to content

merely_existing

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Female

Contact Methods

  • Yahoo
    u2vipergirl

merely_existing's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I figured out the problem it was the files I was trying to upload they are too big it should have given me the file size error instead but maybe there is a smaller restriction set on the server. What I did was try a real simple upload script no names being changed nothing fancy still got an error. so just out of curiousity I tryed a few differnt files and they all worked. so it had to be something about size. not type cause I tryed both .jpg and gif they now work even with the copied= copy(. sorry to waste everyones time if I would have just tryed a few different files it would have worked straight away. Now is just for realizing why it didn't tell me file size was too big
  2. btw I put in hisservername and myweburl just as references since I dont know how secure his server is and dont want people going there to find out lol. right now for me its free and its just a place to test my code just too bad he didn't give me a way into everything that I might need. oh and I am using dreamweaver to ftp and I have the site sync feature on so everything is the same on my machine as it is on the server.
  3. I agree that after trying move_uploaded_file function I now get Copy unsuccessfull! It has to be a server issue. Problem is its my friends server and he was letting me use it for free php hosting so I have no access to the server itself other then ftp or database management. :/ . I asked him if he changed anything on the server and he said no but hey this was days ago that this worked and he's on it constantly so maybe he did by accident. I will just have to get more access to the server when I talk to him next so I can check the permissions and other stuff I guess when I run the echo "SCRIPT_FILENAME: {$_SERVER['SCRIPT_FILENAME']}";die(); I get SCRIPT_FILENAME: /home/Hisservername/public_html/myweburl.com/CR/backend/addpro.php not sure if thats what supposed to be comming up
  4. Ok well I redid the one I originally had and changed copy to $copied = move_uploaded_file($_FILES['image']['tmp_name'], $newname); and it now parses but says unsucessful. I think something on the server must have gotten changed because this script was working fine before I left and I dont remember making any changes to it afterwards. :/ sad thing is this is on my friends server and I have just the permissions to upload and mess with my database I dont have anyway to get into cpannel and make sure my folder permissions are set properly or my access to any of my data is set properly. I will start with the script you sent after I get access into cpannel (got to talk my friend into more permissions) if nothing on there seems out of place then off to recoding. "Final Thought" I wish my PHP Instructor would have gotten more advanced all he had us do is a few easy book apps and then write a paper about cms's pissed me off cause this site would have been my final project if I would have had his help its a e commerce shop / which I'm now trying to create a gui backend and my shop is different because it has no urls in the database everything would be called out by product # if I could get this script to work
  5. now i get Parse error: syntax error, unexpected ',' CR/backend/addpro.php on line 5 [attachment deleted by admin]
  6. Ok well I am a beginer at all this infact this was a code taken from a php cookbook help site I know that you want me to put this if (move_uploaded_file($_FILES['image']['tmp_name'], $newname)) where line 51 was but where you put { //code here} I have no clue what comes next I tryed it this way and now it says successful but it didn't put anyfiles in any folder on the site if (move_uploaded_file($_FILES['image']['tmp_name'], $newname)) if (!move_uploaded_file) { echo '<h1>Copy unsuccessfull!</h1>'; $errors=1; }}}} //If no errors registred, print the success message if(isset($_POST['Submit']) && !$errors) { echo "<h1>File Uploaded Successfully! Try again!</h1>"; } ?>
  7. I have even tried making a folder on the same level and taking out the ../
  8. yes the folder does exist it is one level up from the folder this file is in so i had it ../images/
  9. $newname="../images/".$image_name; I want my image to go up one directory and into the image folder for now or atleast this is how it was working the other day
  10. Ok I am designing a php upload that will take a image file from a form and change the name of the file to the productnumber also recieved from the form. I had it working the otherday now it says Warning: copy() [function.copy]: open_basedir restriction in effect File() is not within the allowed path(s): (/home:/tmp:/usr) addpro.php on line 51. my files are attached.... note that $pnum is the product number gotten from my form and image is the image being uploaded gotten from the form also. The thing is it worked the other day but now it don't is it a change to the server ( I dont run the server) or did I mess up my code since then? I really need a code that will do this two time over once for a small image being put into a folder called small and once for a folder called large both images being uploaded and being changed to $pnum.ext so they will both be displayed when being called out by the product number. but I can work on that after I get this one working. line 51 is $copied = copy($_FILES['image']['tmp_name'], $newname); [attachment deleted by admin]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.