This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Installing WAMP + APC + intl

Discuss installing Symfony 2 here

Installing WAMP + APC + intl

by caponica » Tue Mar 26, 2013 12:07 pm

Here's a quick how-I-did-it in case others are running into problems getting a WAMP dev environment set up on a windows machine.

- Go to http://www.wampserver.com/en/
- Scroll down (or click 'download' on the menu bar) and click on the yellow "Wampserver (32 bits & PHP 5.3) 2.2E" banner
- Click the yellowish "download it directly" text (links to sourceforge )
- install wampserver...
- when you fire it up you realise that intl doesn't work (at least in my experience) and there's no APC
- left-click on the WAMP icon and stop all the services

(Side note: In my Apache error log I was finding errors stating:
"Unable to load dynamic library .../php_intl.dll"
and
"the specified module could not be found.")

For APC:
- Go to Pierre's handy DLL download page and grab the php_apc-3.1.10-5.3-vc9-x86.zip
- copy the php_apc.dll file into C:\wamp\bin\php\php5.3.13\ext
- open C:\wamp\bin\apache\apache2.2.22\bin\php.ini and add an entry for "extension=php_apc.dll" next to the other extensions
- at the end of the php.ini file add something like this:
[APC]
apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 128M
apc.max_file_size = 5M
apc.stat = 1
- save your changes and restart apache
- if you open a phpinfo() page then you should see APC enabled (and you should see your pages loading faster)

Now to deal with that pesky intl...
- Click on the wamp icon and stop all services
- Go to the pecl intl page and download the version of intl that you wish to use: http://pecl.php.net/package/intl (you want the 5.3 ZTS version)
- Also take note of the sentence under the dll download links: "The binaries depend on the ICU libraries..." and download the correct zip for the intl version you went for
(e.g. get v2.0.1 of intl by choosing the PHP 5.3, ZTS option and then get the related icuXX v49 dlls)
- unzip the php_intl.dll into C:\wamp\bin\php\php5.3.13\ext
- unzip the icu dlls (all 7 of them) into C:\wamp\bin\apache\apache2.2.22\bin
- edit php.ini (or click the WAMP menu) to enable php_intl
- restart all services
- if you open a phpinfo() page then you should see APC enabled (and you should see your pages loading faster)

...and, most importantly, if you open a config.php page in a new Symfony 2 project you should see a nice green

Your configuration looks good to run Symfony.

And that's what it's all about at the end of the day!

Now go faster:
One more thing... to speed up the execution time of Symfony scripts that read in a lot of files:
- open C:\wamp\bin\apache\apache2.2.22\bin\php.ini and set realpath_cache_size =512k
- restart apache

In my experience this single change makes pages load about 25-30% faster.
User avatar
caponica
Senior Member
 
Posts: 121
Joined: Mon Mar 17, 2008 11:25 am
Location: London

Re: Installing WAMP + APC + intl

by richinri » Tue Feb 18, 2014 7:59 am

Here is what I get in the Apache error log when doing exactly what this thread says:

PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.12/ext/php_apc.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0

I am on Win 7 64 running the latest WAMP.
richinri
Junior Member
 
Posts: 2
Joined: Sun Feb 16, 2014 3:03 am

Re: Installing WAMP + APC + intl

by richinri » Wed Feb 19, 2014 8:33 am

I had posted to this thread and it was still being approved. You can delete the post. I have been designing web sites for over 13 years and thought I would give Symfony a try. After 5 days of repeated attempts at getting everything working right I have decided to stop trying. Anything this hard to get working right will be a nightmare to move online when done. Note: I was able to get the dev site to load using WAMP...the hell arose with the right version of WAMP, Apache, PHP and the accelerator. If one of them was right, another was wrong. And on and on it went.
richinri
Junior Member
 
Posts: 2
Joined: Sun Feb 16, 2014 3:03 am

Re: Installing WAMP + APC + intl

by caponica » Wed Feb 19, 2014 1:44 pm

I think it's hard to get Symfony up and running on Windows (using WAMP) but server side installation on a linux box is really simple. Also, even though I have everything working here, it still runs *very* slowly (several seconds to render a page). The failings are, I think, in the stack tools (Windows stack of Apache, MySQL and PHP) rather than Symfony itself. At some point I will try out a different WAMP stack (i.e. not using "WAMPserver") and see if that helps, but I haven't had the spare time to look at that recently.
User avatar
caponica
Senior Member
 
Posts: 121
Joined: Mon Mar 17, 2008 11:25 am
Location: London

Re: Installing WAMP + APC + intl

by nymo » Fri Feb 21, 2014 2:34 pm

richinri wrote:I had posted to this thread and it was still being approved. You can delete the post. I have been designing web sites for over 13 years and thought I would give Symfony a try. After 5 days of repeated attempts at getting everything working right I have decided to stop trying. Anything this hard to get working right will be a nightmare to move online when done. Note: I was able to get the dev site to load using WAMP...the hell arose with the right version of WAMP, Apache, PHP and the accelerator. If one of them was right, another was wrong. And on and on it went.


Well, designing websites for 13 years and being not able to setup apache php and mysql with symfony following the documentation maybe you should stop designing web sites...
On Windows I can only suggest not to use XAMP or something similar and instead install the webserver/mysql and php from scratch. With that you will get a better overview at all.
nymo
Senior Member
 
Posts: 174
Joined: Fri Jan 07, 2011 11:37 pm
Location: Germany

Re: Installing WAMP + APC + intl

by caponica » Fri Feb 21, 2014 9:43 pm

@nymo - it's very possible to be a great web designer without having much experience in setting up the server stack, so please keep the responses civil.
User avatar
caponica
Senior Member
 
Posts: 121
Joined: Mon Mar 17, 2008 11:25 am
Location: London

Re: Installing WAMP + APC + intl

by nymo » Fri Feb 21, 2014 11:10 pm

@caponica
Yes, maybe it was a little bit to harsh sorry for that, but if your're not familiar with the basics of setting up your webserver and local dev machine than a full stack framework is a step to high on the stairs to begin with. But that is just my opinion.
nymo
Senior Member
 
Posts: 174
Joined: Fri Jan 07, 2011 11:37 pm
Location: Germany