Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jan 2005
    Posts
    10

    Default Zend Optimizer 2.5.7 and PHP 4.3.10

    It appears that although Westhost has given up the chance to upgrade to PHP 4.3.10, the Zend Optimizer (absolutely required upgrade) upgrade has not been included ... I called support and they told me that they don't do the optimizer upgrade.

    Did a search on these boards and found a post where someone did the install themselves ... but the details were a little sketchy (for me anyway). This is what I have done.

    1) Went to www.zend.com and downloaded

    ZendOptimizer-2.5.7-linux-glibc21-i386

    2) Unzipped the file and loaded it to a new directory /usr/local/Zend2

    3) From putty I tried to run ./install.sh ... got permission errors.

    4) Did a chmod 777 on everything I could find and ran ./install.sh again. This time I got the rights errors (no root access) that the other poster had. He/she said that the commented out the lines that looked for root access.

    Now my questions

    1) Is the file that I should edit /zui_files/install.php ?

    2) What am I looking for to comment out ?

    3) Should I run ./install , ./install.sh or ./install-tty under putty ?

    4) Will this install Zend optimizer where everything that's looking for it will find it? If not what else do I have to do?

    5) The docs say:

    If you are running under Apache, restart your Apache Web server. For Apache V1.3,
    use the commands:
    apachectl stop; apachectl start


    do I do this?

    6) and finally can I get rid of Zend2 directory when I'm finished?

  2. #2
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    Afraid the only clear answer I can give you is that if you want to restart Apache all you need to do is use 'restart' in an SSH session or you can do it via you Site Manager... same thing.

    I would say just as a guess they had looked at all the errors they got and made note of them then went in and commented out. Not sure this well always be the same with everyone. Never know what is on our account or not that the other user had or did not have.

    I think there in an include for Zend at the bottom of your php.ini that may have be looked at.

    Wish I could give you better.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  3. #3
    Junior Member
    Join Date
    Jan 2005
    Posts
    10

    Default

    wjd,

    I am pretty sure the rights violation was generated by system - I could not see anything in the files that matched the error message. I think the file that makes the calls is install.php ... below do you see anything that I should comment out (I don't know **** about php).

    <?php
    /*
    +----------------------------------------------------------------------+
    | ZendOptimizer installation script |
    +----------------------------------------------------------------------+
    | Copyright (c) 1998-2003 Zend Technologies Ltd. |
    +----------------------------------------------------------------------+
    | The contents of this source file is the sole property of |
    | Zend Technologies Ltd. Unauthorized duplication or access is |
    | prohibited. |
    +----------------------------------------------------------------------+
    | Authors: Michael Spector <michael@zend.com> |
    | Anya Tarnyavsky <anya@zend.com> |
    +----------------------------------------------------------------------+
    */

    include_once("install.inc");

    $INSTALL =& new Install("Zend Optimizer", "2.5.7");

    $argv = $_SERVER["argv"];
    for($i=1; $i<count($argv); $i++) {
    if($argv[$i] == "--help" || $argv[$i] == "-h") {
    die("USAGE: ". $argv[0] ." [ --aix ]\n");
    }
    if($argv[$i] == "--aix") {
    $INSTALL->conf['uname']['sysname'] = "AIX";
    }
    }

    if($INSTALL->conf['uname']['sysname'] == "AIX") {
    $INSTALL->conf['license_file'] = "zend_optimizer.zl";
    }

    $INSTALL->set_components(array(
    "doc" => array ("%PREFIX%/doc", false),
    "zendid" => array ("%PREFIX%/bin", false),
    "ZendExtensionManager.so" => array ("%PREFIX%/lib", false),
    "poweredbyoptimizer.gif" => array ("%PREFIX%/etc", false)
    ));

    $INSTALL->conf['supported_systems'] = array(
    "Linux" => array(
    "glibc" => array("2.1", "2.2")
    ),
    "SunOS" => array(
    "machine" => array("sparc"),
    "release" => array("5.x")
    ),
    "FreeBSD" => array(
    "release" => array("3.4", "4.x"),
    ),
    "AIX" => array(
    "release" => array("4.x", "5.x"),
    )
    );

    //$INSTALL->check_system_supported();

    $INSTALL->welcome_box();
    $INSTALL->license_agmnt_box();

    if($INSTALL->conf['uname']['sysname'] == "AIX") {
    $INSTALL->find_license_on_disk($INSTALL->conf['license_file'], "Zend Optimizer");
    }

    $INSTALL->choose_install_prefix("/usr/local/Zend");
    $INSTALL->php_ini_location_guess();

    # Check for installed components:
    $keep_existing = $INSTALL->check_installed_components(array(
    array (
    "filename" => "ZendExtensionManager.so",
    "compname" => "extension_manager",
    "nicename" => "ZendExtensionManger"
    ),
    array (
    "zemname" => "optimizer",
    "compname" => "optimizer",
    "nicename" => "ZendOptimizer"
    )
    ));

    if(isset($keep_existing["extension_manager"])) {
    $INSTALL->remove_component ("ZendExtensionManager.so");
    }


    # PHP version detection - FROZEN

    $using_apache = $INSTALL->is_using_apache();
    if($using_apache){
    $apache_ver = $INSTALL->apache_get_version();
    }

    #if($using_apache) {
    # $INSTALL->php_type_guess(); /* Detect it just for Apache restart */
    #}

    if($INSTALL->conf['uname']['sysname'] == "AIX") {
    $INSTALL->php_version_remove("5.0.x");
    }

    if($INSTALL->conf['uname']['sysname'] == "Darwin" )
    {
    $INSTALL->php_version_remove("4.0.6");
    $INSTALL->php_version_remove("4.1.x");
    $INSTALL->php_version_remove("4.2.0");
    $INSTALL->php_version_remove("4.2.x");
    $INSTALL->php_version_remove("4.3.x");
    $INSTALL->php_version_add("PHP 4.3.x ", "4.3.x ", 2);
    }

    $INSTALL->php_version_detect(true, true);

    if($INSTALL->conf['uname']['sysname'] == "AIX") {

    $INSTALL->php_version_remove("4.0.6");

    if($using_apache && $INSTALL->conf['php_type'] == "module") {
    $optimizer_libname = "dyn/ZendOptimizer.so";
    $extension_manager_libname = "dyn/ZendExtensionManager.so";
    }
    else {
    $optimizer_libname = "stat/ZendOptimizer.so";
    $extension_manager_libname = "stat/ZendExtensionManager.so";
    }
    $INSTALL->remove_component("ZendExtensionManager.so");
    $INSTALL->add_component($extension_manager_libname,
    $INSTALL->make_path($INSTALL->conf['prefix'], "lib"), false);
    }
    else {
    $optimizer_libname = "ZendOptimizer.so";
    }
    $component_name = "optimizer";

    $php_versions = $INSTALL->php_versions_get_array();
    foreach ($php_versions as $php_ver) {

    $PHP_VER = preg_replace("/\./", "_", $php_ver);

    if(!isset($keep_existing["optimizer"])) {
    $INSTALL->add_component($PHP_VER."_comp/$optimizer_libname",
    $INSTALL->make_path($INSTALL->conf['prefix'], "lib",
    "Optimizer-".$INSTALL->get_component_version($component_name), "php-$php_ver"),
    false);
    }

    /* install Optimizer thread safety for PHP version >= 4.2.1 */
    if($INSTALL->ver_cmp($PHP_VER, "4.2.0")>0 && $INSTALL->conf['uname']['sysname'] != "AIX" && $INSTALL->conf['uname']['sysname'] != "Darwin" ){

    if(!isset($keep_existing["optimizer"])) {
    $INSTALL->add_component($PHP_VER."_comp/TS/$optimizer_libname",
    $INSTALL->make_path($INSTALL->conf['prefix'], "lib",
    "Optimizer_TS-".$INSTALL->get_component_version("$component_name-ts"), "php-$php_ver"),
    false);
    }

    if(!isset($keep_existing["extension_manager"])) {
    $INSTALL->add_component("ZendExtensionManager_TS.so",
    $INSTALL->make_path($INSTALL->conf['prefix'], "lib"), false);
    }
    }
    }


    $INSTALL->set_var_component("%PREFIX%", $INSTALL->conf['prefix']);
    $INSTALL->php_ini_backup();

    $INSTALL->start_install();

    if($INSTALL->conf['uname']['sysname'] == "AIX") {
    $INSTALL->install_license();
    }

    /* do php.ini modifications */
    $INSTALL->php_ini_open();

    $INSTALL->php_ini_add_zend_section();

    if($INSTALL->conf['uname']['sysname'] == "AIX") {
    $INSTALL->php_ini_add_path("zend.license_path", $INSTALL->conf['prefix']);
    }

    $INSTALL->php_ini_add_entry("zend_optimizer.optimization_le vel", 15);
    $INSTALL->php_ini_add_zend_extension($INSTALL->conf['prefix']."/lib/ZendExtensionManager.so");

    # Remove ZendOptimizer.so zend_extension entry before using ZendExtensionManager
    $INSTALL->php_ini_remove_entry("ZendOptimizer.so");

    if(!isset($keep_existing["optimizer"])) {
    $INSTALL->php_ini_add_entry("zend_extension_manager.optimiz er",
    $INSTALL->make_path($INSTALL->conf['prefix'], "lib",
    "Optimizer-".$INSTALL->get_component_version($component_name)));
    }

    if($INSTALL->conf['uname']['sysname'] != "AIX" && $INSTALL->conf['uname']['sysname'] != "Darwin"){
    if(!isset($keep_existing["optimizer"])) {
    $INSTALL->php_ini_add_entry("zend_extension_manager.optimiz er_ts",
    $INSTALL->make_path($INSTALL->conf['prefix'], "lib",
    "Optimizer_TS-".$INSTALL->get_component_version("$component_name-ts")));
    }

    if(!isset($keep_existing["extension_manager"])) {
    $INSTALL->php_ini_add_zend_extension($INSTALL->make_path($INSTALL->conf['prefix'], "lib",
    "ZendExtensionManager_TS".$INSTALL->conf['so_ext']), "zend_extension_ts");
    }
    }

    $INSTALL->php_ini_reorder();
    $INSTALL->php_ini_fix();
    $INSTALL->php_ini_close();

    $INSTALL->php_ini_relocate();

    if($INSTALL->conf['uname']['sysname'] == "AIX") {
    $httpd_user = $INSTALL->webserver_get_user();
    $INSTALL->add_permissions($INSTALL->conf['prefix']."/".$INSTALL->conf['license_file'], "0440", $httpd_user);
    $INSTALL->set_file_permissions();
    }

    $INSTALL->add_package_info();

    /* There may be a case when PHP type is not detected, since php_type_guess() call is commented */
    if(isset($INSTALL->conf['php_type']) && $INSTALL->conf['php_type'] == "executable"){
    $INSTALL->msgbox("The installation has completed successfully.");
    }
    else{
    $INSTALL->msgbox("The installation has completed successfully.\n".
    $INSTALL->conf['product']." is now ready for use.\n".
    "You must restart your Web server for the modifications to take effect.");

    if($INSTALL->conf['webserver'] == "Apache" && $INSTALL->yesnobox("Restart the Web server now?")){
    $INSTALL->webserver_restart();
    }
    }

    $INSTALL->cleanup();

    ?>

  4. #4

    Default

    I added some additional info about the steps to install Zend Optimizer:
    http://forums.westhost.com/phpBB2/vi...?p=15080#15080

Similar Threads

  1. Replies: 7
    Last Post: 01-13-2007, 07:50 AM
  2. eAccelerator + Optimizer?
    By Armadillo in forum PHP / MySQL
    Replies: 1
    Last Post: 09-18-2006, 07:58 AM
  3. PHP and MySQL Site Application Upgrades
    By WestHost - MStevenson in forum News / Announcements
    Replies: 0
    Last Post: 02-01-2005, 12:55 PM
  4. PHP 4.3.10 - security fixes
    By nsc in forum PHP / MySQL
    Replies: 16
    Last Post: 12-26-2004, 11:41 AM
  5. Replies: 0
    Last Post: 12-18-2004, 09:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •