Jump to content

Copying a live store to a local server for testing


RetroRocker

Recommended Posts

Hi

I have a fully operational live site and CC store (v 3.0.15) which I have copied from my remote server to a local server (IIS on Windows XP Pro). I have successfully imported the remote database to the MySQL installation on the local machine and edited global.inc.php to reflect the new location. The store front works just fine on the local server but I cannot gain access to the admin panel. I can access the admin login.php (but that is without any images or css ... maybe a clue here ?), try to log in but that's it, it's all 404 errors from there.

I have tried running editconf but there is no change to be made, all the required files are present and correct. Where could the problem lie in order to make the admin panel accessible ? In the database maybe ? ... a path issue maybe ? but then the store front works fine. I can easily make any changes to any of this if necessary but I dont know what.

any help genuinely appreciated, thanks

RR

Link to comment
Share on other sites

Do you have any mods installed? Did you have SSL enabled prior to copying the database contents?

OK, no mods excepting an occasional small code addition to cart.inc.php ... but no commercial mods. SSL was not enabled prior to copying database contents. I have checked that sessions are operating OK locally. I have tried various path changes via editconf and I have ensured read and write permissions are set for the admin folder but I simply can't get to the admin panel (I'll bet it's something really simple, but I can't see it :cry: )

As before, the only file I can open in a browser from 'localhost' is admin/login.php (this is without any images or css though). All other files, if accessed directly in the browser's address bar return 404 errors but those files ARE physically present at those locations. Even admin/index.php gives a 404 error.

any other ideas gratefully appreciated

RR

Link to comment
Share on other sites

When you get the login.php page to show in your browser (with or without the CSS and imagery), look at the "View Source" of the rendered page in the browser. Find the path to the CSS files and images.

Here's one thing I learned about with IIS: for every one backslash in the physical 'rootDir', make it four. That is:

$glob['rootDir'] = 'E:\\\\Inetpub\\\\wwwroot\\\\Store';

$glob['rootRel'] = '/';

What was 'E:\Inetpub\wwwroot\Store' is now the above. Forward slashes are not affected.

Link to comment
Share on other sites

Thanks, that has helped tremendously ! I had a mistake in my 'rootrel' global in any case :( which was that my store is actually in a subfolder one level below that of my 'live' remote server location ... quickly obvious when I followed your suggestion for observing the path to the stylesheet with 'view source'. The main problem though was as you suggested, with 'escaping' the backslashes in the absolute path to the IIS root in the 'rootdir' global ... that did sort it out B)

There is one thing though that does still bug me ... that is, for example, passing CubeCart demographic data via PHP session variables to an independent page script. You have helped with this in the past and it was very successful, working well on the live, remote (Apache) server. Running CubeCart and accessing this script on the IIS test site does not result in the session variables I have declared/set in CubeCart being passed to the independent page script as they are perfectly on the live server. My IIS setup has been tested for session operation by writing simple scripts which do pass session variables between pages and it works fine. The session variables are being set but cannot be picked up by the retrieving page, even with the session id being specifically passed, so ...

In your experience, would this be a specific IIS issue ? ... if so, do you have any ideas on how could it be resolved ? (apart from moving to Apache :whistle: )

all the best

RR

Link to comment
Share on other sites

Not an IIS 6 expert, but I *think* it may have something to do with running PHP as CGI vs ISAPI. Don't know.

There may also be something about IIS 6 running in "isolation" mode or not. Get a book on IIS 6 and look up those terms.

Otherwise, sorry.

Link to comment
Share on other sites

OK, no worries really, I still appreciate the insight whatever the outcome.

Just for the record, you're definitely correct about issues concerning the use of CGI vs. ISAPI 'flavours' of PHP within IIS but this unfortunately is not an issue here. I did for the hell of it switch to Apache server and retry but amazingly I still had the same problem ... perhaps I shouldn't be quite so hard on poor old IIS :(

I've never yet resolved this issue but I have directed it towards a more specialist PHP forum because I think it is a configuration issue rather than a scripting one. We'll see ... I'll post back if I ever get to the bottom of this.

thanks again

RR

Link to comment
Share on other sites

There is one thing though that does still bug me ... that is, for example, passing CubeCart demographic data via PHP session variables to an independent page script. You have helped with this in the past and it was very successful, working well on the live, remote (Apache) server. Running CubeCart and accessing this script on the IIS test site does not result in the session variables I have declared/set in CubeCart being passed to the independent page script as they are perfectly on the live server. My IIS setup has been tested for session operation by writing simple scripts which do pass session variables between pages and it works fine. The session variables are being set but cannot be picked up by the retrieving page, even with the session id being specifically passed, so ...

Well, I finally got to the bottom of this. It's is definitely NOT a CubeCart issue and not really within the scope of these forums but I started it just out of interest ... so I'll finish it. It could help someone one day.

The problem was actually a session handling / memory management issue with the PHP version (5.1.5) I was running on my local server for development. Upgrading PHP to 5.2.9-2 (current stable release) removed this problem completely.

cheers

RR

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...