ID: 14770 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Documentation problem Operating System: Linux/Windows 98SE PHP Version: 4.2.0 Assigned To: yohgaki New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [2002-04-25 23:14:14] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [2002-04-25 18:16:06] [EMAIL PROTECTED] Setting output_buffering to anything over 16386 (which by the way is the magic number of bytes that wget/lynx fetch, breaks all attempts at fetching the source. Note, the php script itself still performs fine. ------------------------------------------------------------------------ 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