?
Solved

"session_start()" isn't recognize as a function ...

Posted on 2005-03-01
5
Medium Priority
?
489 Views
Last Modified: 2013-12-13
Hi experts !

  I'm getting a weird error here.  I have scripts that was working perfectly this afternoon, and tonight, I did an update of Apache2 and upgrade PHP4 to PHP5.  Now, I get the following error when I try to access my pages:

---------------------
Fatal error: Call to undefined function session_start() in /home/.../index.php on line 2
---------------------

And the first lines in that file are:

------------------
<?
session_start();

[rest of the script]
------------------

Have you any idea why I'm getting this error ?  Does the function still exist under PHP5 ???  Do I have to activate something somewhere ?  Please help !!!
0
Comment
Question by:BGMi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:BGMi
ID: 13436288
Hi !

  It seem that the packages have been compiled with the "--disable-session" switch.  Is there a way to "enable-session" without recompiling the whole package ?

Thanks !
0
 

Author Comment

by:BGMi
ID: 13436296
If you are using "Gentoo Linux", do the following when emerging the package

-------------------
#USE="session mysql apache2" emerge -av php
-------------------

That way, you will be sure that the basic support will be there.

Have a nice day !
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 2000 total points
ID: 13438839
install module php4_session
then in php.ini define extension_dir to point to the module directory
0
 

Author Comment

by:BGMi
ID: 13438934
As I was in an hurry yesterday, I decided to recompile "php" and "mod_php" with the USE variable set like I said before.  That way, everything goes well !  So I cannot test your comment, but like I find out myself the problem, and can't give me points :-P  I will give them to you ... easy points as you answer first !  Hope you will not disagree !

Have a nice day !
Sorry if I can't test it !
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 13439195
thanks for being generous, hope this helps future readers ..
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question