Difference between revisions of "CubeCart v3 and PHP 5.3.x"

From Acenet Knowledgebase
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 15: Line 15:
 
and change:
 
and change:
  
<highlightsyntax lang="php">
+
<pre>
 
error_reporting(E_ALL ^ E_NOTICE);
 
error_reporting(E_ALL ^ E_NOTICE);
</highlightsyntax>
+
</pre>
  
 
to:
 
to:
  
<syntaxhighlight lang="php">
+
<pre>
 
error_reporting(E_ALL  and  ~(E_NOTICE | E_STRICT | E_DEPRECATED | E_USER_DEPRECATED));
 
error_reporting(E_ALL  and  ~(E_NOTICE | E_STRICT | E_DEPRECATED | E_USER_DEPRECATED));
<syntaxhighlight>
+
</pre>
  
 
It is also suggested to update the file:
 
It is also suggested to update the file:
Line 31: Line 31:
 
and add the line:
 
and add the line:
  
<syntaxhighlight lang="php">
+
<pre>
 
include("../../includes/ini.inc.php");</pre>
 
include("../../includes/ini.inc.php");</pre>
  
 
below this line:
 
below this line:
  
<syntaxhighlight lang="php">
+
<pre>
 
// Init var :
 
// Init var :
</syntax>
+
</pre>
  
 
This will disable warnings regarding deprecated functions.  The E_DEPRECATED flag only provides warnings regarding features that will not work in the future.  The eregi() function still operates correctly, but will not be supported in a future version of PHP.  At this time, it is important to begin considering migrating to another shopping cart solution or upgrade to the pay version of CubeCart.  Once the eregi() function is removed from a future version of PHP, CubeCart v3 will no longer function correctly.
 
This will disable warnings regarding deprecated functions.  The E_DEPRECATED flag only provides warnings regarding features that will not work in the future.  The eregi() function still operates correctly, but will not be supported in a future version of PHP.  At this time, it is important to begin considering migrating to another shopping cart solution or upgrade to the pay version of CubeCart.  Once the eregi() function is removed from a future version of PHP, CubeCart v3 will no longer function correctly.
  
 
[[Category:CubeCart]]
 
[[Category:CubeCart]]

Latest revision as of 22:55, 4 October 2012

CubeCart v3.0.17 is the latest version available through Fantastico. After this version, CubeCart became a pay product and is no longer freely available.

PHP 5.3.x compatibility updates for CubeCart are only available in later versions of CubeCart than what is freely available via Fantastico. When CubeCart is run on PHP 5.3.x, you may notice the following errors:

Deprecated: Function eregi() is deprecated in ...

This solution is taken from the CubeCart forums here:

http://forums.cubecart.com/topic/39139-installation-on-thumbdrive-problem/page__p__166757

To address this problem, edit the file:

includes/ini.inc.php

and change:

error_reporting(E_ALL ^ E_NOTICE);

to:

error_reporting(E_ALL  and  ~(E_NOTICE | E_STRICT | E_DEPRECATED | E_USER_DEPRECATED));

It is also suggested to update the file:

admin/filemanager/upload.php

and add the line:

include("../../includes/ini.inc.php");

below this line:

// Init var :

This will disable warnings regarding deprecated functions. The E_DEPRECATED flag only provides warnings regarding features that will not work in the future. The eregi() function still operates correctly, but will not be supported in a future version of PHP. At this time, it is important to begin considering migrating to another shopping cart solution or upgrade to the pay version of CubeCart. Once the eregi() function is removed from a future version of PHP, CubeCart v3 will no longer function correctly.