typedef intptr_t;
#define _INTPTR_T_DEFINED
typedef int intptr_t;
#define _INTPTR_T_DEFINED
#else
# ifdef HAVE_STDINT_H
# include <stdint.h>
# elif HAVE_INTTYPES_H
# include <inttypes.h>
# endif
if !defined(_INTPTR_T_DEFINED) && ZEND_WIN32
typedef int intptr_t;
#define _INTPTR_T_DEFINED
#else
# ifdef HAVE_STDINT_H
# include <stdint.h>
# elif HAVE_INTTYPES_H
# include <inttypes.h>
# endif
#endif
}
/*
* Initialization on first call, comes from eaccelerator_zend_startup().
*/
if (eaccelerator_global_function_table.nTableSize == 0) {
zend_function tmp_func;
zend_class_entry tmp_class;
zend_hash_init_ex(&eaccelerator_global_function_table, 100, NULL, NULL, 1, 0);
zend_hash_copy(&eaccelerator_global_function_table, CG(function_table), NULL,
&tmp_func, sizeof(zend_function));
zend_hash_init_ex(&eaccelerator_global_class_table, 10, NULL, NULL, 1, 0);
zend_hash_copy(&eaccelerator_global_class_table, CG(class_table), NULL,
&tmp_class, sizeof(zend_class_entry));
/*
* HOESH: on apache restart there was some
* problem with CG(class_table) in the latest PHP
* versions. Initialization moved to eaccelerator_compile_file()
* depends on the value below.
*/
eaccelerator_global_function_table.nTableSize = 0;
test -z "$PHP_AUTOCONF" && PHP_AUTOCONF=autoconf-2.61
test -z "$PHP_AUTOHEADER" && PHP_AUTOHEADER=autoheader-2.61
[eaccelerator]
extension="eaccelerator.so"
eaccelerator.shm_size="8"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
/tmp/ZendOptimizer-3.3.0a-openbsd3.4-i386/data/ZendExtensionManager.so
/tmp/ZendOptimizer-3.3.0a-openbsd3.4-i386/data/5_2_x_comp/ZendOptimizer.so
[Zend]
zend_optimizer.optimization_level=0
zend_optimizer.version=3.3.0a
zend_extension=/var/www/lib/php/modules/ZendExtensionManager.so
zend_extension=/var/www/lib/php/modules/ZendOptimizer.so
eaccelerator.allowed_admin_path="/var/nginx/html/"
[eaccelerator]
extension="eaccelerator.so"
eaccelerator.shm_size="8"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.allowed_admin_path="/var/nginx/html/"
<?php eaccelerator_clear(); ?>
原帖由 wosl2001 于 2009-3-2 10:58 发表
Solution for ZendOptimizer to work under
OpenBSD 4.1/i386
1. Download the file for OpenBSD 3.x as distributed by Zend
currently ZendOptimizer-3.2.8-openbsd3.4-i386.tar.gz
2. Untar (tar -xzf ZendOpt*), and fetch the files
-> ZendOptimizer*/data/ZendExtensionManager.so
-> ZendOptimizer*/data/5_1_x_comp/ZendOptimizer.so
where 5_1_x is the php you have installed
3. Put those file somewhere clean like
-> /var/www/lib/php/ZendExtensionManager.so
-> /var/www/lib/php/ZendOptimizer.so
you NEED to keep the names unchanged
4. Simulate old libs (here's the magic)
type in the console the following command
# ln -s libm.so.2.3 /usr/lib/libm.so.1.0
Alternatively, if you don't like symlinking you can edit the binaries and cha
string 'libm.so.1.0' into 'libm.so.2.3' in both of Zend*.so files
- change 0x[31 2E 30] -> 0x[32 2E 33] in ZendExtensionManager.so at offset 0x
- change 0x[31 2E 30] -> 0x[32 2E 33] in ZendOptimizer.so at offset 0xCEAE
5. Edit your /var/www/conf/php.ini and add the section
[Zend]
zend_extension=/var/www/lib/php/ZendExtensionManager.so
zend_extension=/var/www/lib/php/ZendOptimizer.so
6. Test
Reboot your webserver
# apachectl stop
# apachectl start
Write down one php page containing <? phpinfo(); ?> and browse it !
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |