Please help me solve this problem. The code ran perfectly on my localhost having PHP 5.3, but I am facing problem on the webserver having PHP 5.3 though I think the version is not the problem here.

SpacePhoenix
—
2013-01-04T19:02:00Z —
#2

You need to either include or require the file containing the logged_in() function before you can use it

trollster
—
2013-01-05T01:29:19Z —
#3

I have done that bro

rickschmidt
—
2013-01-05T02:36:03Z —
#4

Where have you started the session? You should have the code session_start(); at the top of every page that you use it on, otherwise you can't access the session data.Even though PHP reads your code for functions before it calls them, its general best programming practice to define the functions above where you call them. Where is the include for this function?

Also, you mention that your web host has PHP 5.3 installed. Make sure its running that version using the php_info(); function. I know with my experience that some hosts have 5.3 off by default (but have it installed) which you need to enable via an .htaccess file. If this is the case the following .htaccess code should be used in the root directory:

#Use PHP 5.3
AddType application/x-httpd-php53 .php

With what you have posted it is hard to tell what the issue is. Please post more code in context for further assistance.

Hope this helps,Rick

trollster
—
2013-01-05T02:44:24Z —
#5

I have started the session on top of init.php page, init.php page requires the connect.php, functions.php

And I checked with phpinfo(), it shows 5.3 only, nevertheless I will add that code to my .htaccess file.

And now I am getting this error: Fatal error: Allowed memory size of 65011712 bytes exhausted (tried to allocate 40961 bytes) in /home/ankursvo/public_html/tofsis/init.php on line 2