Alright, I have to admit - I'm stumped.
Check out these links:
http://www.phpdeveloper.org/feedback_class.phps
http://www.phpdeveloper.org/xml_class.phps
http://www.phpdeveloper.org/amazon_class.phps
Now, the common thread - they all get chopped off before the bottm. (And yes, I made sure they were all there...) The files on the server are intact, but I can't get Apache to show them all for some reason....
Has anyone else ever seen this? And how did you fix it?
thanks.....
Chopping off .phps files?
Moderator: General Moderators
I have seen a somewhat similar problem on some older build of php when writing very long strings to files. If the formatter is written in php you might want to see if you can make it echo/output the formatted code in chunks instead of all at once (if that's what its doing) It shouldn't be a problem in newer versions of php(at least according to the developers) but I've left my "chunked" code in my pages.
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
my version of php adds in new lines...it seems to run it through nl2br() or something. at every break in the code i see:
so im going to go with the idea that apache can't handle a line that long being generated..php or apache
Code: Select all
code..
<br />
code..But doesn't apache still know to hand off the execution of .phps script to another specified script to generate the pretty-printing? (Ie the input phps script is identical to the main .php (often a symlink, right) and apache knows nothing about pretty-printing so some script on your server is creating the returned page.
It might be as simple as inserting a \n after every <br /> or something like
If you could provide a pointer to the script youre using to generate the markup, I'ld happily take a look.
It might be as simple as inserting a \n after every <br /> or something like
Code: Select all
$len= strlen($wholePage);
$numBlocks = $len/512;
for ($i=0;$i<$numBlocks;$i++)
{
echo substr($wholePage,$i*512,512);
}So I've dug around on the php.net site to look at how they appear to be doing it and how they suggest doing it (often different), their pages appeae to have the same all source=one line of text affect, but most of their pages are quite short.
What version of php are you running? I can force a similar problem on one of my machines that has an ancient version, 4.0.4.
What version of php are you running? I can force a similar problem on one of my machines that has an ancient version, 4.0.4.
that's just it - i'm not passing it off to a script.
The .phps file is a native thing for PHP - it handles it on it's own as long as the AddType is in the Apache conf. On all my other machines, it works just fine....I make the .phps symlink and it shows the entire file just fine in the browser.
But, for some reason this one doesn't want to cooperate. I hacked around it for my purposes, but I've heard from other people that this is a bug that other people have seen since PHP 4.1.2
The .phps file is a native thing for PHP - it handles it on it's own as long as the AddType is in the Apache conf. On all my other machines, it works just fine....I make the .phps symlink and it shows the entire file just fine in the browser.
But, for some reason this one doesn't want to cooperate. I hacked around it for my purposes, but I've heard from other people that this is a bug that other people have seen since PHP 4.1.2