Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
Doulos
Life Cycles Becoming CPU Cycles



Joined: Jun 06, 2005
Posts: 732

PostPosted: Mon Dec 05, 2011 8:36 pm Reply with quote

I don't know PHP, but am trying to fix errors that crop up after updating to PHP5.3:

Getting this error
Quote:
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
 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Mon Dec 05, 2011 9:36 pm Reply with quote

Code:


Line 223: return preg_match('/^[a-f0-9]{32}$/', strtolower($sid));

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
Doulos







PostPosted: Mon Dec 05, 2011 9:58 pm Reply with quote

Thank you.
 
Doulos







PostPosted: Tue Dec 06, 2011 2:35 pm Reply with quote

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

PostPosted: Wed Dec 07, 2011 1:42 pm Reply with quote

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.
 
View user's profile Send private message Send e-mail
CodyG
Life Cycles Becoming CPU Cycles



Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island

PostPosted: Thu Jan 31, 2013 10:30 am Reply with quote

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 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Thu Jan 31, 2013 10:33 am Reply with quote

Just replace with

if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
}
 
View user's profile Send private message Visit poster's website
CodyG







PostPosted: Thu Jan 31, 2013 10:42 am Reply with quote

Thank you... I thought it would be something like that but had to check. it works great.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©