[nycphp-talk] PHP segmentation fault with custom-compiled binaries - Zen Cart
Jayesh Sheth
jayeshsh at ceruleansky.com
Fri Feb 11 17:08:57 EST 2005
Hello all,
I have been having quite an 'interesting' time with some Zen Cart
issues. The customer had Zen Cart installed on his shared host, Dreamhost.
The only payment module he had set up was PayPal. On step 3 of the
checkout process, the cart would fail to post to PayPal, because it did
not draw the required PayPal HTML form. Instead, it simply posted to his
own site. (For a detailed description of the initial problem, please see
my post here:
http://www.zen-cart.com/modules/ipb/index.php?showtopic=16869&st=0&#entry96673
)
Anyway, "Kim" from this forum with some 10,000 posts to her name,
suggested that the reason it was failing was because the "Zend
Optimizer" was not installed along with Dreamhost's PHP 4.3.10 binary.
This seemed wrong to me, because Zend Optmizer only deals with
'interpreting' compiled / encoded PHP code, and none of Zen Cart's code
is compiled.
I installed Zen Cart on my local Windows, PHP 5, Apache 2, MySQL
machine, and it ran fine. So, we thought that perhaps doing a custom
compile of PHP 5 on Dreamhost ( for more info. please see:
http://www.moztips.com/php5_install/ ) as a CGI binary, and registering
that binary through a .htaccess file for .php files would make the
program work, because there seemed to be some conflict between the
current PHP version and Zen Cart.
The binary compiled file, the phpinfo() test script (
http://www.permanentimpressions1.com/phpinfo.php5 ) and other test
scripts worked fine. But then, when encountering the main "index.php"
page for Zen Cart (which serves as the main page controller / director
to all its inner modules), produced an "internal server error". I custom
compiled PHP 4.3.10 too, the phpinfo (
http://www.permanentimpressions1.com/phpinfo.php4 ) and test script
worked fine too, but I got the same error with Zen Cart.
Apache's error logs said the following:
[Fri Feb 11 12:53:58 2005] [error] [client 209.194.148.130] Premature
end of script headers: /home/*username*/*domain*/cgi-bin/php4.cgi
I then decided to run the script in question through the command line to
see what was happening:
cd /home/*username*/php/bin
./php /home/*username*/domainname.com/index.php
Then I got:
Segmentation fault
(The same thing happened with the PHP 4 compiled binary)
But with Dreamhost's PHP binary, it worked (And all the HTML spewed forth)
# It looks up php from the system path and runs it
php /home/*username*/domainname.com.com/index.php
Does anyone know:
a) Why Zen Cart failed to go past Step 3 in the first place?
b) Why the PHP interpreters are seg faulting on this index.php script?
(It must be one heck of script!)
Thanks a billion in advance for any help.
- Jay
More information about the talk
mailing list