[PHP] Something I must have missed?
RWB
Icrontian
I just installed Apache2 and PHP5, I THOUGHT I did it right, but it's been a while since I last installed either. Anyways, the webserver works... when I goto http://localhost I get the apache default site, but I created the PHPinfo() thing on a page and when I load it, I only get the text I put in it, and not teh phpInfo stuff.
[PHP]<?php
phpinfo();
?>[/PHP]
[PHP]<?php
phpinfo();
?>[/PHP]
0
Comments
DirectoryIndex index.html index.html.var
and change to:
DirectoryIndex index.html index.html.var index.php
2) At the bottom of the file add:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
#Change the "c:/php/php5apache2.dll" line to point to the correct path for that DLL
3) Make sure you have edited and setup your PHP.ini and put it into C:/windows
4) F:/WEB/Apache Group/Apache2/htdocs is where that phpinfo page should go
The book told me how to install this stuff from the CD, so I installed it, apache seems tow ork just fine too. When I installed PHP it gave me some kind of report saying I needed to edit a certain file it couldn't automatically do for me or some crap like that, I just can't remember despite reading it multiple times throughout the several installs I have done.
I edited the php.ini file the way the book says, and the httpdconfig file thing. I made an extensions folder in my PHP folder, and put some DLL files into that folder and my system32 folder.
What could I be doing wrong?
"Now that you have PHP installed you can add extensions to the installation. Table 2.2 provides the extensions available to Windows.
Adding an extension is very easy--all you need to do is copy the dll's you want and edit the php.ini file. First create a directory called extensions in the folder where you installed PHP (usually C:\PHP). Now extract the php-4.3.2-Win32.zip file that is included on the CD. Go to the directory that the zip file extracted to an copyall the dlls out of the dlls directory and paste them into C:\WINDOWS\system32 if on a Windows XP machine. Now go back to the folder where the zip file extracted to and copy all the dlls out of the extensions folder and paste them into the extensions folder you created.
Now that you have the dlls in their proper places, open up your php.ini file. It should be located in the C:\<WINDOWS DIRECTORY>\php.ini. Once you have that file open, go to the "Paths and Directories" section and lookf or extension_dir="./". We want to set this to C:\PHP\extensions\. Now goto the "Dynamic Extensions" section and uncomment the following lines.
Save."
OK so, I did everything to the bone, or at least I believe I did. Here is my files as of now. Take note that *AT THE TIME OF TYPING THIS* I my directories for PHP and Apache are:
D:\PHP
D:\Program Files\Apache Group\Apache2
php extensions are located at
D:\PHP\extensions
*Also some in my System32 folder as specified.
httpd.conf
Did you follow the PHP instructions and copy the DLL to system32?
But when I goto 'http://localhost/phpinfo.php' (with phpinfo.php being the page I made with the code in my first post), all I see is the code itse;f and not the phpinfo page that should come up.
I am curious if Sarcnet uses the stuff I need, so then I could just upload to my webspace and work from there. Do they use that GD thing, which I _THINK_ is for allowing PHP to manipulate and build images? Or well all that stuff that was mentioned before in the past few posts with the instructions from the book?
Thom can enable GD on request and has done it on the SM server with his eyes closed and one hand behind his back
Will do, when I come across anything that requires something I don't have, otherwise, at the moment I have *little* idea of what I am doing, but so far all the php stuff I am doing doesn't seem to require anything I don't have yet on the server.
:headbange