php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12318 ob_gzhandler screws-up included .js files
Submitted: 2001-07-23 09:38 UTC Modified: 2001-10-19 11:02 UTC
From: gilux at xs4all dot nl Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.0.6 OS: redhat 6.2
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: gilux at xs4all dot nl
New email:
PHP Version: OS:

 

 [2001-07-23 09:38 UTC] gilux at xs4all dot nl
i put this in my apache1.3.12 httpd.conf:
-----------------------------------------
 AddType application/x-httpd-php .js
-----------------------------------------

this in a .htm file:
----------------------------------------
this
<script language=javascript src=titatest.js></script>
----------------------------------------

and this in titatest.js:
----------------------------------------
document.write('is a');
<?echo ("document.write(' test ');");?>
----------------------------------------

the output of this little script should have been:
----------------------------------------
this is a test
----------------------------------------

but instead, it gives me this error (in the javascript console):
----------------------------------------
JavaScript Error: http://www.devweb.nl/titatest.js, line 1:
illegal character.
?
.^
----------------------------------------

i put this in my php.ini:
output_handler = ob_gzhandler 

but if i turn this off, all seems to work fine again.

other than the above error,
ob_gzhandler seems to work fine.

is this a bug or maybe im trying something here that isnt supposed to work with ob_gzhandler anyway??

==============================================
configure command:
----------------------------------------
'./configure' '--with-apxs' '--with-xml' '--with-zlib'
'--with-mysql=/usr' '--enable-track-vars'
----------------------------------------

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-19 11:02 UTC] sander@php.net
Your browser obviously can't handle compressed js-files. Not a bug in PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 12:01:27 2024 UTC