logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: httpd 2.4 .htaccess and auto_prepend_file with php
Author
ml1



Joined: 28 Jan 2009
Posts: 8

PostPosted: Sat 09 Feb '13 1:59    Post subject: httpd 2.4 .htaccess and auto_prepend_file with php Reply with quote

When running 2.4.3, .htaccess files containing an auto_prepend_file for PHP don't seem to cause anything to be prepended.

It works on 2.2.23 with both PHP 5.3 and 5.4.
It does not work at all with 2.4.3 with either PHP 5.3 or 5.4.

I don't think it's a PHP issue because the version of PHP doesn't make a difference. Only the change from 2.2.23 to 2.4.3 makes a difference.

The entire content of the .htaccess file is similar to this:
php_value auto_prepend_file C:/apache2/html/special/canaccess.php

I've tried everything I can think of to make it work.

As a test, I introduced a deliberate parse error in canaccess.php (error*space*_reporting(6143); ) and nothing happened with 2.4.3. With 2.2.23, it generated an error. Typos in .htaccess cause internal server errors.

Any ideas?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 13 Feb '13 1:00    Post subject: Reply with quote

Have you tried an empty file as prepend file?
Back to top
ml1



Joined: 28 Jan 2009
Posts: 8

PostPosted: Thu 21 Feb '13 6:06    Post subject: Reply with quote

Yes. Nothing happens.
I tried an echo "blahblahblahblah" and it didn't echo anything.
I tried it with ehco "blahblahblahblah" and got no error.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 21 Feb '13 20:29    Post subject: Reply with quote

Do you use php as module or over fcgid?
Back to top
ml1



Joined: 28 Jan 2009
Posts: 8

PostPosted: Tue 05 Mar '13 19:30    Post subject: Reply with quote

I'm using the module. From what I can gather, auto_prepend_file can't be used with fcgid.
Back to top


Reply to topic   Topic: httpd 2.4 .htaccess and auto_prepend_file with php View previous topic :: View next topic
Post new topic   Forum Index -> Apache