{"id":711,"date":"2011-12-15T08:12:24","date_gmt":"2011-12-14T21:12:24","guid":{"rendered":"http:\/\/howden.net.au\/thowden\/?p=711"},"modified":"2011-12-15T08:12:24","modified_gmt":"2011-12-14T21:12:24","slug":"sugarcrm-iis-7-5-php-windows-server-exchange-combined","status":"publish","type":"post","link":"https:\/\/howden.net.au\/thowden\/2011\/12\/sugarcrm-iis-7-5-php-windows-server-exchange-combined\/","title":{"rendered":"SugarCRM IIS 7.5 PHP Windows Server Exchange combined"},"content":{"rendered":"<p>When combining server roles to perform many tasks with one server there is a lot of potential for things to trip over themselves.<\/p>\n<p>This started as a simple &#8216;Provide an LDAP connection between SugarCRM and Active Directory&#8217;.<\/p>\n<p>Issue: Configuring the LDAP settings for SugarCRM is relatively easy but when trying to test by setting a specific user to &#8216;Use only LDAP Authentication&#8217; the SugarCRM login page reports that the LDAP extensions are not loaded. Ok, so its a PHP config issue.<\/p>\n<p>Issue: The PHP error log shows that not only is LDAP an issue but also CURL and a few other PHP extensions are not loading. With a &#8216;File not found&#8217; error.<\/p>\n<p>The extension files are all there, the paths are correct, etc. The issue appears to be that some supporting files are missing including libeay32.dll and ssleay.dll, so preparing a fresh install of PHP with these options enabled adds the files to the PHP directory. But the error persists.<\/p>\n<p>Issue: PHP 32 bit not 64 bit so we need to set the Application Pool to allow for 32 bit applications. But this triggered another series of issues.<\/p>\n<p>Issue: Attempting to set 32 bit for any App Pool on the server crashes with errors.<br \/>\nThe browser returns an error 500 Internal Server Error.<\/p>\n<p>The Application Event Viewer showed<\/p>\n<p>Log Name: Application<br \/>\nSource: Microsoft-Windows-IIS-W3SVC-WP<br \/>\nEvent ID: 2282<br \/>\nTask Category: None<br \/>\nLevel: Error<br \/>\nKeywords: Classic<br \/>\nUser: N\/A<\/p>\n<blockquote><p>The Module DLL &#8216;C:Program FilesMicrosoftExchange ServerV14Binkerbauth.dll&#8217; could not be loaded due to a configuration problem. The current configuration only supports loading images built for a x86 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see <a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkId=29349\">http:\/\/go.microsoft.com\/fwlink\/?LinkId=29349<\/a>.<\/p><\/blockquote>\n<p>Which\u00a0led me to <a title=\"32 bit application on a server with Exchange OWA\" href=\"http:\/\/www.mosmar.com.au\/chris-blog\/2011\/3\/15\/taking-care-of-bitness-or-how-to-run-a-32-bit-app-with-owa-2.html\">Chris&#8217;s Blog and issues with setting 32 bit apps on an OWA server<\/a>. Following those instructions which can be summarised as follows:<\/p>\n<ul>\n<li>Stop the IIS Service<\/li>\n<li>Edit C:WindowsSystem32inetsrvconfigapplicationHost.config<\/li>\n<li>Edit the following 3 lines to append\/insert the preCondition=&#8221;bitness64&#8243; option<\/li>\n<li>&lt;add name=&#8221;kerbauth&#8221; image=&#8221;C:Program FilesMicrosoftExchange ServerV14Binkerbauth.dll&#8221; preCondition=&#8221;bitness64&#8243; \/&gt;<\/li>\n<li>&lt;filter name=&#8221;Exchange OWA Cookie Authentication ISAPI Filter&#8221; path=&#8221;C:Program FilesMicrosoftExchange ServerV14ClientAccessowaauthowaauth.dll&#8221; enabled=&#8221;true&#8221; preCondition=&#8221;bitness64&#8243;\u00a0\/&gt;<\/li>\n<li>&lt;filter name=&#8221;Exchange ActiveSync ISAPI Filter&#8221; path=&#8221;C:Program FilesMicrosoftExchange ServerV14ClientAccesssyncbinAirFilter.dll&#8221; enabled=&#8221;true&#8221; preCondition=&#8221;bitness64&#8243; \/&gt;<\/li>\n<\/ul>\n<li>Start the IIS Service<\/li>\n<li>Set an Application Pool to use 32 bit Applications<\/li>\n<p>This resolved the 32 vs 64 bit war and brought me back to the PHP issues that started this.<\/p>\n<p>Issue: Curl and other extensions not loading. <\/p>\n<p>So I tried running php from the command line<\/p>\n<blockquote><p>\nD:Applicationsphp&gt; C:progra~1phpphp-cgi.exe<br \/>\nPHP Warning:  PHP Startup: bz2: Unable to initialize module<br \/>\nModule compiled with module API=20060613, debug=0, thread-safety=0<br \/>\nPHP    compiled with module API=20060613, debug=0, thread-safety=1<br \/>\nThese options need to match<br \/>\n in Unknown on line 0<br \/>\nPHP Warning:  PHP Startup: Unable to load dynamic library &#8216;C:Program Files (x86<br \/>\n)PHPextphp_curl.dll&#8217; &#8211; The specified module could not be found.<br \/>\n in Unknown on line 0<br \/>\nPHP Warning:  PHP Startup: dba: Unable to initialize module<br \/>\nModule compiled with module API=20060613, debug=0, thread-safety=0<br \/>\nPHP    compiled with module API=20060613, debug=0, thread-safety=1<br \/>\nThese options need to match<br \/>\n in Unknown on line 0\n<\/p><\/blockquote>\n<p>So this suggests that it is not a missing file or path but the thread-safety option which is weird as everything I have read including the name of the download is &#8221; PHP Non-Thread Safe&#8221; so why would the installer be installing a modules compiled differently to the PHP install? I will probably never know. I gave up at this point and removed PHP 5.2.8 completely and <a href=\"\/thowden\/2011\/12\/windows-iis-7-removing-php-5-2-8-and-installing-php-5-3-8\/\">installed 5.3.8 via the Microsoft Installer<\/a> for PHP which enabled curl and ldap but led to a whole different world of pain.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When combining server roles to perform many tasks with one server there is a lot of potential for things to trip over themselves. This started as a simple &#8216;Provide an LDAP connection between SugarCRM and Active Directory&#8217;. Issue: Configuring the LDAP settings for SugarCRM is relatively easy but when trying to test by setting a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,19,22],"tags":[],"class_list":["post-711","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-sugarcrm-windows","category-windows-servers"],"_links":{"self":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts\/711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/comments?post=711"}],"version-history":[{"count":0,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts\/711\/revisions"}],"wp:attachment":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/media?parent=711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/categories?post=711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/tags?post=711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}