Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Upgrade Apache/PHP, install GD...

  1. #1
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default Upgrade Apache/PHP, install GD...

    Did you know you can upgrade/recompile the Apache daemon and PHP interpreter on your CPanel VPS all through a web interface? Sure, you can do the same thing from the command line by running /scripts/easyapache (as the root user), but if you don't have an SSH client application, or just don't want to use the command line...

    Log in to your WHM at https://your_servers_ip:2087/ and click on "Apache Update" under the "Software" heading in the menu.

    Do read the warning at the top of the page here:
    You can upgrade apache by using this interface. Just select the options you wish to include in the apache build and click the build button. The options checked below reflect the default options, and not the currently active ones. Dynamic modules that were previously compiled into apache will not be removed. If you wish to remove any apache module you should remove it from httpd.conf and restart apache. If you wish to compile apache with the default options just click the build button without making any changes. Do not check every box as some options are not compatible or require third party software to be installed. If you do not know what to check leave the defaults as they are or you will probably end up with a broken apache configuration that will not start up.

    If you have installed third party modules that are not listed below, you will probably need to recompile them after apache is rebuilt. You may experience an unusable apache that produces segmentation faults until the old modules are recompiled or removed.
    Before doing this, it's a good idea to make a backup of your server (or at least the /usr/local/apache/conf/httpd.conf file) in case the build fails. CPanel is pretty smart, and will restart the build with default configuration options if anything fails during your selected build. So if you choose some new options, and realize they weren't built, check your selections and remove any you're not sure you need/want and then rebuild.

    Keep in mind, if PHP fails to build for any reason, but apache still rebuilds, any php script served by this new apache will send the php script to the browser uninterpreted. This could be a security risk if you store passwords in your php scripts. It's also a good reason to keep passwords out of php scripts in the first place, put them in an include file outside of the web document root.

    Also, rebuilding apache/php takes time, memory, and cpu resources. Don't do this during a high traffic period, or right before you want to show a client your work.

    Fedora Core VPS administrators: If you want GD support in PHP, you must install xorg-x11-devel via yum or rpm before starting this build. It provides libXpm. See this thread.
    Last edited by Lyle@Spry; 01-27-2006 at 09:54 AM. Reason: Link to libXpm thread

  2. #2
    Junior Member Newbie
    Join Date
    Dec 2005
    Posts
    13

    Default

    When I take and do the above steps i get the following errors:

    Verifying archive integrity... All good.
    Uncompressing buildapache....................................... .................................................. .......................................
    Verifying compiler and libs....Verifying installation....retrygrab() failed for:
    http://mirrors.kernel.org/pub/fedora...rs/header.info
    Executing failover method
    failover: out of servers to try
    Error getting file http://mirrors.kernel.org/pub/fedora...rs/header.info
    [Errno 4] IOError: HTTP Error 404: Not Found
    Gathering header information file(s) from server(s)
    Server: Fedora Core 2 - i386 - Base
    Error - /var/cache/yum/base/header.info cannot be found
    Please run yum in non-caching mode to correct this header.
    Gathering header information file(s) from server(s)
    Server: Fedora Core 2 - i386 - Base
    Done
    Done
    ********************************
    This is buildapache version 10.8.1
    ********************************
    buildapache configured from Web Host Manager
    Apache configured from Web Host Manager!
    /etc/rc.d/init.d/httpd start: httpd started
    Setting /home permissions to 0711......Done

    Then it goes on to check for everything replies yes or no -- then it restards the httpd, but the GD Software is not able to be used.

    I'm really new with this whole VPS Cpanel setup. :/

  3. #3
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default Missing files

    Quote Originally Posted by moFBush
    Verifying compiler and libs....Verifying installation....retrygrab() failed for:
    http://mirrors.kernel.org/pub/fedora...rs/header.info
    Executing failover method
    failover: out of servers to try
    Error getting file http://mirrors.kernel.org/pub/fedora...rs/header.info
    [Errno 4] IOError: HTTP Error 404: Not Found
    Gathering header information file(s) from server(s)
    Server: Fedora Core 2 - i386 - Base
    Error - /var/cache/yum/base/header.info cannot be found
    Looks like mirrors.kernel.org does not have the files easyapache needs to get for this operation. I have personally tested the yum.conf entries tamlyn posted in Fedora Core 2 RPM repository. Update your /etc/yum.conf file to match the one given there and try this again.

  4. #4
    Junior Member Newbie
    Join Date
    Dec 2005
    Posts
    13

    Default

    Towards the end of the rebuild I get this..


    configure php-4.4.1...(--with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath --enable-calendar --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --enable-magic-quotes --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --enable-versioning --with-zlib).... . . . . . . . . . . . . . . . . . . . . Done

    configure: error: libXpm.(a|so) not found.

    make -j 4 php-4.4.1...(clean).... Done

    make -j 4 php-4.4.1....... Done

    make php-4.4.1...(install).... Done

    /etc/rc.d/init.d/httpd start: httpd started

    configure php-4.4.1...(--prefix=/usr --with-xml --enable-bcmath --enable-calendar --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --enable-magic-quotes --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --enable-versioning --with-zlib).... . . . . . . . . . . . . . . . Done

    configure: error: libXpm.(a|so) not found.


    Everything still works, well not GD though. :/

  5. #5
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default libXpm needed.

    Quote Originally Posted by moFBush
    libXpm.(a|so) not found.
    Hmmm, that means the libXpm development headers/library are not available, which GD needs.

    I see you've made a few posts on the cPanel forums... Great! Best place to find answers to these sorts of problems.

    In fact, this thread seems to have a similar problem. I think your server is using FC2, which should work with xorg-x11-devel.
    Last edited by Lyle@Spry; 12-31-2005 at 08:47 PM. Reason: Found proper package for FC2

  6. #6
    Junior Member Newbie
    Join Date
    Dec 2005
    Posts
    13

    Default

    root@web [~]# yum install gd-devel
    Gathering header information file(s) from server(s)
    Server: Fedora Core 2 - i386 - Base
    Server: Fedora Linux 2 - i386 - core
    Server: Dag RPM Repository for Fedora Core
    Server: Fedora Linux 2 - i386 - freshrpms
    Server: Fedora Linux 2 - i386 - updates
    Server: Fedora Core 2 - i386 - Released Updates
    Finding updated packages
    Downloading needed headers
    sitecopy-0-0.16.2-1.1.fc2 100% |=========================| 2.8 kB 00:00
    tnef-0-1.3.4-1.1.fc2.rf.i 100% |=========================| 1.8 kB 00:00
    miau-0-0.6.0.2-1.1.fc2.rf 100% |=========================| 2.4 kB 00:00
    Resolving dependencies
    ...Dependencies resolved
    I will do the following:
    [install: gd-devel 2.0.21-5.20.1.i386]
    I will install/upgrade these to satisfy the dependencies:
    [deps: gd 2.0.21-5.20.1.i386]
    [deps: xorg-x11-libs 6.7.0-14.i386]
    [deps: xorg-x11-Mesa-libGL 6.7.0-14.i386]
    [deps: xorg-x11-libs-data 6.7.0-14.i386]
    [deps: fontconfig 2.2.1-10.i386]
    Is this ok [y/N]: y
    Downloading Packages
    warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 4f2a6fd2
    Error: Could not find the GPG Key necessary to validate pkg /var/cache/yum/updates/packages/gd-2.0.21-5.20.1.i386.rpm
    Error: You may want to run yum clean or remove the file:
    /var/cache/yum/updates/packages/gd-2.0.21-5.20.1.i386.rpm
    Error: You may also check that you have the correct GPG keys installed

    root@web [~]#

    I'm using Fedora Core 2
    what do i do
    Last edited by moFBush; 01-01-2006 at 02:11 PM.

  7. #7
    Junior Member Newbie
    Join Date
    Dec 2005
    Posts
    13

    Default

    I fixed that error by doing:
    root@web [/]# rpm --import http://fedora.redhat.com/About/security/4F2A6FD2.txt

    Hopefully this will fix a lot of my problems.

    Thanks for your support Spry, specially Lyle.

  8. #8
    Junior Member Newbie
    Join Date
    Jan 2006
    Posts
    2

    Exclamation

    I am having the same error when attempting to load GD

    "configure: error: libXpm.(a|so) not found.
    make -j 4 php-4.4.1...(clean).... Done
    make -j 4 php-4.4.1....... Done
    make php-4.4.1...(install).... Done
    /etc/rc.d/init.d/httpd start: httpd started
    configure php-4.4.1...(--prefix=/usr --with-xml --enable-bcmath --enable-calendar --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --enable-magic-quotes --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --enable-versioning --with-zlib).... . . . . . . . . . . . . . . . Done
    configure: error: libXpm.(a|so) not found."

    Is there a simple fix.

  9. #9
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default See linked thread...

    Quote Originally Posted by Lyle@Spry
    Fedora Core VPS administrators: If you want GD support in PHP, you must install xorg-x11-devel via yum or rpm before starting this build. It provides libXpm. See this thread.
    The linked thread talks about this error.

  10. #10
    Member Newbie tamlyn's Avatar
    Join Date
    Aug 2005
    Location
    Manchester, UK
    Posts
    67

    Default

    It recompiled php OK but apache is still v1.3.33 and not v1.3.34. There were a couple of errors in the build:


    <...snip...>
    configure apache_1.3.34...(--enable-module=ssl --enable-module=expires --enable-shared=expires --add-module=../mod_frontpage.c --enable-module=rewrite --enable-shared=rewrite --enable-suexec --suexec-logfile=/usr/local/apache/logs/suexec_log --suexec-caller=nobody --suexec-uidmin=100 --suexec-gidmin=100 --suexec-docroot=/ --suexec-userdir=public_html).... . . . . . . . . . . Done

    make -j 4 apache_1.3.34....... . . . . . . . . . . . . . . . . Done

    make[2]: *** [target_static] Error 1
    make[1]: *** [build-std] Error 2
    make: *** [build] Error 2


    make apache_1.3.34...(install).... Done

    make[3]: *** [target_static] Error 1
    make[2]: *** [build-std] Error 2
    make[1]: *** [build] Error 2
    make: *** [install-all] Error 2

    /etc/rc.d/init.d/httpd start: httpd started
    <...snip...>



    just using default options for apache (ticked GD for php but php compiled fine). I tried building again with 'verbose' on but that time it didn't give any error messages (although it still doesn't appear to have upgraded apache). What's going on!

    If I ignore the whm thing and just compile apache from the command line will that confuse cpanel on the next upgrade?
    "They think they've tricked you. And then they have."

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •