Larry Brouwer

... just my personal technology sandbox

  • About
  • Blog
  • Archives
  • Contact

Connect

  • Email
  • Facebook
  • LinkedIn

Powered by Genesis

Installing PrestaShop on Windows Server 2008

January 12, 2011 By Larry Brouwer Leave a Comment

This morning, I’m working on installing open source ecommerce packages on my Windows Server 2008 box. This is mainly for experimental and learning purposes.

The first package I choose to install is PrestaShop. PrestaShop was chosen as the winner of the 2010 Open Source Awards as published by Packt Publishing.

My first step was to read through the most current PrestaShop User Guide. The most current stable version as of this writing is PrestaShop v.1.3.5. PrestaShop uses a MySql Database, so my first task is to install the current release of MySql (5.5.8) on my Windows 2008 server.

Since I’m not currently using MySql on a daily basis, I also made sure all of my workstation components (i.e. workbench, connector, etc.) are also up to date.

I ran into a glitch installing MySql. The Configuration Wizard has an identified bug in it as reported to the MySql Bug database as, Bug #59038 mysql.user.authentication_string column causes configuration wizard to fail. To overcome this bug, I executed the following command from the MySql Workbench:

use mysql;
alter table 
    user change authentication_string authentication_string text null;

I then clicked on the re-try for the Wizard and it completed normally. After this, I ran the following commands:

use mysql;
update user set authentication_string = '' where authentication_string is null;
alter table user change authentication_string authentication_string text not null;
I then installed PHP 5.2.17 using the IIS7 Web Platform Installer.
I then downloaded PrestaShop and extracted the files to my server.
I then added the website in IIS7 and started the website binding it to port 8001.
I then opened the firewall on port 8001.
I then opened a browser tab on my workstation and navigated to the website.
I then followed the installation instructions.
At the “DATABASE CONFIGURATION” section, I logged into MySQL Workbench, and created a new user account, and database schema’s.
At the “E-MAIL DELIVERY SET-UP” section, it allows you to enter the SMTP server information. I currently do not have the SMTP service installed. So, at this point, I used the “Add Features Wizard” on the “Initial Configuration Tools” window to install the SMTP Server.
*** After many attempts at getting email to work, I’ve decided to move on for now and come back to this issue later.
After the database was successfully created, I then selected the Shop name, Default country, and attempted to upload a logo. But this action was not successful. There are most likely permission problems being encountered.
In IIS7, I configured a PrestaShop Application Pool giving it Integrated pipeline mode, and a NetworkService for an Identity. I then went to the root directory for the application, and modified the security adding “NETWORK SERVICE” and giving it full control.
**If my Webserver were running Server 2008 R2, then I could more easily use the ApplicationPoolIdentity for an Identity, and then specify “AppPool\PrestaShop” when alter security.
Ran into serious problems with continuing the installation as I couldn’t get past the database screen. I ran into a post, Prestashop, Cant continue with installation!, and abandoned the installation wizard and opted to execute the sql script to manually create an admin user and go from there.
This didn’t help much as I was unable to log into the admin site. I suspected that the encrypted password wasn’t being generated properly, so I found another post, Prestashop, Password encryption. pSQL function. This post has a php script in it that can be used to generate an encrypted password.
I attempted to run the php script from a command prompt, however, I got a php error, “The application has failed to start because MSVCR71.DLL was not found. Re-installing the application may fix the problem.”. I found a post entitled, PHP on Windows: workaround for a command-line error (MSVCR71.DLL is missing). I didn’t install the .Net Framework 1.1 on my server as I already had msvcr71.dll on a Windows XP workstation. So I copied the file from “C:\Windows\Microsoft.NET\Framework\v1.1.4322” on my XP machine to “C:\Windows\syswow64” on my Windows 2008 Server. This solved the problem, and I was now able to run the script.
Next, I had to get the proper “COOKIE_KEY” for my PrestaShop installation to re-create the encrypted password accurately. This string is found under the prestashop\config\config.inc.php file. Just to confirm, this string is indeed much different than the string used to generate the original user outlined above.
So, basically, the php code necessary to generate the password is:
<?php
echo md5("xae0u0c9kzEGgPFJWgGtgJa8PG1STZubGmeI57482nPwmzTkEowdbBth"."admin");
?>

 

where, the first long string came from the “COOKIE_KEY” and the second part is my actual password. The command to execute the php is:
"C:\Program Files (x86)\PHP\php.exe" -f .\password.php

 

This resulted in the output string “a170cb24882e45992cd42259e6579502”, which I then used in a sql update statement. I was then able to log into the admin section of the database! What a use of my day!

Manual Setup of PrestaShop

Now that I’m able to log into my demo PrestaShop site, I need to start configuring it!
First thing is to add a robots.txt file into the root directory! Here’s the file:
# go away
User-agent: *
Disallow: /

I then logged into the shop and set the home time zone, the default currency, the default country, etc. This was a little more difficult than I first thought it would be. However, most of the problems I encountered were due to the Windows and PHP environment settings. Once I ironed those out, everything else went fine.

I’ll keep updating this post with additional details as I continue to explore PrestaShop.
You’re welcome to view my PrestaShop demo site here. It will most likely only be available during the day when I’m at work. If you should need help with your installation, drop me a line. I’d be happy to help you out! Take care!

Filed Under: Notable Tagged With: eCommerce, MySQL, PHP, PrestaShop

Leave a Reply

You must be logged in to post a comment.

Recent Posts

  • Weaver’s Bamboo “Bambusa textilis” clumping bamboo for sale
  • configuring NTP Service on FreeNas, XenServer, and virtualized Windows Server 2012 R2 Domain Controller
  • CentOS 7 Warning: Your Magento folder does not have sufficient write permissions.
  • AOE Scheduler 1.3.0 cron issue with Magento 1.9.2.2

Tag cloud

Live Writer Silverlight OpenCart 301 TomatoCart Scanpst.exe SqlServer Windows Remote Desktop Exchange 2010 Azure SVN Log Parser Google Analytics SBS2011 SmarterMail WordPress SSL Maytag IIS7 redirect Security Linux Magento eCommerce PHP Neptune ASP.Net Visual Studio DotNetNuke C# Yahoo Mail DIR-655 PrestaShop Spam PST Outlook 2007 Database Mail clumping bamboo Windows 7 Tools mstsc.exe iframe SMTP AWStats MySQL