Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Can't add items... help? :)


Recommended Posts

I've recently installed osCommerce for the first time. I have a fair bit of experience with e-commerce sites and PHP, but this error is disturbing me, and I can't find reference to it here (unless I'm being blind)..


Basically, when I go to the admin section and try to add new categories or products, I can't. Here's the process;



"new category"

Name: test1, image: null.gif, sort order 0


--> A new entry appears in the list and database with no title or image. I check the database itself and the ID is generated but with no text. Manually alter the database, to name the categories, then within one category I try:


"new product"

Fill out all the details (manufacturer, model, image, URL, tax class and weight are all blank) -- then I get


Warning: Variable passed to reset() is not an array or object in /var/www/html/mydomain/shop/admin/includes/classes/object_info.php on line 17


Warning: Variable passed to each() is not an array or object in /var/www/html/mydomain/shop/admin/includes/classes/object_info.php on line 18


when I submit the form and a blank page with "?0.00" and no other data. It seems that the form is submitting nulls for some reason. I've looked at the PHP but can't see a quick and dirty fix, and checking my database permissions the user that osCommerce is running under has full insert, delete, update, drop, select etc permissions.


I'm running Apache 1.3.27 with PHP 4.1.2 and MySQL; osCommerce latest milestone release (2.2MS1).


any ideas? is there something very basic I'm missing? :)





Link to comment
Share on other sites

ok, nobody's replied, does anyone know any solutions -- or do I need to provide more info?


fyi i run Linux and Mozilla and the stuff is on a different server. hmmmmm.....



Link to comment
Share on other sites

  • 4 weeks later...

I'm in the same situation ... I have all of my permissions checked... and getting the exact same problem.


Have you (or anyone else) had any luck yet?


It seems odd that if I have permissions to change the configuration settings (presumably stored in the database also) that I should have permissions to add categories and products as well!


I really want to get this cart up and running ... but I'm afraid of what other issues I'll run into as we go along...

Link to comment
Share on other sites

I had this same problem and scoured the support forum and found a solution which worked for me. Seems the answer is in the php.ini file (usually located in /etc/php.ini for Linux systems).


Make sure you have file uploads on:


file_uploads = On


Then restart or reload apache (graceful will do). For hosted folks, you'll need to talk to your virtual host.


It's odd though, I am not doing any file uploads that I know of, but this works. Go Figure.


Next time you have a problem, assume someone else has had it in the past. Old solutions still work for *your* new problem. I just searched for objectInfo (the function php reported as having the problem) in the forums search engine and found multiple solutions. This might explain why you weren't getting responses, since the question had been answered multiple times in the near past.


Link to comment
Share on other sites

I have the same problem .. tried to change db server from ip to localhost but it made no diffrence. Checked php.ini and file_upload was already on.


The item description I type when I add a product is correct but the picture wont upload and the price is always 0.


Any more ideas?

Link to comment
Share on other sites

Humm .. I upgraded to the CVS version and now the price is correct but the image of a product I add myself wont show.

It only says IMAGE DOES NOT EXIST when I edit a new product ...


How come?


You probably already checked this... but have you made sure that the permissions on the catalog/images directory are set properly? You may want to temporarily set the permission wide open (chmod 777).

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...