Author |
Message |
Doulos
Life Cycles Becoming CPU Cycles

Joined: Jun 06, 2005
Posts: 732
|
Posted:
Mon Dec 05, 2011 8:36 pm |
|
I don't know PHP, but am trying to fix errors that crop up after updating to PHP5.3:
Getting this errorQuote: | Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in /home/mememe/public_html/stats/includes/class_session.php on line 223
|
Line 222-223:Code:Line 222: function is_sid($sid) {
Line 223: return preg_match('^[a-f0-9]{32}$', strtolower($sid));
|
help would be greatly appreciated.
Thanks |
|
|
|
 |
nuken
RavenNuke(tm) Development Team

Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Mon Dec 05, 2011 9:36 pm |
|
Code:
Line 223: return preg_match('/^[a-f0-9]{32}$/', strtolower($sid));
|
|
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
 |
Doulos

|
Posted:
Mon Dec 05, 2011 9:58 pm |
|
|
|
 |
Doulos

|
Posted:
Tue Dec 06, 2011 2:35 pm |
|
Wow, updating to PHP5.3 totally messed up Psychostats. Took me hours to fix it so it showed no errors. Thankfully, there are guys like you who post fixes for these errors.No errors showing, but total time online shows "Array", instead of the time. I guess I should try to learn PHP again. |
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Wed Dec 07, 2011 1:42 pm |
|
Last time I checked, only around 7% of shared hosting providers were using PHP 5.3 so it's nice to see someone blazing a trail. Personally, I'm really looking forward to 5.3 as I use some software locally that won't run on my main server. |
|
|
|
 |
CodyG
Life Cycles Becoming CPU Cycles

Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island
|
Posted:
Thu Jan 31, 2013 10:30 am |
|
I'm just catching up...
Here is my error thrown by a coppermine block:
[28-Jan-2013 09:00:17 America/Los_Angeles] PHP Deprecated: Function eregi() is deprecated in /home/*****/public_html/blocks/block-Gallery_center-Last_pictures_thumb.php on line 25
if (eregi("block-CPG", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
I tried this, but no luck.
if (preg_match("block-CPG", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
Ideas? Thank you. |
_________________ "We want to see if life is ubiquitous." D.Goldin |
|
|
 |
spasticdonkey
RavenNuke(tm) Development Team

Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Thu Jan 31, 2013 10:33 am |
|
Just replace with
if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
} |
|
|
|
 |
CodyG

|
Posted:
Thu Jan 31, 2013 10:42 am |
|
Thank you... I thought it would be something like that but had to check. it works great. |
|
|
|
 |
|