You are not logged in.
Ruud
Error log says Premature end of script headers: php5.cgi at the time of the server error.
The echo vardump(... line produces…
array(10) { [0]=> string(43) "textpattern/publish.php:973 trigger_error()" [1]=> string(13) "processTags()" [2]=> string(51) "textpattern/publish.php:922 preg_replace_callback()" [3]=> string(44) "textpattern/lib/txplib_misc.php:1412 parse()" [4]=> string(40) "textpattern/publish.php:704 parse_form()" [5]=> string(40) "textpattern/publish.php:808 doArticles()" [6]=> string(43) "textpattern/publish.php:509 parseArticles()" [7]=> string(37) "textpattern/publish.php:963 article()" [8]=> string(13) "processTags()" [9]=> string(51) "textpattern/publish.php:922 preg_replace_callback()" }
Weird, looks like I can use the return value as a direct argument to vardump() but not join().
— Steve
Textile | My plugins on GitHub | @netcarver
Offline
Ruud
Here’s a link to a very similar problem over at bugs.php.net
Edited to add: I say similar in a restricted sense of the word… it’s using the join()/implode() function on php5.2 cgi, whilst the array being join()ed is not null, the solution to the problem is the same in my case as theirs.
Last edited by net-carver (2007-12-12 13:06:09)
— Steve
Textile | My plugins on GitHub | @netcarver
Offline
I can confirm this bug, and also the healing powers of Steve’s workaround
$callers = get_caller(10);
print "\n<pre style=\"padding-left: 2em;\" class=\"backtrace\"><code>".escape_output( join( "\n", $callers ) )."</code></pre>";
for
Apache/1.3.33 (Debian GNU/Linux) FrontPage/5.0.2.2623 mod_ssl/2.8.10 OpenSSL/0.9.7 PHP/5.2.3
EDIT: Bug does not occur with PHP 4.4.7, does occur with PHP 5.2.3 on two distinct hosts.
Last edited by wet (2007-12-12 13:27:37)
Try wet_quicklink | Me | @rwetzlmayr | +Robert Wetzlmayr | Repos
Offline
Robert
just wondering if php is running as a cgi on those hosts?
— Steve
Textile | My plugins on GitHub | @netcarver
Offline
One runs as CGI, the other runs as an Apache module.
Try wet_quicklink | Me | @rwetzlmayr | +Robert Wetzlmayr | Repos
Offline
Ruud, Robert, Mary
searching the textpattern source code shows similar patterns that may trigger this error in other places.
plugin_verify()lib/txplib_db.php in safe_query() (fail path makes a similar call)lib/txplib_misc.php in pluginErrorHandler() and assert_int()That’s from a txp4.0.5 install but not from svn; so Ruud’s recent feed handler wasn’t covered.
— Steve
Textile | My plugins on GitHub | @netcarver
Offline
Does this also occur in PHP 5.2.4 or 5.2.5?
I mean, if we can’t rely on join() working properly when it is fed a simple array, we might as well dump PHP and switch to a different language.
Offline
Does not occur on my localhost (XAMPP, Apache2, PHP 5.2.4). I do not have access to any PHP 5.2.4++ install “in the wild”.
Try wet_quicklink | Me | @rwetzlmayr | +Robert Wetzlmayr | Repos
Offline
Ruud
Sorry, I don’t have access to anything higher than 5.2.3 without pulling the source code and learning how to build it myself. As it’s just about midnight here I don’t intend going through that learning curve today :)
I mean, if we can’t rely on join() working properly when it is fed a simple array, we might as well dump PHP and switch to a different language.
I feel the pain there too. Perhaps the news isn’t so bad. <g> It seems the problem is limited to cases where the second is an array directly returned by a function. Thankfully there are just a few of these cases in the source.
— Steve
Textile | My plugins on GitHub | @netcarver
Offline
This one was fixed in 5.2.4. Looks familiar…
Try wet_quicklink | Me | @rwetzlmayr | +Robert Wetzlmayr | Repos
Offline