PHP issues...

Jugernot

Diamond Member
Oct 12, 1999
6,889
0
0
I've set up my home server running Window XP Pro with Apache, PHP, and MySQL. Amazingly after a couple of hours of tinkering, I got them all working.... except for one thing. I'm getting the PHP script (/php/php.exe) location in all of my img tags and links. Such as

http://deepfreeze.hn.org:81/php/php.exe/phpinfo.php

Rather than:
http://deepfreeze.hn.org:81/phpinfo.php

It's breaking all my img tags (http://deepfreeze.hn.org:81/php/php.exe/phpBB/login.php) and links. So basically, looks to me like it's trying to parse everything as a php document. Can you look at my PHP info file (links above) and tell me if you see something that is listed wrong?

Here is what I how I configured the server:

php.ini (c:\windows\):
doc_root = C:\Program Files\Apache Group\Apache\htdocs
extension_dir = C:\php\extensions

httpd.conf:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
Action application/x-httpd-php "/php/php.exe"
ScriptAlias /php/ "c:/php/"

Anyone know what's up with this?

Thanks
 

Elledan

Banned
Jul 24, 2000
8,880
0
0
Did you read the 'install.txt' which comes with PHP?

Quote from the above mentioned file follows:

-------------------------------- install.txt --------------------------

Web server configuration
========================

Installing PHP on Windows with Apache 1.3.x

There are two ways to set up PHP to work with Apache 1.3.x
on Windows. One is to use the CGI binary (php.exe),
the other is to use the Apache module dll. In either case
you need to stop the Apache server, and edit your
srm.conf or httpd.conf to configure Apache to work with PHP.

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.

If you unzipped the PHP package to C:\PHP\ as desribed
above, you need to insert these lines to your Apache conf
file to set up the CGI binary:

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

Remember to restart the server, for example,
NET STOP APACHE
followed by
NET START APACHE

If you would like to use PHP as a module in Apache,
you should move php4ts.dll to the windows/system (for Windows 9x/Me)
or winnt/system32 (for Windows NT/2000) directory, overwriting any
older file. Then you should add the following two lines to you Apache
conf file:

LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php

Remember to restart the server, for example,
NET STOP APACHE
followed by
NET START APACHE

To use the source code highlighting feature, simply create a PHP
script file and stick this code in:
<?php show_source("original_php_script.php"); ?>
Substitute original_php_script.php with the name of the
file you wish to show the source of. (This is the only way of
doing so).

On Win-Apache all backslashes in a path statement such
as: "c:\directory\file.ext", must be converted to
forward slashes.

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

Jugernot

Diamond Member
Oct 12, 1999
6,889
0
0
Yah read it, but I apparently only tried the CGI install versus PHP module method. Working now, thanks!