Installing Alfresco 2.2 on Windows Server 2003

Posted by stephen on August 14th, 2008

There wasn’t a any clear-cut guide for installing Alfresco 2.2 ECM on Windows Server 2003, so I took some notes. Here goes…

  1. Installed jdk-1_5_0_15-windows-i586-p.exe with default options. The JDK is required (I tried it with just the JRE first).
  2. Installed mysql-essential-5.0.67-win32.msi with the following options:
    • Complete
    • Configure Now
    • Standard Configuration
    • Install As Windows Service, Launch Automatically
    • Root Password: ********
  3. Installed mysql-gui-tools-5.0-r12-win32.msi with default options.
  4. Installed OpenOffice_2.4.1_Win32Intel_install_wJRE_en-US.exe with the following options:
    • Custom
    • Disable Java Runtime Environment
  5. Unpacked alfresco-enterprise-tomcat-2.2.0.zip to C:\Alfresco.
  6. Followed these steps to use MySQL database.
  7. Also uncommented lines in custom-repository.properties for db.username, db.password, db.pool.initial, db.pool.max.
  8. Added JAVA_HOME system variable pointing to C:\Program Files\Java\jdk1.5.0_15.

I ran alf_start.bat, waited for the “Started in…” message, and tried http://localhost:8080/alfresco. I got a Tomcat 404 error, and my alfresco.log showed the following (abbreviated) errors:

  • Error creating bean with name ‘dictionaryRepositoryBootstrap’…
  • Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
  • ERROR [org.springframework.web.context.ContextLoader] Context initialization failed

It turns out Alfresco removed the MySQL JDBC driver in 2.2 for licensing purposes, so I just needed to place mysql-connector-java-5.1.6-bin.jar in C:\Alfresco\tomcat\common\lib. Started up fine after that :).

After all of this, I noticed Alfresco would shutdown out of nowhere, I’d get some hs_err_pid logs in C:\Alfresco. The java.exe process was also taking 99% of the CPU and I couldn’t end the process. The machine was basically useless until I restarted. After a bit of back-and-forth with Alfresco support and some digging around, I finally figured out that NetBIOS being disabled was the entire problem. You can enable it in Local Area Connection Properties > TCP/IP > Advanced > WINS.

So, no more freezes, but then I couldn’t access the CIFS. One thing after another, right? I would get a username/password prompt if I tried to access it by \\<ip>\Alfresco, but it didn’t like any of the credentials I entered, and didn’t recognize \\<machinename>A\Alfresco at all. Finally, I found that having “Local Area Connection > Client for Microsoft Networks” disabled was the cause of that.

Both of those settings are not default in a Windows install, but they were set that way in the VM image that was used for my server. Talk about frustrating…

There also seems to be a memory leak in Alfresco that will cause the OutOfMemory Java heap space error in the virtual Tomcat instance. Disabling link validation fixed this for me. You can do that by setting the “pollInterval” to 0 in “C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\linkvalidation-service-context.xml”.

Installing Magento Commerce on IIS 6

Posted by stephen on August 7th, 2008

A friend recently told me about the open source e-commerce software, Magento. It looked much nicer than osCommerce and ZenCart, so I wanted to give it a try.

Most of what I found involved setting it up in Apache, but I did come across one well-written guide on installing it in IIS.

I got to page 2 of the walkthrough and read, “There is no need to go into details about each extension, but something worth mentioning is that you cannot have both php_mysql.dll and php_pdo_mysql.dll enabled. Magento uses pdo_mysql, and if you enable both, php_mysql takes presedence over pdo_mysql, so keep this in mind.”.

AH! I just jumped through several hoops to get mysql working for Wordpress. And obviously, the generic mysql extension is required by too many things to disable it. I decided to move on with fingers crossed…
** NOTE: I did not run into a conflict with having both enabled. Maybe this has to do with php_pdo_mysql being declared before php_mysql. **

Also, I did not see an ISAPI_Rewrite tab in my IIS Web Sites properties after installing it; although, there was an entry for it in the ISAPI Filters. I went to the Rewrite Manager in Start > Programs > Helichon, and saw pretty much the same output as the guide’s screenshot.

This tutorial states it assumes we downloaded Magento build 1.0.19870.1, but 1.1.2 was out now, so I went for that instead.

After handling a couple of permission issues (described in the guide), the Magento installer started!

I got to the Configuration section and got thse messages:

  • PHP Extension “mcrypt” must be loaded
  • PHP Extension “curl” must be loaded

Those extension lines were already uncommented in my php.ini, so I did some searching. This post says to place libeay32.dll and ssleay32.dll in the windows\system32 directory. I did so, restarted IIS, and the curl message dissapeared.

I figured the mcrypt problem was related to the curl and mysql issues I’d had, where I needed to place the dll directly in windows\system32 (still no idea why IIS doesn’t read from the Path environment variable). So, I copied libmcrypt.dll to my system32 dir, restarted IIS, and it worked!

Now, I could browse around the admin area, but all the links on the front end were broken. I noticed the admin area had index.php/ before most of the paths (like my Wordpress blog), but it was missing from the links in the front end. The guide had me add index.php to a config.php file, so I assumed the same had to be done for the URLs on the front end. Sure enough, http://MYURL/customer/account/login/ didn’t work, but http://MYURL/index.php/customer/account/login/ did.

Currently trying to resolve this on the Magento Forums. I’ll update this post once it’s all squared away.

I have found that disabling the URL Rewrites in Admin > System > Web works, but the URLs aren’t quite as friendly.

**UPDATE 8/10/2008**

As excited as I was to get this up and running in IIS, there was too much of a speed issue. I’m giving SimpleHelix Hosting a try, per the recomendations on a Magento Forum post.

PHP and MySQL on IIS 6

Posted by admin on August 7th, 2008

I went to install Wordpress, but I got this error when I ran wp-config.php:
PHP has encountered an Access Violation at 0202B75A

A test phpinfo() file also displayed a completely blank page. Even a simple echo yielded the same results. Obviously php was not configured correctly.

Turns out the installer is not the way to go. After checking the settings and reinstalling several times, I followed these steps.

Progress! But I was now getting the following error - clearly a permissions issue:

HTTP Error 401.3 - Unauthorized: Access is denied due to an ACL set on the requested resource.

After setting the basic permissions to no avail, I crawled back to google. After another 30 minutes of searching, I came across this post.

The trick was adding the appropriate users with “Read & Execute”, “List Folder Contents”, and “Read” permissions, then clicking “Advanced”, then checking “Replace permission entries on all child objects…”, then “Apply”. Specific to my server, I gave IUSR_TEMPLATE and IIS_WPG access.

phpinfo() now displayed the php config! Considering it’s been as simple as running the installer for me before, this seemed like quite a hassle.

At this point in my Wordpress installation, I excitedly ran wp-config.php, which abuptly stated, “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”

Horseradish. Neither extension lines for mysql.dll and mysqli.dll were commented.

Then I found this post, which explains the PHPRC environment variable must be set to your php path. This didn’t fix the error, but since I did notice before that the variable was being created by the PHP installer, I left it.

Next, I found a walkthrough that said to copy the libmysql.dll file from c:\php to c:\windows\system32. He also questions why IIS doesn’t just read it from the php directory, since the dir is in the Path environment variable…who knows. I restarted IIS and HOORAH! As you can see, I’m up and running.


Copyright © 2007 Stephen Rushing. All rights reserved.