NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP segmentation fault with custom-compiled binaries-Zen Cart

Jayesh Sheth jayeshsh at ceruleansky.com
Mon Feb 14 10:38:42 EST 2005


Hi Tim,

thanks for the link. It will be useful to keep on file. However, the 
customer in question is using a shared account on Dreamhost, so he will 
not be able to un apt-get.
But I think we have identified other issues in the code (of Zen Cart) 
that are causing the problems. So it is not a conflict with the PHP 
version that Dreamhost has, which we originally suspected.
So, for now, we can use their system-wide PHP CGI binary instead.

If one were to want to compile PHP 5 on Dreamhost, one could do so, 
except (I think) without MySQL support. There would be a way around it - 
place all PHP 5 scripts in a separate subdirectory ( 
www.mysite.com/php5docs/ ) and instruct Apache via a .htaccess file to 
parse .php files in that directory using the compiled PHP 5 binary. 
Then, modify the data object layer of the PHP 5 scripts to use a 
webservice (XML-RPC) to access the MySQL database via a script in 
www.mysite.com/mysql_xmlrpc.php. In other words, one could let the PHP 5 
binary select, insert, update and delete data in a MySQL database by 
posting to a PHP 4 script one directory "above" it. If it is a well 
architected app, just the data object layer would have to be changed. 
But sadly, most open source apps do not have this strict three tier 
(data object, business object, presentation layer) separation. It would 
be an interesting exercise though, to modify one PHP 5 cart that I know 
of ( the one in the excellent new book from Apress on PHP 5 and 
E-Commerce - http://apress.com/book/bookDisplay.html?bID=356 ) so that 
it can run on a shared server (such as  Dreamhost) with a PHP 5 binary 
and without built-in MySQL support. Oh - this cart in question is a 
PHP5-only cart, but it is exceptionally well architected (perhaps a bit 
over-architected, but nevertheless good).

Many businesses however are already set up with Zen Cart, which seems to 
be an incredibly complex and temperamental piece of software. It does a 
lot, and from an end-user perspective (shopper and store owner) it does 
look appealing. But it has these gotchas: mess with some settings 
(stored in the DB), and then it bombs out before the payment step. And 
many of the (good-intentioned) people helping in the forums are 
non-programmers, so you cannot post a piece of code and expect them to 
have an opinion on it ...

Anyway, I am rambling here ... thanks to you all for your help so far.

Best regards,

- Jay Sheth



More information about the talk mailing list