PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro How Do I...? (http://www.photopost.com/forum/photopost-pro-how-do-i/)
-   -   Error when trying to upload photo? (http://www.photopost.com/forum/photopost-pro-how-do-i/115264-error-when-trying-upload-photo.html)

bill03 August 14th, 2005 03:47 AM

Error when trying to upload photo?
 
Warning: move_uploaded_file(/home/build/public_html/photopost/uploads/1/grandesunset.jpg): failed to open stream: Permission denied in /home/build/public_html/photopost/image-inc.php on line 37

Warning: move_uploaded_file(): Unable to move '/tmp/phpMmVvnJ' to '/home/build/public_html/photopost/uploads/1/grandesunset.jpg' in /home/build/public_html/photopost/image-inc.php on line 37

Any ideas?

Chuck S August 14th, 2005 06:55 AM

Hello your uploads and data directories as well as all of there subdirectories need to be CHMOD to 777 to be able to allow uploads

apex944 August 27th, 2005 02:33 PM

Help with setup permissions
 
I'm having similar troubles. All works OK except for image uploads. I set /uploads and /data and the children to 777. Still I get the following errors.
oh btw, apache is uid 501 and the site account is uid 515

Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 515 is not allowed to access /var/www/html/sites/forums/html/pp_classifieds/data/6 owned by uid 501 in /var/www/html/sites/forums/html/pp_classifieds/image-inc.php on line 53

Unable to move file [/tmp/phpT9OfGB] [/var/www/html/sites/forums/html/pp_classifieds/data/6/3Image6.jpg]


Any ideas?

Chuck S August 27th, 2005 05:16 PM

Hello per our feature requirements safe mode must be off on the server to ensure proper operation of the program.

apex944 August 29th, 2005 02:06 PM

Safe Mode not supported?
 
No decent host is going to run their servers without safemode are they? :confused:

I have a number of other PHP apps that are able to upload/modify/execute files within my site's directory even with Safemode enabled. With open_base dir limiting scripts ability to read/write outside the site's root dir there should be no reason that PhotoPost Classifieds can't fully modify the files within my site directories.

Can someone explain how PPClass is different than other photo apps that can sun in safe mode?

Is there no work around like a change to my site's config files?

Chuck S August 29th, 2005 02:21 PM

99% of all hosts I know of run safe mode OFF

Basically with safe mode on you can not create the directories for categories or user upload directories.

Not many apps of this nature are safe mode compatible. There may be one or two but it means dumping all files into one directory which severily limits how many files you can have since directories are not infinite.

apex944 August 29th, 2005 09:06 PM

Admittedly I'm not a good PHP developer but couldn't something like this be implemented?

Use the move_uploaded_file() function to move the file to a temporary location before assigning final filename. If you use move_uploaded_file(), you can access the temporary uploaded file.

Chuck S August 29th, 2005 09:18 PM

move_uploaded_file has nothing do to with it

The problem is the creation of the categories and user upload directories that I noted.

Our software states explicitly that safe mode must be off.

Something we can look into but for the future the only way around it is as I noted to dump everything into one uploads directory and one data directory which is not necessarily a good thing.

apex944 August 29th, 2005 09:22 PM

>> Something we can look into

That is what I'm trying to help with. Do you want to continue to discuss this?
I have a PHP developer who thinks he can help fix this problem.

Chuck S August 29th, 2005 09:42 PM

Well I know how to code up the program to work with safe mode just as I stated above but there are things to consider like severily limiting storage since things would need to be stored in one spot.

When I stated something we can look into I mean we would consider supporting safe mode in a future version of the software.

apex944 August 29th, 2005 09:58 PM

>> your uploads and data directories as well as all of there subdirectories need to be CHMOD to 777 to be able to allow uploads

Since Safe-Mode cares about ownership and not really about the dir permissions (it's comparing the UID of the PHP script acct [Apache] vs. the UID of the FTP [user] acct.) How does changing dir. permissions help? I tried this when I first found this thread and it had no effect. Do you mean that I need to change the owner of the /upload and /data dirs ?

Thanks for you quick replies...over and out for tonight...

Chuck S August 29th, 2005 11:22 PM

well nowhere in this thread have I said anything about permissions.

Basically with safe mode directories will not be created is what I have said

apex944 August 30th, 2005 06:13 AM

Chmod?
 
Sorry, I was looking at this post:
Quote:

CHMOD to 777 to be able to allow uploads
Quote:

Basically with safe mode directories will not be created
Are you creating sub dirs via PHP in the /data and /upload directories? It appears as if that's what happening.

Also I think I see why your app has trouble where my other photo manipulation apps dont. Here is the error I see....

Unable to move file
[/tmp/phpQIvb8K]
[/var/www/html/sites/forums/html/pp_classifieds/data/4/3P1010038.JPG]

It appears that PHP is trying to move an image file it created
from the /tmp/* directory by traversing across ACCOUNTS & SITES (which Safemode doesn't allow) to /var/www/html/sites/.....etc ????

Is this correct?

Chuck S August 30th, 2005 08:22 AM

Hello

Thats right your trailing on someone else's post so I know I never told you that directly which is why you threw me off ;) . Yes if directories are not 777 files cant move. This would be the issue of someone who did not follow the installation instructions correctly. It's probally the single most common support responce next to cookie settings. Here are the installation instructions

http://www.photopost.com/installphp.html

Now on to your questions!

Yes subdirectories are created in those directories that would be correct. A numeric identifier for the categories under data and in uploads the user userid. Not uncommon as the top 3 gallery programs I know all do the same and are incompatible also with safe mode as a result from what I show.

As far as how PHP moves or uploads files ALL file uploads go through PHP's tmp directory then are moved to wherever. This is just how PHP works. You never see this error unless you dont have permissions set right. You know how when you install programs they say certain directories need to be 777 ;) This is why in most cases

Now unless there are any other support issues that have not been answered our requirements clearly state safe mode must be off on the requirements page. That said there is nothing more of a support nature I can add here.


All times are GMT -5. The time now is 11:46 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97