Search This Blog

Showing posts with label Zend. Show all posts
Showing posts with label Zend. Show all posts

Wednesday, May 8, 2013

Zend Guard Loader Zend Optimizer install CentOS 6

0. Download package:

# wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz

1. Extract the Zend Loader package.

# tar xzvf ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz

2. Locate and extract the ZendGuardLoader.so (Linux) or ZendLoader.dll (Windows) that corresponds to your php version.

# cp ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x /usr/lib64/php/modules/

3. Add the following line to your php.ini file for loading the ZendGuardLoader:
Linux and Mac OS X: zend_extension=
Windows non-thread safe: zend_extension=

# vi /etc/php.d/ZendGuard.ini

; Enable Zend Guard extension
zend_extension=/usr/lib64/php/modules/ZendGuardLoader.so
zend_loader.enable=1


4. Add an aditional line to your php.ini for enabling ZendGuardLoader
; Enables loading encoded scripts. The default value is On
zend_loader.enable=1

5. Optional: following lines can be added your php.ini file for ZendGuardLoader configuration:

; Disable license checks (for performance reasons)
zend_loader.disable_licensing=0
; The Obfuscation level supported by Zend Guard Loader. The levels are detailed in the official Zend Guard Documentation. 0 - no obfuscation is enabled
zend_loader.obfuscation_level_support=3
; Path to where licensed Zend products should look for the product license. For more information on how to create a license file, see the Zend Guard User Guide
zend_loader.license_path=

6. If you use Zend debugger as well, please make sure to load it after the Zend guard Loader

7. If you use ioncube loader, please make sure to load it before Zend guard Loader

8. Restart your Web server.

# service httpd restart

To Fix Selinux issue:
# cd /usr/lib64/php/modules/
# chcon -h --reference=curl.so ZendGuardLoader.so

It may not works after chcon, then do this:
# execstack -c /usr/lib64/httpd/modules/ZendGuardLoader.so

Thursday, January 24, 2013

Zend Debugger How To

Download and Install Zend Debugger

# wget http://downloads.zend.com/studio_debugger/2011_04_10/ZendDebugger-20110410-linux-glibc23-x86_64.tar.gz
# wget http://downloads.zend.com/studio_debugger/2011_04_10/ZendDebugger-20110410-linux-glibc23-i386.tar.gz
# tar xzvf ZendDebugger-20110410-linux-glibc23-x86_64.tar.gz
# cp ZendDebugger-20110410-linux-glibc23-x86_64/5_3_x_comp/ZendDebugger.so /usr/lib64/php/modules/ZendDebugger.so


Configuration Debugger

# vi /etc/php.d/zend_debug.ini



;;;;;;;;;;;;;;;;;;;;
; ZendDebugger ;
;;;;;;;;;;;;;;;;;;;;
zend_extension=/usr/lib64/php/modules/ZendDebugger.so
zend_debugger.allow_hosts=192.168.1.1/16
zend_debugger.expose_remotely=always


Restart Apache before Testing

# service httpd restart


Check if it works

# php -v

PHP 5.3.3 (cli) (built: Jun 27 2012 12:53:18)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies


Error:libssl.so.0.9.8:

# php -v



Failed loading /usr/lib64/php/modules/ZendDebugger.so: libssl.so.0.9.8: cannot open shared object file: No such file or directory
PHP 5.3.3 (cli) (built: Jun 27 2012 12:53:18)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


Install openssl098e package

# yum -y install openssl098e.x86_64

epel/metalink | 9.1 kB 00:00
epel | 4.3 kB 00:00
epel/primary_db | 5.0 MB 00:03
ol6_UEK_latest | 1.2 kB 00:00
ol6_latest | 1.4 kB 00:00
ol6_latest/primary | 24 MB 00:31
ol6_latest 18436/18436
pgdg92 | 2.8 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package openssl098e.x86_64 0:0.9.8e-17.0.1.el6_2.2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
openssl098e x86_64 0.9.8e-17.0.1.el6_2.2 ol6_latest 761 k

Transaction Summary
================================================================================
Install 1 Package(s)

Total download size: 761 k
Installed size: 2.2 M
Downloading Packages:
openssl098e-0.9.8e-17.0.1.el6_2.2.x86_64.rpm | 761 kB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : openssl098e-0.9.8e-17.0.1.el6_2.2.x86_64 1/1
Verifying : openssl098e-0.9.8e-17.0.1.el6_2.2.x86_64 1/1

Installed:
openssl098e.x86_64 0:0.9.8e-17.0.1.el6_2.2

Complete!


Link the file


# ln -s /usr/lib64/libssl.so.0.9.8e /usr/lib64/libssl.so.0.9.8
# ln -s /usr/lib64/libcrypto.so.0.9.8e /usr/lib64/libcrypto.so.0.9.8


Check it Again
# php -v



PHP 5.3.3 (cli) (built: Jun 27 2012 12:53:18)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies


Reference:
http://forums.zend.com/viewtopic.php?f=8&t=3281
http://forums.zend.com/viewtopic.php?f=59&t=962
http://static.zend.com/topics/Zend-Debugger-Installation-Guide.pdf
http://static.zend.com/topics/Debugger-Install.pdf
http://www.developertutorials.com/tutorials/php/php-debugging-with-zend-studio-8-02-01-938/