Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
jlajax
Ardent RavenCMS Supporter



Joined: Oct 12, 2006
Posts: 244
Location: Jacksonville, Florida

PostPosted: Wed Sep 12, 2012 4:44 pm Reply with quote

Hello everyone it's been a while since I dropped in. I am getting the following errors upon moving a site to a newer server.

Deprecated: Function ereg() is deprecated in /home/content/90134/9848090/html/html/mainfile.php on line 70

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/content/90134/9848090/html/html/rnconfig.php on line 264

I think I have determined that it is a php 5 conflict. I have to the best of my knowledge set the error reporting to off and I am still getting he error messages.

config.php > $display_errors = false; //This should only be used (set to "true") when testing locally and not in a production environment

rconfig.php > $error_reporting = E_ALL & ~E_DEPRECATED; // This is the default and means: All errors except Notices

These are the solutions I have found in the forums and I am still getting the error messages. Have I missed something?

RavensScripts RavensScripts
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1775

PostPosted: Wed Sep 12, 2012 4:53 pm Reply with quote

do you use php 5.4?

in RN2.40.01 is line 70 in the mainfile:

Code:
         if (ereg('MSIE', $_SERVER['HTTP_USER_AGENT'])) {

            header('Content-Encoding: gzip');
         }
 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Wed Sep 12, 2012 9:14 pm Reply with quote

jlajax, the problem is that these two warnings are before the error handling is set. Open rnconfig.php and at the bottom change:
Code:


set_magic_quotes_runtime(0); // Disable magic_quotes_runtime

to:
Code:


@set_magic_quotes_runtime(0); // Disable magic_quotes_runtime


Open mainfile.php and find the following lines (59-75):
Code:


if ($phpver >= '4.0.4pl1' && isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'],'compatible')) {
   if (extension_loaded('zlib')) {
      @ob_end_clean();
      ob_start('ob_gzhandler');
   }
} elseif ($phpver > '4.0' && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && !empty($_SERVER['HTTP_ACCEPT_ENCODING'])) {
   if (strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
      if (extension_loaded('zlib')) {
         $do_gzip_compress = true;
         ob_start(array('ob_gzhandler',5));
         ob_implicit_flush(0);
         if (ereg('MSIE', $_SERVER['HTTP_USER_AGENT'])) {
            header('Content-Encoding: gzip');
         }
      }
   }
}

change to:
Code:


if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false && @extension_loaded('zlib') && !headers_sent()) {
   ob_start('ob_gzhandler');
   ob_implicit_flush(0);
}

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
jlajax







PostPosted: Thu Sep 13, 2012 10:10 am Reply with quote

You guys are the best! THX!


RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts
 
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1123

PostPosted: Fri Sep 14, 2012 1:18 am Reply with quote

Open mainfile.php and at the bottom remove

Code:
?>


to avoid any future errors.
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sun Sep 16, 2012 9:29 am Reply with quote

unicornio wrote:
Open mainfile.php and at the bottom remove

Code:
?>


to avoid any future errors.


We should actually be doing this across the board for ANY script that is brought in via include/require and is also not intended to be accessible directly from the browser.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

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 ©