[nycphp-talk] Config Problems, Apache-PHP on Windows
Oktay Altunergil
nyphp at altunergil.com
Tue Dec 17 17:40:53 EST 2002
Jessica,
"server-parsed" is not the setting you should be modifying. Like Dan said, what you need to do is to add
AddType application/x-httpd-php .php
Action application/x-httpd-php "/phpdir/php.exe"
ScriptAlias /phpdir/ "c:/Program Files/php/"
which has the effect of associating the .php extension with the x-httpd-php mime time which in turn will be handled by php.exe.
If you put .php in the 'server-parsed' setting Apache will try to *handle* it as if it was a server side include (i think that's what server-parsed is for) and not as php. Make sure you remove .php from that line. You can also add other extensions such as .php4, .phtml etc but you should do that in the section i've described above.
oktay
On Tue, 17 Dec 2002 17:35:20 -0500
jessica kelly <jkelly at sussex.cc.nj.us> wrote:
> Hi Dan,
>
> I added/changed what you suggested. I'm still having problems though.
>
> I have mucked around with the below section hoping to get things going but to no avail.
>
> >>>
> # To use server-parsed HTML files
> #
> AddType text/html .shtml .htm .inc
> AddHandler server-parsed .shtml .htm .inc .php
> #
> >>>>
> If I change " AddType text/html .shtml .htm .inc" and "AddHandler server-parsed .shtml .htm .inc" to not include .php I get a "Bad Request Error".
>
> If I add .php to "AddType text/html .shtml .htm .inc [.php]" I get a page with <? phpinfo(); ?> in the source code but nothing else.
>
> If I keep .php in "AddType text/html .shtml .htm .inc [.php]" and add .php to "AddHandler server-parsed .shtml .htm .inc [.php]" I get the same error as above (I get a page with <? phpinfo(); ?> in the source code but nothing else.)
>
> If I get rid of .php in "AddType text/html .shtml .htm .inc" and Keep .php to "AddHandler server-parsed .shtml .htm .inc [.php]" the server wants to download the page to the computer rather than displaying the phpinfo();
>
> All this said I don't think that the above in any form is the answer but maybe a clue as to the cause.
>
> If someone would like to paruse the .conf file let me know & I will send a copy to you.
>
> Thank's
>
> Jessica
>
> >>> danielc at analysisandsolutions.com 12/17/02 2:03:20 PM >>>
> Hi Jessica:
>
> On Tue, Dec 17, 2002 at 12:19:28PM -0500, jessica kelly wrote:
>
> > I'm trying to get Apache 1.3.26 and PHP 4.2.3 setup on my win production
> > computer
> > ... snip ...
> > "You have chosen to download a file of type: application/x-httpd-php
> > from 127.0.0.1/a/test.php"
>
> Modify your httpd.conf file...
>
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/phpdir/php.exe"
> ScriptAlias /phpdir/ "c:/Program Files/php/"
>
> Tweak paths as appropraite for your system.
>
> --Dan
>
> --
> The new Department of Homeland Security is exempt from:
> * the Freedom of Information Act * procurement rules
> * labor collective bargaining * whistle blower protection
> The real goal? Eliminating government accountability.
>
>
>
>
>
>
>
>
>
> --- Unsubscribe at http://nyphp.org/list/ ---
>
>
More information about the talk
mailing list