Jump to content

Problems with ProcessWire on Cloud Hosting


benjaminE
 Share

Recommended Posts

I've recently had to install a couple of processwire sites on a cloud hosting service (TSO Host) and have had the same issue arise on both occasions.

What happens is that when you try and access any page of the site, an error message - "Unable to complete this request due to an error. Error has been logged" - is displayed. Inspecting the log revealed this particular error:

2013-12-03 05:23:34    ?    http://rebeccacharlton.com.gridhosted.co.uk/?/    Error:     session_start() [function.session-start]: Failed to initialize storage module: memcache (path: ) (line 104 of /var/sites/r/rebeccacharlton.com/public_html/wire/core/Session.php)

 

A simple fix I found on these forums was to comment out line 155 on the root index.php file: ini_set("session.save_path", rtrim($config->paths->sessions, '/'));

But I was wondering whether there might be a more thorough fix than this...

I think the problem stems from the fact that on cloud hosting, the root isn't the simple root because you're on a shared server with many other sites. One attempt to solve the problem was to find the true root using: echo $_SERVER['DOCUMENT_ROOT'];  and then replacing the "/" on line 155 with the result but this caused the same problem as before.

Only commenting out the line entirely worked as a solution but this feels somewhat like a compromise. Any help to resolve the issue would be much appreciated!

Many thanks in advance,

ben

Link to comment
Share on other sites

Hi Ben

I've been using the same hosting for a couple of ProcessWire sites myself. The reason I found it fails is because PW is setting the session save path to a directory, but the servers are not configured to use files for sessions - they use a different method. So setting the directory does not make sense.

The latest development version of PW has fixed this problem though - it does a check to ensure that the session storage method uses files, before trying to set the path.

Another issue I had with this hosting was centred around the cache file that PW generates to keep a track of installed modules. I submitted a small fix for this to Ryan a while ago, which he merged into the development version.

  • Like 2
Link to comment
Share on other sites

Hi Craig,

Thanks for your reply and very helpful clarification. And it's great to hear you've found a fix for the problem. However, I thought I was using the latest version of ProcessWire... Is the development version different from  "the latest stable" version that's on the GitHub page? If so, do you know where I might find it?

Many thanks,

ben

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...