Localhost - Warning: mysql_pconnect()

sitemaniac

New Member
Hello,

I've just taken over the control of a functioning CMS website.

I will be doing a revamp of the site so I downloaded the complete site via ftp on to my local drive so I could make changes and test locally before uploading the new live site.

Normally I use xampp for this and it works fine but for this site, when I try to open locally I get an error:

Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user '**********'@'localhost' (using password: YES) in C:\xampp\htdocs\*******\******.php on line 7
Couldn't connect to server.


I have Apache and MySql running in Xampp.

However, if I just open the .php files with Dreamweaver I can view them pretty okay so I could use that to make changes and test the outcome but it's not ideal as I want to be able to view the site locally in the same way it would be when live.

Does anyone know how to connect properly?

I have all the necessary passwords etc but do you need to enter a different address in the browser for Sql sites as opposed to normal php ones?

I normally use: http://localhost/*******/index.php whch is what usually works when I design normal more basic html with php for includes type sites. This is a CMS site though which is new to me.

All I want to do is be able to change the styling and view in local browser and not the database.

Any ideas how to get this working locally?

Google has not helped me.

Thanks in advance!
 

sitemaniac

New Member
I downloaded the entire contents from the live site to the local drive so I guess that includes the users?

Will try the 127.0.0.0 later when I get home.

thanks.
 

chrishirst

Well-Known Member
Staff member
I downloaded the entire contents from the live site to the local drive so I guess that includes the users?

No it won't, the database information is NOT in the "site contents" you will need to export the database from the production server and load it to your development server.
 

sitemaniac

New Member
Ah.... I see.

Ok I've gone back into cpanel and found phpMyadmin and exported the database and saved the .sql file and saved it into the root folder for the site.

Still get the same error :(

I've installed microsoft sql server management but don't know what to do with it.

Is there a simple way to get this working? As I said I don't want to change the DB. I just want to be able to change the css etc and view the changes in localhost browser.

Do the .sql files go elsewhere in the xampp folder maybe?

thanks again.
 

chrishirst

Well-Known Member
Staff member
You need to IMPORT the .sql file to your DB server, not stick in a folder and hope the SQL pixies pay a visit.
 

leroy30

New Member
Since it's MySQL you'll need a local MySQL instance then you'll need to import the database you downloaded from your web server.

That should give you some hint to the process; Google should be able to fill in the rest.

Cheers,
Le-roy
 

sitemaniac

New Member
Thanks guys.

Had little luck with this though. Can't import with myphpadmin as apparently the file is too large and tried googling and just can't get it working. I've also downloaded easyphp as an alternative to xampp to see if that was easier. (no luck)

Tried a command prompt line that's recommended but command did not understand it.

How the hell can a file be too large when all I want to do is run everything locally on my own computer for site modifications. I've no clue about databases but they are extremely annoying!!!!

Spent two hours trying to get this working and give up for the moment :mad:
 
Top