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.

PHP Upgrade Broke Applications

Discussion in 'General Discussion' started by ramorse, Sep 9, 2008.

  1. ramorse

    ramorse Well-Known Member

    Joined:
    Sep 6, 2003
    Messages:
    201
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I had a server management co. upgrade PHP to 5.2.6. I requested all configuration and modules be carried over to remain the same. But when the upgrade was complete I had several sites that suddenly didn't work.

    Two sites have Drupal installs using CiviCRM. Suddenly there are path errors for example:

    "Oops! - The path for including CiviCRM code files is not set properly. Most likely there is an error in the civicrm_root setting in your CiviCRM settings file (sites/default/civicrm.settings.php).

    » civicrm_root is currently set to: /home/username/public_html/sites/all/modules/civicrm."

    However, the config files on these sites have not changed and the paths are correct. The web server just can't find them.

    Similarly, I have a bunch of X-cart sites and when you try to access the shopping cart you get the error message: "Can't find template engine!"

    Clearly a path issue. The company that did the upgrade seems to have no answers. I have posted to the CiviCRM forum just in case anyone there might have a clue, and no help. So, I am seeking any help I can find.
     
  2. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    Did you install suphp or something similar when you upgraded?

    I know that suphp and similar systems can restrict php from opening files that it thinks are outside the scope of the script.

    For example /opt/suphp/etc/suphp.conf has the following parameters:

    Code:
    ; Path all scripts have to be in
    ; This works as a prefix when a trailing slash is not specified.
    ; e.g. /home will match /home /home2 /home3 etc While /home/ will only match /home/
    docroot=/home
    
    ;Path to chroot() to before executing script
    chroot=/home
    
     
  3. ramorse

    ramorse Well-Known Member

    Joined:
    Sep 6, 2003
    Messages:
    201
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    suphp was not installed.

    It's fixed with the help of data center support. In case anyone runs in to this here is what was discovered and the fix:

    Each VirtualHost declaration contains include file in form like this:

    include /usr/local/apache/conf/userdata/std/1/<username>/*

    At this location you can find file: cp_php_magic_include_path.conf which contains:

    php_admin_value include_path "..." declarations. Values set by php_admin_value directive can not be overwritten anyhow (not by .htaccess file not by set_ini function).

    The solution is replace 'php_admin_value include_path' with 'php_value include_path' anywhere it exists.

    Now, why this happened with the upgrade to php 5.2.6 is still unclear and may have to do with the fact that this is a Cpanel server.
     
  4. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    Did you enable these 'include' lines by hand or were they already uncommented?

    Because my httpd.conf has them but they are all commented like this:

    Code:
        # To customize this VirtualHost use an include file at the following location
        # Include "/usr/local/apache/conf/userdata/std/2/myuser/mydomain.com/*.conf"
    
     
  5. ramorse

    ramorse Well-Known Member

    Joined:
    Sep 6, 2003
    Messages:
    201
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I can't tell you as I didn't do the work. I am just reporting what was done. Sorry.
     
Loading...

Share This Page