// July 4th, 2010 // No Comments » // PHP, PHP Tips
I am working on an expressionengine application these days. As I am using the beta version of expression engine until they release the final version, so the source files are encoded with the zend optimizer. Zend optimizer has a limitation that it can’t work with version 5.3 of PHP so far.
I had the latest XAMPP installed on my Windows VISTA machine for a year now but I found out that Zend optimiser isn’t compatible with version of PHP it provided i.e PHP 5.3, so I downloaded the version 1.6.8 of XAMPP from http://sourceforge.net/projects/xampp/files/ which has the older version of PHP i.e 5.2 which is compatible with Zend Optimizer.
Now here is the thing, I downloaded the Zend Optimizer from this link and installed it. In its installation steps it asks you for two locations which you have to tell it correctly or else it will not work properly.
- The path to php.ini
- The path to Apache websrver’s root.
Based on the installation directory of your XAMPP, you can select appropriate directories in these steps. I chose default C:\xampp while installing XAMPP, so I selected C:\xampp\apache\bin and C:\xampp\apache for the Steps 1 and 2 respectively.
And before that, using XAMPP control panel, I had stopped the Apache so when the configuration changes take place, the next time apache runs, it loads this new php.ini file which is changed by the zend optimizer installation.
Next thing you want to do is, check the php info using phpinfo.php file using the follwing url.
http://localhost/xampp/phpinfo.php
It will open up a page with a bunch of information. Look for the text Loaded Configuration File and open the same php file using windows explorer.
For me it was
| Loaded Configuration File |
C:\xampp\apache\bin\php.ini |
So I opened the php.ini folder and searched for the line where Zend Optimiser properties were mentioned and
[Zend]
zend_extension_ts="C:\Program Files\Zend\ZendOptimizer-3.3.0\lib\ZendExtensionManager.dll"
zend_extension_manager.optimizer_ts="C:\Program Files\Zend\ZendOptimizer-3.3.0\lib\Optimizer-3.3.0"
zend_optimizer.enable_loader = 0
zend_optimizer.optimization_level=15
;zend_optimizer.license_path =
; Local Variables:
; tab-width: 4
; End:
[Zend]zend_extension_ts="C:\Program Files\Zend\ZendOptimizer-3.3.0\lib\ZendExtensionManager.dll"zend_extension_manager.optimizer_ts="C:\Program Files\Zend\ZendOptimizer-3.3.0\lib\Optimizer-3.3.0"zend_optimizer.enable_loader = 1zend_optimizer.optimization_level=15;zend_optimizer.license_path =; Local Variables:; tab-width: 4; End:
In the above code I changed
zend_optimizer.enable_loader = 0
to
zend_optimizer.enable_loader = 1
So its loaded the next time I start the apache.
