?
Solved

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

Posted on 2005-03-01
5
Medium Priority
?
505 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
  • 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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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

599 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