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 2010
    Posts
    220
    Thanks
    116
    Thanked 1 Time in 1 Post

    PHP Session issue / Amazon EC2 cloud server

    Im very new to PHP and still trying to understand this.

    In a nutshell, there was a form I had setup that was working, and then it stopped working. For example, the form would start saying to 'fill in the field' (validation) when the field was properly filled in, etc.

    After doing some research on this form, it looks like the issue is with PHP sessions?

    Here is some response I got:

    "If you know how to change the session config, probably the variable session.save_path, then please make it writable by web user"

    It is an EC2 setup w/ Amazon, and all I have is FTP access. Can this be done through FTP access?

    Any help would be greatly appreciated. I don't understand the 'PHP session' concept....

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Without any code posted and no determinable error, than saying its a PHP session is not verify-able.
    The default of session.save_path is /tmp. Which is globally writable by any user. If its not, than your host has broken something on their end.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • Users who have thanked Fou-Lu for this post:

    BlackReef (03-13-2013)

  • #3
    Regular Coder
    Join Date
    Apr 2010
    Posts
    220
    Thanks
    116
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Fou-Lu View Post
    Without any code posted and no determinable error, than saying its a PHP session is not verify-able.
    The default of session.save_path is /tmp. Which is globally writable by any user. If its not, than your host has broken something on their end.
    Thank you for your response, Fou-Lu.

    Yea. So, I should just be able to create a /tmp folder in the root?

    Do I create like a session.php file and place it in there? Im sorry, I dont have much experience with this...

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Nope and nope. /tmp should be created by default. All you need to do is call a session_start() prior to any output, and it should automatically create the files in the session.save_path location (/tmp by default). PHP manages the files completely.
    You can run a phpinfo() script and search it for the session.save_path or simply echo an ini_get('session.save_path') to see where its going.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • Users who have thanked Fou-Lu for this post:

    BlackReef (03-13-2013)


  •  

    Posting Permissions

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