The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Zend crashes PHP

Discussion in 'General Discussion' started by sparkleisp, Sep 6, 2007.

  1. sparkleisp

    sparkleisp Member

    Joined:
    May 31, 2007
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Hello people,

    I've been struggling with this problem for over 3 days now.
    I'm on cPanel Egde (latest) and i upgraded Apache tot 2.2.4

    I am trying to build Zend Optimizer into any PHP5 version (PHP running with suexec)
    As long as i don't include the lines that call for Zend in php.ini PHP works fine:

    But as soon as i include the Zend lines, PHP instantly crashes en the output of php -v is just blank.

    Anybody has suggestions on how to fix this?

    We have been trying to rebuild the whole thing a few times, we've tried Apache 2.0, 2.2. and all available PHP5 versions.
     
  2. shashank

    shashank Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    159
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    What version of Zend are you trying to install ?
     
  3. sparkleisp

    sparkleisp Member

    Joined:
    May 31, 2007
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    At this moment it's 3.3.0 after several rebuilds now the error:

    comes up, i don't have a clue where it's loaded the second time...and searching google did'nt help me any further.
     
    #3 sparkleisp, Sep 6, 2007
    Last edited: Sep 6, 2007
  4. sparkleisp

    sparkleisp Member

    Joined:
    May 31, 2007
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Nobody who has a solution?

    If someone thinks he can fix the problem (against payment) please let me know.
     
  5. Tymsah

    Tymsah Well-Known Member

    Joined:
    Apr 6, 2007
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    You must upload Binary format PhpZend files.
     
  6. sparkleisp

    sparkleisp Member

    Joined:
    May 31, 2007
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    What do you mean?
     
  7. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Could it be that both the main php.ini and your local php.ini are loading zend ?
     
  8. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    If you are using the --with-config-file-scan-dir switch in your PHP set up and specifying an alternative path to look for configuration files then this can cause this problem.

    For example, you may have compiled PHP with this switch, something like --with-config-file-scan-dir=/etc/php.d

    In the /etc/php.d directory you may have an ini file, like zend.ini, that includes loading the Zend Optimizer.

    Your main php.ini file, for example at /usr/local/Zend/etc/php.ini may also be loading the Zend Optimizer.

    At which point, both /usr/local/Zend/etc/php.ini and /etc/php.d/zend.ini are loading Zend Optimizer extensions and causing the error.
     
  9. sparkleisp

    sparkleisp Member

    Joined:
    May 31, 2007
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1

    Yes there is a config file scan dir


    [/usr/local/lib]# ls -la
    total 124
    drwxr-xr-x 4 root root 4096 Sep 6 22:37 ./
    drwxr-xr-x 27 root root 4096 Sep 6 01:27 ../
    -rw-r--r-- 1 root root 258 Sep 5 18:23 error_log
    lrwxrwxrwx 1 root root 33 Jun 8 17:12 mysql.sock -> ../../../var/lib/mysql/mysql.sock=
    drwxr-xr-x 17 root root 4096 Aug 11 06:13 php/
    lrwxrwxrwx 1 root root 27 Sep 6 01:27 php.ini -> /usr/local/Zend/etc/php.ini
    -rw-r--r-- 1 root root 0 Sep 6 01:27 php.ini-zend_optimizer.bak
    drwxr-xr-x 19 root root 20480 Jun 5 00:29 python2.4/


    I cant find anything in there which contains a second include for Zend.
     
    #9 sparkleisp, Sep 6, 2007
    Last edited: Sep 6, 2007
  10. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    It may be trying to load the php.ini file again since it is listed in that directory. I'm not really sure how the switch handles symlinks. It may also being trying to load php.ini-zend_optimizer.bak although I think what you have listed shows that file as being 0 bytes.

    If your main php.ini file is /usr/local/Zend/etc/php.ini then its really not necessary to have /usr/local/Zend/etc/php.ini symlinked in the /usr/local/lib directory.

    Try removing that symlink and see if this fixes your problem.

    rm -f /usr/local/lib/php.ini
     
  11. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Actually it really looks like you need to adjust the --with-config-file-path=/usr/local/lib path. This really should be something more like --with-config-file-path=/etc/php.d

    Whatever directory you use in the --with-config-file-path you would want it to point to an otherwise empty directory.

    Actually if you are not using this, you really shouldn't have it compiled in PHP.
     
  12. sparkleisp

    sparkleisp Member

    Joined:
    May 31, 2007
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    The problem is solved.

    I recompiled PHP from original php.net source without the --with-config-file-path=/usr/local/lib --with-config-file-scan-dir=/usr/local/lib directives.
    Perhaps cPanel can adjust this in their easyapache system?
     
    #12 sparkleisp, Sep 6, 2007
    Last edited: Sep 6, 2007
  13. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    YOu can already disable this in EA3. You need to look in the Advanced Configuration section.
     
Loading...

Share This Page