Posts Tagged ‘php 5’

Fixing PHP Fatal error: Call to undefined function session_register()

Monday, July 1st, 2013

While moving Website from older Debian 6 to Debian 7 server with Apache I encountered PHP Fatal error:

PHP Fatal error:  Call to undefined function session_register() in /var/www2/site/www/include/modules/core/session.class.php on line 7, referer: http://192.168.1.9/

In PHP newer than PHP 5.3, session_register(): function is obsolete, there is no need anymore to have this function initiated before using SESSION variables.

Comment out  in PHP files prompting error in Apache error.log everywhere where matched:

session_register();
session_register('session');

 

to look like this:
 

//session_register();
//session_register('session');

In newer PHP versions to initialize sessions:

 $_SESSION['session']="session_variable";

Before test it again in browser, restart Browser and Apache server to make sure some caching from Apache or Browser doesn't influence. That's all now site  works fine 🙂

How to fix “The function split() is deprecated in PHP 5.3” on FreeBSD

Saturday, May 28th, 2011

If you’re installing some PHP based CMS/blog like (Joomla or WordPress) or some kind of template and suddenly you stumble on a error:

Deprecated: Function split() is deprecated in /usr/local/www/websitedomain/templates/youbizz/html/modules.php on line 78

In order to fix that the file which spits the error message, in my case modules.php needs to be modified and the split php function has to be substituted with explode on every occuring place.

I experienced this error on FreeBSD 7_2 with php version 5.3.5 installed from ports.
This simple fix works fine.

For the School-examination

Thursday, January 31st, 2008

Tell me which ideotic government would create a site based on php and would make the serverunder Windows?

Just Guess ours the Bulgarian ministry of Science and Knowledge has started a new site dedicated to helping graduating school pupils with the Future School-examinationthey have to make.

It’s pretty easy to see that just observe:

jericho% telnet zamaturite.bg 80

Trying 212.122.183.208…

Connected to zamaturite.bg.
Escape character is ‘^]’.
HEAD / HTTP/1.0HTTP/1.1 200 OK
Connection: close
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Date: Wed, 30 Jan 2008 19:10:18 GMT
Content-Type: text/html; charset=UTF-8Server: Apache/2.2.6 (Win32) PHP/5.2.5X-Powered-By: PHP/5.2.5Set-Cookie: PHPSESSID=fn5jtjbet7clrapi0a5e5kgvt7; path=/
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Keep-Alive: timeout=5, max=100
Connection closed by foreign host.
jericho%

Just great our Bulgarian government spend money on buying proprietary software OS to run a Free Software based solution.

This example is pretty examplary of what our country looks like. Sad …

END—–