In the shared hosting environment the hosting providers upgrade the platform/features/environment which will cause certain unexpected behavior(s) as the screen-shot(s) which showed that certain function were deprecated due to upgrading of php to what the hosting company found fit.
a) In the home page the following msg was displayed
"Function ereg() is deprecated in /home/gnum****/public_html/includes/file.inc on line 895"
In the file file.inc the ereg is replaced with preg_match
- elseif ($depth >= $min_depth && ereg($mask, $file)) {
+ elseif ($depth >= $min_depth && preg_match("/$mask/", $file)) {
b) In the qchronicle page a warning msg similar to
"Warning: strtotime()[fuction.strtotime]: It is not safe to rely on the system's timezone settings. You are "required" to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for 'BST/1.0/DST' instead in /home/gnum****/public_html/sites/all/modules/views/modules/node/views_handler_argument_dates_various.inc on line 66"
The following warning regarding date/time was displayed which was resolved by appending the
date_default_timezone_set('Europe/London');
at the top of bootstrap.inc file
<u-09-08-2012>
when edit tab is selected in the drupal's blog section, following msg is displayed
: Function eregi_replace() is deprecated in /home/gnumeno/public_html/sites/all/themes/basic/template.php on line 46.
- $body_classes[] = 'tax-' . eregi_replace('[^a-z0-9]', '-', $term->name);
+ $body_classes[] = 'tax-' . preg_replace('/[^a-z0-9]/', '-', $term->name);
</u-09-08-2012>
a) In the home page the following msg was displayed
"Function ereg() is deprecated in /home/gnum****/public_html/includes/file.inc on line 895"
In the file file.inc the ereg is replaced with preg_match
- elseif ($depth >= $min_depth && ereg($mask, $file)) {
+ elseif ($depth >= $min_depth && preg_match("/$mask/", $file)) {
b) In the qchronicle page a warning msg similar to
"Warning: strtotime()[fuction.strtotime]: It is not safe to rely on the system's timezone settings. You are "required" to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for 'BST/1.0/DST' instead in /home/gnum****/public_html/sites/all/modules/views/modules/node/views_handler_argument_dates_various.inc on line 66"
The following warning regarding date/time was displayed which was resolved by appending the
date_default_timezone_set('Europe/London');
at the top of bootstrap.inc file
<u-09-08-2012>
when edit tab is selected in the drupal's blog section, following msg is displayed
: Function eregi_replace() is deprecated in /home/gnumeno/public_html/sites/all/themes/basic/template.php on line 46.
- $body_classes[] = 'tax-' . eregi_replace('[^a-z0-9]', '-', $term->name);
+ $body_classes[] = 'tax-' . preg_replace('/[^a-z0-9]/', '-', $term->name);
</u-09-08-2012>
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.