Get FCKeditor work on Oscommerce 2.2 release 2a

OSCommerceToday I downloaded All In One FCK Editor WYSIWYG Editor Oscommerce add-ons since I needed to add a WYSIWYG(What You See Is What You Get) HTML editor on one of my client’s Oscommerce Shopping Cart site.

After I did all uploadings and changes according to the Readme document, I got the following errors after I refreshed the back-end page.

Warning: Failed opening ‘fckeditor_php4.php’ for inclusion (include_path=”) in /var/www/html/catalog/admin/fckeditor/fckeditor.php on line 75

Not sure this is a world-wide bug or just for this particular situation since the version of PHP on the client’s web server is only PHP 4.1.2 which might caused this problem (might not?). Anyway, upgrading the PHP is not an option for me at this moment. So I had to dig into the PHP codes to try my best to resolve this problem.

After a minor code change, this problem went away. Publishing here and hope it can save your time if you have the similar problem.

Find the file named fckeditor.php under the folder of \catalog\admin\fckeditor\, and look for line 74 to line 78 as the below.

if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) )
include_once( ‘fckeditor_php4.php’ ) ;
else
include_once( ‘fckeditor_php5.php’ ) ;

You should put fckeditor folder before the included file name (fckeditor_php4.php and fckeditor_php5.php), like this:

if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) )
include_once( ‘fckeditor\fckeditor_php4.php’ ) ;
else
include_once( ‘fckeditor\fckeditor_php5.php’ ) ;

Save this file and upload the web server, you should be fine now.

Tags: , , ,

Related posts

0 Responses to “Get FCKeditor work on Oscommerce 2.2 release 2a”


  1. No Comments

Leave a Reply