- PHP 5.2 or greater (would be a bit sad to know that someone is still using PHP 4)
- Upgrade PEAR to latest version
- Upgrade PECL to latest version
- Installing PHP ZipArchive library by using PECL's zip package
I will use pecl to install ZipArchive PHP library.
- Open terminal and execute pecl install zip
- Updating your php.ini:
- Linux: find your php.ini file and add "extension=zip.so"
- Windows: same as one, just add "extension=zip.dll"
- service httpd restart
- apache2ctl restart
- or any other way that you like
There are many different ways to use and build Zip helpers. I will just demonstrate an example for using ZipArchive.
Using a debugger is very important while writing code, so lets see how to do it with PHP and Zend Debugger:
- Install Eclipse or Zend Studio
- If you have installed Eclipse, you should install two more things:
- After extracting everything, search for ZendDebugger.so path
- Edit your php.ini or create another ini --> zend.ini which will have to be loaded by your PHP and add:
; Loading Zend Debugger Extension zend_extension=/your/path/to/ZendDebugger.so ; ; use 127.0.0.1 for local host, or you another local network IP zend_debugger.allow_hosts=127.0.0.1 ; ; Expose Zend Debugger ; ; never - do not expose (default) ; always - expose to whoever want to know ; allowed_hosts - expose only if request comes from an IP listed above ; zend_debugger.expost_remotely=always
- Save & Restart Apache
- Verify your phpinfo()
- Download FireFox or Chrome Extension (Chrome extension is not official extension by Zend)
- Configure Eclipse \ Zend Studio settings:
- Configure your extension settings:
- Start debugging!:)
Note for Zend Studio 8.x users:
I suggest that you will update your Zend Studio application by using the following instructions:
Today I wanted to share a text with my brother so I thought about making new tool that will highlight my text and create short URL. After some googling I have found a very nice tool that already implement it "Yellow highlighter pen for web". This plugin is working on Chrome and may be found athttp://www.marker.to or at Google chrome extension web store
Use it carefully