PHP/mySQL expert ?
Discussion
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
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
I believe XP is just as simple. Don't know about the home versions, don't touch 'em
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 ?!?
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 ?!?
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)
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)
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 ?
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 ?
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 !
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>
< body>
< ?php>
echo ?< p>Hello World!?
?>
< /body>
< /html>
(ignoring the extra spaces after the < of course)
aaaaaaaaaaaaaaaaaaarrrrrrgggh !
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
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
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
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff