0.9.4 Install Issues on Windows 2003

August 23, 2006 - 11:09
0.9.4 Install Issues on Windows 2003
Posts: 6
Joined: 2006-08-23

ENVIRONMENT:
==========
Windows 2003 Server / IIS 6.0
PHP 4.3.11
Zend Optimizer 3.0.1
eAccelerator 0.9.4

ISSUE:
=====
When I run my phpinfo file I do not see eAccelerator listed as installed.
http://www.mcedigital.com/test.php

I have a number of PHP sites, particularly Xoops that run very slow and it was recommended that I install eAccerator and Zend Optimizer to resolve this issue since the web server I am using is IIS.

WHAT I HAVE DONE:
==============
1 Downloaded and copied unzipped file structure for eAccelerator into C:\php\extensions\eAcellerator

2. Downloaded the compiled binary eAccelerator094_4.3.11.dll renamed it eaccelerator.dll and put it in C:\PHP\extensions\eAccelerator

3. Created C:\eAccerator_tem_cache folder and gave the Internet User account read and write permissions to the folder

4. extension_dir = "C:\php\extensions" already present in the PHP.ini file

5. Added the following to the PHP.ini file at the beginning of the Windows Extensions section of the file.:

;BEGIN - eAccelerator Extension added for PHP Caching for performance
;
extension="eaccelerator.dll"
eaccelerator.shm_size="64"
eaccelerator.cache_dir="C:\eAccelarator_temp_cache"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0" ( I have used 3600 = 1 hour)
eaccelerator.shm_prune_period="0" ( testing 1800)
eaccelerator.shm_only="0" (testing 1 this seem noticeably faster?)
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.content = "shm_and_disk" (testing)
eaccelerator.allowed_admin_path = "C:\PHP\extensions\eAccelerator\eaccelerator.php"
;
;END - eAccelerator Extension
;

6. I do not understand the reference in the eAccelerator installation documentation for the eAccelerator site “3)” that relates to the php4ts.lib file. That file is already present in my C:\php directory.



August 23, 2006 - 15:46
Posts: 16
Joined: 2006-08-15

If you'r going to use Zend Optimizer you need to use zend_extension=eaccelerator.dll. Though the documentation in the "Useful Files" download (from the link below) recomends not using Zend Optimizer with EA unless you have Zend Encoded files, because EA has it's own optimization

http://www.sitebuddy.com/PHP/Accelerators/eAccelerator_windows_binaries_builds



August 23, 2006 - 18:16
Posts: 6
Joined: 2006-08-23

Tried adding zend_extension=eaccelerator.dll to the php.ini file but it did not work. Are you sure that those instructions are for PHP 4.3.11 and not PHP 5?

This is what is at the very end of my PHP.ini file if that helps?

[Zend]
zend_extension_manager.optimizer_ts="C:\Program Files\Zend\ZendOptimizer-3.0.1\lib\Optimizer-3.0.1"
zend_extension_ts="C:\Program Files\Zend\ZendOptimizer-3.0.1\lib\ZendExtensionManager.dll"



August 24, 2006 - 11:57
Posts: 16
Joined: 2006-08-15

Did you get your dll from here on Sitebuddy.com?
http://www.sitebuddy.com/PHP/Accelerators/eAccelerator_windows_binaries_builds_php_4

There are a couple that you can try. I've had pretty good luck with them.

Also, I haven't seen you say anything about CGI vs FastCGI. From my experience EA only works with FastCGI or Apache

Supported SAPIs as reported by php_sapi_name():
apache
apache2handler
apache2filter
cgi-fastcgi



August 24, 2006 - 14:03
Posts: 6
Joined: 2006-08-23

Yes I did download the binary from that page. I selected the last one: eAccelerator.dll 0.9.4 for PHP 4.3.11

I am not sure what your reference suported SAPI's is about. I am using IIS and ISAPI not CGI. This is the configureation that has been recommended by people who have this setup working.



August 24, 2006 - 17:34
Posts: 16
Joined: 2006-08-15

SAPIs are DLLs that stay in memory as opposed to using CGI and pointing at the PHP executable that is re-run for every page request.

You may need to add your install directory (c:\PHP) and possibly the extenstions directory (c:\PHP\extensions and/or C:\PHP\extensions\eAccelerator) to the Windows path

I have been battling with PHP 5 and eAccelerator & Alternative PHP Cache for the last week or two trying to find a combination that works.

I'm not sure why this is not made more clear in the documentation but under IIS the only supported PHP "mode" is FastCGI. ISAPI and standard CGI don't work. I've tried both, though only with PHP 5. FastCGI is an SAPI that keeps the CGI executable in memory so it effectivly behaves like the ISAPI DLL. Here's the best installation documentation for IIS that I've found:
http://phplens.com/phpeverywhere/fastcgi-php

The only place I've found this compatability "documented" is via the Useful Files download from PHP 5 EA downloads. There's a file in it called bugreport.php. The first thing this file does is check to see if the current install of PHP is compatible with EA. They explicityly list three different flavors of Apache and FastCGI. I'm not sure why this file isn't included with the PHP 4 EA Useful Files download but I would assume the same would be true.
http://www.sitebuddy.com/files/RC1_useful%20_files.zip

I've been trying all sorts of combinations to stick with PHP 5, I may have to bite the bullet and go back to 4. I would love to hear how you get things up and running. I hope this helps.

Josh



August 25, 2006 - 06:06
Posts: 16
Joined: 2006-08-15

I personally just had a breakthrough last night. I finnaly got APC to work with PHP 5.1.2 (I used that version because of a show stopping bug in versions >=5.1.4 and a security flaw in 5.1.3). The trick I found was to use FileMon from SysInternals.
http://www.sysinternals.com/Utilities/Filemon.html

Set the filter to either *php* or if you're using the ISAPI still try *isapi*, and then watch the fileMon as you try to request a page.

I had to create and set privilages on a particular temp directory that didn't even exist at first.

Josh



August 26, 2006 - 08:04
Posts: 6
Joined: 2006-08-23

I tried putting C:\PHP\Extensions'C:\PHP\extensions\eAccelerator\ to my path and that did not seem to do much. I have someone helping me with this who might have a solution for me in a week or so. My understanding is that he has PHP 4.3.11 and Zend & eAccelerator working with IIS in ISAPI so it will be interesting what he comes up with.

I can't use PHP5 becaseue of a number of other applications I am using that are not stable in 4.3.11 so I am going to stick with that for now. Unless there is some really compelling reason to try PHP5 and then I would probaly get a Linux server for that. Seems much less complicated and more secure.

Thanks for the help. I'll keep you posted.



August 28, 2006 - 08:07
Posts: 406
Joined: 2006-01-02

technobia,

This looks wrong:

"2. Downloaded the compiled binary eAccelerator094_4.3.11.dll renamed it eaccelerator.dll and put it in C:\PHP\extensions\eAccelerator"

Try moving eaccelerator.dll to C:\PHP\extensions\



August 23, 2006 - 17:59
Posts: 6
Joined: 2006-08-23

I will try the extension syntax change and see what that does Thanks! It was recomended to me by someone who seems to be an expert that I should install both Zend Optimizer AND eAccelerator. I guess I am not ure what you mean by "Zend Encoded files"