Matpatnik Posted February 15, 2007 Author Share Posted February 15, 2007 Hi, it did print the right path: /usr/local/4admin/apache/vhosts/My_site.com/httpdocs/images/4and the permission of the folder are set as 777is there a more secure way to set my folder so I can add stuffin it? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 15, 2007 Share Posted February 15, 2007 You can generally use 0644 or 0755 instead of 0777, depending on the owner of the folder. If the PHP process or the Apache process owns the folder, then you can use more strict permissions to allow the folder owner to do everything, but not the other groups. But if you have the permissions set, and the path is correct, then it should be working. Check to see if safe mode is enabled on the server and if the open_basedir directive is set.ini_get("safe_mode");ini_get("open_basedir"); Link to comment Share on other sites More sharing options...
Matpatnik Posted February 15, 2007 Author Share Posted February 15, 2007 the open_basedir /tmp:/usr/local/4admin/apache/vhosts/My_site.com/httpdocs:/usr/local/4admin/apache/vhosts/My_site.com/logs:/usr/local/4admin/apache/vhosts/My_site.com/storage:/usr/local/4admin/apache/vhosts/My_site.com/web_users:/usr/local/4admin/apache/lib/php:/usr/local/4admin/apache/php5/lib/php:/usr/local/4admin/phpstuffand safe_mode it doesn't show anything but I turned it off last month manually Link to comment Share on other sites More sharing options...
justsomeguy Posted February 15, 2007 Share Posted February 15, 2007 The source and destination locations are both in the open_basedir directive, so that should not be an issue. There might be another error happening that is not being reported. Add this to the top:ini_set("display_errors", 1);error_reporting(E_ALL);and also make sure you aren't using the @ operator to suppress error messages on the functions that are involved with this. Link to comment Share on other sites More sharing options...
Matpatnik Posted February 15, 2007 Author Share Posted February 15, 2007 ini_set("display_errors", 1); = 1error_reporting(E_ALL); = 2039edited: Notice: Undefined index: action in /usr/local/4admin/apache/vhosts/My_site.com/httpdocs/ain/include/ac.php on line 10this one work fine and doesn't affect the page Link to comment Share on other sites More sharing options...
justsomeguy Posted February 15, 2007 Share Posted February 15, 2007 Oh, it's not a permission issue at all. Warning: move_uploaded_file(../images/6) [function.move-uploaded-file]: failed to open stream: Is a directory in /usr/local/1/2/3/4/5/6/age.php on line 40I was wondering what that meant.. the destination you are giving to move_uploaded_file is a directory. The destination needs to be the filename that you want to save the image as. Link to comment Share on other sites More sharing options...
Matpatnik Posted February 15, 2007 Author Share Posted February 15, 2007 Oh I see, it make sense now thank youedited: it work perfectly now Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now