Is Zend OPCache the same thing as Zend Optimizer+ - php

I'm in a process of upgrading the PHP across all of our servers to 5.5.x
I read that the PHP team will be integrating Zend Optimizer+ within the PHP core for the 5.5 release. So I installed that but in phpinfo() there's nothing about zend optimizer+, there are only few Zend OPCache directives. So my question is, am I looking at the same thing, or should
I compile/install another extension and if so where can I find the latest version.
Thank you in advance.

Yes, it is. Here is repo for a proof: https://github.com/zendtech/ZendOptimizerPlus
Zend have some troubles with naming: Zend Optmizer != Zend Optmizer+
Now, they've opensourced it, and it is called OPCache and bundles with 5.5.

Related

Installing Zend 1.11

I currently have PHP 5.4 setup, can we install Zend 1.11 with it or do we need to go for Zend 2 (have not come across decent tutorials explaining the setup for Zend 2 on WAMP)
I tried installing 1.11, but it gives out a errow while using the zf CLI
***************************** ZF ERROR ********************************
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path. There are a variety of ways that you can
ensure that this zf command line tool knows where the Zend Framework
library is on your system, but not all of them can be described here.
You can absolutely run Zend Framework 1.11 with PHP 5.4.
The error you are getting is because you are trying to use "zf" in the command line, but PHP can't find where the Zend Framework is loaded. In order to fix this, find the include_path directive in your php.ini file, and update the path to include where you have installed the Zend Framework.
Don't forget to restart your web server after you have done this!

Upgrading Zend Framework Advise

I am using 'MJS_Controller_PathRouter' in any ancient Zend Framework version 0.6 and PHP 5.1.6. When I run this in a newer php version e.g. 5.2.x or 5.3.x, it is throwing this error:
Declaration of
MJS_Controller_Router_PathRoute::__construct()
must be compatible with that of
Zend_Controller_Router_Route_Interface::__construct() in
/opt/ezxwebadmin-versions/ezxwebadmin_2.11.5/Library/MJS/Controller/Router/PathRoute.php
on line 34
I would like to remove this enhanced rewrite router and upgrade our application to use a newer Zend Framework version. Our web application doesn't use any of the classes provided by Zend and we are only utilizing the MVC architecture and rewrite functionality from Zend framework.
Now could any one advise which Zend Framework version would be best for us to upgrade to?
The error you are getting is actually a PHP strict coding standards error and should be fairly easy to fix. Just open up Zend_Controller_Router_Route_Interface and MJS_Controller_Router_PathRoute and compare the parameters for the __construct method. They need to be the same, so change your class to match the parameters in the interface.
Zend Framework requires PHP 5.2.4. ZF2 will require PHP 5.3+. PHP 5.1.6 is almost 5 years old so you really should be upgrading (or planning to). If you are using something like CentOS with really ancient PHP packages, you might want to consider switching to Zend Server community edition (which is free). This can be installed with Yum and will give you more recent versions of PHP.
You should take a close look at the Zend Framework Migration Notes starting at 0.8
Then look through the Zend Framework Download Archives and upgrade your framework version by version (follow the versions listed in the migration notes) to either get to a version that works with the PHP you have or (ideally) the latest version: 1.11.x

Zend error: The apc extension must be loaded for using this backend

Hi I am getting the above error setting up my Zend application on a public hosted server. I have another application on the same sever which works ok so I assume APC is obviously loaded. How can I diagnose this? Thanks
I'm assuming you are you using the APC Zend_Cache backend. To use this, you need the APC extension installed.
To check if it is loaded, just paste the following into a php file and then view it in a browser:
<?php
phpinfo();
Search for the block that says something like "This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies"
If you see APC in there, then it's loaded.
http://php.net/manual/en/function.extension-loaded.php
Check for "apc" extension.

Is there anyone here familiar with this zend debugger error found in apache's error log?

[Zend Debugger] Cannot receive start command
...
[Zend Debugger] Cannot send message
I googled and found there are others also having this problem (here and this one on serverfault), but unluckily no fix yet.
PHP 5.2.8 (cli) (built: Dec 8 2008 19:31:23)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
Is there an official fix for this yet?
Well, like Henrik already said, this is hard to diagnose with no information about your setup at all. Also, if Roman (the rbzend from the thread you linked at the Zend Forum) has no solution at hand, it is likely really an incompatibility you have to live with for now.
If this is something that was fixed, your best bet would be to download the latest version of Zend Debugger from the Zend website. Then go through installation again as explained in the Sticky Note Setting Up Zend Debugger in the Zend Forum.
If reinstalling Zend Debugger doesn't help and you do have a valid support license with Zend, you might want to open a ticket with Zend Support. I have opened a few tickets with them myself and found them very helpful. So far, they solved all issues I had with Zend Debugger and Zend Studio. If you don't have a valid license, you can still register for the Zend Forum and ask there.
As a random idea, you might get the Debugger working by disabling IPv6 in Zend Studio/Eclipse by starting it with -Djava.net.preferIPv4Stack=true. I remember I had an issue with Zend Debugger because of that once. But of course it might be completely unrelated to your troubles - it's really just a straw.
Finally, if you don't mind, you can still change to XDebug instead.

using xCache with Zend optimizer together

i have installed xCache and Zend optimizer in same time and it gives me PHP Fatal error: [Zend Optimizer] Zend Optimizer 3.3.3 is incompatible with XCache 1.2.1 in Unknown on line 0
I have lines in installation document that i should include zend php.ini file to normal php.ini and ansure that xCache runs befor Zend Optimizer.
My question is how i include files in php.ini and how i can be sure that xCache run before Zend Optimizer?
I've run across this same issue. FWIW Zend Optimizer (excluding Zend Platform) is not an opcode cacher like XCache is. I've had success running both at the same time. The trick is to replace the following line:
extension=xcache.so
With this:
zend_extension=/path/to/xcache.so
(note that the zend extension may require the full path to your xcache.so library)
Hope this helps.
All of the PHP opcode caches are mutually exclusive - including: xCache, Zend Optimizer, APC, or eAccelerator. Don't try to use them at the same time.
The classic joke: "doctor, it hurts when I do X!" - "so don't do X"
A quick look seems to indicate that both products operate on the PHP opcode level and it might very well be, especially given the error message, that they are incompatible.
You can ensure xcache is loaded first by putting the xcache ini settings before the Zend Optimizer ini settings. There's no other way I know of...
ie. make sure [xcache] and every other [xcache...] section in the ini is before the line loading Zend Optimizer (which, on Linux should like kind of like the following : zend_extension=/usr/local/Zend/lib/ZendOptimizer.so).
But as mentioned in the other replies, it might not be advisable to use both XCache and Zend Optimizer together, especially since there have been compatibility problems in the past. If you can do without Zend Optimizer (ie. when not using Zend Guard protected scripts), it's safe to remove the relevant config lines from php.ini.

Categories