Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I am getting "Product not found!" on my site for all items?


PHP_User

Recommended Posts

Posted

I dont know why, but I get "Product not found!" no matter what item I click on the product_info.php page.

 

Our ISP changed something with PHP and I was forced to register_globals to On to even get the site to work.

 

We are running:

 

osCommerce 2.2-MS2

PHP Version 5.2.13

MySQL 5.1.47

Apache 2.2.15

 

I checked the products, categories and products_to_categories tables and all the data is there and the items are related correctly.

 

I tried to echo the query from the products_info.php page, but I haven't deciphered this query to be able to echo it so I can run the query in MySQL to check it.

 

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_check = tep_db_fetch_array($product_check_query);

 

Does anyone have any ideas about this?

 

Regards,

Don

Posted

Print the two variables below above the sql query, and see if there are something wrong with their values:

 

echo (int)$HTTP_GET_VARS['products_id'];
echo '<br/>';
echo  (int)$languages_id;

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Posted

Print the two variables below above the sql query, and see if there are something wrong with their values:

 

echo (int)$HTTP_GET_VARS['products_id'];
echo '<br/>';
echo  (int)$languages_id;

 

Here is what I got back for those vars:

 

$HTTP_GET_VARS['products_id'] =0

$languages_id=1

 

So its not getting product_id and the language is set to English.

 

What do you get from this, and do you have any more suggestions?

 

Regards,

Don

Posted

Update:

 

Our ISP went in on Monday and renamed our php.ini and uploaded a new one (which had 'most' of our settings in there, minus them setting register_globals to On).

 

There was some other settings they added to the php.ini file.

 

I took a backup I had of the php.ini on there before Monday and set register_globals to on, and now the links are working again and the site seems ok. I am going to complain about the change they made without our consent and the fact they did not notify us before or after the fact.

 

And I am not forced to take steps (most likely upgrade to RC2 of OsC) to be able to turn register_globals to off.

 

If you have any comments, please let me know.

 

Thanks for you help,

Don

Posted

I would strongly recomend upgrading to rc2a. Having register globals turned on is a security risk. As of php6, there will be no option to turn them on.

Archived

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

×
×
  • Create New...