We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I get all kinds of lovely session warnings after deploying my site to a ValueWeb.com account. Anyone have a clue what is going on?

    Warning: session_start(): open(/tmp/php-ses/sess_4e6885bc32fc136d42bda30a697e0989, O_RDWR) failed: No such file or directory (2) in /nfs/cust/1/84/82/528481/web/manager/processors/login.processor.php on line 35 
     
    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /nfs/cust/1/84/82/528481/web/manager/processors/login.processor.php:35) in /nfs/cust/1/84/82/528481/web/manager/processors/login.processor.php on line 35 
     
    Warning: Cannot modify header information - headers already sent by (output started at /nfs/cust/1/84/82/528481/web/manager/processors/login.processor.php:35) in /nfs/cust/1/84/82/528481/web/manager/processors/login.processor.php on line 203 
     
    Warning: Cannot modify header information - headers already sent by (output started at /nfs/cust/1/84/82/528481/web/manager/processors/login.processor.php:35) in /nfs/cust/1/84/82/528481/web/manager/processors/login.processor.php on line 228 
     
    Warning: Unknown(): open(/tmp/php-ses/sess_4e6885bc32fc136d42bda30a697e0989, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 
     
    Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp/php-ses) in Unknown on line 0
      • 4018
      • 1,131 Posts
      Looks to me like the session file isn’t being saved to the servers /tmp directory. Might want to contact your hosting provider and let them know. And speaking of ValueWeb...I took a look at their site. Honestly...I’m not impressed. Take a look at Fluid Hosting (www.fluidhosting.com). Very solid and stable service...and quite inexpensive too! Been with them for a little while now...very few problems. Reason I say this is cause if ValueWeb’s servers are blocking you from saving sessions in the /tmp directory...that’s not good! That’s a standard setting for any properly configured PHP server! E-mail them or call them...if they offer you shabby support for a rather simple problem...cancel your account and go elsewhere! Nuff said! laugh
        Jeff Whitfield

        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
      • Quote from: Bravado at Jun 23, 2005, 11:05 PM

        Looks to me like the session file isn’t being saved to the servers /tmp directory. Might want to contact your hosting provider and let them know. And speaking of ValueWeb...I took a look at their site. Honestly...I’m not impressed. Take a look at Fluid Hosting (www.fluidhosting.com). Very solid and stable service...and quite inexpensive too! Been with them for a little while now...very few problems. Reason I say this is cause if ValueWeb’s servers are blocking you from saving sessions in the /tmp directory...that’s not good! That’s a standard setting for any properly configured PHP server! E-mail them or call them...if they offer you shabby support for a rather simple problem...cancel your account and go elsewhere! Nuff said! laugh

        I appreciate the referral, though I actually run two hosting operations myself, on which I’ve never encountered any problems with regards to MODx (or otherwise). wink

        Anyway, off to talk to support, again...
        • If you really have to use a host like that, you could re-assign the session file storage folder, either through a .htaccess file
          php_value session.save_path "/home/www/mysite.com/manager/sessions"

          or in the files (a pain, since you have to declare it before every session_start() call). That also eliminates the session timeout issue, although you do have to come up with your own session file garbage collection scheme.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
          • Actually, no the issue here is that these guys used clustered server environments and thus saving session data to the temporary directory is not a valid action -- it must be saved somewhere specifically or it may not be available on subsequent requests that might get routed to a different server instance. This seems like a big deal when dealing with anyone that uses a clustered web hosting environment and needs to be addressed in the product IMO.

            Anyone else have other ideas on this issue? Clustered servers are wonderful to help keep sites stable and I think it’s important that we support such things.
              • 4018
              • 1,131 Posts
              Yep...clustered servers are great...but not so if you don’t plan ahead. What most service providers should do in this case is use one server just for that...storing temporary files for sessions and whatnot.

              I don’t think my service provider (Fluid Hosting) uses clustering too much...at least I don’t think so. They use H-Sphere to allow their customers to control websites...which is pretty good IMO. I don’t think H-Sphere allows for clustering with H-Sphere, with the exception of database servers which can be clustered pretty easily regardless of the use of H-Sphere or the like.

              My advice remains unchanged. If your service provider is unable or unwilling to change their configuration to allow for the saving of session data in such a way so that it’s consistent...then change service providers and find someone who does.

              One workaround you could do is change the PHP configuration variable session.use_cookies to 1 in your htaccess file. However, the problem with this is that if you have a visitor who isn’t accepting cookies from your site then it’ll result in a failure to authenticate. So...unless you force everyone to accept cookies from your site, you’re pretty much left with the fact that you need to change servers. Bummer!

              Jeff

              Quote from: OpenGeek at Jun 24, 2005, 06:40 PM

              Actually, no the issue here is that these guys used clustered server environments and thus saving session data to the temporary directory is not a valid action -- it must be saved somewhere specifically or it may not be available on subsequent requests that might get routed to a different server instance. This seems like a big deal when dealing with anyone that uses a clustered web hosting environment and needs to be addressed in the product IMO.

              Anyone else have other ideas on this issue? Clustered servers are wonderful to help keep sites stable and I think it’s important that we support such things.
                Jeff Whitfield

                "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."