1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

The Loader must appear as the first entry in the php.ini file in Unknown on line 0

Discussion in 'Plesk for Linux - 8.x and Older' started by Amin Taheri, Jul 22, 2007.

  1. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Apache does not start after installing Zend Optimier and doesnt show in phpinfo

    So, after installing Zend Optimizer word for word in the directions - for php 5.2 (version 3.3.0) my servers apache did not start.

    Apache failed to start with the error:
    "PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0"

    SwSoft has a KB article here:
    http://kb.swsoft.com/article_41_1520_en.html

    Personally I didn't find this very helpful as it didn't solve my problem when I ran into this on RHEL4. Your location and name of the loader, and php.ini files could be different based on your php version and OS distro, but the overall steps should be similar.

    In this article I am using PHP 5.2.x and Zend 3.3.0 on Red Hat Enterprise 4

    The result of the grep command showed that there was only one file with the specified contents.

    So what I did was move the contents of that file into php.ini as the first line in the zend block and that fixed my problem after restarting apache.

    First, I got rid of the file that had the line originally - but I kept it arround just in case I ever needed it.

    Code:
    mv /etc/php.d/ioncube.ini ~
    
    Then I edited php.ini
    Code:
    nano -w /usr/local/Zend/etc/php.ini
    So at the end of it all, the zend section looks like this

    Code:
    [Zend]
    zend_extension=/usr/lib/php/ioncube/ioncube_loader_lin_5.2.so
    zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0
    zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0
    zend_optimizer.version=3.3.0
    zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
    zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
    
    I only added the first line under the [Zend] line, this is the line moved from the other file.

    then I retarted apache
    Code:
    /sbin/service httpd restart
    then verified output
    Code:
    php -v
    
        PHP 5.2.3 (cli) (built: Jun  7 2007 08:59:02)
        Copyright (c) 1997-2007 The PHP Group
        Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
            with the ionCube PHP Loader v3.1.31, Copyright (c) 2002-2007, by ionCube Ltd., and
            with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
            with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
    
    
    Now everything works, and now Zend is properly displayed in php.ini

    I hope some one finds this useful.
     
  2. pagecom

    pagecom Guest

    0
     
    Thank you so much , it worked perfect
     
  3. BoTGoD

    BoTGoD Guest

    0
     
    Thank you very much for this fix, was driving me insane for a bit ^^
     
  4. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    You are both quite welcome, I am glad that I was able to help some one else.
     
  5. calderwood

    calderwood Regular Pleskian

    25
     
    Joined:
    May 12, 2006
    Messages:
    103
    Likes Received:
    0
    Zend Optimzer Not responding

    Seems to be the day for Zend Optimizer errors. I followed your suggestions and got Apache to restart. Seems PHP has errors and no Optimizer. Here are the logs if anyone has an idea:


    [root@ip-XXX-XXX-XXX-XXX ~]# php -v
    No log handling enabled - turning on stderr logging
    Cannot find module (IP-MIB): At line 0 in (none)
    Cannot find module (IF-MIB): At line 0 in (none)
    Cannot find module (TCP-MIB): At line 0 in (none)
    Cannot find module (UDP-MIB): At line 0 in (none)
    Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
    Cannot find module (SNMPv2-MIB): At line 0 in (none)
    Cannot find module (SNMPv2-SMI): At line 0 in (none)
    Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
    Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
    Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
    Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
    Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
    Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
    Cannot find module (LM-SENSORS-MIB): At line 0 in (none)
    Cannot find module (IPV6-ICMP-MIB): At line 0 in (none)
    Cannot find module (IPV6-MIB): At line 0 in (none)
    Cannot find module (IPV6-TCP-MIB): At line 0 in (none)
    Cannot find module (IPV6-UDP-MIB): At line 0 in (none)
    Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
    Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
    Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
    Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
    Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
    Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
    Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
    Cannot find module (SNMPv2-TM): At line 0 in (none)
    Failed loading /usr/local/Zend/lib/Optimizer-3.0.2/php-4.3.x/ZendOptimizer.so: /usr/local/Zend/lib/Optimizer-3.0.2/php-4.3.x/ZendOptimizer.so: undefined symbol: match
    PHP 4.3.9 (cgi) (built: Feb 21 2007 06:35:52)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with the ionCube PHP Loader v3.1.16, Copyright (c) 2002-2006, by ionCube Ltd., and
    with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies
     
  6. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    looks like its a problem with SNMP in php. If you ain't planning on using it, try

    rpm -e php-snmp
     
  7. calderwood

    calderwood Regular Pleskian

    25
     
    Joined:
    May 12, 2006
    Messages:
    103
    Likes Received:
    0
    Zend said there is an issue with Plesk - it is fixed

    I spoke to Zend about the errors and the said there was an issue - I have used their supplied files and the problems went away. My system is:
    Plesk 8.2.1
    CentOS4.2
    PHP 4.3.9

    I also made theses changes after installing Optimizer:
    Edit the includer for ioncube in /etc/php.d/ and add a # infront of the loader.

    Then edit your php.ini file and add at the top of the Zend section:
    zend_extension = /usr/lib/php4/ioncube_loader_lin_4.3.so

    Test your PHP output with: php -v

    <b>HERE IS THE MESSAGE FROM ZEND:</b>
    This is a known issue and you need to either upgrade or downgrade Optimizer.

    Use one of the versions (preferred 3.2.8) below:
    http://downloads.zend.com/optimizer/3.2.8/ZendOptimizer-3.2.8-linux-glibc21-i386.tar.gz
    http://downloads.zend.com/optimizer/2.6.2/ZendOptimizer-2.6.2-linux-glibc21-i386.tar.gz

    In addition, please disable ioncube extension before loading Optimizer,
    if it solves a loading problem (you can see it in the stderr, console output as below, or Apache error log when starting up Apache.
     
Loading...