Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting up a test server to work on old site

Status
Not open for further replies.

Exclusif

Technical User
Feb 8, 2012
1
0
0
SE
Hi,

I'm very new to servers, and so my question is probably as basic as they get.
I've recently put up a local server (physical) with Xampp 1.7.7 for linux. I have Debian installed on the server and it seems to be working fine. I tried creating a test.html file and found it without problems at localhost/test.html.

Now, the purpose of the server is to be a development environment for an old website that's currently live on another server. My question, I guess, is how I copy the website from the other server to this new test server. The website use quite a bit of php. As of now I've just copied the public_html folder with all its content and uploaded it to the test server at lampp/htdocs/. This didn't seem to be enough as I get a simple error message in swedish saying "There was an error" when I go to localhost/public_html/index.php. I've also exported the database as an SQL file (88mb) from the live host and tried to import it with phpMyAdmin, but it keep saying that the file probably is too big, even after I changed the 3 settings suggested (upload file size and so on). Is the database even needed to get the site working in a test environement where only css and html will be worked on? I don't really need the content, but it would be a bonus. As said, im really a newbie at this. Anyway, what am I not doing, or what am I doing wrong? Would very much appreciate some advice since the organization I'm working for really can't afford to hire someone for this.

Thank you.
 
Hi

Too few details for me to understand how all that is structured, but this :
Exclusif said:
localhost/public_html/index.php
Is almost never used in practice. The public_html/ directory normally is in a user's home directory and is reached at localhost/~that_users_name/ .
Exclusif said:
tried to import it with phpMyAdmin
Matter of personal habits but I never had enough patience to use phpMyAdmin. I would just load the dump with [tt]mysql[/tt] command-line tool.

Feherke.
 
I'd be inclined to export the dB without data then import that first. Then see what data rows you need and export/import only that minimal data,

In Oracle its an export flag "rows=no" I'm sure there's an option in MySQL if that's what you are using ( "--no-data" I think).

The problem I have is that if you don't understand the websites requirements or dependences then you could be chasing your tail forever trying to get it to work.

To get the mirror of the website (not including dB) you can simply use the mirror flag to the "wget" tool.
Code:
$ wget -mk -w 20 [URL unfurl="true"]http://fredbloggs.com/[/URL]

Then do some funky stuff with perl to clean up your url's

Code:
find . -type f -exec perl -pi -e 's{fredblogs.com}{fredsclone.co.uk}g' {} +

I hope it helps but may just be digging your hole much deeper ..

Laurie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top