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

Plesk automatically updated php to version 5 and broke multiple apps!

Discussion in 'Plesk for Linux - 8.x and Older' started by dtb71, Jul 10, 2006.

  1. dtb71

    dtb71 Guest

    0
     
    Has anyone else had problems with Plesk automatically updating php4 to php5 without warning?

    Checked my email yesterday to see an auto mail from Plesk that Apache was down... and that's where it all started.

    Sent off a support request to swsoft but they were no help.

    Contacted aplus.net (dedicated server host) and within 15 minutes had discovered the problem. They said several clients had experienced this problem. Got Apache started by changing the libraries it was attempting to load to php5 instead of php4.

    Bottom line now all php apps are broken, including Horde WebMail -- You'd think that Plesk would at least validate their own bundled apps would work with their update?!? Ticks me off that aplus.net would know the answer within minutes and swsoft did not help. But it really pisses me off they broke my customer's apps without any warning or notification that the upgrade was coming. Would have been nice to have some prep-time!

    So -- ranting is done. Here's my problems:

    open_basedir is causing all kinds of grief. Is there a way to disable this? Is there a way to disable it? Is there a way to add a wildcard to the path (because everytime we add an additional path it continues to fail at yet another point. the path is already over 255 characters.)

    Also failing php functions like "PHP Fatal error: Call to undefined function mysql_pconnect()" which seems really strange - those should continue to function just fine, right??

    Any help is greatly appreciated!
    dtb71
     
  2. Arundel69

    Arundel69 Guest

    0
     


    Yes indeed...

    I usually comment that line on all vhosts where I need no restrictions...

    That was one of the things that got me scared yesterday and made me shiver in cold sweat...

    You can confirm through phpinfo() that mysql support is very likely not built-in on your PHP.

    Like many of you, I mostly do my upgrading through yum to the AtomicRocketTurtle packages. Now apparently one of the php/httpd package combinations there (in my case, 5.0.4/2.0.46 — the latest available for RH Enterprise Edition 3) does not come with mysql support built in. This is terrible because almost all applications I use need that support...

    Someone on a thread here suggested using "mysqli" support instead (which strangely enough comes compiled with ART's httpd). This is not an option when one has hundreds of third-party apps all of them requiring the traditional mysql support.

    Workaround (it worked only after doing this SEVERAL times...):

    - delete (with rpm -e --nodeps if you can't do a rpm -i) the httpd package
    - delete the PHP5 package(s) - the main one should be enough
    - do an yum install php-mysql

    It should get the correct dependencies, ie. PHP itself. With luck, you'll even get Apache with correct PHP support. If not, do the yum install httpd afterwards.

    What didn't work "immediately": in some cases, when Apache restarted, it still wanted to load the php4 definitions. My workaround was editing manually
    Code:
    /etc/httpd/conf.d/php.conf 
    to:

    PHP:
    #
    # PHP is an HTML-embedded scripting language which attempts to make it
    # easy for developers to write dynamically generated webpages.
    #

    LoadModule php5_module modules/libphp5.so

    #
    # Cause the PHP interpreter to handle files with a .php extension.
    #
    AddHandler php5-script .php
    AddType text
    /html .php

    #
    # Add index.php to the list of files that will be served as directory
    # indexes.
    #
    DirectoryIndex index.php

    #
    # Uncomment the following line to allow PHP to pretty-print .phps
    # files as PHP source code:
    #
    #AddType application/x-httpd-php-source .phps
    and do a
    Code:
    service httpd restart
    afterwards.

    I must admit that this didn't work the first time I tried; I had to delete and reinstall those 3 packages over and over again, until by some magic I got httpd + php working with the mysql module built-in.

    It's not very user-friendly, but it works.
     
  3. dtb71

    dtb71 Guest

    0
     
    Well.. just got off the phone w/ swsoft and they ensure me it was not plesk that automatically updated php -- rather my dedicated server hoster or some auto fedora core process.....

    In addition, Plesk on FedoraCore 3 does not support php5

    so - time to make some more phone call and determine what happened.....
     
  4. PE-Steve

    PE-Steve Guest

    0
     
    That's correct. Plesk does not automatically update your PHP version. The only time this can be done is if you used Plesk Updater, although Plesk still doesn't support PHP5, so it's out of the question. I can't imagine your server would automatically update your PHP version, either.
     
  5. dtb71

    dtb71 Guest

    0
     
    Well... this is very interesting and very disheartening

    Just got off the phone with aplus.net and they said it quite clearly that they've encountered MANY problems with dedicated server clients where Plesk performed updates that effect/modify binaries outside of Plesk. Recently it was php 5 with a version that doesn't support MySQL.

    They said that swsoft would deny it but they have the emails that show when plesk performs the updates and the binaries have changed after that point.

    Things that make you go HHhhmmmm

    Not sure where this is going to end up.

    But I need help rolling back to php 4 -- anyone got a good and easy method to do that??
     
  6. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    963
    Likes Received:
    32
    Location:
    Romania
    yesterday server was worked fine, php4, today (without any intervention) php-mysql not working and I have php5. I avoided to upgrade to php5 and now I have it :-((
    all is stopped working, cause php-mysql not loading.

    Failed loading extension_dir: extension_dir: cannot open shared object file: No such file or directory
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/dom.so' - /usr/lib/php4/dom.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/gd.so' - /usr/lib/php4/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/imap.so' - /usr/lib/php4/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/mbstring.so' - /usr/lib/php4/mbstring.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/mysqli.so' - /usr/lib/php4/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/pgsql.so' - /usr/lib/php4/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/sitebuilder.so' - /usr/lib/php4/sitebuilder.so: undefined symbol: zend_hash_add_or_update in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/xsl.so' - /usr/lib/php4/xsl.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: àäM: Unable to initialize module
    Module compiled with module API=20020429, debug=0, thread-safety=0
    PHP compiled with module API=20041030, debug=0, thread-safety=0
    These options need to match
    in Unknown on line 0
    PHP 5.0.4 (cli) (built: Jan 29 2006 21:59:47)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies

    THE SOLUTION
    I went into /usr/lib/php/ and copied to /usr/lib/php4/ all .so files what was missing.
    Is not the best way I know, now is working, but I need to test all sites to see how good it is :-(((((
     
  7. dtb71

    dtb71 Guest

    0
     
    Well, it looks like YUM is the one to blame here.... automatically updated php to version 5.0.4 - caused a nightmare!

    I am 95% sure of this... :confused:
     
  8. Arundel69

    Arundel69 Guest

    0
     
    Ivalics, I think that the only thing that needs to be changed is /etc/httpd/conf.d/php.conf.

    Aren't the *.so files modules for PHP4? Apparently, PHP5 comes with all (most?) of them bundled into modules/libphp5.so...
     
  9. dtb71

    dtb71 Guest

    0
     
    Arundel69 -

    Question for you on your suggestions for fixing php. I've read them again and not really sure -- had some questions:
    Can you please give me the complete shell line I'd use?
    Is that the precise shell script? "yum install php-mysql"
    again - that the precise shell script? "yum install httpd"?

    Thanks for your help!!
     
  10. Arundel69

    Arundel69 Guest

    0
     
    Sorry about that dtb71, I should have been more precise indeed.

    When I'm unsure about the exact package name, I do a

    rpm -qa | grep <partial package name>

    eg.

    rpm -qa | grep httpd

    That gives me (in my case, RH EL3)

    httpd-2.0.46-46.highfd.rhel3.art

    and then I can do a

    rpm -i httpd-2.0.46-46.highfd.rhel3.art

    if that fails:

    rpm -e --nodeps httpd-2.0.46-46.highfd.rhel3.art

    Do the same trick for php and php-mysql (in my case, I also had to deal with php-gd, php-pear, php-imap, and php-mbstring, since my users use these extensions to PHP and they needed proper upgrading as well).

    yum[/code] at least seems to be more patient with no exact names, ie.
    Code:
    yum install httpd
    yum install php-mysql
    
    should all work fine.

    Please note that you should set up yum according to http://www.atomicrocketturtle.com/ to make sure you have only Plesk-compatible packages. Sorry if I'm stating the obvious!
     
Loading...