PHP/mySQL expert ?

Author
Discussion

nevpugh308

Original Poster:

4,414 posts

276 months

Wednesday 13th August 2003
quotequote all
I want to install PHP/mySQL on my Win Xp or Win2k machine so I can have a play, but it seems I MUST install a web server first (Apache / IIS) which I dont really want to have to do on my dev machine.

Can you run PHP/mySQL for development purposes on a normal PC, without Apache ?

Ta

dontlift

9,396 posts

265 months

Wednesday 13th August 2003
quotequote all
nevpugh308 said:
I want to install PHP/mySQL on my Win Xp or Win2k machine so I can have a play, but it seems I MUST install a web server first (Apache / IIS) which I dont really want to have to do on my dev machine.

Can you run PHP/mySQL for development purposes on a normal PC, without Apache ?

Ta


Yes no problem, and it will run under IIS aswell, if you need a hand later I will be sat in my office most of the night, drop me a mail for phone number, I also have plenty of docs on how to install it etc

nevpugh308

Original Poster:

4,414 posts

276 months

Wednesday 13th August 2003
quotequote all
Ooh, thanks for the offer of help

Presumably IIS doesn't come built in with Windows, so I'll have to install that first ? Wonder if you can download it from microsoft.com ...

Liszt

4,330 posts

277 months

Wednesday 13th August 2003
quotequote all
Actually it does come with some versions of windows. You'll find it on the win2k professional disk. If, from control panel, you choose install new program then select windows components, IIS will be an option.

I believe XP is just as simple. Don't know about the home versions, don't touch 'em

jonnyhilfiger

548 posts

256 months

Wednesday 13th August 2003
quotequote all
Give Foxserv a go. Use it all the time, got it installed on my laptop at present. Installs Apache,PHP and MySql in one go, just click on the exe to install, simple as that. Go to sourceforge.net to get the download (about 37Meg) or just type in Foxserv in google.

John

nevpugh308

Original Poster:

4,414 posts

276 months

Wednesday 13th August 2003
quotequote all
Hmm ... my XP is definately Home edition ... can't remember which my Win2k is .... I'll check when I get home.

plotloss

67,280 posts

277 months

Wednesday 13th August 2003
quotequote all
All versions of 2000 have IIS, I think XP Home does as well but I am not as sure of that.

Liszt

4,330 posts

277 months

Wednesday 13th August 2003
quotequote all

judas

6,069 posts

266 months

Wednesday 13th August 2003
quotequote all
plotloss said:
All versions of 2000 have IIS, I think XP Home does as well but I am not as sure of that.

Nope. Only comes with XP Pro

dontlift

9,396 posts

265 months

Wednesday 13th August 2003
quotequote all
You are much better off installing apache for PHP work anyway

nevpugh308

Original Poster:

4,414 posts

276 months

Wednesday 13th August 2003
quotequote all
Er ... help !!

Okay, so I've downloaded Foxserv and installed it, taking all the default options, onto my Win2k machine. All appeared to work fine.

Quick reboot later for good measure, and mySQL is working fine (I can get to it's control panel via Foxserv), Apache appears to be working fine (I can see localhost etc) but PHP refuses to work ! (a simple .php file doesn't run, you see a mish mash of the PHP code instead)

I've checked that httpd.conf contains a loadmodule and an addtype for PHP (as set up by the Foxserv install)

But I'm totally at a loss what to try next ?!?

jonnyhilfiger

548 posts

256 months

Wednesday 13th August 2003
quotequote all
Must admit its always worked straight off the bat for me. There shouldn't be any need to configure it at all unless you want particular versions of PHP, MySql etc. As far as I remember the only thing you have to make sure you do during the install is set your username and password. Have you tried to see if the phpinfo file works?

Theres some good support forum sites for it which I would take a look at but tbh it's just as quick to uninstall it and reinstall it. (make sure you delete the php.ini file from the windows directory)

nevpugh308

Original Poster:

4,414 posts

276 months

Wednesday 13th August 2003
quotequote all
I did enter a username/pw for mysql, and the http://localhost/phpinfo.php page displays perfectly correctly (have no idea wtf it's displaying to me, but it does display data ! )

But if I open a .php file into IE6, it doesn't work (e.g. the test "hello world" page on the CD that came with the book I'm reading)

Am I doing something daft ?

nevpugh308

Original Poster:

4,414 posts

276 months

Wednesday 13th August 2003
quotequote all
Ding, just had a thought ...

Do all pages have to be "published" to the localhost to work ? i.e. you can't just double click on a php file and expect it to work ?!?

nevpugh308

Original Poster:

4,414 posts

276 months

Wednesday 13th August 2003
quotequote all
Ha ! Yes, I think that's it, it has to be http://localhost/mypage.php ... you can't just double click on stuff !

But why am I getting this error

Parse error: parse error, unexpected T_ECHO in C:FoxServwwwhello.php on line 5

... from this simple hello world page ?!? ....

< html>
< head>Hello World Program
< body>
< ?php>
echo ?< p>Hello World!?
?>
< /body>
< /html>

(ignoring the extra spaces after the < of course)

aaaaaaaaaaaaaaaaaaarrrrrrgggh !

nevpugh308

Original Poster:

4,414 posts

276 months

Wednesday 13th August 2003
quotequote all
Got it ...

the PHP should read :

< ?php
echo "< p>Hello World!";
?>

However this has given me no confidence whatsoever in my new book, as how I copied it in this thread is how it is in the book and on the CD ! Great start .... wonder how many of the other examples have errors in them ....

But, thanks all for your help and, er, for listening to me ramble

jonnyhilfiger

548 posts

256 months

Wednesday 13th August 2003
quotequote all
Good stuff. You've answered all your own questions.

dontlift

9,396 posts

265 months

Thursday 14th August 2003
quotequote all
nevpugh308 said:
Got it ...

the PHP should read :

< ?php
echo "< p>Hello World!";
?>

However this has given me no confidence whatsoever in my new book, as how I copied it in this thread is how it is in the book and on the CD ! Great start .... wonder how many of the other examples have errors in them ....

But, thanks all for your help and, er, for listening to me ramble




Books with errors help you learn to debug


one thing to remember is that if you do make any changes to httpd.conf or php.ini you will need to stop and restart the apache service for them to have any effect.

>> Edited by dontlift on Thursday 14th August 06:25

nevpugh308

Original Poster:

4,414 posts

276 months

Thursday 14th August 2003
quotequote all
jonnyhilfiger said:
Good stuff. You've answered all your own questions.

Eventually !