Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Friday, December 11, 2009

Zend Server and Xdebug on Ubuntu

You can chose how to install your Zend server from here http://www.zend.com/products/server/
The server works fine :) but the problem appears when I tried to install Xdebug extension included in Zend server distribution. Once I do install the extension the server stops working :( and I ... do not like this at all.
I've found a solution to the problem by building it from source.
First install some development tools:
$ sudo apt-get install build-essential
$ sudo apt-get install autoconf
After this step is completed we can continue with downloading and installing xdebug.
$ wget http://www.xdebug.org/files/xdebug-2.0.4.tgz
$ tar -xzf xdebug-2.0.5.tgz
$ cd xdebug-2.0.5/
$ /usr/local/zend/bin/phpize
$ ./configure --enable-xdebug --with-php-config=/usr/local/zend/bin/php-config
$ make
Copy the compiled library:
$ cp modules/xdebug.so /usr/local/zend/lib/debugger/xdebug.so
Then edit file /usr/local/zend/etc/ext.d/debugger.ini and comment everything you see uncommented :D (this probebly is not required but just in case do it)
and add the following line at the end of the file:
zend_extension=/usr/local/zend/lib/debugger/xdebug.so

Restart zend server:
$/etc/init.d/zend-server restart

You are done. And ... you can "live happily ever after" :D

Wednesday, June 24, 2009

PHP CLI - bad interpreter??

After some changes on one of our internal servers one of the cron jobs stopped to work with this error: /usr/bin/php: bad interpreter: Permission denied

Everything is in place! PHP is there ... the script is executable ... but the cron job is not working!

I have searched google for some answers. And I have found it on one website. The partition where the script was stored is mounted as "noexec".

To fix this you need to edit your fstab file and change mount options for your partition. After this "mount -a" should work, it did not work for me and I've had to remount partitions manualy (reboot will help too).

Greetings