Copying php website from shared server to wamp
Posted by: ozstar (---.livrp2.nsw.optusnet.com.au)
Date: April 07, 2010 10:20AM

HI,

I have some oscommerce shops on a shared server with PHP 5.2.11 and I have set up wampserver with PHP 5.2.11

I have copied all the files of one site which has the User name of 'rentalho' to Wamp in a directory I have called /shop/rentalho'/ which is the same as on the server.

When I try it in localhost/shop/rentalho/index.php, I get..

FATAL ERROR: register_globals is disabled in php.ini, please enable it!

I understand that we do not want to enable globals however I think this site is still set for golabls on. I have looked in the php.ini in the site and it does say globals on. I have turned them off but there is no difference.

What else could be giving me this message?

oz

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: yfastud (Moderator)
Date: April 07, 2010 02:38PM

you cant just copy over but have to backup data and db from host, install oscommerce on wamp, restore data and db from host backup

to setup osCommerce on wamp, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: gattaka (---.real.kvidex.net)
Date: April 08, 2010 10:00AM

Almost the same situation.
I DID not backup data I just copy all files. is it possible to restore it just by coping MySQL data files and may be run some php script?

There is just "loren ipsum.." texts but menu, sections etc. are important... I mean structure of site that is in dBase...

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: ozstar (---.livrp2.nsw.optusnet.com.au)
Date: April 09, 2010 06:38AM

Hi,

I have set my Virtual Host up okay and from [localhost] can choose my sites so that part is fine, than k you.

I am not sure about the dbase though.

The store database name on the online isp server is auto_autovision. This is also in the congifure .php file of the osc stote.

When I create a dbase in wamp what should I name it?

The same as the online one... auto_autovision? Or does it not matter?

I have exported the sql dbase file from the online store and will import it into the wamp dbase once I know what to call the wamp dabse when I create it.

Am I on the right track?

Thanks


oz :-)

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: yfastud (Moderator)
Date: April 09, 2010 02:57PM

should setup same db name, username, and password but might have to manual change host name in scripts

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: motters007 (---.10-1.cable.virginmedia.com)
Date: April 09, 2010 03:42PM

hi
any script that need you to use register_globals DO NOT USE they are bad practice they make you site hackable and looks like you setting up a shop so need to be secure.
just google register_globals bad and read what they say
and php is i think is total removing register_globals soon so your shop will not work with the new version of php

hope this help smiling smiley

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: ozstar (---.livrp2.nsw.optusnet.com.au)
Date: April 09, 2010 11:37PM

Ah Haa.. Thanks. That is helpful. It was a bit confusing about the database name thing.

The online server gives the database the user name of the site.. in this case 'autovisi' then I name it 'autovison', so it gets autovisi_autovison.

Same with the dbase user I name it 'webmaster', it gets webmast_autovison.

Do I use the whole thing .. autovisi_autovision or just autovison?

About the Globals 'on', yrs thank s for that although I do know that 5.3 knocks it on the head and 6 will definately do it.

This is why I am trying it on 5.3 on wamp so I can make sure we will be able to stay on line once we get 5.3 online.

Thanks again

ox :-)

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: yfastud (Moderator)
Date: April 10, 2010 02:28AM

you should upgrade your osCommerce instead as I dont have any problem w/ php5.3 as shown in this guide

to setup osCommerce, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: ozstar (---.livrp2.nsw.optusnet.com.au)
Date: April 10, 2010 04:18AM

Yes I am going to upgrade it so it is okay with 5.3 but at the moment I am just trying to at least get it to work on wamp. I like wamp alot and all my regular html sites are okay but I need to get these php sites working especially oscommerce which I use a lot.

It seems I have fixed the dbase problem now. I had not craeted a user in phpMyAdmin for that dbase, so once I did that and changed the info in the config files I was in however..

I get shown the site although it has code all over it, but I get this message at the top of the page 'before' the site graphics..

Warning: session_start() [function.session-start]: open(/tmp\sess_krrp8ov4b6hlftq5ch0iorodc3, O_RDWR) failed: No such file or directory (2) in C:\wamp\www\autovision\includes\functions\sessions.php on line 67
Warning Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.

I also get these at the bootom of the page 'after' all the graphics..

Warning: session_write_close() [function.session-write-close]: open(/tmp\sess_9fa64pop5q0a41h91pgvpqc9m7, O_RDWR) failed: No such file or directory (2) in C:\wamp\www\autovision\includes\functions\sessions.php on line 106

Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in C:\wamp\www\autovision\includes\functions\sessions.php on line 106

It also seems I see all the site images but no products images. I guess it is all to do with the sesions.

I have googled and tried a few things but nothing so has helped.

There is a/tmp in C:/wamp/tmp and also one in /www/autovision/tmp.

Thanks

oc

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: ozstar (---.livrp2.nsw.optusnet.com.au)
Date: April 10, 2010 04:35AM

Well it looks like have fixed those messages.. all went when I entered 'mysql'this at the bottom of the /includes/configure.php file..

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

Now however I still see lots of code and still no product images.

When I click on most of the links I also get this..

Forbidden

You don't have permission to access /autovision/< on this server.

oz



Edited 1 time(s). Last edit at 04/10/2010 04:39AM by ozstar.

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: yfastud (Moderator)
Date: April 10, 2010 05:36AM

it might have short tag so enable short_open_tag through wamp tray icon

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: ozstar (---.livrp2.nsw.optusnet.com.au)
Date: April 10, 2010 05:46AM

Wow.. That was it!!! I will give it all a run but at least it all shows now without code etc..

Many many thanks. I would never had got that! Been trying for several hours today.

enable short_open_tag

Wow!!

Thanks..

Just got to write all these things down as I guess they will all need to be much the same for every oscommerce site.

When i get it done I will post here in case someone else in my predicament comes along pulling their hair out!!

oz :-)

Options: ReplyQuote
Re: Copying php website from shared server to wamp
Posted by: ozstar (---.livrp2.nsw.optusnet.com.au)
Date: April 10, 2010 08:28AM

Okay, have given it a whirl and still have some probs although I think they are still all to do with the sessions.

Somewhow I do not have them set correctly.

When I click any of the product links I do not go anywhere. The images that are on the home page just stay there.

If I click on a Product link on the Home Page.. this is the url

[localhost]

Yet if I do that on the online store the url is..

[www.autovision.com.au]

So all the session stuff is missing.

---------------------
In the osc store config file I have set this...

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

and this stops the message but does not get the sessions to work.

The online store however has this...

define('STORE_SESSIONS', '');

but if I do this on the wamp store, I get this same message..

Warning: session_start() [function.session-start]: open(/tmp\sess_34nmtm4imooqjn69j0l0h2tce0, O_RDWR) failed: No such file or directory (2) in C:\wamp\www\autovision\includes\functions\sessions.php on line 67
Warning Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.

-----

I do have a /tmp file in /wamp/, also one in /wamp/autovision/ and even one in /wamp/autovision/admin/

Whereis else is there to look to see waht could cause this?

Thanks agagin.. Appreciate the help..

oz


PS:

Our online sites are set up as /home/sitename/public_html/ etc.

How would this be on wamp? /www/sitename/public_html/ etc?

Options: ReplyQuote


Sorry, only registered users may post in this forum.