Guest Posted September 25, 2010 Posted September 25, 2010 I am testing oscommerce on my laptop under localhost. I have in the past developed successfully tested php and MYSQL programming under local host via a Apache local server. Using phpMyAdmin I created a new database on MYSQL called “oscommerce”. During the installation phase I changed all Global Privileges to Grant to All. During the installation process everything goes well until the last page where the warning appears: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\htdocs\oscommerce-2.2rc2a\catalog\install\includes\functions\database.php on line 39 I checked out the configure.php files in both the Includes and the Admin directories and the detaisl seem fine: <?php define('HTTP_SERVER', 'http://localhost'); define('HTTPS_SERVER', 'http://localhost'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'localhost'); define('HTTPS_COOKIE_DOMAIN', 'localhost'); define('HTTP_COOKIE_PATH', '/oscommerce-2.2rc2a/catalog/'); define('HTTPS_COOKIE_PATH', '/oscommerce-2.2rc2a/catalog/'); define('DIR_WS_HTTP_CATALOG', '/oscommerce-2.2rc2a/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/oscommerce-2.2rc2a/catalog/'); . . . define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'xxxxxx'); ** I removed these details prior to posting and for this forum replaced with xxxx** define('DB_SERVER_PASSWORD', 'xxxxxx'); define('DB_DATABASE', 'oscommerce'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> When the installation is complete and either Catalog or Administration Tool is selected the error message appears: 1146 - Table 'oscommerce.configuration' doesn't exist select configuration_key as cfgKey, configuration_value as cfgValue from configuration Reinstalled the program and this has no affect. I have also tracked back the error message: C:\htdocs\oscommerce-2.2rc2a\catalog\install\includes\functions\database.php This function around line 39 looks O.K.: function tep_db_query($query, $link = 'db_link') { global $$link; if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { $result_error = mysql_error(); error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } return $result; } I have applied all the previous forums in this subject but to no effect. I am overlooking something but at this time cannot see it. Much appreciated for any ideas.
MrPhil Posted September 25, 2010 Posted September 25, 2010 Go into phpMyAdmin (or whatever MySQL interface you have) and check if table configuration is defined. Here is its definition: CREATE TABLE configuration ( configuration_id int NOT NULL auto_increment, configuration_title varchar(255) NOT NULL, configuration_key varchar(255) NOT NULL, configuration_value varchar(255) NOT NULL, configuration_description varchar(255) NOT NULL, configuration_group_id int NOT NULL, sort_order int(5) NULL, last_modified datetime NULL, date_added datetime NOT NULL, use_function varchar(255) NULL, set_function varchar(255) NULL, PRIMARY KEY (configuration_id) ); If it's not being created and preloaded during installation, there's something odd going on. Any other tables not being created? Check against install/oscommerce.sql to see who's not there.
Guest Posted October 5, 2010 Posted October 5, 2010 Go into phpMyAdmin (or whatever MySQL interface you have) and check if table configuration is defined. Here is its definition: CREATE TABLE configuration ( configuration_id int NOT NULL auto_increment, configuration_title varchar(255) NOT NULL, configuration_key varchar(255) NOT NULL, configuration_value varchar(255) NOT NULL, configuration_description varchar(255) NOT NULL, configuration_group_id int NOT NULL, sort_order int(5) NULL, last_modified datetime NULL, date_added datetime NOT NULL, use_function varchar(255) NULL, set_function varchar(255) NULL, PRIMARY KEY (configuration_id) ); If it's not being created and preloaded during installation, there's something odd going on. Any other tables not being created? Check against install/oscommerce.sql to see who's not there. I have the same problem with: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/*****/******.dk/catalog/install/includes/functions/database.php on line 39 When I enter my MYSQL DB I get this message: Your PHP MySQL library version 5.0.51a differs from your MySQL server version 4.1.22. This may cause unpredictable results. The DB is empty. And from here I go blank, what to do? "Finished! The installation and configuration was successful!"...not :( When I click Catalog or Administration Tool, I get this message: 1146 - Table '****_osCommerce.configuration' doesn't exist select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP]
MrPhil Posted October 5, 2010 Posted October 5, 2010 I get this message: Your PHP MySQL library version 5.0.51a differs from your MySQL server version 4.1.22. This may cause unpredictable results. Well, that certainly sounds like it could be a problem. Have a talk with your hosting service about whether there's a mismatch between the MySQL version and the PHP library level -- maybe there's a bad install? The DB is empty. The entire database has nothing in it, or just this one table?
Guest Posted March 12, 2012 Posted March 12, 2012 I'm having the same problem. There's nothing in the DB after the installation, and if I try to create table using phpmyadmin, it says #1050 - Table '`DB-name`.`configuration`' already exists. I can create tables in other DBs. The problem is only with the DB created for oscommerce. (oscommerce 2.3.1, easyphp 5.3.9) Anyone could please help?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.