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 7 of 7
  1. #1
    New Coder
    Join Date
    Oct 2010
    Location
    http://www.sussexweddingphotography.org.uk
    Posts
    29
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Undefined Index Pain In The A...

    Hi there.

    I have an error occuring, not all the time, just now and again. I have a feeling it might be session expiry settings but I'm not sure...

    It's happened once with me just after I left the page for a time and then went to click next page..

    error_reporting (E_ALL ^ E_NOTICE);

    if(isset($_POST['postcode'])) { $_SESSION['postcode']=$_POST['postcode']; }
    $usrPostcode = formatBritishPostcode($_SESSION['postcode']);

    I haven't pinned down when it's happening yet

    If anyone can help

  • #2
    New Coder
    Join Date
    Oct 2010
    Location
    http://www.sussexweddingphotography.org.uk
    Posts
    29
    Thanks
    2
    Thanked 0 Times in 0 Posts
    This also pops up around the same time too

    function.session-start</a>]: ps_files_cleanup_dir: opendir(/var/lib/php5) failed

  • #3
    New Coder
    Join Date
    Oct 2010
    Location
    http://www.sussexweddingphotography.org.uk
    Posts
    29
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I've set my php.ini file to have this

    session.gc_probability = 0

    Problem is. When I putty in to my server anbd do a search for php.ini I find several files. I editied the one on my VPS Shared hosting which came under my domain name folder.

    I've only just restarted the folder, so no idea if that helped yet..

  • #4
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,091
    Thanks
    51
    Thanked 506 Times in 493 Posts
    You do realise that the .org.uk domain is for non-profit organisations don't you?

    Instead of posting just a few minimal lines of code, please show us the file in [php] tags.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #5
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    What are all the errors you receive in their entirety?
    That second one in specific is a failed C function call. But its not really helpful as it sits unless there's more information on why it failed to open that path (permission denied? Path not found?).
    I wouldn't set the probability of the garbage collection to 0. That'll just leave files to never get cleaned up.

  • #6
    New Coder
    Join Date
    Oct 2010
    Location
    http://www.sussexweddingphotography.org.uk
    Posts
    29
    Thanks
    2
    Thanked 0 Times in 0 Posts
    It appears to be a permission problem rather than a coding one.

    I think the var/lib/php folder doesn't have the right access.

    I have chmod it to 777 755 still cause the same error to occur.

    I am not sure I want it set at 777 so if anyone has any thought.

    Thanks very much..

  • #7
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Post the errors in their entirety. Having an error simply saying it has failed doesn't help.

    Edit:
    As for permissions, make sure you check the umask settings as well.


  •  

    Posting Permissions

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