Zend Optimizer (loader?) not reading encoded files

kristian

Verified User
Joined
Nov 4, 2005
Messages
461
Location
Norway
Hi,

We've recently moved a customer between two DA-servers, and there's a problem with a file that requires Zend Optimizer to run, as the file is encoded.

When you open this site in a browser, the encoded content is simply displayed to the browser, which obviously isn't supposed to happen. :-)

The old and the new servers are set up equally except the new one has the suhosin php-patch (in addition to the extension), but phpinfo() shows a few differences in how Zend is loaded as well:

Old server:
Code:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
    with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

There is also a section further down in the phpinfo()-listing that shows:
Code:
Zend Optimizer
Optimization Pass 1 	enabled
Optimization Pass 2 	enabled
Optimization Pass 3 	enabled
Optimization Pass 4 	enabled
Optimization Pass 9 	enabled
Zend Loader 	enabled
License Path 	no value
Obfuscation level 	3

New server:
Code:
This server is protected with the Suhosin Patch 0.9.6.2
Copyright (c) 2006 Hardened-PHP Project

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

The other part about things like "Zend Loader enabled" does not appear on the new server.

Can anyone shed some light on this? I've read a few posts here and there that suhosin and Zend isn't a good team, but it seems to have been fixed in later versions (i.e. the ones I'm using), so from what I can see, I shouldn't be having this problem at all!

The server is built with custombuild, with the following options.conf:
Code:
#PHP settings. default_php possible values - 4 or 5
default_php=5
php5_cli=no
php5_cgi=yes
php4_cli=no
php4_cgi=no
php_ini=yes
#Possible values - recommended or dist
php_ini_type=dist
zend=yes

#Possible values - 5.0 or 5.1 (4.1 is possible too, but it's EOL)
mysql=5.0
mysql_inst=yes
mysql_backup=yes

#Possible values - 1.3, 2.0 or 2.2
apache_ver=2.2

#Web applications
phpmyadmin=yes
atmail=yes
squirrelmail=yes
roundcube=yes
uebimiau=yes

#Mail options
mail-header-patch=yes
dovecot=yes
eximconf=yes

#FTP options
proftpd=yes

#Jailed shell
jail=no

#Custombuild options
autover=yes
bold=yes
clean=yes
fileserver=2
custombuild=1.1
awstats=yes
webalizer=yes
clean_old_webapps=no
cron=no
[email protected]
notifications=yes
updates=no

Any help appreciated.
 
cd /usr/local/directadmin/custombuild
./build update
./build zend
 
Not long ago I did ./build all, but ok. However, after typing ./build zend, I get this message:

Code:
File already exists:	ZendOptimizer-3.3.3-linux-glibc23-x86_64.tar.gz

Location of php.ini:
  /usr/local/lib
Press return to continue...

Now, it's the location of php.ini that strikes me as a bit odd, since my php.ini (as reported by phpinfo()) is in fact in /usr/local/etc/php5/cgi/php.ini. Can I ignore this message and press return to continue, or should I change something somewhere?

Thanks for your help.
 
./build all does not include zend.

Just press return.
 
Proceeded with the install, zend completed and asked me to restart apache, which I did, but it has the same info shown with phpinfo() as before, and the encoded file is still not loaded properly.

Any other ideas?

(And btw, I read build, and it seems that if I have zend=yes in options.conf, build all will in fact also build zend.)

Appreciate your help in this.
 
Strange its like its not loading it.

Maybe try:

cd /usr/local/directadmin/custombuild
./build rewrite_confs
 
Hm, looking at the build-script, it doesn't seem to have anything in the rewrite_confs-section to affect the loading of zend? Actually it looks a little scary to run :-) I'll take a closer look tomorrow though, I need some sleep now..

Thanks for your help so far!
 
Make sure it's loaded in php.ini file, if you have suhosin - it might prevent it from running.
 
I removed the suhosin-patch now from my custom configure.php5 (i added a line that applied the patch before it ran configure), and did a ./build php along with a ./build zend. Zend moved my php.ini to /usr/local/Zend/etc/ and made a symlink from /usr/local/etc/php5/cgi/, which was fine I guess, except that 'webapps' didn't have permission to read it for some reason. So I change ownership to webapps:webapps on the file, and voila. It loaded.

Now I have suhosin-extension (but not the patch) and zend optimizer running as they should, with zend loader enabled.

Thanks. :)
 
except that 'webapps' didn't have permission to read it for some reason. So I change ownership to webapps:webapps on the file, and voila. It loaded.

Actually, it seemed like it didn't matter, I had to put o+r on php.ini for it to be loaded, so I ended up changing it back to root:root and 644.
 
Back
Top