views:

187

answers:

3

I'm using FreeBSD + Apache. How do I disable Zend Framework from running on a system? I prefer not to delete the entire software if I don't have to.

Secondarily, how do I find out the version of Zend Framework I am using?

I am refering to Zend Framework, the CMS.

What would be my DocmentRoot directory? It seems to me that the DocumentRoot which apache.conf is pointing to is not where the Zend directory is located.

+1  A: 

Option 1) Move the directory hierarchy out of PEAR/PHP accessible path

Option 2) Modify php.ini in order to remove the path to the Zend Framework

jldupont
+1  A: 

Disable ZF:

Locate the ZF directory (/Zend) and rename it (/_Zend).

ZF Version:

echo Zend_Version::VERSION;

You can also compare Zend's versions using Zend_Version::compareVersion($versionYouNeed); This function return 0 if versions are same. -1 if $versionYouNeed is older then installed and 1 if $versionYouNeed is newer then installed.

Tomáš Fejfar
+1  A: 
...disable Zend Framework from running on a system?

Renaming the /Zend folder to something like /_Zend will certainly make the framework files inaccesible. But if there is code out there that calls that ZF functionality, then it will fail, and most likely fail ugly.

It seems to me that how you "disable" ZF depends upon how it is being invoked. If you are using it in the standard MVC approach, it is the .htaccess at the Apache webroot that points all the requests into ZF's public/index.php "bootstrap" file.

So I would either:

  • Change/remove the .htaccess file so that it no longer points to public/index.php
  • Change public/index.php so it no longer invokes the ZF functionality.
David Weinraub