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
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
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]
Hello per our feature requirements safe mode must be off on the server to ensure proper operation of the program.
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?
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.
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.
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.
>> 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.
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.
>> 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...
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
Sorry, I was looking at this post:
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
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?
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
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