php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25645 Error including a PHP file from within an SSI
Submitted: 2003-09-24 11:24 UTC Modified: 2003-09-25 09:05 UTC
From: makull at freemail dot nl Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.3.3 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: makull at freemail dot nl
New email:
PHP Version: OS:

 

 [2003-09-24 11:24 UTC] makull at freemail dot nl
Description:
------------
If you use any PHP version above 4.2.3, including a PHP file from within a SSI file using '#exec cgi' or '#include virtual' will fail and either result in the raw source code of the PHP script or in machine code.

If you go back to PHP 4.2.3 using '#exec cgi' to include a PHP file works perfectly.

This is on a Windows 2000 server using IIS 5 and all the latest service packs and patches.

Reproduce code:
---------------
Lines from the SSI file (.shtml) :

<!--#exec cgi="test.php"-->
<!--#virtual include="test.php"-->


Expected result:
----------------
Expected result : The output of the PHP script in HTML (the output is correct when you run it directly).

Actual result:
--------------
Actual result : Either the source code from the PHP script (virtual include) or machine code (exec cgi).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-24 11:48 UTC] sniper@php.net
Are you using ISAPI module or CGI binary version of PHP?

What is "cgi.fix_pathinfo" set to in php.ini (if you use PHP CGI binary)

Did you update your php.ini with the new php.ini-dist from the PHP 4.3.3 distribution?

 [2003-09-25 08:35 UTC] makull at freemail dot nl
I am using the CGI binary version. cgi.fix_pathinfo is default (zero).

I found the problem, the php.ini that was loaded was for 4.2.3, the 4.3.3 version was installed but to an incorrect location. After setting cgi.force_redirect to 0 (IIS) and moving the php.ini to the correct location it worked.

So this is all user error. Thank you for your help.
 [2003-09-25 09:05 UTC] sniper@php.net
Not bug -> bogus.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 16:01:31 2024 UTC