Switch the Zend Framework Version on Zend Server CE

841 Views Asked by At

So, I have recently installed the new Zend Server CE 6.0.0.

Now, if I go to localhost:10081/ZendServer/ServerInfo/ I get the following info on top:

  • PHP Version 5.4.11
  • Zend Server Version: 6.0.0
  • Zend Framework:1.12.1, 2.1.1**
  • Zend Server Gateway: 0.9.0.201301302347
  • Build: 68518

As you can see, there are two Zend Framework versions installed, 1.12.1 and 2.1.1.

If I use echo Zend_Version::VERSION; in my application it shows me 1.12.1.

Question: How do I switch these different versions? And how am I able to add even more versions (e.g. additionally 1.12.3)?

1

There are 1 best solutions below

0
RockyFord On BEST ANSWER

How do I switch these different versions?

if you are using non namespaced code you are using Zend Framework 1:

echo Zend_Version::VERSION;//this is ZF1 style code

if the code is namespaced it's Zend Framework 2:

echo Zend\Version::VERSION;//this would be ZF2 style code

you're not likely to use the wrong one by accident.

With Zend Server both versions of Zend Framework are located in the /ZendServer/share directory (windows) and included in the php.ini include_path. If you don't want one or the other available edit it out of you php.ini include_path.

NOTE: often the include_path entry in the php.ini for Zend Server is located at the end of the document instead of in the usual location.

 And how am I able to add even more versions (e.g. additionally 1.12.3)?

This is the easy part;

Add the new version to the Zendserver/share directory and then add the new path to the php.ini include_path.

include_path=".;C:\Zend\ZendServer\bin\pear;C:\Zend\ZendServer\share\ZendFramework\library;C:\Zend\ZendServer\share\ZendFramework2\library"

Path

    /Zend
        /ZendServer
            /share
                /Zendframework
                /Zendframework2

Good Luck