Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: AddHandler .htaccess PHP |
|
Author |
|
petersra
Joined: 01 Dec 2008 Posts: 2
|
Posted: Fri 12 Dec '08 13:37 Post subject: AddHandler .htaccess PHP |
|
|
Greetings
I want any request for a .jpg file in the target directory to cause a PHP script to run. In the past I did this with the following code in my .htaccess which executed the php script in the same directory as the image file.
AddHandler phpscript .jpg
Action phpscript myscript.php
The above worked with Apache2 and PHP version 4. However, when I changed to PHP v5 the script no longer works.
Please note that I have PHP5 as a module of Apache2 not a CGI.
Help. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 07 Jan '09 18:51 Post subject: |
|
|
Are you using short tags? e.g. <? instead of <?php
What is about that in your error log? Turned on php error log?
With PHP5 AddType application/x-httpd-php phpscript.jpg should work.
Than the phpscript.jpg contains the script |
|
Back to top |
|
|
|
|
|
|