Bug #14770 Updated: phps truncates long sources
| From: | eru@php.net | Date: | Tue, 02 Jul 2002 21:04:56 +0000 |
| Subject: | Bug #14770 Updated: phps truncates long sources | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12867@lists.php.net to get a copy of this message | ||
ID: 14770
Updated by: eru@php.net
Reported By: Shaggy_Pyce@yahoo.com
-Status: Open
+Status: Won't fix
-Bug Type: Documentation problem
+Bug Type: Feature/Change Request
Operating System: Linux/Windows 98SE
PHP Version: 4.2.0
Assigned To: yohgaki
New Comment:
Recategorized as feature-request, and status as wont-fix (otherwise you
really want to tackle it, yohgaki, but that's why there's such a
status, right? ;-)) during the qa-bughunt.
Previous Comments:
------------------------------------------------------------------------
[2002-05-22 00:03:05] adamhooper@videotron.ca
Dillo (http://dillo.cipsga.org.br/) handles .phps files fine, though
others (mozilla, ie) don't.
And as a user of .phps, I'd just like to venture the humble opinion
that it's more secure and convenient in many cases to make a symlink
than a security-conscious source viewer program.
------------------------------------------------------------------------
[2002-04-25 23:14:14] yohgaki@php.net
Thanks for reply.
Here is why,
phps feature is implemented as Zend feature. Therefore, it does not
work well with output bufffering, since output buffering is PHP
feature. (some problems with output like you have, don't work with
built in output callback functions, etc)
hilight_file (show_source or highlight_string) provides the same
feature with much better way. If you are using apache and mod_rewrite,
you can have script like
<?php
// If you need access control write here.
$filename = // Code to dicide file to show
$src = hilight_file($filename, TRUE);
// Do what ever you need
// Add header/footer, translate encoding, etc
print $src;
?>
to show sources you want to hilight.
You don't even have to create symlinks and this method works with any
configuration.
Refer to mod_rewrite manual how you can do that w/o
creating files.
BTW, last time I checked, phps does not work with
zlib.output_compression. I might be able to make phps
work under any configuration, but I don't think it
worth to do. (Patches are welcome, though)
------------------------------------------------------------------------
[2002-04-25 22:46:07] david@blue-labs.org
As per my first post ;) ...
Yes, 4.2.0, and yes on Linux. I'm not the original reporter, I can't
update this bug's fields.
I have to ask why .phps won't be used. It's -very- convenient and well
established in the community. What is as simple using show_source()?
At present all I had to do was make a symlink to my source with .phps
as the extension.
Irrespective, my source is plain english, no special chars involved,
etc.
------------------------------------------------------------------------
[2002-04-25 19:29:33] yohgaki@php.net
After document is updated I'll take a look at output buffering code.
(If there is problem here, it should be fixed)
David,
Did you tested with 4.2.0?
What is your OS?
Please update Version and OS field, thanks.
------------------------------------------------------------------------
[2002-04-25 19:20:15] yohgaki@php.net
This problem probably will not be fixed.
1) It does not worth the effort.
2) There is show_source()
3) phps does not work under certain encodings.
Use show_source() instead...
I made this report as Documentation problem to encourage use of
show_source().
Someday, when ZendEngine became fully i18n, someone may care to fix
phps.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/14770
--
Edit this bug report at http://bugs.php.net/?id=14770&edit=1