I needed to compile/install php so that I could access with cgi for another app I have which works fine. However, I also want to run a couple of php redirect scripts in my apache public areas (images folder). When I access the php script, it is not executed, but rather the source code is displayed.
Seems like I need to do something with apache to get the script to execute but I am not sure what.
I saw this:
http://www.php.net/manual/en/security.c ... direct.php
which mentions using:
Action php-script /cgi-bin/php
AddHandler php-script .php
But I am not sure how to make this work for my specific situation)
I want to use a script in /usr/local/www/apache/mydomain.com/images
I am using ubuntu 8.1.0, apache 2.2.9, php 5.2.9 (cli) compiled with --enable-force-cgi-redirect --with-curl --enable-cli
Do I just need to config apache more or do I need to recompile/reinstall php to get cgi, an occasional php script in apache served directory, and decent security?
PHP displays source code with --enable-force-cgi-redirect
Moderator: General Moderators
-
seankelley
- Forum Newbie
- Posts: 1
- Joined: Thu Jun 18, 2009 11:57 am