Recent Topics

1 Nov 18, 2007 14:50    

My b2evolution Version: 2.x

Attempting my first install of 2.x on a non-production server safely out of the way. Put on top of a previous 1.8 installation (which had no content anyway). Deleted all old files. New files all uploaded, config seemed OK, database updated Ok, came to log in as admin and when I did so got what I guess php users might call the 'red screen of death':


Warning: ini_set() has been disabled for security reasons in /data/members/paid/s/t/[myserver]/htdocs/www/blog/inc/sessions/model/_session.class.php on line 157

Warning: ini_set() has been disabled for security reasons in /data/members/paid/s/t/[myserver]/htdocs/www/blog/inc/sessions/model/_session.class.php on line 170

Warning: Cannot modify header information - headers already sent by (output started at /data/members/paid/s/t/[myserver]/htdocs/www/blog/inc/sessions/model/_session.class.php:157) in /data/members/paid/s/t/[myserver]/htdocs/www/blog/inc/_core/_misc.funcs.php on line 2304

Warning: Cannot modify header information - headers already sent by (output started at /data/members/paid/s/t/[myserver]/htdocs/www/blog/inc/sessions/model/_session.class.php:157) in /data/members/paid/s/t/[myserver]/htdocs/www/blog/inc/_core/_misc.funcs.php on line 2305

Warning: Cannot modify header information - headers already sent by (output started at /data/members/paid/s/t/[myserver]/htdocs/www/blog/inc/sessions/model/_session.class.php:157) in /data/members/paid/s/t/[myserver]/htdocs/www/blog/inc/_core/_misc.funcs.php on line 2306

Warning: Cannot modify header information - headers already sent by (output started at /data/members/paid/s/t/[myserver]/htdocs/www/blog/inc/sessions/model/_session.class.php:157) in /data/members/paid/s/t/[myserver]/htdocs/www/blog/inc/_core/_misc.funcs.php on line 2307

Fatal error: Call to a member function on a non-object in /data/members/paid/s/t/[myserver]/htdocs/www/blog/inc/_main.inc.php on line 439

I checked phpinfo and sure enough ini_set() is disabled if indeed that is the issue. Not my server so I'm going to have to live with that.

Of course I went to RTFM but all the advice on the forum about the ini_set() issue seems to relate to 1.x. So new suggestions welcomed.

2 Dec 02, 2007 15:45

Update: this is still a problem for me. I've now put a complete clean install of 2.2.0 onto the same server, new database too. Same errors. The same error occurs if I simply reload the login screen too.

I'd really appreciate some help here if anyone's got any ideas. Or if I just need to give up with b2e on this server then I'd like to know that, so I can stop trying!

3 Dec 02, 2007 16:13

Let's try a hack.
1) download and install 2.2 (it's released today)
2) make a backup from the file ../blogs/inc/session/model/_session.class.php
3) crack open one of the copies of this file and find lines 153-171:

					else
					{ // Some session data has been previsouly stored:

						// Unserialize session data (using an own callback that should provide class definitions):
						$old_callback = ini_set( 'unserialize_callback_func', 'session_unserialize_callback' );
						if( $old_callback === false )
						{ // this can fail, if "ini_set" has been disabled for security reasons.. :/
							// Brutally load add classes that we might need:
 							session_unserialize_load_all_classes();
						}
						// TODO: dh> This can fail, if there are special chars in sess_data:
						//       It will be encoded in $evo_charset _after_ "SET NAMES", but
						//       get retrieved here, _before_ any "SET NAMES" (if $db_config['connection_charset'] is not set (default))!
						$this->_data = @unserialize($row->sess_data);

						if( $old_callback !== false )
						{	// Restore the old callback if we changed it:
							ini_set( 'unserialize_callback_func', $old_callback );
						}


and change it to:

					else
					{ // Some session data has been previsouly stored:

						// Unserialize session data (using an own callback that should provide class definitions):
						// $old_callback = ini_set( 'unserialize_callback_func', 'session_unserialize_callback' );
						// if( $old_callback === false )
						// { // this can fail, if "ini_set" has been disabled for security reasons.. :/
							// Brutally load add classes that we might need:
 							session_unserialize_load_all_classes();
						// }
						// TODO: dh> This can fail, if there are special chars in sess_data:
						//       It will be encoded in $evo_charset _after_ "SET NAMES", but
						//       get retrieved here, _before_ any "SET NAMES" (if $db_config['connection_charset'] is not set (default))!
						$this->_data = @unserialize($row->sess_data);

						// f( $old_callback !== false )
						// {	// Restore the old callback if we changed it:
							// ini_set( 'unserialize_callback_func', $old_callback );
						// }

Good luck

5 Dec 02, 2007 23:31

Thanks for your help. That's certainly cut down on the red stuff, so some progress. I made the suggested changes and now I get this error:

Fatal error: Call to a member function on a non-object in /data/members/paid/s/t/s[my server]/htdocs/www/blog/index.php on line 59


But nothing else.

6 Dec 02, 2007 23:50

Next try:

change everything back to normal (I advised you to hold an original copy at hand) and add after the very first <?php this line:

error_reporting(E_ALL ^ E_WARNING);


and see if you get away with this one.

Good luck

8 Dec 03, 2007 20:11

Good idea, I've uploaded the file (yes I did indeed keep a copy - good tip) but the same error occurs, with nothing else on the page at all. :(

9 Dec 04, 2007 01:04

Can you change to $debug=1 at ../blogs/conf/_advanced.php and report what the debug spits out?

10 Dec 04, 2007 09:43

That's a useful trick - sadly it didn't get anything more. Still nothing other than the same error.

11 Jan 01, 2008 17:27

No easy solution to this one - however I finally 'cured' it by moving the entire installation to a new server with different host - which I had more direct control over, where it worked fine. FWIW by this time I was using 2.3 and I did not try to see if the original 2.1 would be any different. I doubt it.

Suggest anyone else facing similar issue tries the same approach if you can.

12 Mar 18, 2008 16:41

filthio wrote:

Thanks for your help. That's certainly cut down on the red stuff, so some progress. I made the suggested changes and now I get this error:

Fatal error: Call to a member function on a non-object in /data/members/paid/s/t/s[my server]/htdocs/www/blog/index.php on line 59


But nothing else.

I'm not wondering about this, i think the Code from Afwas needs a i for the last "if" :roll:
So i want to try Afwas Change-Code because have the same Problem as filthio :-/

// :D *yeahh* with the full "if" it works :D thx Afwas!

13 Mar 18, 2008 21:32

:p

Hi yasi,

Nice to see it works, but you may concider upgrading to the latest version 2.4.1. Actually I strongly advise you to do so.

Good luck

14 Mar 19, 2008 09:36

ohh kk i will have a look now :)

15 Aug 27, 2008 04:35

help

Warning: ini_set() has been disabled for security reasons in /home/tarma/public_html/weblog/blogs/inc/sessions/model/_session.class.php on line 157


Form is loading...