Wednesday, March 10, 2010

Deprecate function Problem for Drupal/Joomla in PHP 5.3.x

Hi Developers,
I googled or searched a lot of forums and website to resolve the issue Deprecate Function error when installing Drupal CMS in PHP 5.3.x version but finally a got a forum i.e Click it

Solution Type 1:
Deprecate warning while installing Drupal framework in php 5.3 version.
If you prefer to keep PHP 5.3, you can always suppress the errors. In Drupal's includes/common.inc, find line 620(nearly).


It should be listed as:
if ($errno & (E_ALL ^ E_NOTICE ^ E_DEPRECATED)) {
Replace this line with:
if ($errno & (E_ALL & ~E_NOTICE & ~E_DEPRECATED)) {


After doing above change in include/common.inc drupal folder,check the installing drupal, if you get again error then you need to Change in php.ini file also


It should be listed as:
error_reporting=E_ALL | E_STRICT | E_DEPRICATED
Replace this line with:
error_reporting=E_ALL & ~E_DEPRICATED & ~E_STRICT


After finishing above change in php.ini,Please Restart your Webserver and Check the installation of drupal.

Note that every time you update Drupal you'll have to manually make this change until they finally patch them to deal properly with php 5.3

Solution Type 2:

Note :If you Still get Deprecate Error after changing all above setting, while Installing Drupal in PHP 5.3.x.
I got solution by My Colleague(Innocent )
Remove all above changes and modify following Line no 902 in includes/file.inc in drupal it resolve the deprecate error.


It should be listed as:
elseif ($depth >= $min_depth && ereg($mask, $file)) {
Replace this line with:
elseif ($depth >= $min_depth && @ereg($mask, $file)) {

No comments:

Post a Comment