Posted by admin on March 10, 2010 under oScommerce Issues, osCommerce Tips |
This is a known bug in the latest osCommerce 060817 release and has to do with the modules not refreshing with udated changes in the admin.
This fix has worked for several users:
1. Open the catalog/admin/includes/functions/compatibility.php.
2. At the end of the “do_magic_quotes_gpc” routine, add the following code
reset($ar);
It will end up looking like this:
function do_magic_quotes_gpc(&$ar) {
if (!is_array($ar)) return false;
while (list($key, $value) = each($ar)) {
if (is_array($ar[$key])) {
do_magic_quotes_gpc($ar[$key]);
} else {
$ar[$key] = addslashes($value);
}
}
reset($ar);
}
3. Do the same for the compatibility.php file located in catalog/includes/functions/compatibility.php.
Posted by admin on March 9, 2010 under oScommerce Issues, oScommerce Upgrade |
This means that the function is not defined in the store files or is defined by the store is not getting the file loaded.
this happens in badly customized templates of oscommerce.
quick fix is to delete the functions in the language files in english.php, german.php etc and then define the function in includes/functions/general.php so that is loads all the time irrespective of the language file selected.
If you need support in fixing it you can use the contact us form to get in touch with us.
Posted by admin on October 30, 2009 under oScommerce Issues |
Fatal error: Class ‘httpClient’ not found in /home/xxxxxx/public_HTML/catalog/includes/modules/shipping/ups.php on line 265
To solve this issue in ups module
Find this at line 265:
$http = new httpClient();
if ($http->Connect(‘www.ups.com’, 80)) {
$http->addHeader(‘Host’, ‘www.ups.com’);
$http->addHeader(‘User-Agent’, ‘osCommerce’);
$http->addHeader(‘Connection’, ‘Close’);
And replace with this:
if (!class_exists(‘httpClient’)) {
include(‘includes/classes/http_client.php’);
}
$http = new httpClient();
if ($http->Connect(‘www.ups.com’, 80)) {
$http->addHeader(‘Host’, ‘www.ups.com’);
$http->addHeader(‘User-Agent’, ‘osCommerce’);
$http->addHeader(‘Connection’, ‘Close’);
Posted by admin on July 30, 2009 under oScommerce Issues, oScommerce Security, osCommerce Services |
There has been a recent increase of attacks on osCommerce websites using old versions.
Hackers exploit a vulnerability that is usually used for uploading product pictures to the /images directory.
Php files are uploaded in the images directory and executed.
CUstomer and order details are displayed and also emailed to the hackers email address.
Sometimes traces are left by the hacker.
PHP files show up in the images directory (though sometimes they’re deleted after being run).
Gengerally, the following code iframe is added to every product_description and categories_description
We have a process to clean up the database and clean up the images directory
150 USD
Posted by admin on May 12, 2009 under oScommerce Issues |
Open /includes/application_top.php
if (tep_session_is_registered(‘navigation’))
{
if (PHP_VERSION < 4)
{
$broken_navigation = $navigation;
$navigation = new navigationHistory;
$navigation->unserialize($broken_navigation);
}
}
else
{
tep_session_register(‘navigation’);
$navigation = new navigationHistory;
}
$navigation->add_current_page();
Replace with
// navigation history
if (tep_session_is_registered(‘navigation’)) {
if (PHP_VERSION < 4) {
$broken_navigation = $navigation;
$navigation = new navigationHistory;
$navigation->unserialize($broken_navigation);
} else {
$navigation = new navigationHistory;
}
} else {
tep_session_register(‘navigation’);
$navigation = new navigationHistory;
}
$navigation->add_current_page();
cheers
Posted by admin on May 10, 2009 under oScommerce Issues, osCommerce Services |
1016 – Can’t open file
The following error message is shown when a database table is corrupt and can no longer be accessed nor read properly:
1016 – Can’t open file ‘<database table name>.MYI’ (errno: 145)
The error message will always be shown until the database table involved has been repaired.
1016 – Can’t open file Solution
The following methods are available to repair damaged database tables, depending on whether the database server is still running or not:
o Using the “repair table” SQL statement
o Using the “myisamchk” command
The <database table name> part in the commands below must be replaced with the actual database table name as shown in the error message.
Using the “repair table” SQL statement
The following SQL statement can be executed when the database server is still running:
repair table <database table name>;
Using the “myisamchk” command
The following command, which is part of the MySQL installation, can be executed on the server when the database server is no longer running:
myisamchk /path/to/database/directory/<database table name>.MYI
References
o MySQL Documentation: 15.1.4.1 Corrupted MyISAM Tables
o MySQL Documentation: 14.5.2.6 REPAIR TABLE Syntax
o MySQL Documentation: 5.6.2.1 myisamchk Invocation Syntax
1030 – Got error 127 from table handler
This indicates the table mentioned is corrupt.
1030 – Got error 127 from table handler Solution
Try running a repair and optimize on the table in phpMyAdmin.
1046 – No Database Selected
This indicates that either no database has been created or the wrong database name DB_DATABASE exists in the configure.php files.
select configuration_key as cfgKey, configuration_value as cfgValue from configuration
1046 – No Database Selected Solution
Check to make sure the database has been created and the catalog/includes/configure.php and catalog/admin/includes/configure.php files for correct database name.
Warning: mysql_connect(): Access denied for user:
The following error message is shown when either the username or password is incorrect for the database connection:
Warning: mysql_connect(): Access denied for user: ‘username@localhost’ (Using password: YES) in /home/username/public_html/shop/includes/functions/database.php on line 19
Unable to connect to database server!
Warning: mysql_connect(): Access denied for user: Solution
You will need to check with your hosting provider the username and password required to access the MySQL database and/or check the catalog/includes/configure.php and catalog/admin/includes/configure.php files for incorrect information.
Warning: mysql_connect(): Can’t connect to local MySQL server through socket
The error Can’t connect to … normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket filename or TCP/IP port number when trying to connect to the server.
Warning: mysql_connect(): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111)
in /var/www/html/store/catalog/includes/functions/database.php on line 19
Unable to connect to database server!
Warning: mysql_connect(): Can’t connect to local MySQL server through socket Solution
The following are checks for mysql to see if it is running and setup properly.
1. Start by checking whether there is a process named mysqld running on your server host.
Use ps xa | grep mysqld on Unix or the Task Manager on Windows.
2. It might also be that the server is running, but you are trying to connect using a TCP/IP port, named pipe, or Unix socket file different from those on which the server is listening. To find out what port is used, and where the socket is, you can do:
shell> netstat -l | grep mysql
3. The grant tables must be properly set up so that the server can use them for access control.
One way to determine whether you need to initialize the grant tables is to look for a `mysql’ directory under the data directory. (The data directory normally is named `data’ or `var’ and is located under your MySQL installation directory.) Make sure that you have a file named `user.MYD’ in the `mysql’ database directory. If you do not, execute the mysql_install_db script. After running this script and starting the server, test the initial privileges by executing this command:
shell> mysql -u root test
4. Sometimes a simple restart of mysql will fix the problem.
References
o MySQL Documentation: 5.5.8 Causes of Access denied Errors
o MySQL Documentation: A.2.2 Can’t connect to [local] MySQL server
Warning: mysql_connect(): Host ‘******’ is not allowed
This indicates the wrong server DB_SERVER information in the configure.php files.
Warning: mysql_connect(): Host ‘******’ is not allowed to connect to this MySQL server in *:\******\www\*****\******\includes\functions\database.php on line 19
Unable to connect to database server!
Warning: mysql_connect(): Host ‘******’ is not allowed Solution
Check the catalog/includes/configure.php and catalog/admin/includes/configure.php files for incorrect information.
Warning: Too many connections
The following error message is shown when the maximum number of connections to the database server has been reached:
Warning: Too many connections in /path/to/osCommerce/includes/functions/database.php on line 19 Warning: MySQL Connection Failed: Too many connections in /path/to/osCommerce/includes/functions/database.php on line 19. Unable to connect to database server!
Warning: Too many connections Solution
This problem is common for shared hosting servers and requires correspondance with the server administrator.
This problem is generally not a fault of osCommerce, but can be experienced when osCommerce is installed on budget hosting servers.
Posted by admin on April 18, 2009 under oScommerce Issues, oScommerce Upgrade |
This happens due to a bug in OSCommerce after the server upgrade is from PHP 4.x to PHP 5. The way the code was written in upload.php was using an undocumented feature that was not officially supported, and subsequently did not carry over into PHP 5.
To fix this, edit the ‘upload.php’ file mentioned in the error message using a text editor. Open the file and find the line (about 30 lines down) that says:
// self destruct
$this = null;
And edit it to say this:
// self destruct
// $this = null;
unset($this);
(basically comment out with // the $this = null; line and add the unset($this); line)
Your admin panel should work properly now.
This is a common issue with a working admin panel when php version upgrade to 5 is done
Posted by admin on December 31, 2008 under oScommerce Issues |
After upgrading a OsCommerce site to PHP5 the follow errors occurred when using the customer part of the admin section:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /catalog/admin/customers.php on line 782
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /catalog/admin/customers.php on line 784
Warning: reset() [function.reset]: Passed variable is not an array or object in /catalog/admin/includes/classes/object_info.php on line 17
Warning: Variable passed to each() is not an array or object in /catalog/admin/includes/classes/object_info.php on line 18
To eliminate thee array_merge() errors, edit the admin/customers.php file:
Find these lines:
$customer_info = array_merge($country, $info, $reviews);
$cInfo_array = array_merge($customers, $customer_info);
and change them to:
$customer_info = array_merge((array)$country, (array)$info, (array)$reviews);
$cInfo_array = array_merge((array)$customers, (array)$customer_info);
Posted by admin on under oScommerce Issues |
Error Messages –
Warning: Too many connections in /path/to/osCommerce/includes/functions/database.php on line 19 Warning: MySQL Connection Failed: Too many connections in /path/to/osCommerce/includes/functions/database.php on line 19. Unable to connect to database server!
This problem is generally not a fault of osCommerce, but can be experienced when osCommerce is installed on budget hosting servers.
The following error message is shown when the maximum number of connections to the database server has been reached:
Warning: Too many connections in /path/to/osCommerce/includes/functions/database.php on line 19
Warning: MySQL Connection Failed: Too many connections in /path/to/osCommerce/includes/functions/database.php on line 19. Unable to connect to database server!
Warning: Too many connections Solution
This problem is common for shared hosting servers and requires correspondance with the server administrator.