Undefined Posted July 16, 2005 Share Posted July 16, 2005 We have been running osCommerce for about 6 months now and all of a sudden when you add a new product to our active store, the product image fails to upload. The warning with the pink background appears saying "Warning. No file uploaded" and I have to go in through the database and insert the name of the picture manually and I also have to upload the image via ftp. I right clicked on the url of the blank image and it gave me "http://www.mydomain.com/catalog/images/" with mydomain being my url. I know I have plenty of HD space on my hosting because I can upload the files via ftp and I checked how much space I had left and it was plenty. Any help would be gladly appreciated. Thanks. Link to comment Share on other sites More sharing options...
♥yesudo Posted July 16, 2005 Share Posted July 16, 2005 check that the images directory is chmod to 777. Your online success is Paramount. Link to comment Share on other sites More sharing options...
Undefined Posted July 17, 2005 Author Share Posted July 17, 2005 check that the images directory is chmod to 777. <{POST_SNAPBACK}> It is. The store has been running fine for a long time. It just all of a sudden stopped uploading images... Link to comment Share on other sites More sharing options...
stevel Posted July 17, 2005 Share Posted July 17, 2005 Your web host may have changed their configuration so that the temp folder no longer works. The way image uploading works is that the image is first uploaded to PHP's temp folder, then copied to the store folder. In many cases, you can set your own temp folder with a php.ini. Contact your host's support desk and see if they're aware of any changes in this area. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Undefined Posted July 17, 2005 Author Share Posted July 17, 2005 Thanks! I will email them about this right now!!! Link to comment Share on other sites More sharing options...
Undefined Posted July 18, 2005 Author Share Posted July 18, 2005 I got a reply back from my hosting company and they said they didnt change anything... Should I just backup the database and try a reinstall? Link to comment Share on other sites More sharing options...
stevel Posted July 18, 2005 Share Posted July 18, 2005 I doubt that would help. As an experiment, and though I usually recommend removal of this feature, go to the File Manager tool in admin and see if it will successfully upload a new file. (Make sure it is a file that does not exist.) If this works, then the PHP mechanism is probably ok and solving your problem will require some code debugging. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Undefined Posted July 18, 2005 Author Share Posted July 18, 2005 I did that and everytime a file uploads it says upload successful but the file is empty and says 0 bytes and if the file I use does not even exist, then it still says upload successful and creates a file that is 0 bytes in filesize. There haven't been any changes in my file codes for months. I have a couple of contributions but they have been working fine for the longest time. Is it possible some of the source got corrupted???? Link to comment Share on other sites More sharing options...
stevel Posted July 18, 2005 Share Posted July 18, 2005 No, I think this is a PHP issue with your host. Ask them where the PHP temp directory is and see if there's a problem with your site accessing it. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Psicadelic Posted July 20, 2005 Share Posted July 20, 2005 I have the same problem. Could you resolved it ? Link to comment Share on other sites More sharing options...
Psicadelic Posted July 20, 2005 Share Posted July 20, 2005 :'( Pleaseeeeeeeeee Link to comment Share on other sites More sharing options...
Undefined Posted July 20, 2005 Author Share Posted July 20, 2005 This is what was in the email that I got: You can use "/var/tmp" as your temp directory. If you have any further questions, feel free to contact us Link to comment Share on other sites More sharing options...
Undefined Posted July 21, 2005 Author Share Posted July 21, 2005 Is "/var/tmp" different from the folder used in uploading in the code in osCommerce? Link to comment Share on other sites More sharing options...
stevel Posted July 21, 2005 Share Posted July 21, 2005 What you have to do is supply a php.ini file, based on what your host provides, and then edit the line that defines the upload temp directory to be what you want. On my store, I made this be a folder local to my site rather than the server-wide /tmp. It's a PHP thing, not an osCommerce thing. You'll have to ask your host how to supply a custom php.ini, or what their default one is. The file just goes in your top-level web directory (where index.php is.) Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Undefined Posted July 22, 2005 Author Share Posted July 22, 2005 I follow you almost... but if my host says that "/var/tmp" is my temp directory why would i need to make an *.ini file. Since my knowledge of php is very little I would rather not go that route. In the mean while I have emailed them on how to supply a custome php.ini file and to tell me what their default one is. Link to comment Share on other sites More sharing options...
stevel Posted July 22, 2005 Share Posted July 22, 2005 osC uses a PHP function to upload the file, and it initially gets placed in a directory specified by the PHP setting upload_tmp_dir. This is normally set by your host in the default php.ini to some central place (such as /var/tmp). If you want to change it, you get a copy of the default php.ini, make the changes you want, and upload it to your top level web folder. Now, the problem you may be having is something else entirely, but the symptom you describe suggests that your host broke PHP uploads for all users in their default php.ini. I know this can happen because, at one time, my host did the same. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Undefined Posted July 22, 2005 Author Share Posted July 22, 2005 Wow... All that is inside my php.ini file is: register_globals = on include_path = ".:/usr/local/php/share/pear" How do i add the tamp directory Link to comment Share on other sites More sharing options...
nicpon Posted July 22, 2005 Share Posted July 22, 2005 I did that and everytime a file uploads it says upload successful but the file is empty and says 0 bytes and if the file I use does not even exist, then it still says upload successful and creates a file that is 0 bytes in filesize. There haven't been any changes in my file codes for months. I have a couple of contributions but they have been working fine for the longest time. Is it possible some of the source got corrupted???? <{POST_SNAPBACK}> Try to upload a text file with some text in it and check if it still has 0 bytes ? Link to comment Share on other sites More sharing options...
stevel Posted July 22, 2005 Share Posted July 22, 2005 How do i add the tamp directory <{POST_SNAPBACK}> Just add the line: upload_tmp_dir = "/var/tmp" or whatever you want it to be. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Undefined Posted July 22, 2005 Author Share Posted July 22, 2005 Thanks soooooooo much!!!!! The "/var/tmp" didn't work but I changed it to a folder on my server and it now works like a charm! Preciate all your help and patience. Link to comment Share on other sites More sharing options...
stevel Posted July 22, 2005 Share Posted July 22, 2005 Right - /var/tmp was just an example and, in my view, not usually a good choice. Better would be the path to a folder within your own site's area, especially if it's outside the directory that is used for web files. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.