2007-12-13 08:22:54

Mary
Sock Enthusiast
omega
From: Canada

Re: 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

 

2007-12-13 16:11:09

net-carver
Admin
psi
Real name: Steve
From: UK
Known languages: English
Website

Re: 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

 

2008-01-08 20:36:20

variaas
Plugin Author
lambda
Real name: Amit
From: Chicago
Known languages: English
Website

Re: 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

 

2008-01-08 20:49:50

ruud
Developer emeritus
omega
Real name: Ruud van Melick
From: a galaxy far far away
Known languages: li,nl,en,(de)
Website

Re: 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

 

2008-01-08 20:52:30

variaas
Plugin Author
lambda
Real name: Amit
From: Chicago
Known languages: English
Website

Re: Running site in debugging mode gives internal server error

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

Offline

 

2008-01-09 01:11:34

variaas
Plugin Author
lambda
Real name: Amit
From: Chicago
Known languages: English
Website

Re: 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

 

2008-01-09 06:01:23

wet
Developer
omega
Real name: Robert
From: Lenzing, Austria
Known languages: de-AT, en, PL/M-80
Website

Re: 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

 

2008-02-21 08:45:50

iblastoff
Plugin Author
sigma
Real name: Steve Lam
From: Toronto
Known languages: en
Website

Re: 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

 

Powered by FluxBB