Alex (SirShurf) Frenkel's Blog

A web log of a PHP professional

Archive for the ‘PHP’ Category

How to fix Zend Server on Ubuntu 12.04 Precise

with 10 comments

After a long battle a solution is here!

Many thanks to Alex Sherman @AlxShr  from BelleRon Technologieswww.belleron.com.

Disclaimer: Use at your own risk! Worked on clean 12.04 install.

First of all we used a script taken from: http://ubuntuforums.org/showthread.php?t=636724&page=2

#!/bin/bash
#modded by japzone

if [[ -z "$1" ]]; then
  echo "Syntax: $0 debfile"
  exit 1
fi

DEBFILE="$1"
TMPDIR=`mktemp -d /tmp/deb.XXXXXXXXXX` || exit 1
OUTPUT=`basename "$DEBFILE" .deb`.modfied.deb

if [[ -e "$OUTPUT" ]]; then
  echo "$OUTPUT exists."
  rm -r "$TMPDIR"
  exit 1
fi

dpkg-deb -x "$DEBFILE" "$TMPDIR"
dpkg-deb --control "$DEBFILE" "$TMPDIR"/DEBIAN

if [[ ! -e "$TMPDIR"/DEBIAN/control ]]; then
  echo DEBIAN/control not found.

  rm -r "$TMPDIR"
  exit 1
fi

CONTROL="$TMPDIR"/DEBIAN/control

MOD=`stat -c "%y" "$CONTROL"`
gedit "$CONTROL"
read -p "Press any key once you've finished editing and saved"

if [[ "$MOD" == `stat -c "%y" "$CONTROL"` ]]; then
  echo Not modfied.
else
  echo Building new deb...
  dpkg -b "$TMPDIR" "$OUTPUT"
fi

rm -r "$TMPDIR"

The script above saved as debedit.sh and given execute permissions by

chmod u+x debedit.sh

Packages downloaded by:

apt-get download libpq4  php-5.3-imap-zend-server

Then edited dependencies by:

./debedit.sh libpq4_8.1.17-0etch1_amd64.deb
./debedit.sh php-5.3-imap-zend-server_5.3.9+b260_amd64.deb

In the “Depends” line of each of them changed libkrb53 to libkrb5-3

After that installed each of the modified packages:

dpkg -i libpq4_8.1.17-0etch1_amd64.modfied.deb
dpkg -i php-5.3-imap-zend-server_5.3.9+b260_amd64.modfied.deb

And then, finally, installed the zend server by:

apt-get install zend-server-ce-php-5.3

WOW! It Works!!!

This is continued from: Zend Server broken on Ubuntu 12.04

Thanks to the investment from Tesserent Limited we were able to create this script without a problem.

Visit or contact the tax office to know about our packages.

Advertisements

Written by Alex (Shurf) Frenkel

May 1, 2012 at 2:42 pm

Zend Server on Ubuntu 12.04 Precise – @Zend responded “NO ETA”

with one comment

I have contacted Zend founder Zeev and a friend of mine who have 2 servers running Zend Server Enterprise contacted Zend support.

The official response right now it: There is no ETA but because of the big interest we are looking at it.

I have checked the fix provided on Zend Forums (link) and using it it works, but you can not use imap any more, so if you have an applicaiton that uses it, dont install it.

But what I did found interesting is that the problem only occurs when you re enable Zend repositories after the upgrade, so if you made the upgrade to Ubuntu Precise with Zend Server installed you can continue to use it, just leave the repositories off.

In any case my advice is NOT to update to the new Ubuntu untill this is sorted out or to switch to a different LAMP stack.

 

Written by Alex (Shurf) Frenkel

April 30, 2012 at 11:16 pm

Zend Server broken on Ubuntu 12.04

with 3 comments

To all of us using Zend Server on Ubuntu DONT update to the latest version 12.04 (at least until they will fix it!).

As of now, although they have this posted as a bug from January it’s impossible to use Zend Server 5.6 on Ubuntu 12.04 LTS.

The following packages have unmet dependencies:
zend-server-php-5.3 : Depends: php-5.3-common-extensions-zend-server but it is not going to be installed

The problem is seams is in libkrb53 which was a dummy for libkrb5-3 in previous versions and is no longer supported.

There is no known overrides as of now.

Written by Alex (Shurf) Frenkel

April 29, 2012 at 4:38 pm

Posted in PHP, Ubuntu

Tagged with , , ,

PHP 5.4 is out, and here is the list you should be watching

leave a comment »

As of today PHP team has released PHP 5.4.

Since this is a major version here is the list of things you should look at:

    • The break and continue keywords don’t accept variable argument anymore. Consider using a static constant argument.
    • Safe mode is no longer supported. Any application that rely on safe mode may need adjustements in term of security.
    • Salsa10 and Salsa20 hash algorithms have been removed.
    • In Date extension, setting the timezone with the TZ environment variable is no longer supported. The extension will no longer guess the default timezone if none is set, instead it will always fall back to “UTC”.
    • get_magic_quotes_gpc() and get_magic_quotes_runtime() now always return false. set_magic_quotes_runtime() raises an E_CORE_ERROR
    • Non-numeric string offsets – e.g. $a[‘foo’] where $a is a string – now return false on isset() and true on empty(), and produce warning if trying to use them. Offsets of types double, bool and null produce notice. Numeric strings ($a[‘2’]) still work as before. Note that offsets like ‘12.3’ and ‘5 and a half’ are considered non-numeric and produce warning, but are converted to 12 and 5 respectively for BC reasons.
    • Turning null, false or empty string into an object by adding a property will now emit a warning instead of an E_STRICT error.
    • Converting array to string now will cause E_NOTICE warning.
    • Shadowing names of superglobals for parameter names now causes a fatal error.
    • array_combine() now returns array() instead of FALSE when two empty arrays are provided as parameters.
    • call_user_func_array() no longer allows call-time pass by reference.
    • htmlentities() now emits an E_STRICT warning when used with asian characters, as in that case htmlentities() has (and already had before this version) the same functionality as htmlspecialchars().

The following keyword(s) are now reserved and may not be used in function, class, etc. names.

  • trait
  • callable
  • insteadof

The following functions have been removed from PHP :

  • define_syslog_variables()
  • import_request_variables()
  • session_is_registered(), session_register() and session_unregister()
  • mysqli_bind_param(), mysqli_bind_result(), mysqli_client_encoding(), mysqli_fetch(), mysqli_param_count(), mysqli_get_metadata(), mysqli_send_long_data(), mysqli::client_encoding() and mysqli_stmt::stmt()

Have fun coding!

Written by Alex (Shurf) Frenkel

March 2, 2012 at 8:53 am