|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Trouble Installing PHP and Apache
Hello all,
I am having quite a bit of trouble installing PHP 4.3.3 and Apache Server 2.0.47 on my Windows 98 pc. The first time I tried, I downloaded the "apache_1.3.28-win32-x86-no_src.exe", as the book I am learning from (PHP Bible, 2nd Edition, by Tim Converse and Joyce Park) said to download the most recent secure file with the no_src.msi extention (I tried this first, and could not get it to work, so I downloaded the .exe), and the most recent release (2.0.47) did not have this extention. After installing Apache (to C:/Program Files/Apache Group/Apache/), I downloaded the Windows binary "PHP 4.3.3 zip package", and proceeded to unzip it. After doing this, I copied php4ts.dll and php.ini-dist (which I renamed to php.ini) to C:/WINDOWS. I also copied php4apache.dll and php4ts.dll to my Apache modules directory. Next, I opened httpd.conf, and added the following code: Code:
LoadModule php4_module modules/php4apache.dll AddType application/x-httpd-php .php .phtml AddModule mod_php4.c I also changed both "DocumentRoot"'s to read C:/aaa, as well as changed the ServerName's to 127.0.0.1. After doing this, I saved the file, started up Apache, and created an info.php file, with , and put this file in the C:/aaa folder. When I opened the file (using http://127.0.0.1/info.php), the code appeared in the browser (IE 6), instead of being executed. I viewed the source, which was exactly the same. The error logs in Apache said something like: [WARN] something I don't remember - exec() might not be safe. Running Apache 1.3 and PHP 4.3.3 After this, I uninstalled PHP and all of the relating .dll files. I then downloaded PHP again, this time using the installer, instead of the zip. I don't quite remember what happened here, but I believe Apache said something about a library file not being found. It started a countdown from 20, and autimatically closed after this time period. I deleted both PHP and Apache at this point, making sure I deleted all of the .dll's, as well. This time, I downloaded Apache 2.0.47, and installed it. It seemed to be working, as it was doing more than before. I downloaded the PHP installer again, went through that process, and did the same changes to the httpd.conf file (except this time, I did localhost, instead of 127.0.0.1). I created a new info.php, and put it in C:/aaa. Now, when I try to open it in my browser, I get a "Cannot Find Server" page. I tried creating just a plain HTML page, as well, in case it was just PHP that was not working. This brought up the same results. The Apache error log says the following: [Mon Sep 15 21:07:29 2003] [notice] Parent: Created child process -349849 [Mon Sep 15 21:07:31 2003] [notice] Child -349849: Child process is running [Mon Sep 15 21:07:31 2003] [notice] Child -349849: Acquired the start mutex. [Mon Sep 15 21:07:31 2003] [notice] Child -349849: Starting 250 worker threads. [Mon Sep 15 21:07:56 2003] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Group/Apache2/htdocs/info.php It seems from this file that it is still searching the htdocs file for info.php, and that brings up the Page Not Found. But I tried copying the file to this folder, as well, and still nothing happened. What am I doing wrong? Oh, I suppose I should also mention, in my C:/PHP folder, I only have the following sub-folders: Backup sessiondata uploadtemp No sapi folder, as there was with the manual installation folders. I also can't seem to locate the php4apache.dll file. I don't think this is the only problem, though, because I can't even open html files from the http://localhost prompt. I hope I have been clear enough in my descriptions. As can be seen, I know almost nothing about this sort of thing. I hope someone here can help me. |
|
#2
|
|||||
|
|||||
|
RE: Trouble Installing PHP and Apache
Few tips for you:
Quote:
Copy the php4apache.dll and php4ts.dll into your windowssystem32 directory. Quote:
In LoadModule directive, there should be a full path to your php4apache.dll. for example: C Quote:
You have to set document directory in your php.ini too. The directive is called doc_root and should be the same as DocumentRoot in your httpd.conf. In windows environment you have to use slashes and not backslahes in paths. Hope, it helps you to get the PHP running. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > Trouble Installing PHP and Apache |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|