Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Apr 2009
    Posts
    264
    Thanks
    24
    Thanked 1 Time in 1 Post

    HELP! Can't use sessions! oO

    HELP! When I try to use this at the VERY top of the page:

    PHP Code:
    <?php
     
    session_start
    ();
     
    $_SESSION['f_name0001'] = $_POST['f_name0001'];
    $_SESSION['l_name0001'] = $_POST['l_name0001'];
    $_SESSION['ad_0001'] = $_POST['ad_0001'];
    $_SESSION['co_0001'] = $_POST['co_0001'];
    $_SESSION['c_0001'] = $_POST['c_0001'];
     
    ?>
    I get:

    [code=text]Warning: session_start() [function.session-start]: open(..\Server\tmp\sess_e8140ca2c9eabcfdec9c3ac769ca6da7, O_RDWR) failed: No such file or directory (2) in C:\Users\blah\htdocs\customerform\project\Orderform.php on line 15[/code]

    How do I fix this?!

  • #2
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    Create a folder called sessiontemp in your c: drive then use
    PHP Code:
    <?php 
    session_save_path
    ('C:\\sessiontemp\\');
    session_start(); 
      
    $_SESSION['f_name0001'] = $_POST['f_name0001']; 
    $_SESSION['l_name0001'] = $_POST['l_name0001']; 
    $_SESSION['ad_0001'] = $_POST['ad_0001']; 
    $_SESSION['co_0001'] = $_POST['co_0001']; 
    $_SESSION['c_0001'] = $_POST['c_0001']; 
      
    ?>
    And see if that works.
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)

  • #3
    Regular Coder
    Join Date
    Apr 2009
    Posts
    264
    Thanks
    24
    Thanked 1 Time in 1 Post
    Thanks, but I have decided to switch to my other Apache server, and it works fine now!

  • #4
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    Excellent, as long as you got it resolved
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)


  •  

    Posting Permissions

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