Jump to content

Issues moving from IIS localhost machine into Windows Server production

Matt Cohen

Recommended Posts

Hi everybody, So it turns out PW works on IIS pretty well. Had very little issues in getting it to run and not many issues in getting it setup.... in a localhost environment. 

I've been given a Windows Hyper-V server for the uses of my intranet that I've been building with PW. The only problem is now, I seem to be having issues whenever trying to log in. It doesn't recognize the admin user I created during installation, it simply redirects back to the /login/ page, with no error message. 

Debugging shows the following message on the frontend login screen (not the backend). Localhost does not show this 

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'ip' at row 1' in C:\inetpub\wwwroot\wire\modules\Session\SessionHandlerDB\SessionHandlerDB.module:109 Stack trace: #0 C:\inetpub\wwwroot\wire\modules\Session\SessionHandlerDB\SessionHandlerDB.module(109): PDOStatement->execute() #1 [internal function]: SessionHandlerDB->write('j398has5jatl2lb...', 'Session|a:1:{s:...') #2 [internal function]: session_write_close() #3 {main} thrown inC:\inetpub\wwwroot\wire\modules\Session\SessionHandlerDB\SessionHandlerDB.module on line 109

When moving the dev machine to production, here are the steps I followed:

  • Copied wwwroot from development machine to the production server
  • Exported by site's database using SQL Front and importing on the production server
  • Allowed access on the production server
  • Edited site/config and wire/config to add in the hosts - appname.domainname.co.nz, localhost,

Now this is the real kicker:  I can goto http://localhost on the production machine, and get full access and it works fine... However when I try using appname.domainname.co.nz, I keep getting this weird "blank" redirect.

I would really appreciate any help anyone would be able to give me. I have looked all thru the PW forums for something similar around this to no avail.

Link to comment
Share on other sites

I don't think this is related to processwire but the environments you are using. What processwire version are you using ?

Copied wwwroot from development machine to the production server

This way of moving from dev to production is not recommended as it doesn't check your production environment.

Install a fresh new installation of the same processwire version on the production server and see if this installation

goes error free. This will tell you if processwire matches up with the production server environment.

After that, replace the site folder on the production server with the site folder from the dev server. Empty the database

on the production server and import your database sql file from the dev server. See how that goes.

  • Like 2
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

  • Create New...