Install lighttpd + php5 + mysql5 + zendOptimizer on Fedora10. You can use yum to install lighttpd + php5 + mysql5 + zendOptimizer. ZendOptimizer needs to download and decompress the package, and enter #./install. sh in the decompressed directory. After installation, restart lighttpd, but the zendOptimizer is not started successfully. Solution: 1. initially considered as ph
Install lighttpd + php5 + mysql5 + zend Optimizer on Fedora 10
You can use yum to install the first three.
After zend Optimizer needs to be downloaded and decompressed, enter #./install. sh in the decompressed directory. After installation, restart lighttpd, but the zend Optimizer is not started successfully.
Solution:
1. I started to think that php. ini is not properly configured. Find # find/-name php in the directory. ini, And the webpage output contains Loaded Configuration File:/usr/local/Zend/etc/php. ini display php. the ini file has been loaded.
2. Whether the zend Optimizer version is correct. The latest version cannot be installed.
3. The solution for searching on the network is mostly about php. ini settings. Finally, several methods are summarized to solve the problem:
Specific solution:
1. There is a problem with the php. ini file path (My php. ini path is correct in phpinfo (), so I don't need this method)
Solution
Php-I | grep php. ini to find the php. ini file currently used by php.
For example, if the path for storing php. ini is not specified during compilation and installation, the default php. ini will be placed under/usr/local/lib.
It is best to specify the PHP configuration file path when compiling PHP, for example, -- with-config-file-path =/usr/local/etc.
Generally, zend installs php. ini in the/etc/directory by default or in the/usr/local/Zend/etc directory. Therefore, you must manually specify the location where the php. ini file is stored during installation.
If you do not know the specific location of the current PHP configuration file, you can view it:
Php-I | grep php. ini
If php optimizer is installed and cannot be loaded, you can manually specify the location for reading the php. ini file.
Php-c/etc/-v if you can see that zend opt is correctly loaded
Connect to the default php. ini path read by php.
For example
Ln-sf/etc/php. ini/usr/local/lib
[Root @ localhost/] # php-v
PHP 5.2.5 (cli) (built: Jan 22 2006 12:59:19)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
With Zend Extension Manager v1.0.9, Copyright (c) 2003-2006, by Zend Technologies
With Zend Optimizer v3.3.2, Copyright (c) 1998-2006, by Zend Technologies
OK. If phpinfo () is normal, the same is true.
2. Problems with calling library files
Sometimes, in some cases, php-I or php-v can see zend opt in the console,
However, no phpinfo output is displayed in apache.
This is generally because the zend module cannot be loaded when php is called, such as AS4.
For example, in as4, the path for reading the library file after the default php installation is under/usr/lib,
The zend module loaded in the php. ini file is in the lib directory of the zend installation path.
For example,/usr/local/Zend/lib. apache cannot load the zend module when executing php, so php-v can work normally in the console.
However, apache does not load zend.
Solution
Copy the zend module
In/usr/lib, modify the zend loading module section in php. ini.
(I showed Failed loading/usr/local/Zend/lib/Optimizer-3.3.0/ZendOptimizer in php-I. so:/usr/local/Zend/lib/Optimizer-3.3.0/ZendOptimizer. so: cannot restore segment prot after reloc: Permission denied
It turns out that this is a permission issue)
3. the most disgusting SElinux Problem
SElinux makes PHP unable to use library files under zend/lib. Therefore, even links are not supported. Only the database files can be copied to a directory with permissions. Or directly turn off SElinux.
However, if selinux = disabled in/etc/SELINUX/config is disabled, it still does not work.
After you ensure that SElinux is disable, execute
Chcon-t texrel_shlib_t command
For example: chcon-t texrel_shlib_t/usr/local/Zend/lib/Optimizer-3.3.0/php-5.2.x/ZendOptimizer. so (this file depends on the specific execution file .)
You can.
My solutions are as follows:
1. Disable SElinux
2. Run the # chcon-t texrel_shlib_t/usr/local/Zend/lib/Optimizer-3.3.0/ZendOptimizer. so
You can.