Textpattern Forum

You are not logged in. Register | Login | Help

#21 2007-12-13 08:22:54

Mary
Sock Enthusiast
From: Canada
Registered: 2004-06-27
Posts: 6,235

Re: [issue] Running site in debugging mode gives internal server error

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 vote for pig latin.

Works correctly for me on my local setup: PHP 5.2.5, Apache 2 module, Windows.


My email address has changed recently. If you need to contact me, use the forum contact form.

Offline

#22 2007-12-13 16:11:09

net-carver
Admin
From: UK
Registered: 2006-03-08
Posts: 1,648

Re: [issue] Running site in debugging mode gives internal server error

Mary wrote:

I vote for pig latin. Works correctly for me on my local setup: PHP 5.2.5, Apache 2 module, Windows.

Sounds more acceptable than developing with Klingon bite-code, especially on Windows.


Steve
Textile | My plugins on GitHub | @netcarver

Offline

#23 2008-01-08 20:36:20

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: [issue] Running site in debugging mode gives internal server error

From a seperate thread, but I can confirm that it happened on 5.2.4 for me:

PHP version: 5.2.4
Register globals: 1
GD Image Library: version bundled (2.0.34 compatible), supported formats: GIF, JPG, PNG
Server Local Time: 2008-01-08 02:41:24
MySQL: 5.0.45-community
Locale: en_US.UTF-8
Server: Apache/1.3.39 (Unix) PHP/5.2.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.30 OpenSSL/0.9.7a
Apache version: Apache/1.3.39 (Unix) PHP/5.2.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.30 OpenSSL/0.9.7a
PHP Server API: apache
RFC 2616 headers:
Server OS: Linux 2.6.9-67.ELsmp

Offline

#24 2008-01-08 20:49:50

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 4,492
Website

Re: [issue] Running site in debugging mode gives internal server error

Let’s try to get a minimal code example that still triggers this error:

<?php
$callers = join("\n", get_caller(10))

function get_caller($id)
{
  $out = array();
  $bt = debug_backtrace();
  return $out;
}
?>

and with a non-empty array.

<?php
level1();

function level1() {level2();}
function level2() {level3();}
function level3() {
  $callers = join("\n", get_caller(10));
}

function get_caller($id)
{
  $out = array();
  $bt = debug_backtrace();
  $out[] = 'something';
  $out[] = 'else';
  return $out;
}
?>

Offline

#25 2008-01-08 20:52:30

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: [issue] Running site in debugging mode gives internal server error

you forgot a semi-colon on the first line of the first block

Offline

#26 2008-01-09 01:11:34

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: [issue] Running site in debugging mode gives internal server error

I gave both scripts a try and both passed successfully with no segfaults (strange considering I still get segfaults with txp):

PHP version: 5.2.4
Register globals: 1
GD Image Library: version bundled (2.0.34 compatible), supported formats: GIF, JPG, PNG
Server Local Time: 2008-01-08 02:41:24
MySQL: 5.0.45-community
Locale: en_US.UTF-8
Server: Apache/1.3.39 (Unix) PHP/5.2.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.30 OpenSSL/0.9.7a
Apache version: Apache/1.3.39 (Unix) PHP/5.2.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.30 OpenSSL/0.9.7a
PHP Server API: apache
RFC 2616 headers:
Server OS: Linux 2.6.9-67.ELsmp

Last edited by variaas (2008-01-09 01:12:54)

Offline

#27 2008-01-09 06:01:23

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,091
Website

Re: [issue] Running site in debugging mode gives internal server error

Both minimal cases run without errors on PHP 5.2.3 and PHP 4.4.7.

Apache’s log entry for the Textpattern abort on PHP 5.2.3: [Wed Jan 9 06:53:10 2008] [notice] child pid 5342 exit signal Segmentation fault (11)

Offline

#28 2008-02-21 08:45:50

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [issue] Running site in debugging mode gives internal server error

strange..i’ve been getting this on my site as well. when i switch to debugging, i get 500 internal error along with huge 10mb core dumps. running php 5.2.1 (as cgi), txp 4.0.6, and apache error reads:

PHP Notice: Undefined variable: out in /home/***/public_html/textpattern/lib/txplib_misc.php on line 343 each time i try to switch to debugging. backend works just fine.

Last edited by iblastoff (2008-02-21 09:54:30)

Offline

Board footer

Powered by FluxBB