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

Need to recompile PHP

Discussion in 'Plesk for Linux - 8.x and Older' started by Matthias321, Mar 18, 2006.

  1. Matthias321

    Matthias321 Guest

    0
     
    My system: Suse Linux, Plesk 7.5.4

    Hi everybody!

    Unfortunately I need to recompile my PHP Version 4.3.10 on my server in order to enable sockets.

    Can someone pls help me how to deal with this most elegant, since I'm not so familiar with Linux. I'm affraid to do something wrong and that my server (-software) will not work properly after this.

    From my understanding there could be one folder on the HDD of my server, containing the PHP-installation-files and I need to recompile it with "enable-sockets".

    Pls kindly help as my community is already shouting for a chat-module that I offered on my previous server and that I can't get to work, because of no socket-support of this new server.

    Best regards

    Matthias
     
  2. bleed2002

    bleed2002 Guest

    0
     
    i would recommand you upgrading php through the packing system of your distribution rather than compiling it yourself.

    if you are on reddhat or fedora try art rpms from http://atomicrocketturtle.com. there you will get plesk compatible rpms.

    best regards,
    patrick
     
  3. Matthias321

    Matthias321 Guest

    0
     
    Hi Pattrick,

    thanks for your link.

    I have compiled and installed PHP 4.4.2 with the same configure-statements which are in running now (with 4.3.10 - version) plus '--enable-sockets' and restarted the server, but nothing changed when I open my phpinfo()-file it still shows 4.3.10 with no "sockets"-support.

    Does anyone has an idea why it's not loading my "new" 4.4.2.?

    Kind regards from Munich

    Matthias

    P.S. I have Suse Linux on my server
     
  4. bleed2002

    bleed2002 Guest

    0
     
    how did you compile php excatly?
    ./configure [configure options here]
    make
    make install (this line actually copies the files in the right directories, given via configure options)

    what does the command line binary say (php -v)?

    the apache-php4-module is usually named libphp4.so, try to locate it via:
    locate libphp4.so (be sure to run the command 'updatedb' before). If you find more than one libphp4.so files, replace the original by the newly compiled one..

    cheers,

    patrick
     
  5. Matthias321

    Matthias321 Guest

    0
     
    './configure' '--prefix=/usr' '--datadir=/usr/share/php' '--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib' '--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' '--disable-debug' '--enable-inline-optimization' '--enable-memory-limit' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild' '--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli' '--without-pear' '--with-openssl' 'i586-suse-linux' '--enable-sockets'

    I had to delete '--with-apxs2=/usr/sbin/apxs2-prefork' from this configure string in order to get no error message :(

    That's what I did and installed and installed and at the end there were no error messages. Then I rebooted the whole machine.

    PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php/extensions/socket.so' - /usr/lib/php/extensions/socket.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP 4.4.2 (cgi) (built: Mar 29 2006 22:35:48)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

    I think I better have to check for this socket.so mentioned before, what do you think?

    Actually I'm lost now :(

    Best regards

    Matthias
     
  6. Matthias321

    Matthias321 Guest

    0
     
    Just read the error-message again

    I don't want it to be running as CGI anyway?!

    Strange!

    Cheers

    Matthias
     
  7. bleed2002

    bleed2002 Guest

    0
     
    What does 'locate socket.so' give you?
    Once you found it, copy it to /usr/lib/php/extensions/ (what seems to be your php-extension folder).

    But anyway, I would consider that you rebuild your php, since you disabled CLI through the configure option --disable-cli (what is bad if you use php from the command line) and you definitely should compile it with apxs support (you'll need the apache2-devel package to do so).

    cheers,
    patrick

    p.s.: just read your configure statement again. you should change the following statements too, since you most probably want these features:
    '--enable-safe-mode' (drop that, use open_basedir instead)
    '--disable-session' (drop that)
    '--without-mysql' (really no mysql support?)
    '--disable-cli' (use --disable-cgi instead)
    '--without-pear' (drop that)
     
  8. Matthias321

    Matthias321 Guest

    0
     
    There is none?! Honestly I don't get this: I did started compilation with '--enable-sockets' - no error message did appear but no 'socket.so' was created.

    I tried this through Yast but it's not available it's says. Should explain that this server we are talking abt is a pre-installed root-server. So for some reason they didn't put it on and I don't know where to get this apache2-devel-package from separately (I have Suse Linux 9.3 Professional distribution installed on this server).

    You are perfectly right, I'd better turn this on, since I need MySQL-Support! Thanks for your attention!!!

    I made my mind about this situation and I was close to re-install the whole server from scratch with Suse Linux 9.3 on it with nothing more. Then I thought about the whole Email-Setup, etc. which would be difficult to setup and maintain for a newbie like me.

    I really love this Plesk Interface still, as need to get familiar with Linux before I can dive into systems depth.

    For now I'm really stranded, as I don't know where to start. Again what I don't understand is that it didn't compile a sockets.so, when compiling PHP, eventhough it didn't worked out because of Plesk didn't (allow to) load/change the correct ini or config-file, but at least there should be this sockets.so file somewhere.

    Cheers

    Matthias
     
  9. bleed2002

    bleed2002 Guest

    0
     
    maybe its easier if you call in my office on monday. I'm located in munich as well. see http://iolab.de for contact details..

    cheers,

    patrick
     
Loading...