php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35199 .htaccess "Action" no longer executes PHP page
Submitted: 2005-11-12 15:12 UTC Modified: 2005-11-24 01:00 UTC
From: choover at rdg dot com Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 4.4.1 OS: Linux 2.6.9-22.0.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: choover at rdg dot com
New email:
PHP Version: OS:

 

 [2005-11-12 15:12 UTC] choover at rdg dot com
Description:
------------
A script under Apache2 using PHP 4.3.11 as an Apache 2 Handler that was called from a .htaccess file using the AddHandler and Action statements worked fine.  The 4.4.1 version of PHP with the same configuration no longer executes the page and gives no errors.  We changed the php.ini with cgi.fix_pathinfo=1 and made the appropriate modifications to httpd.conf to fix the issue.  Still no luck.  

Reproduce code:
---------------
#.htaccess file
Addtype text/xml .phpx
AddHandler phpx-file-handler .phpx
Action phpx-file-handler /lib/phpx.php
DirectoryIndex index.phpx index.php



Create the phpx.php file:

<?

session_start();

echo "Passed Path :".$_SERVER["PATH_INFO"];

session_write_close();
?> 


Create a file with .phpx as extension:

<?xml version="1.0"?>
<Document>
</Document>

Expected result:
----------------
This url represents the expected result:http://emd11.medianext.com/quango/websites/rdg/index.phpx

Apache redirects the .phpx file to the /lib/phpx.php page for processing and outputs results.

Actual result:
--------------
This is the non-working one:
http://quangoweb.medianext.com/websites/rdg/index.phpx

There are NO errors in our logs:

/var/log/httpd/error_log
/var/log/error_php

And no $_SERVER variables are being set on the phpx.php page. However, calling the page by itself:

http://quangoweb.medianext.com/lib/phpx.php

Show that it does run.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-16 14:35 UTC] choover at rdg dot com
Installed latest CVS 4.4.2-dev and still have no results.
 [2005-11-16 17:12 UTC] choover at rdg dot com
This is getting VERY frusterating!  We have found that if we add ob_end_flush(); to the bottom of the phpx.php page, the page will then execute; but there is no ob_start()  in our code.  Also, require() and require_once() do not work but include() does.  But include only works when it wants.  The first file we include is a custom error handler. Once the file is executed the first time, we have to rename the actual error handler function call to get the file to load again. Something with the buffering is really screwed up.
 [2005-11-16 18:15 UTC] sniper@php.net
Are you sure the php.ini file you have is used? And is the right one? (check this from phpinfo() output)
Also check for any "auto_prepend_file" settings in .htaccess / httpd.conf / php.ini files.
 [2005-11-16 18:26 UTC] choover at rdg dot com
Here is the phpinfo():

http://quangoweb.medianext.com/.test.php
 [2005-11-16 18:32 UTC] sniper@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.


 [2005-11-16 19:40 UTC] choover at rdg dot com
We rolled back to 4.3.11 and all is working again as it should be.  But this issue with 4.4.1 is really problematic.
 [2005-11-16 20:06 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-11-16 20:13 UTC] choover at rdg dot com
Using PHP 5 is just not an option. This is a production server with a lot of XML programming and is also dependent upon PHP working correctly with Apache.
 [2005-11-16 20:19 UTC] sniper@php.net
a) You refuse to TEST things
b) You refuse/are not able to provide us a reproducing script

As long as the above stands this bug is just bogus.

 [2005-11-16 20:51 UTC] choover at rdg dot com
The script is in THIS post.  It is the first item mentioned and there ARE instructions to reproduce the error.  We have tested this by turning on and off buffering as well as checking all configuration options in the httpd.conf and php.ini files.  There are no problems.  We have reviewed the Apache and PHP error logs and NO ERRORS are produced.  The code runs fine independently and ran well in PHP 4.3.11
 [2005-11-16 22:36 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

Just try the snapshot. If you don't, I'll just leave this alone.
 [2005-11-24 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC