AudioOPond Posted July 18, 2003 Share Posted July 18, 2003 I am a first time user of osCommerce and am using 2.2MS2. In attempting to configure my store I cannot upload images when editing manufacturers, categories, products etc. The file does not appear in the appropriate directory, and the database contains Null for the Manufacture_image, for instance. As a further example, on adding a new category the image is not uploaded as above. A new category is added to the categories table in the mySQL database, category_image = NULL, but there is no line added for the new category in the categories_description table. As I am new to PHP I cannot yet draw obvious conclusions from the PHP files, but will add debug print statements printing to file tomorrow to see if all of the relevant variables close to the "new upload ('..." file upload function contain sane data. I appreciate any help and will post my solution if I discover it myself. Regards Mark Link to comment Share on other sites More sharing options...
Guest Posted July 18, 2003 Share Posted July 18, 2003 Installation Troubleshooting Stylesheet: All images are broken If a page shows everything right except the graphics and formatting are missing then go to that page and change the link of your stylesheet in whatever file is not displaying correctly: <LINK href="../oscommerce/catalog/catalog/stylesheet.css" type=text/css rel=stylesheet> All you have to do is find that line in and correct the path to point to your actual stylesheet.css If this does not help, try the bottom links and search them Link to comment Share on other sites More sharing options...
AudioOPond Posted July 19, 2003 Author Share Posted July 19, 2003 Thanks for your input. I had had a problem with the stylesheets earlier, and have fixed that. I looked at the documentation, and am still having problems. On further analysis of the operation of the manufacturers.php file the upload function: if ($manufacturers_image = new upload('manufacturers_image', DIR_FS_CATALOG_IMAGES)) { is returning $manufacturers_image as empty. I.e. from inspection of the upload class, something is going wrong and the class member is being destroyed. in manufacturers.php I addes a statement global $messageStack; and wrote the value of $messageStack->size to a debug file. The message stack size was 0 suggesting no errors. So either, I am not accessing $messageStack correctly (most probable) or my use of the empty function if (empty($manufacturers_image)) { $mai_write_str = "Manufacturers Image t" . "Does not exist" . "n";... on the returned $manufacturers_image value from the upload constructor is incorrect. Please someone help me on how to preserve/access the values in the message stack so that I can figure out what is going on here. Today is the first day I have ever written php code so my guess is that I am making a trivial conceptual blunder here. Thanks for your help Mark Link to comment Share on other sites More sharing options...
Dangeo1 Posted July 19, 2003 Share Posted July 19, 2003 I had a problem with uploading images (from the admin page), I found that my images folder was not setup properly "777", to allow the images to be written. Link to comment Share on other sites More sharing options...
AudioOPond Posted July 19, 2003 Author Share Posted July 19, 2003 :oops: Doh!! I expected that I was doing something dumb, but not quite that dumb. Thanks, that worked for me. I'm still interested to understand how to access the $messageStack in manufacturers.php and elsewhere as this looks like a very useful debugging class. Regards Mark Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.