#1434 new
peters@slx-online.biz

Moving Exponent to a new server

Reported by peters@slx-online.biz | July 5th, 2018 @ 02:17 PM

I am in the process of moving a web site from an insecure server to a secure server in a different account. I have created a new MySQL database with the same parameters as the existing site, except for the IP address. I exported the current database and imported successfully into the new database. I registered a new domain name on the new server for testing and have uploaded all of the existing site content. Then I updated the conf.php with the new database IP address. The site worked fine, however there is one major issue:

  • I can't log into the new site. After entering username and password it just drops back to the home page without login.

Although I haven't as yet updated the menu imbed file links to https the new site seems to have converted these dynamically.

The old site is at britishtrolley.org.uk and the new copy at british-trolley.org.uk. I guess I've missed something, but trawling through the site files doesn't show anything obvious. Version 2.4.1 level patch 5 PHP 5.6.

I then decided to try a new installation at the latest level. After deleting all files and uploading the new files, and clearing out the database, the installation ran fine until the last screen.

It asked for my login, and what I wanted to do. I selected import database, it then went to the screen in the attached file, not logged in, no menu, even though the original theme files are still there.

I can't see any permissions that look wrong.

Can you help please? Thanks.

Comments and changes to this ticket

  • peters@slx-online.biz

    peters@slx-online.biz July 7th, 2018 @ 03:25 PM

    I have done some more investigating and have established that if I do a new install of Exponent on the existing test platform it works fine. An identical install on the new platform does not allow me to log in, defaulting back to the home page.

    The new platform is a Fasthosts cluster server. I have asked them to investigate why the two servers are reacting differently. Meanwhile are you able to let me know what are the dependencies for logging into Exponent please? Are there any file / folder permissions that may need changing? The cluster servers default to 700 and you can't change this via FTP. I have changed the folders as recommended in your installation guide to 775 via SSH with chmod.

  • peters@slx-online.biz

    peters@slx-online.biz July 8th, 2018 @ 02:06 PM

    Fasthosts denies that it's their problem but admit to changes to the new server configurations. I've attached them for you to compare and see if you can identify why login on the new server doesn't work. I've had a look down both and note the following:

    • The additional ini files loaded is a little different
    • Memory_limit on the new servers is 128M up from 64M
    • The new server has a section called Memcached
    • In the Session section, the new server shows registered_save_handlers, session_save_handler as memcached and the save path is different
    • New server has a section called Zend Guard Loader
    • There are differences in the PHP variables list

    Not sure where I am in your queue, but would appreciate you getting back to me as I need to get this Exponent site ported to the new server fairly quickly. I hope to avoid finger pointing, but I do find the Fasthosts approach a little 'gay cavalier' - we changed our servers, tough... Help please! Attached 'british-trolley is the new server.

    Thank you.
    Peter.

  • peters@slx-online.biz

    peters@slx-online.biz July 9th, 2018 @ 03:12 PM

    • Assigned user changed from “expNinja” to “dleffler”
  • peters@slx-online.biz

    peters@slx-online.biz July 9th, 2018 @ 06:20 PM

    Thanks for your initial response. I have in the meantime escalated the issue to the general manager of Fasthosts. I think it is unreasonable of them to expect you to change your code because one server in the world has a problem. This especially as this is new server technology they have introduced.

    I'll keep you updated on what happens there, meanwhile if you get a chance to look at the two PHP profiles you may well spot what the actual problem is. Once I get someone sensible at Fasthosts to talk to me I'll pass on what you've said. Their first liners are typically defending the status quo.

    Regards.
    Peter.

  • peters@slx-online.biz

    peters@slx-online.biz July 11th, 2018 @ 04:23 PM

    Response from Fasthosts to the info I sent them from you, however I don't know what that means as i can't see anywhere in the code that sets a save path:

    PHP sessions do work and do store on the Cluster platform.

    [Wed Jul 11 08:15:19.663146 2018] [fcgid:warn] [pid 50326] [client 213.171.217.172:59038] mod_fcgid: stderr: PHP Warning: session_start(): open(10.10.111.52:11211,10.10.111.53:11211/sess_2256aee97ccc4a8fa1d3ec4ff849271f, O_RDWR) failed: Input/output error (5) in /home/hp3-linc8-nfs2-z/524/1943524/user/htdocs/framework/core/subsystems/expSession.php on line 132 [Wed Jul 11 08:15:19.672836 2018] [fcgid:warn] [pid 50326] [client 213.171.217.172:59038] mod_fcgid: stderr: PHP Warning: Unknown: open(10.10.111.52:11211,10.10.111.53:11211/sess_2256aee97ccc4a8fa1d3ec4ff849271f, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 [Wed Jul 11 08:15:19.672864 2018] [fcgid:warn] [pid 50326] [client 213.171.217.172:59038] mod_fcgid: stderr: PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (10.10.111.52:11211,10.10.111.53:11211) in Unknown on line 0

    According to PHP Info on the site:

    session.save_path 10.10.111.52:11211,10.10.111.53:11211 10.10.111.52:11211,10.10.111.53:11211

    This is the error that is being returned.

    So adding in the correct script to the site

    http://british-trolley.org.uk/fh_sessiontest.php

    The session is set! The PHPSESSID is: 24648f070b8e3f13b15e535768743b63 set at 15:21:50

    Time = 15:29:34 GMT - Refresh

    Does allow the session to be saved as it should.

  • peters@slx-online.biz

    peters@slx-online.biz July 12th, 2018 @ 06:55 AM

    <?php
    // Start session and set variable. session_start();
    // Check if the session is set. if(isset($_SESSION['theSESSIONvarName']))
    { $sid = session_id(); echo "";
    echo "

    ";
    echo "

    The session is set! The PHPSESSID is: " . $sid . " set at " . $_SESSION['theSESSIONvarTime'] . "

    ";
    echo "

    Time = " . date("H:i:s",time()-date("Z")) . " GMT" . " - Refresh

    ";
    echo "";
    } else
    { $_SESSION['theSESSIONvarName'] = "is_set"; $_SESSION['theSESSIONvarTime'] = date("H:i:s",time()-date("Z")); echo "";
    echo "";
    echo "

    The session is NOT set! Setting!

    ";
    echo "

    Refresh | Show PHP Info

    ";
    echo "";
    }

    if($showinf == "true")
    { PHPInfo(); }

    ?>

  • peters@slx-online.biz

    peters@slx-online.biz July 14th, 2018 @ 07:42 AM

    Hi Dave. Not sure what to do with this other than save as a PHP and run it. Then all I get is a white screen with:

    The session is NOT set! Setting! Refresh | Show PHP Info

    and no PHP Info. Can't log in after running it either. Do you think you will be able to modify Exponent to get around this issue please?

    Regards,
    Peter.

  • peters@slx-online.biz

    peters@slx-online.biz July 14th, 2018 @ 11:21 AM

    Clearly something is different on the new server, but the problem seems to be tying down exactly what / why. Earlier I attached two PHP info files, one from each server, in the hope you could spot what might be causing the issue. The hosting company admits there are differences but they claim, as you can see above, that sessions do work. The test script was them demonstrating that sessions could be set, and suggesting you pick up the 'correct' code to make Exponent work correctly. What they don't mention is session cookies.

    I'm afraid I am not a PHP expert, so am not able myself to interpret what I am being told. As I said earlier, I did try to escalate the fact that the new servers do not react the same as the old ones, but that has drawn a blank. I am on a bit of a deadline with this now, so I need to determine if there is a code change you can do to get this to work, or if I need to pursue further with the hosting company. The latter will almost certainly not prove fruitful, the support guys seem to have taken the attitude 'that's the way it is, you go fix the code' - not hugely helpful.

    If it helps, you can FTP into the site - ftp.british-trolley.org.uk - user ambr-support pwd aM456sup . This login is being shared with the Amember support people - minor problems with the member system too although nothing to do with logins.

    I'll ask the question about cookies, but don't hold your breath!

    Peter.

  • peters@slx-online.biz

    peters@slx-online.biz July 14th, 2018 @ 01:41 PM

    The Fasthosts guy has sent me this:

    I have also looked at the error logs and see an error with expressions.php line 132, (full path below)

    could you check that and ensure it is pointing to the correct location, If you need to get permissions changed I will ask our engineers to see if they can do it if you cant.

    Regards

    Allan
    Fasthosts customer support.

    htdocs/framework/core/subsystems/expSession.php on line 132

    When I look at that file it is empty. Also I'm not too clear what you are telling me - is this something that needs to be changed on the server or is it something you can work around? It's a shared server so I'm pretty well stuck with what they provide.

    Thanks.

  • peters@slx-online.biz

    peters@slx-online.biz July 14th, 2018 @ 02:09 PM

    Latest Fasthosts update:

    As it is shared hosting unless it is something you can change in the .htaccess file then we will be unable to change the settings.

  • peters@slx-online.biz

    peters@slx-online.biz July 15th, 2018 @ 08:02 AM

    Thanks. Unfortunately this results in the content of that file appearing first on the browser page, and login does not work.

    Fasthosts have once again come back and said they will not change anything on the server. I would be grateful if you could find a work-around please.

    Peter.

  • peters@slx-online.biz

    peters@slx-online.biz July 15th, 2018 @ 01:58 PM

    Now this is weird. I created the file with your code, saved and uploaded. Now I downloaded the file to find that Dreamweaver had wrapped html around it... So I edited it back to what you sent and uploaded. Now the file contents don't appear, so that explains that phenomenon.

    Still can't log in though! :-(

    Did you compare the two info files I sent you? Are there any clues in the setup of the new server compared to the old?

  • peters@slx-online.biz

    peters@slx-online.biz July 16th, 2018 @ 08:01 AM

    I've had one more go at Fasthosts, their response:


    The message from Exponent support indicates that they need to use a lot of session data.

    However, both of the available solutions mentioned already (larger key/slab size and not using memcache) would require changes to the server settings themselves, which is something that unfortunately cannot be done, as the servers are set up this way to ensure that the sites of customers will not impact each other in terms of performance.

    Looking through this issue, the reality is that it seems that our hosting platform simply won't support the site, which means that you will need to look at another hosting solution, whether that be a server, or a different hosting provider all together.

    Now I don't know which way to turn. I could go to another supplier, purchase a contract and find the same issue. The one possibility that looked hopeful will only offer PHP 7 and the membership package that runs in parallel with Exponent needs 5.6.

    Where do we go from here?

  • peters@slx-online.biz

    peters@slx-online.biz July 16th, 2018 @ 08:56 AM

    Is there any way to use .htaccess to get around this problem?

  • peters@slx-online.biz

    peters@slx-online.biz July 17th, 2018 @ 02:05 PM

    OK, but can you fix my problem please? Or do I have to find another provider which doesn't use memcached? If you can fix, please let me know how long it might take. If not please say so, I am on a deadline here and every day takes me closer.

    Thank you.

  • peters@slx-online.biz

    peters@slx-online.biz July 20th, 2018 @ 08:49 AM

    Just a thought - can you not change to store session info in the database? The other half of this site uses Amember, which does that.

    If I can get amember to work at the latest level with my customisation, I will be able to try another provider to see if Exponent will work OK there.

  • peters@slx-online.biz

    peters@slx-online.biz July 20th, 2018 @ 01:10 PM

    Yes, it's an application. Within the setup there's an option to use either the database or standard PHP sessions, with database as default. I know very little PHP I'm afraid.

    I don't know if it helps, but I've attached a couple of files from amember.

  • peters@slx-online.biz

    peters@slx-online.biz July 20th, 2018 @ 02:11 PM

    OK, it was worth asking... If I can get the amember stuff working (need to run a major upgrade and put customisation back) I will be able to create an account on another provider and see if it works there. Will be a few days...

    Thanks for your help so far, pity we couldn't get around this.

  • peters@slx-online.biz

    peters@slx-online.biz July 27th, 2018 @ 08:28 AM

    Well, at long last I have a working site! It is now hosted at UK2, not yet live for users but fully accessible under the test domain name. I did have a few migration issues but we are there now. Peter.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Bug Tracker for Exponent CMS

Shared Ticket Bins

People watching this ticket

Pages