Jump to content

Site transfer issues, probably with $session ..?


choppingblock
 Share

Recommended Posts

Hey,

so now my first PW site is ready to go to the production server, but something's not working.

I have set up a new database, dumped my local database and imported it.

I then copied all files to the production server, changed the db settings in the config file, made site/assets writable and emptied site/cache.

The .htaccess file is in the root folder.

The site is running, but:

I have a 

$session->redirect($page->children->first()->url); 

in the home template, which is not working (displays a 404 error).

And, even worse, I can't login to the admin page. I assume that this is somehow connected to a session error... but I can't figure out where to look.

I did a fresh install of PW on the same machine and all was good, so it must be an issue related to the transfer.

Any hints are welcome... thanks.

Link to comment
Share on other sites

Did you transfer the .htaccess ? 

I like to transfer all files within a zip & then unpack it on the server. If you're on mac, use the terminal for zipping. ( sudo zip -r zipfile.zip directory )

This way the read/write stays intact and no single file missed issues.

  • Like 1
Link to comment
Share on other sites

ProfileExporter doesn't work with languages as it was created before language support.

Make sure all files get transfered, empty the session folder and cache folder.

You might want to install a fresh PW on the server, then transfer the needed site files and db. 

Link to comment
Share on other sites

Still not working. Fresh install works ok, I can login as admin. Transferring the site files and db works, even the $session->redirect on the homepage. But as soon as I log out from the admin section, I can't login again and the redirect stops working. Arg.

Link to comment
Share on other sites

Okay... i made some progress, sort of.

I transferred the site to a different server, and the login works now. The redirect again only worked when I was logged in... until I realized that I set the page to unpublished. Corrected that, works now.

I still have to figure out what is not working on my production server... maybe it's a php setting or something.

Link to comment
Share on other sites

Ok, I think I figured out what causes the issue. Seems that the old PHP 5.2.6 on my production server messes up the encryption/hash functions, so the Password::matches() method does not work as expected (on my local machine I have 5.3.5 ...which is rather old, too, as I just realized :-[ ).

I'll try to udpate the PHP version and check again.

  • 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
 Share

×
×
  • Create New...