View Full Version : Installing PHP
snapple
11-02-2003, 09:01 AM
Many thanks for taking the time to read this thread.
I while ago i installed PHP and MySQL on my computer, no problems. I then saved up my pennies and bought a new one, i simply have not got round to installing PHP and MySQL - that is until the other week.
I am running windows 2000 proffessional.
I have installed Apache Webserver fine (i test the page, "http://local host" produces the "seeing this instead of your web page" graphic in my browser) - nice i thought, all going like before.
That is until i moved on to installing PHP, i downloaded it (php-4.3.3 - win32), put it in 'Program Files" - then:
1) Re-named the php.ini.dist file to php.ini and moved it to C:\WINDOWS.
Then i was about to move the file mscvrt.dll (but could not find it).
2) So i moved onto moving php4ts.dll file over to C:\WINDOWS (managed that one ok).
Then moved on to telling Apache that i have installed PHP and where it was.
3) So i opened up httpd.conf (that was in C:\Program Files\Apache Group\Apache\conf).
4) Edited the relevant sections fo the script - apart from one peculiarity, when i was adding the:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php4
I could not find the correct two lines above it (where in the book it states) should have:
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
And yes - it is the Foundation PHP for Flash Book by Steve Webster i have :)
I know i did it before fine - which is why i get angry with myself.
I dont know whether i have given stupid information as to try and help you answer my question or not - but if you need anymore specifics then just ask - cos i am not getting anywhere at the moment - just reading 'theory' in bed.
Thanks for taking the time to help me.
Regards, snapple :)
CyanBlue
11-02-2003, 09:23 AM
Howdy, snapple... ;)
So, youv'e bought the new computer, eh??? Great... :D
I have no idea what you are talking about since I use IIS to run the PHP on my W2K machine...
This is what I generally do whenever I install PHP on my IIS...
I download the Installer version first and use that one to install the PHP...
PHP 4.3.3 installer (http://www.php.net/get/php-4.3.3-installer.exe/from/a/mirror)
That mostly take care of any sort of settings related stuff for me...
After that, I download the package from the same site...
PHP 4.3.3 zip package (http://www.php.net/get/php-4.3.3-Win32.zip/from/a/mirror)
and replace whatever it overwites...
That usually takes care of the job for me...
Just my 2 cents... ;)
snapple
11-02-2003, 09:54 AM
Thanks for the speedy response CyanBlue - yeah new computer (Dell Work station, mmmmmmmm - with extra dribble protectors on the keyboard and monitor).
Yeah, i know how it all works (and that was the reason for not installing via the 'installer wizard') - but i guess i have had enough of doing it the 'step by step way'.
As such i have decided to use the links you have provided, and i shall let you know how i get on in apporximately, erm - well, when i am done.
Many, Many thanks CyanBlue - it is really appreciated !
Regards, snapple :)
CyanBlue
11-02-2003, 10:04 AM
Hm... New Dell... Yummy... :) I really need to get one myself... :(Yeah, i know how it all works (and that was the reason for not installing via the 'installer wizard') - but i guess i have had enough of doing it the 'step by step way'.Um... I don't really get it... Can you tell me what was the reason that forced you to go on with the step by step way???
Actually I don't understand why they made two versions of PHP distribution copies with different installation method... :confused:
snapple
11-02-2003, 01:18 PM
Um... I don't really get it... Can you tell me what was the reason that forced you to go on with the step by step way???
Well, i was running through the Steve Webster Foundation PHP for Flash, (the installation of MySQL and PHP section) - and there is no mention of an installation wizard.
You download it from the site you gaveme the url to, and you have to sift through the relevatn files (mentioned in my first post), editing them as recomended and moving them around.
The i run the
< ? phpinfo(); ? >
test, and check in my browser and i get 'page cannot be displayed' - i know the Apache webserver is installed fine because when i tes that (by typing in 'http://localhost').
SO i ssume there are two ways 1) using the installer wizard, and 2) editing the files yourself - i dont know, because i am new to PHP.
Anyway - goingt o give it a go now - i started it, decided to fit in a run before it got dark, then got something to eat, so am sitting down with a beer now, ready to get it up and running.
Also - i dont have any icons on my toolbar - on my old computer, when Apache webserver was running - i knew about it, but now, i seem to get nothing.
Oh, when it says:
Please enter the address of your SMTP server
and
Please enter the 'from' address for the mail function
I assume the address is just my own address (i have used the mail funciton before - this is the annoying thing - i had it all up and running and was interacting with the DB and built a 'tell-a-friend' form - but now its all going tits-up) - but what is the SMTP ?
Anyway - i'll get back to you in a minute.
Thanks again for your help, very much appreciated.
Regards, snapple :)
CyanBlue
11-02-2003, 02:03 PM
Howdy... ;)
You said in a minute, but it's been a while already...
If things are not going well, you can blame your beer... :D< ? phpinfo(); ? >shoud be<? phpinfo(); ?> // Without the space around the '?' mark...Please enter the address of your SMTP serverI don't even remember if there was a screen that was asking this information, but I know that there is a section in PHP.ini file that goes with the SMTP... I have it setup with 'smtp.netzero.com' since that's what I use with the NetZero service... If you do not want to mail something out, you can leave it to 'localhost'...Please enter the 'from' address for the mail functionBasically same thing... You can either specify the real email address you want somebody to reply to when they get the email from you, or some bogus one like me@mycomputer.com would be fine...Thanks again for your help, very much appreciated.Hey, I am not doing much to get you solve your problem... I'm just doing what I can... That's all... Besides, that's the least I can do to help you... :)
freddycodes
11-02-2003, 02:13 PM
PHP comes with Windows installers for IIS, it does not come with Apache Installer.
You need to set it up manually on Windows with Apache.
You should be almost there. However I normally put Apache at C:\Apache
I put php at
C:\Apache\modules\mod_php4
In my httpd.conf file I use
LoadModule php4_module modules/mod_php4/sapi/php4apache.dll
AddType application/x-httpd-php .htm .php .php3 .html
This should never be used unless you plan on running php3. Which I highly doubt.
AddType application/x-httpd-php3 .php3
CyanBlue
11-02-2003, 03:05 PM
freddycodes comes to rescue as always... :D
Ah... PHP installer does not work with the Apache... I didn't know that... ;)
Hope snapple has installed PHP with no problem... :)
snapple
11-02-2003, 07:54 PM
Thanks you very much freddycodes & Cyanblue - i have successfully installed PHP & MySQL on my computer, it took a pizza and another beer - but its raining outside, so who cares ?
Thanks very much, sorry for my slow responses - i was regularly interupted via on-line games (you know the button bashing ones where you don't even really need to look at the monitor, like 100m race) and went for a walk with my mini disk, always feel better after a nice fresh walk, put a storming track on, come back, dry myself off, sit down ready to tackle all that i throw at myself.
Thanks once again ! - I think i just got the editing of the php files a bit muddled up, i was puting different files in different directories , in the end i just deleted the whole lot and started from scratch, seems to have worked because i tested this php:
<?
function doubleAndSquare ($number)
{
$returnArray['double'] = $number * 2;
$returnArray['square'] = $number * $number;
return $returnArray;
}
$values = doubleAndSquare(5);
print "Doubled: " . $values['double'] . "<br>\n";
print "Squared: " . $values['square'] . "<br>\n";
?>
.............and i got:
Doubled: 10
Squared: 25
in my browser (that was an example from the Steve Webster book by the way)
I shall now go foward.
Best regards, snapple :)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.