osCthumb-phpThumb does not show all cached images

 One of our client’s osCommerce websites with oscThumb was not displaying all thumbnails for some reason. After messing around with the configuration file and testing a few directives, I found one that fixed the problem. PhpThumb was generating the thumbnails properly, but hit the maximum cached files limit. In order to fix this, edit the ‘cache_maxfiles’ and/or ‘cache_maxsize” parameters. In this instance, I changed it from 200 to 400. Maximum number of generated thumbnails and directories is usually less...

read more

Fix osCommerce 2.3.x to be compatible with PHP 5.4.x UPDATED

 To make your version of osCommerce 2.3.1 or 2.3.2 compatible with upgrading to PHP 5.4.x you only need to replace 2 files.  The reason why those versions of osCommerce die with the upgrade to PHP 5.4.x is because of the new session handling process in PHP 5.4, you can read about it here: http://php.net/manual/en/migration54.php.  Please note that this fix does not account for any plugins or custom code that you might have.  If you have customized your site there may be other files you will need to update. To fix: start by downloading...

read more

osCommerse configure.php troubles

 An osCommerse installation was giving me a bunch of problems with configure.php and it’s modules, boxes and other paths.  The problem was the install did not like virtual directory paths, but worked fine with physical directory paths.  Here is a quick fix that may help you. Add the following code to set the include path in your appication_top.php file(s). Do this in \www\includes\application_top.php: // ADD INCLUDED PATH MANUALLY // set_include_path(get_include_path() . PATH_SEPARATOR . '/home/cgt001/www'); // END ADD...

read more

osCommerce Get Cheapest Product in Category

 Here’s a function that you can use to find and get the cheapest product in any category. The function looks at the base price (product_price) and special price (specials_new_products_price) and chooses the lesser value; I added it to includes/functions/general.php, but you can add it anywhere it makes sense to do so.   //// // Get Cheapest Product in Category // function tep_get_cheapest_prod_in_cat($cat_id=0) {   global $languages_id; $res=false;   $categories = array(); ...

read more

osCommerce required files Error “Fatal error: require() [function.require]: Failed opening required ‘includes/functions/compatibility.php’” Solved

 We encountered the following error on of our osCommerce sites, Fatal error: require() [function.require]: Failed opening required ‘includes/functions/compatibility.php’ the problem was that the site’s web_root directory was not in php’s include path. To quickly fix the problem without having to mess with php.ini, or server settings we included the following line of code: set_include_path(get_include_path() . PATH_SEPARATOR . $absolute_path_to_web_root); as the first directive in...

read more