Installing PHP on windows 7

Associate
Joined
17 Dec 2007
Posts
652
Location
Edinburgh
Hi guys

getting really desperate here, got coursework due in on Thursday which involves MySql databases
What I to do is create a website which will provide a front end to my database using HTML and PHP

I'm pretty sure my HTML and PHP files are correct, how-ever every time I try and do something which involves running the PHP file, all that happens is that it tries to download the PHP file

The same things happens when I try and run the sample files we have been provided with

I have been told this is down to the fact that PHP isn't installed on my laptop

I have followed some of the guides online for installing PHP on windows 7 to no avail, still got the same problem

Getting really desperate now:(

Any advice would be greatly appreciated
Grant (Wingnuttzz)
 
Appears to be working using WAMP, thanks

Just got a new host of problems though, biggest problem is working with mysql now :(
 
Last edited:
Most of my work was done on the Linux machines in the University labs, but obiviously this is no good for working from home.

I can access all my data on the uni machines using a program called winSCP, and i can access/run the mysql database using another program called Putty.

Obiviously i can't do that to try and tie my database in with my website (using PHP). So i've tried using the address (linux23.macs.**.**.uk) which i would normally use to log in, but that doesn't work.

So i've tried opening my database using the mySQL consoel though WAMP, everytime. But everytime try to open my database through the console just gives me an error of "error 2" or "error 22". A quick google didn't give my avail.

Hope that makes some sort of sense

Kinda feel at a lose hope at the moment, as the PHP on the lab machines wasn't even working today:(
 
On the Linux machines, we would use

"mysql -u gf46 -D gf46 -h mysql-server-1 -vp"

to log into MySql using the terminal.

It would then ask for a password and you would be logged in.

Then i'd give it the source of the database and it would create it

"source ~gf46/FarmerSubsidy/CreateFarmerSubsidyTables.sql"

And thats fine. When using Putty, I give it the "linux23.mac.**.**.uk" (commented out because i doubt its the best thing to post on the internet), log in with my username and password, and then give it the source of the data on the linux machine (i.e, same as above) and it will create it fine etc.

On my own PC with WAMP installed, i've tried both of these source lines using the mySQL console

"source ~C:/wamp/www/MySqlFarmerSubsidy/CreateFarmerSubsidyTables.sql"

"source ~Wingnuttzz/Documents/University Work/Year 1/Semester 2/DataBase Systems/Coursework - Farmers/CreateFarmerSubsidyTables.sql"

So i've tried it in my normal documents folder, and also in WAMP's own folder (although this is only for PHP stuff i'm sure)

I think the way i'm trying is ok but would be more than happy to be told otherwise
 
Last edited:
Thanks for your help, it is very much appreciated!

I've installed the MySQL package, but whenever I try to use the Administrator to create an account etc I just get an error...

As for opening the SQL file, will the database name just be the name of the file - so "CreateFarmerSubsidyTables".

With-in the CreateFarmerSubsidyTables file is just the creation of the database, so it Drops the Tables and then Creates them

Sorry for my lack of knowledge, but our lecture hasn't been very good, and his notes are vague to put it polietly
 
errror given is

"Could no connect to the specified instance.

MySQL Error Number 2013
Lost connection to MySQL server during query

If you want to check the network connection, please click the ping button."

Click the ping button and get a Request timed out error.

I know this means that it isn't able to make a connection, but i'm just using the same serverhost and port that i use in winSCP and putty...
 
ahh, my mistake.

I've managed to log in using host 127.0.0.1 and username root (no password), it gave me an error but it still opens the administrator and it says mysql server is running

under the query broswer, after dumping my database in that it just gives me constant errors.

Going to down to the uni labs tomorrow and hope to god that the PHP works there, and take it from there.
At least i know my working enviroment there, with the likes of WAMP, XAMPP etc, i'm a bit clueless to be honest. Probably not helping anything

Thanks again for your help
 
Thanks for having a quick look over it Pho

In the QueryBroswer, If i add "CREATE DATABASE FamerSubsidy;" and remove the "DROP TABLES;" it appears to creates the database with no error's, so that is something!

Just had to hand my coursework in minus the PHP stuff though, not happy about it but its done now. Lessons learnt too

Thanks again
 
Back
Top Bottom