php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18397 Unable to do PHP source view (PHPS)
Submitted: 2002-07-17 16:33 UTC Modified: 2002-10-04 16:40 UTC
Votes:4
Avg. Score:4.2 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:2 (50.0%)
From: robbat2 at orbis-terrarum dot net Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.3.0-dev OS: Linux-2.4.18-rc1-ac6
Private report: No CVE-ID: None
 [2002-07-17 16:33 UTC] robbat2 at orbis-terrarum dot net
Back in the days of Apache1
All that was needed to get the syntax highlighted PHP source view was:
AddType application/x-httpd-php-source .phps
In the Apache configuration file.
This followed the same pattern as the line to make PHP run on PHP files:
AddType application/x-httpd-php .php

Now with Apache2, the regular line has become:
<Files *.php>
        SetOutputFilter PHP
        SetInputFilter PHP
</Files>

And I have looked high and low to get the functionality with Apache2 but it does not seem to exist. I have looked in the PHP source as well, to no avail.

From looking at the source, could a new set of input/output filters named PHPS to do the source highlighting?

I listed this as a bug, as the removal of the PHPS functionality is not documented in any release notesor mailing list that I have found.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-17 17:09 UTC] sniper@php.net
I have used "AddType application/x-httpd-php .php" with
apache2 and it works just fine. I didn't try the source type
though. Have you tried those? Or just the new style?

--Jani

 [2002-07-17 17:54 UTC] robbat2 at orbis-terrarum dot net
I just commented out my previous PHP lines,
and put in this:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

To test for certain again, and although regular PHP works with the AddType directive, the directive containing php-source seems to do nothing at all.

I use the Set[Input/Output]Filter PHP commands because I use a chain of content handlers in some other parts of my server (namely PHP+SSI), so just the having the AddType method fixed would not be enough, as I need an
Filter instead.

For testing purposes, here are some PHP pages I'm working on:
http://robbat2.matchbox.research.techbc.ca/sqlparse.php
http://robbat2.matchbox.research.techbc.ca/sqlparse.phps

(In case you are wondering about them, I'm a core developer on phpMyAdmin)
 [2002-07-17 17:56 UTC] robbat2 at orbis-terrarum dot net
Side note on this,
I just reproduced it on Linux-2.4.18, with a slightly older CVS of PHP and Apache2.0.39.
 [2002-07-17 17:58 UTC] sniper@php.net
It does not work as it hasn't been implemented yet.

 [2002-07-17 18:07 UTC] robbat2 at orbis-terrarum dot net
Is there either an ETA for it or some implementation suggestions for writing it myself?
 [2002-07-17 18:10 UTC] sniper@php.net
ETA? heh..no such thing exists here..this is opensource project. :)

About implementation..I guess it should work same as with the 1.3.x apache SAPI..

 [2002-07-17 18:12 UTC] robbat2 at orbis-terrarum dot net
I'll see about hacking on the code for it this evening and tommorow morning and submiting a patch afterwards.

Thanks for the help Jani.
 [2002-08-13 15:10 UTC] happy at happyhgw dot de
I experienced the same situation using apache 2.0.39 under windows. My PHP-version is 4.2.2 as a module for apache 2.
 [2002-08-26 18:39 UTC] paul dot brzezinski at eds dot com
having same issue on php v4.3.0-dev on Solaris 8 (SPARC).  When I click on a .phps file I get the source -- but the browser doesn't know what to do with the MIME-type applicaiton/x-http-php-source.
 [2002-10-04 16:40 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 09:01:27 2024 UTC