0

I have php 5.5 installed in my Linux server. I checked it through the php info file. However, when I issue the command

#which php

it says /usr/bin/php. I have also used the find command, but there is no php5 directory in my linux server. I am going through many forums to understand this, and all I find is, there should be a php5 directory either in /usr/lib/php5 or /usr/share/php5.

As a result, I have facing lot of difficulties in installing the ZendGuard. The tutorial http://grainier.net/installing-zend-guard-on-linux-distributions-centos-6-debian-ubuntu/ says, it needs to be moved to /usr/lib/php5. But I can’t find php5 directory in my server.

Any help would be highly appreciated.

Jay
  • 744
  • 4
  • 14
  • 30
  • Location of /usr/lib/php(5) : Fedora, CentOS, RHEL : 64bits OS : /usr/lib64/php/ .... 32bits OS : /usr/lib/php/ ,,,,, and that's only if the development package is installed : php-devel ... – Knud Larsen Oct 31 '15 at 16:57
  • /usr/bin/php : That means you have "php-cli" installed : `$ rpm -qf /usr/bin/php` ..... and php-cli is a package with four files ( + a few files documentation.) – Knud Larsen Oct 31 '15 at 17:22
  • My server runs on a 64bit OS, but php directory is in /usr/lib64/php/. Inside this php directory, I see the modules folder, which has ZendGuardLoader.so, but still ZendGuardLoader is not loading as modules, when I issue the command php -m – Jay Nov 01 '15 at 07:01

1 Answers1

0

Finally solved it. This was terrible. My OS is a 64 bit OS and using PHP 5.5. I followed the usual installation procedure from http://www.servermom.org/how-to-install-zend-optimizer-on-centos-6-with-apache/775/ OR http://grainier.net/installing-zend-guard-on-linux-distributions-centos-6-debian-ubuntu/

I downloaded the correct version from http://www.zend.com/en/products/guard/downloads

Extarcted the .so file and moved it to /usr/lib64/php/modules. This should do the job. If you follow the installation instruction in the site links that I provided above, it says that you will have to additionally create a ZendGuard.ini file. Don't do it. It will not work.

Jay
  • 744
  • 4
  • 14
  • 30
  • Congrats you did well. Regarding the .ini file, you don't have to create one but it's a convenience. It allows you to quickly manage loaded modules. You create an .ini file in your php con.d folder and load the module with extension=ZendGuardLoader.so plus any zend_loader configuration. Your PHP automatically loads the .ini files and looks for the .so files in the appropriate file path. – Scriptonomy Nov 01 '15 at 14:09
  • I have removed all traces of zend_extension, zend_loader etc. from php.ini and ZenGuard.ini as described above. Now it is working perfect. Issued the command php -m and I see all php modules as well as Zend Modules loaded. Earlier, Zend Modules were not loading. The problem was due to the newer versions. Thanks! – Jay Nov 02 '15 at 15:19