1. Installing Apache/PHP

This is a new install on windows XP (or a re-install after the first didn't go well)

I'm installing Apache_1.3.27-win32-x86-no_src.msi

All seems to be fine with the installation as I get no complaints from Apache on startup.

I've installed php-4.3.0-win32

I have put php4ts.dll into the sapi folder with php4apache.dll (apache gave me problems with it anywhere else)

I have put my php.ini file into C:\windows and changed these lines:
Removed the ; from: Colors for Syntax Highlighting mode

Not sure if I uncommented this or if it was already done:
; Windows: "\path1;\path2"
include_path = ".;c:\php\includes"

; Directory in which the loadable extensions (modules) reside.
extension_dir = c:\php\extensions

doc_root = C:\Program Files\Apache Group\Apache\htdocs

Set sessions.save_path:
session.save_path = C:/windows/tmp (for some reason we went from backslash \ to forwardslash / here)

And thats about it for my ini file

Now for my httpd.conf file I changed (or added)

Should I comment this out as its only for test purposes:
# AccessFileName: The name of the file to look for in each directory
# for access control information.
#
AccessFileName .htaccess

Thats about it, problem is if I put info.php into the address bar all I get is a box for a file download.Funny thing is that if I click open, it opens my info.php file and I get to see: <?php phpinfo(); ?>

Thanks to all who have helped to date.

2. You haven't set up PHP as an application type in the Apache config.

Although there can be a few variations of configuring PHP
under Apache, these are simple enough to be used by the
newcomer. Please consult the Apache Docs for further
configuration directives.

Now that version 4.1 introduces a safer sapi module, we recommend
that you configure PHP as a module in Apache.

To do this, you should move php4ts.dll to the windows/system (for Windows 9x/Me)
or winnt/system32 (for Windows NT/2000/XP) directory, overwriting any
older file. Then you should add the following three lines to your Apache
conf file: (swap c:/php/ for your PHP install path)

If you wish to install PHP as a CGI binary, (the sapi is much better)
you need to enable the apache security fix in your php.ini by
setting cgi.force_redirect = 1. Then, insert these lines to your conf file:

ScriptAlias /php/ "c:/php/"
Action application/x-httpd-php "/php/php.exe"

3. Am I reading something wrong ??

Isn't this:
ScriptAlias /php/ "c:/php/"
Action application/x-httpd-php "/php/php.exe"

needed if you are setting php as a cgi binary.

I'm trying to set this up as a module.

4. Did you read the install.txt file? It says to copy files from the SAPI directory to the SYSTEMROOT, either C:\WINDOWS\SYSTEM or C:\WINNT\SYSTEM32.

Also, php4ts.dll needs to be in the SYSTEMROOT as well and no other place will work.

5. Yes I did read the install.txt, but I also read a trouble shooting thread that suggested that if you get errors (which I was) the install dll's into sapi folder, this removed the errors I was getting. I also uninstalled "QoS packet scheduler"

I know I'm missing something and I appreciate the time you are putting in.

6. Well the problem that you are having suggests to me that you haven't got the ApplicationType setup correctly but your first posts shows that you do so I'm sorry but I can't help.

7. DJ P@CkMaN sticking the php4ts.dll & php4ts.lib in the PHP/SAPI directory is about as foolproof as it gets. (it also lets you run multiple versions of PHP across different servers/apps should you wish to do such a thing.)

8. Hey Firepages

From our previous thread (quote from you)
if not you have other config problems with apache, to check the configuration open a dos prompt and type

c:\path\to\apache\apache.exe -t

and note any errors reported there.

So tell me if I'm doing this correct:
Start
Programs
Accessories
Command Prompt

Now I'm guessing thats what you meant ??

I have the full path in my browser which is:
C:\program files\apache group\apache

Now if I put into my command prompt:
C:\>program files\apache group\apache\apache.exe -t

All I get is:
apache is not recognised as an internal or external command,operable program or batch file

So tell me I'm an idiot and what I'm doing wrong.

9. Hi, perhaps its an issue with DOS names ? save the following as tester.bat (save it anywhere)

Code:
cd C:\PROGRA~1\APACHE~1\APACHE
apache.exe -t
PAUSE
then double-click it for an error message, if you dont even get the error message (or a Syntax OK msg) then you have a bigger problem.

to see what else you can do from the command line change the '-t' to '-help'

10. Heres the results:
C:\program files\apache group\apache\htdocs>cd C:\PROGRA~1\APACHE~1\APACHE
The system cannot find the path specified
C:\program files\apache group\apache\htdocs>apache.exe -t
'apache.exe' is not recognised as an internal or external command,operable program or batch file.
C:\program files\apache group\apache\htdocs>pause
Press any key to continue.

I uninstalled my firewall, I've disconnected from the internet and am using another computer for outside contact, and I cant see that either my anti-virus (AVG) or firewall (OUTPOST) would be causing any problems as I used these on win98 with no probs

If I put http://localhost in the address bar I get that good looking apache window.

Heeeeeeeeeeelp

11. Type this in when you first open the Command Prompt.
cd\Program Files\Apache Group\Apache
and then hit Enter and it should look something like this -
Code:
C:\Program Files\Apache Group\Apache>
Then type in
apache -t
and you will see the error messages or any other problems Apache recognises.

12. Yep, I feel like a dork ! (forgot about cd)

Anyways thanks.

Heres the results:
C:/Program Files/Apache Group/Apache/conf/httpd.conf:SYNTAX OK
[fri JAN 03 20:36:14 2003] [error] cannot remove module mod_php4.C: not found in module list

And that just about does it.

13. here ... http://www.firepages.org/public/httpd.conf.txt is a simple httpd.conf which should work for your setup, make a backup of your existing httpd.conf then save the page contents as httpd.conf - & see if that works.

14. Well that didn't work, all I get is a complaint about a SYNTAX ERROR and I cant even bring up the test page for apache. I replaced the original httpd.conf and I get the test page back with localhost but I'm still getting the pop up for a file download with localhost/info.php.

This has got me screwed.
Give me back win98

15. How a about you post a link to your own httdp.conf, then someone can add the neccessary lines and post it back again?

16. If this keeps up I'll go to a free site and post it there, but I would rather not abuse their service like that.

Could it be something in my Administrative Tools:
Component services
Computer Management
Data Sources
Performance
Services (looks like a shortcut to a driver)

I've found others with the same problem but no answers.

17. No, you're most likely just not doing it correctly. Nothing in the control panel has a direct effect on Apache.

And why do you consider posting your apache conf to a free server "abusing their services"?? Its just a text file, they wont care.

Originally posted by Motivated
If this keeps up I'll go to a free site and post it there, but I would rather not abuse their service like that.

Could it be something in my Administrative Tools:
Component services
Computer Management
Data Sources
Performance
Services (looks like a shortcut to a driver)

I've found others with the same problem but no answers.

18. With nothing better to do I went into a couple of old httpd.conf files I had from previous installs on win98.

PHP just wasn't being started/recognised or something.

Action application/x-httpd-php /php/sapi/php.exe

I went to C:/php and double clicked php.exe,another box opens up and says "This application failed to start because php4ts.dll was not found." So I moved it to the sapi folder where php4ts.dll is and it worked. Back to my browser after starting Apache again, and another 404 error.

I have since found there are posts all over the internet about this problem. I would say it is quite probably this version of Apache but that doesn't fix my problem.

19. <bright_red>DOH, sorry dude there was an error in that file !</bright_red>

I tested the one thats there now though

20. I didn't think it was a fault in your file, more likely a fault with apache. I've been reading heaps and there are so many people having this problem and people with a lot more experience than me.

I'll try your other conf and a completely different way of installing and setting up and see how that goes. It might just be easier to re-install an earier version of both that was working as it only has to be for testing on my machine. Although on saying that I had hoped to host a small site just for the experience.

Thanks to all for your time, really appreciate it.
Now, as we look further................

21. For anyone interested I solved the problem.

The solution is very simple:
Install an older version of both Apache and PHP.

Had it working in 15 mins.

Hey, I would like to say a BIG thankyou for all the help.
Thanks guys.

22. CORRECT line LOCATIONS

HERE IS THE HTTPD CONFIG for APACHE 1.3.27
-------------------------------------------
THE 2 uncommented lines SHOULD BE PLACED at the right location in the httpd.conf:

# Dynamic Shared Object (DSO) Support

# etc etc

THE 2 lines below can be placed right at the bottom of httpd.conf:

-----------------------------------------

The above works for PHP 4.3.0 on APACHE 1.3.27 as a MODULE.
Eventhough its a bit late, I hope anyone looking for answers can use it.

Thanx

23. Hey thanks azman, I'm still planning on 1.3.27 soon as I finish doing what I am working on now.

Much appreciated.

24. Hi,

but,
could be or could not be needed.

If it's commented then AddModule is not necessary.
I think it's important to remark that.

:-)
pippo

25. Hi Pippo,

Indeed you're correct:

ClearModuleList <-- it needs to be uncommented

Thanx for the tip.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•