Jump to content
Larry Ullman's Book Forums

add_pdf.php move_uploaded_file()

Recommended Posts

Hey Larry - it's my understanding that this error relates to the location of my web root directory? Thanks

An error occurred in script '/Users/saphiakharaz/Sites/html/add_pdf.php' on line 37:
move_uploaded_file(/~saphiakharaz/ecom1/html/pdfs/d19915d2209b4ead4a9cfc8cf246f7bc458dd8365d39f7e0081947.22694525_tmp): failed to open stream: No such file or directory

Share this post

Link to post
Share on other sites

Well, the error means that it cannot find the named file or directory, which either means the file or directory doesn't exist OR the file or directory path provided is wrong. Here it's the latter. Note that you start with 


That's probably wrong. In Unix, the tilde refers to the current user's home directory. So ~ in this case equals /Users/saphiakharaz. You have "/~saphiakhara" which is incorrect in a couple of ways. "~/ecom1/..." would be more correct  but you should probably use the full, absolute path  ("/Users/saphia...") instead. 

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...