Forum Moderators: mack
Have took a site from my programmer.
Therefore its my responsibility to edit the site to suit any changes.
However..been trying to view my site on my own pc without much success. The browser keeps returning blank pages without any error.
The site is done using php + mysql.
However can only see the login fields like id and password without the background colours and graphics.
Any clue pls?
Thanks.
NOB
I am thinking along ur line as well.
However, i hv seen the database. It consist of members info like ID and PW. It shud not hv any effect in serving up the index.php page since yu do not need to sign up to view this page.
If i really need the database, how do i download it from the server?
Thanks for all ur time.
Rgs
NOB
mysqldump -u username -p databasename -a -B>database.dump
Replacing 'username' and 'databasename' with your database username and database name respectively. that will prompt you for your mysql password, then create a file called "database.dump". Also notice the lowercase a and uppercase B
Copy the file database.dump to your machine. (make sure you have a user created with the same username/password combination.
On your local machine, issue the command:
mysql -u username -p<database.dump
That will prompt you for your password, then create an identical copy of the database on your local machine.
One way to check to make sure you're somewhat in the neighbourhood is to log in to mysql with the username/password, and see if you can access the database:
mysql -i username -p
(enter your password and hit enter. If that gives you a mysql prompt, see next step. Otherwise, you need to set up the correct username/passwrod in mysql)
At the mysql prompt, type:
use databasename;
(where databasename=your database name). If that comes back ok, then your user is set up right, and the database exists. if not, you know part of your problem is mysql-centric.
Note: all these commands are for linux. Sorry, I don't run MS, I'm certain the commands are similiar.
Very sorry..It seems to be a daunting task for me since i am new to it and not sure if i know for sure wht is the password and name of the database.
B4 i embarked to do tht, do u not agree tht i do not need the database to get php to serve the codes on my machine for the index.php page?
If so, what cud the reason be?
Thanks
And since you haven't set this up yet on your local machine, it almost certainly is an issue - thus you need to correct it before you go any further. In short, fix the database - because I bet that's the problem.
If you're hosting the site locally, you'll need to figure this out anyway.
check your code, for something like a file named 'config.php' or something. In one of the program files, near the top, will be a list of variables that include your username, password, and database name. That'll get you started, but you'll still need to make sure mysql is running, and has a user/password that matches what's in the code.
Thanks for the enlightenment.
However am very new to this and not very sure how to download the database from the server.
All i know so far is to log into the cpanel of the web-hoster, select mysql and view my database from there.
So can you kindly tell me when can i type and execute the command mysqldump?
Thanks.
You're staring down the barrel of a lot of background information needed to get this going. You're kind of asking 'set up my server', it's of that order of magnitude of a problem.
At this point, rather than spending days becoming an expert at setting thisstuff up, find someone and pay them an hour or two to do it for you. A local 'linux users' group' or 'lug' is a good place to start.