Results 1 to 7 of 7

Thread: Undefined call session_start

  1. #1
    jclaes is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    10

    Default Undefined call session_start

    I like to test SugarCrm but having followed the installation manual I get a msg:
    fatal error: call to undefined function session_start()
    I am running Suse SLES 9.2 PHP 4.3.4
    I checked the php.ini but found no indication session_start was disabled.
    Anybody willing to give some advice?
    Much appreciated.

  2. #2
    sugarchris's Avatar
    sugarchris is offline Sugar Community Member
    Join Date
    Sep 2005
    Location
    San Francisco, CA
    Posts
    861

    Default Re: Undefined call session_start

    Try creating a blank page, call it "test.php": add the following code:
    PHP Code:
    <?php

    session_start
    ();
    $_SESSION['test'] = "this is a test.";

    if(
    $_SESSION['test' == "this is a test.") {
        echo 
    $_SESSION['test'] . " And it was successful.";
    } else {
        echo 
    "You probably see an error above this.";
    }


    session_write_close();
    ?>
    Run it and get back to us. If it's unsuccessful, you know your PHP needs updating.

  3. #3
    jclaes is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    10

    Default Re: Undefined call session_start

    Thanks for your reply. I got some parsing errors. So I erased all proposed instructions except the start and close.

    <?php

    session_start();
    echo "XXX";
    session_write_close();
    ?>

    Running it I get a msg
    Fatal error: Call to undefined function: session_start() in /srv/www/htdocs/Nuke/Nuke/testsession.php on line 3
    Thanks.Regards

  4. #4
    sugarchris's Avatar
    sugarchris is offline Sugar Community Member
    Join Date
    Sep 2005
    Location
    San Francisco, CA
    Posts
    861

    Default Re: Undefined call session_start

    I would say pretty confidently that your PHP is not allowing session varibles to be set.

    Take a look at your php.ini file. Does it have an entry that starts with the following?:
    Code:
    [Session]
    ; Handler used to store/retrieve data.
    session.save_handler = files
    
    ; Argument passed to save_handler.  In the case of files, this is the path
    ; where data files are stored. Note: Windows users have to change this 
    ; variable in order to use PHP's session functions.
    ; As of PHP 4.0.1, you can define the path as:
    ;     session.save_path = "N;/path"
    ; where N is an integer.  Instead of storing all the session files in 
    ; /path, what this will do is use subdirectories N-levels deep, and 
    ; store the session data in those directories.  This is useful if you 
    ; or your OS have problems with lots of files in one directory, and is 
    ; a more efficient layout for servers that handle lots of sessions.
    ; NOTE 1: PHP will not create this directory structure automatically.
    ;         You can use the script in the ext/session dir for that purpose.
    ; NOTE 2: See the section on garbage collection below if you choose to
    ;         use subdirectories for session storage
    session.save_path = "C:\xampp\xampp\tmp"
    
    ; Whether to use cookies.
    session.use_cookies = 1
    
    ; This option enables administrators to make their users invulnerable to
    ; attacks which involve passing session ids in URLs; defaults to 0.
    ; session.use_only_cookies = 1
    
    ; Name of the session (used as cookie name).
    session.name = PHPSESSID
    .... (continued)
    If it doesn't I would try to do an up2date run on your RH box. You probably need an updated PHP rpm set. If anyone knows differently, please chime in. I'm definitely not a RH expert.

  5. #5
    jclaes is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    10

    Default Re: Undefined call session_start

    That is an exact copy of what I find in php.ini A bit further I have :

    ; Initialize session on request startup.
    session.auto_start = 1

    This was originally set to 0 but I chenged it to 1
    However I suppose I need to restart the server to make this option work?

    Thanks for your input.

  6. #6
    jclaes is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    10

    Smile Re: Undefined call session_start

    My problem is solved.
    I installed the PHP4 extensions and then the CURL extensions and I am able to log into the system.
    Have not played around but will from now. Hopefully all goes as smooth further on as the install.
    Thanks for your help.

  7. #7
    SWatson is offline Junior Member
    Join Date
    May 2006
    Posts
    3

    Default Session.Name = PHPSESSID

    When we log in to our intranet we use the session.name = PHPSESSID as does Sugar.

    So when we logout it removes the session.name and we have to log backinto our intranet.

    Any ideas on this? I dont see how we could rename the session.name we use, can we change in Sugar?

    Thanks
    Steve W

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •