Guest Posted January 13, 2007 Share Posted January 13, 2007 I just installed osCommerce on a test server at home to try it out before attempting to install it on the shared host for real, and I experienced the following two problems. Maybe they are related, maybe not. Problem #1. I am unable to upload an image for a product. I get these errors every time: Warning: move_uploaded_file(/var/www/testcart/catalog/images/dvd_logo.gif) [function.move-uploaded-file]: failed to open stream: Permission denied in /var/www/testcart/catalog/admin/includes/classes/upload.php on line 91 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpm1gVq3' to '/var/www/testcart/catalog/images/dvd_logo.gif' in /var/www/testcart/catalog/admin/includes/classes/upload.php on line 91 Warning: Cannot modify header information - headers already sent by (output started at /var/www/testcart/catalog/admin/includes/classes/upload.php:91) in /var/www/testcart/catalog/admin/includes/functions/general.php on line 22 When I go into the /images directory I can see the file there with all the rest of the the images that came by default with the installation. The permissions of my file match those of the default images. I have both register_globals and file_uploads set to "On" in my php.ini file. Problem #2. While investigating Problem #1 I noticed in phpMyAdmin that the database I had set up prior to installing osCommerce was empty! But there IS a database that is misspelled by one letter containing 46 tables that was set up in the installation process. Evidently either when I created the database in phpMyAdmin OR at some point during the installation or configuration I mistyped the name of the database. So now I have an empty database, called "commerce" let's say, as well as one named "comerce" with all the tables in it. My first instinct was to delete "commerce" and just rename "comerce" to "commerce" but realized all my configuration settings are going to be pointing to "comerce" but I don't know which ones or even how many there are. (Too bad the program didn't throw a "that database does not exist" error instead of just setting up the database anyway.) First question: Could these two problems be related? (Apart from both having ME in common.) Second question: Even if they are not related, how do I solve them and does it matter in what order I try to do so? Many thanks. Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2007 Share Posted January 18, 2007 Hi everyone, I just wanted to say that I'm sorry if my original post was posted in the wrong category or was unclear or for whatever else may have caused it to be ignored. I did my best to explain the problem and find the correct forum to post it in. If my post in any way violated one of this board's guidelines, either written or unwritten, it was certainly unintentional. If I need to repost it elsewhere or rephrase it in some way, or if there is another more appropriate venue for seeking support with this problem, I would definitely appreciate if someone could just give me a heads-up. I don't want to be a nuisance, but I do still need help with this problem and these forums were the only place I could find to seek it out. Thanks again, and apologies in advance if this post, too, is committing the same errors or whatever as the first one did. Link to comment Share on other sites More sharing options...
davidinottawa Posted January 18, 2007 Share Posted January 18, 2007 Problem #1. I am unable to upload an image for a product. I get these errors every time: Warning: move_uploaded_file(/var/www/testcart/catalog/images/dvd_logo.gif) [function.move-uploaded-file]: failed to open stream: Permission denied in /var/www/testcart/catalog/admin/includes/classes/upload.php on line 91 did you try chmoding the file ? use yout ftp client, or your host file manager and chmod to 755(rwxr-xr-) as long as your sure that your file uploads are set to On. also - it could be that you have saeMode set to On in your ini file as well. Or - you could be trying to upload as a different user - although 755 should fix that. /var/www/testcart/catalog/admin/includes/classes/upload.php on line 91 Problem #2. While investigating Problem #1 I noticed in phpMyAdmin that the database I had set up prior to installing osCommerce was empty! But there IS a database that is misspelled by one letter containing 46 tables that was set up in the installation process. Evidently either when I created the database in phpMyAdmin OR at some point during the installation or configuration I mistyped the name of the database. So now I have an empty database, called "commerce" let's say, as well as one named "comerce" with all the tables in it. My first instinct was to delete "commerce" and just rename "comerce" to "commerce" but realized all my configuration settings are going to be pointing to "comerce" but I don't know which ones or even how many there are. (Too bad the program didn't throw a "that database does not exist" error instead of just setting up the database anyway.) what difference does it make what your db is named ? You can change db's by modifying the include/configure.php and admin/includes/configure.php files accordingling First question: Could these two problems be related? (Apart from both having ME in common.) No - I don't think so. Not logically anyway - but after using OSC for 5 years, sometimes their coding logical is thrown out the window! You may have been ignored because : 1. you are not describing your problem in the subject line. People "don't have time" to click on every link - if the subject of your problem is descriptive, you'll get people clicking on your question. and 2. your post is toooo long. Most people won't take the time to read it. You need to be short and sweet when posting here on this board. If we need/want more detail - we'll ask. david Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2007 Share Posted January 18, 2007 Thanks for the reply! did you try chmoding the file ? I hadn't, but now I have, and it made no difference. as long as your sure that your file uploads are set to On. I am indeed. also - it could be that you have saeMode set to On in your ini file as well. Nope; safe mode Off. what difference does it make what your db is named? None, but I don't want it spelled wrong, do I? :) You can change db's by modifying the include/configure.php and admin/includes/configure.php files accordingling Thank you! That is what I needed to know. You may have been ignored because :1. you are not describing your problem in the subject line. People "don't have time" to click on every link - if the subject of your problem is descriptive, you'll get people clicking on your question. I can appreciate that. Of course, my sub-heading "can't upload images and database wrongly named" is visible without clicking the link, but if it is understood that one is to include all relevant info in the subject line rather than the sub-head, then that is indeed where I may have gone wrong. Thanks for the tip. and 2. your post is toooo long. Most people won't take the time to read it. Guilty of that, no question. I suffer from chronic vomitus typewritis. :) In any case, thanks for the help. I'm glad I found out the files I need to modify to correct the database name. Hopefully someone else can steer me along on the problem I'm having uploading images -- or maybe that is just a freak issue that no one here has ever encountered before. And thanks also for clueing me in on the unwritten posting guidelines. No more sub-headings for me! Link to comment Share on other sites More sharing options...
davidinottawa Posted January 18, 2007 Share Posted January 18, 2007 Thanks for the reply have you been throughh these responses : http://php.mirrors.ilisys.com.au/manual/en...loaded-file.php there are a few that talk about ini differneces between windows and nix servers. d Link to comment Share on other sites More sharing options...
davidinottawa Posted January 18, 2007 Share Posted January 18, 2007 have you been throughh these responses :http://php.mirrors.ilisys.com.au/manual/en...loaded-file.php there are a few that talk about ini differneces between windows and nix servers. d http://www.google.ca/search?q=%5Bfunction....rmission+denied Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2007 Share Posted January 18, 2007 there are a few that talk about ini differneces between windows and nix servers. Uh-oh... did you say 'windows?' do i need to be running a windows server to get this to work??? Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2007 Share Posted January 18, 2007 Uh-oh... did you say 'windows?' do i need to be running a windows server to get this to work??? no Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2007 Share Posted January 18, 2007 no Whew! Good. Then I definitely misunderstood the reference to Windows servers. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.