Click to See Complete Forum and Search --> : installing and testing script
compugeek915
07-08-2004, 12:38 AM
i am using windows xp and bought a book to try and teach my self php4. /i have downloaded apache 1.3 or whatever ( i know its not 2 tho) i know that works because when i go to the local host thing i get the apache was successfully installed page. I downloaded the php installer and ran it. then i wrote the first script in the book and saved it as a .php file. I saved that under the apache htdocs file. The the when i go to the http://localhost/the filename, i get a prompt to download the file.
do i have to edit the apache or php files? (why wont it work) o and also this is less important to me but what do i have to do to install my sql
tommynanda
07-08-2004, 12:41 AM
Check this link...
http://www.ricocheting.com/server/apache.html
Good Luck
TommYNandA
compugeek915
07-08-2004, 12:56 AM
that didnt work because both of those settings were already correct to were i had saved the document.do i have to edit the httpd file or the php.ini file?
tommynanda
07-08-2004, 01:02 AM
Browse the links on the left to install PHP, MySQL, on Windows with Apache... u cant use php installer when running apache... download binary and follow from the following link
http://www.ricocheting.com/server/php.html
compugeek915
07-08-2004, 01:28 AM
i went through all of this and i still get that i have to load the file or save the file. but when i test the configuration its syntax is ok
tommynanda
07-08-2004, 01:35 AM
Do u have something like this in your httpd conf file
LoadModule php4_module e:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
ScriptAlias /php/ "e:/php/"
Action application/x-httpd-php "/php/php.exe"
AddType application/x-httpd-php .php3
Second part is optional... but first part is required
compugeek915
07-08-2004, 01:14 PM
here i dont think my last reply worked so here it is again
i put that in like the tutorial said but i still get the file download screen.
just so your know the script i am trying to use is:
<?php
phpinfo() ;
?>
ty for trying to help me. people on other sites havent been any help
compugeek915
07-08-2004, 01:31 PM
#LoadModule php4_module e:/php/sapi/php4apache.dll
#AddModule mod_php4.c
#AddType application/x-httpd-php .php
does it matter were i put it though?
i just randomly placed it
tommynanda
07-08-2004, 01:37 PM
remove those # symbols before statements
it doesnt matter where u put...
Also change e:/php/sapi/php4apache.dll to your php directory
compugeek915
07-08-2004, 01:45 PM
php directory? mine is just saved at c:/php the goes through all the sub folders so do i just have to change it from c to e ?
tommynanda
07-08-2004, 01:47 PM
yeah... you should find php4apache.dll in c:\php\sapi\
so just change e to c
if that doesn work out give me the following details in your next post
PHP Directory
Apache Directory
compugeek915
07-08-2004, 01:52 PM
directory for which files ( sry im not quit sure i follow.)
for php everything is saved under c:/php4.3/php-4.3.7-Win32/then so on
that is what i changed it to in my httpd file
for apache it c:/program files/apache group/ apache/ then so on
like i said im not sure thats what your looking for though
tommynanda
07-08-2004, 02:09 PM
okay... now rename c:/php4.3/php-4.3.7-Win32/ to c:/php/
and paste the following in your httpd file
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
did u edit ur php.ini file?
assign doc_root to your apache directory
something like
doc_root = "C:\Program Files\Apache Group\Apache\htdocs"
remember there shouldnt be # before statements in httpd conf file and no ; before statements in php.ini
compugeek915
07-08-2004, 02:33 PM
i dont get the file download thing but i now get the cannot find server page.
u mean no # at all because every line except the lines i put in have that in front of it.
compugeek915
07-08-2004, 02:38 PM
when i go to restart apache though it tells me it cant load the php4apache file but im sure the directory is right
and now i do get the save the file thing again. i just dont get it
tommynanda
07-08-2004, 03:08 PM
u mean no # at all because every line except the lines i put in have that in front of it.
Yeah no # symbols... # means comment... so Apache doesnt execute those lines... dont use # before the three lines of PHP module
when i go to restart apache though it tells me it cant load the php4apache but im sure the directory is right
goto php directory that you specified in httpd.conf and see if you can find php4apache.dll file in there
compugeek915
07-08-2004, 03:46 PM
when i go to restart apache though it tells me it cant load the php4apache file but im sure the directory is right
and now i do get the save the file thing again. i just dont get it
compugeek915
07-08-2004, 03:48 PM
yah i can find it but now i am going to try and go through the httpd.conf file and remove all of those # signs in front of every line
tommynanda
07-08-2004, 04:00 PM
DONT remove # from every line...
only before the lines you added
compugeek915
07-08-2004, 04:13 PM
o ok
well any other ideas?
compugeek915
07-08-2004, 07:42 PM
well i am just going to try again start all over. how do i delete all the php files and installs on my system
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.