httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Guillaume <alexan...@caprica.fr>
Subject [users@httpd] Apache + SUEXEC + PHP as CGI give Premature end of script headers
Date Tue, 09 Oct 2012 03:02:11 GMT
Hello All of this list,

I'e a problem with Apache and PHP => Premature end of script headers

My configuration:
Ubuntu Server 12.04 64Bits
Apache 2.2.23 with a suexec patch for php (compilation)
PHP 5.2.17/5.3.x (compilation)

Since the migration of Ubuntu 10.04 to 12.04 I've recompiled Apache and PHP.
But I have very regular errors in error_logs.

//Premature end of script headers//

When PHP is processed by Apache in STRACE I've:
27645 execve("/usr/local/apache2/bin/suexec", ["/usr/local/apache2/bin/suexec", "1085", "100",
"index_debug.php"], [/* 32 vars */]) = 0
27645 stat("/usr/local/bin/php5.cgi", {st_mode=S_IFREG|0755, st_size=24091531, ...}) = 0
27645 open("/usr/local/apache2/logs/suexec_log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3

Here is a STRACE when it does not work:
http://pastebin.com/mNw9v4SR

I see many "unfinished":
21885 <... clone resumed> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7f53c53c39d0) = 25293
25293 set_robust_list(0x7f53c53c39e0, 0x18 <unfinished ...>
25293 <... set_robust_list resumed> )   = 0
25293 rt_sigaction(SIGHUP, {0x48a470, [], SA_RESTORER|SA_INTERRUPT, 0x7f53c4315cb0},  <unfinished
...>
25293 <... rt_sigaction resumed> {0x489cd0, [HUP USR1], SA_RESTORER, 0x7f53c4315cb0},
8) = 0
25293 rt_sigaction(SIGTERM, {0x48a470, [], SA_RESTORER|SA_INTERRUPT, 0x7f53c4315cb0},  <unfinished
...>
25293 <... rt_sigaction resumed> {0x489ca0, [], SA_RESTORER, 0x7f53c4315cb0}, 8) = 0
25293 rt_sigaction(SIGUSR1, {0x489ec0, [], SA_RESTORER|SA_INTERRUPT, 0x7f53c4315cb0},  <unfinished
...>
25293 <... rt_sigaction resumed> {0x489cd0, [HUP USR1], SA_RESTORER, 0x7f53c4315cb0},
8) = 0

The problem, if I use a version of PHP (5.2.16) compiled on Ubuntu 10.04 I've no errors and
everything works.

I'm looking for how to understand the Apache error and how to get a more accurate debug.
I've see that if Apache returns me an error, I did not save the even in the suexec log file.

The problem is that the new compilations on the server that is now in Ubuntu 12.04.
If I compile on a new server and I transfer binaries, I also have the error.

The error is the same whatever the script example, when I to phpMyAdmin.

I see in the STRACE Apache does not load SUEXEC to display the php file, I do not understand
why I've this problem randomly.

Thank in advance,

Bests Regards,
Alexandre
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message