 {"id":95,"date":"2008-12-01T21:02:31","date_gmt":"2008-12-02T02:02:31","guid":{"rendered":"http:\/\/www.networkjack.info\/blog\/?p=95"},"modified":"2008-12-23T13:44:28","modified_gmt":"2008-12-23T18:44:28","slug":"entropy-php-5-install-on-64-bit-xserve","status":"publish","type":"post","link":"http:\/\/www.networkjack.info\/blog\/2008\/12\/01\/entropy-php-5-install-on-64-bit-xserve\/","title":{"rendered":"Entropy PHP 5 install on 64-bit Xserve"},"content":{"rendered":"<p>This is from an exchange on the OS X Server mailing list.<\/p>\n<p>The OP was trying to get mcrypt compiled into his PHP5 install on a 64-bit machine running 10.5.4<\/p>\n<p>On Jul 24, 2008, at 4:53 PM, Someone wrote:<br \/>\n&gt; I&#8217;m trying to compile my own PHP (which I&#8217;ve done plenty of times<br \/>\n&gt; in the past on other systems), but<br \/>\n&gt; I need libmcrypt support. Because 10.5 OS X Server is all 64 bit, I<br \/>\n&gt; need a 64bit php binary, which<br \/>\n&gt; means all my linked libraries need to be 64 bit as well.<br \/>\n&gt;<br \/>\n&gt; I tried to compile libmcrypt by hand and with the SVN version of<br \/>\n&gt; macports, but both versions give me<br \/>\n&gt; the following error when I do `make test` after compiling php with<br \/>\n&gt; them:<br \/>\n&gt;<br \/>\n&gt; dyld: Symbol not found: _arcfour_LTX__is_block_algorithm<br \/>\n&gt;   Referenced from: \/usr\/local\/lib\/libmcrypt.4.dylib<br \/>\n&gt;   Expected in: flat namespace<br \/>\n&gt;<br \/>\n&gt; Googling for this error just brings up a forum post on entropy.org,<br \/>\n&gt; which isn&#8217;t much help. How can I get my 64bit php to play nice?<br \/>\n&gt;<br \/>\n&gt; I&#8217;m using CFLAGS=&#8217;-arch x86_64&#8242; before all my .\/configure<br \/>\n&gt; statements to get a x86_64 build.<br \/>\n&gt;<\/p>\n<p>Jul 25 14:20:59 gerry org.apache.httpd[625]: httpd: Syntax error on line 1462 of \/private\/etc\/apache2\/httpd.conf: Syntax error on line 8 of \/etc\/apache2\/sites\/entropy-php.conf: Cannot load \/usr\/local\/php5\/libphp5.so into server: dlopen(\/usr\/local\/php5\/libphp5.so, 10): no suitable image found.<br \/>\nDid find:<br \/>\n\/usr\/local\/php5\/libphp5.so: no matching architecture in universal wrapper<\/p>\n<p>&#8212;&#8211;<\/p>\n<p><strong>My response for solving the problem in a different way that I found on the Entropy.ch forums<\/strong><\/p>\n<p>&#8212;&#8211;<\/p>\n<p>How about going the other way&#8230;..<\/p>\n<p>I ran into a similar situation setting up an Intel Xserve with a new install of Leopard Server.<br \/>\nI was trying to get the entropy.ch PHP module (which contains mcrypt FYI) running and it would not load due to &#8220;no appropriate image found&#8221; errors.<\/p>\n<p>Apache on Leopard is a fat binary and was trying to load as a 64-bit app, which of course means that all plug-ins, loadable libraries need to be 64-bit as well and the Entropy PHP doesn&#8217;t currently have a 64-bit x86 image.<\/p>\n<p>Since this is for an Apache 2 web server and I would be using the pre-forked model and any single one of my requests that would be running PHP code would be very unlikely to need anywhere near more than even 1GB of RAM, I forced Apache to run as a 32-bit process so that the PHP module would load.<\/p>\n<p>I did this by using the lipo command to thin out Apple&#8217;s apache2 binary (after making a backup of course) to just contain a 32-bit x86 image.<\/p>\n<p>Here is a small shell script that will make a backup and run the lipo command:<\/p>\n<pre>#!\/bin\/sh -\r\n#\r\n#\r\n\r\ncd \/usr\/sbin;\r\nmv httpd httpd.ub;\r\nlipo -info httpd.ub;\r\nlipo -thin i386 httpd.ub -output httpd.i386;\r\nlipo -info httpd.i386;\r\nln -s httpd.i386 httpd;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is from an exchange on the OS X Server mailing list. The OP was trying to get mcrypt compiled into his PHP5 install on&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.networkjack.info\/blog\/2008\/12\/01\/entropy-php-5-install-on-64-bit-xserve\/\">Continue reading<span class=\"screen-reader-text\">Entropy PHP 5 install on 64-bit Xserve<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,8,13],"tags":[39,40,75,37],"class_list":["post-95","post","type-post","status-publish","format-standard","hentry","category-os-x-server","category-servers","category-web-app-development","tag-64bit","tag-apache","tag-php","tag-xserve","entry"],"_links":{"self":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/posts\/95"}],"collection":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/comments?post=95"}],"version-history":[{"count":7,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/posts\/95\/revisions"}],"predecessor-version":[{"id":115,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/posts\/95\/revisions\/115"}],"wp:attachment":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/media?parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/categories?post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/tags?post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}