Forum Moderators: mack

Message Too Old, No Replies

Cant view my sites on my own PC

         

apollo23

2:29 pm on May 5, 2005 (gmt 0)

10+ Year Member



Hi guys

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

mack

3:37 pm on May 5, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



do you have php instaled on the computer you are using?

Mack.

apollo23

5:37 am on May 6, 2005 (gmt 0)

10+ Year Member



Hi mack

Yes i have.

If not i wudnt have been able to see the log in fields like ID, Password and the submit button.

Hope this wl help.

Thanks for the prompt response.

Rgs
NOB

rj87uk

10:55 am on May 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



IS the site located in your local wwwroot folder?

wheel

12:22 pm on May 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it's a blank page without any error, then php is working and serving pages. The problem will be mechanical somehow. Check that mysql is running, and that you have the database installed on your site, and that you've got the correct database name, userid, and password for mysql on your machine.

apollo23

3:34 pm on May 6, 2005 (gmt 0)

10+ Year Member



Hi Wheel

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

wheel

3:51 pm on May 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From the server:

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.

apollo23

5:07 am on May 7, 2005 (gmt 0)

10+ Year Member



Hi Wheel

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

wheel

5:45 pm on May 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, I disagree. It's quite possible (depending on your programming) that the lack of a databse means that you get a blank page.

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.

apollo23

1:56 pm on May 8, 2005 (gmt 0)

10+ Year Member



Hi Wheel

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.

wheel

7:18 pm on May 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry apollo, I don't know cpanel. My instructions above would transfer your database from one machine to another but you would need a command prompt - and I think cpanel is probably designed so you don't get a prompt.

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.

apollo23

9:07 am on May 9, 2005 (gmt 0)

10+ Year Member



Ok frd

Will try and talk to the programmer.

Honestly.. i think he is tryin not to let me gain tht knowledge.

So tht we hv to engage them bck

Thanks anyway.