SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Compiling PHP4

  1. #1
    SitePoint Wizard
    Join Date
    Apr 2000
    Posts
    1,483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've just got a Linux box running with SuSe 6 - appears to be working well.
    It comes as standard with Apache, Perl 5 and PHP 3 but I'd like to upgrade PHP3 to v4. So I downloaded the latest source from php.net and extracted all the files. The instructions say to run this command:
    $ gunzip -c php-4.0.x.tar.gz | tar xf -
    $ cd php-4.0.x
    $ ./configure --with-mysql --with-apxs
    $ make
    $ make install
    The first two commands run fine, but the ./configure line isn't working correctly. It outputs lots of stuff, ending with:
    configure: error: no acceptable cc found in $PATH
    I'm a complete Linux newbie so have no idea what it means/how to solve it
    Thanks in advance for your help
    I'm sure there will be quite a few of my Linux threads floating around over the next few weeks/months as I configure this server hope you can bear with me while I get it going.

    Thanks,

    James.

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2000
    Location
    Chico, Ca
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This what I did when I installed MySQL, apache1.3.14 and PHP

    MySql

    1. copy Mysql to /usr/local/
    2. go to the /usr/local/ directory
    3. gunzip mysql....
    4. tar -xvf mysql..
    5. cd mysql ...
    6. type ./scripts/mysql_install_db

    That is it for MySQL

    Apache

    1. download the lastest verions of apache.. I beleive it is 1.3.14.
    2. copy it to the /usr/local Directory
    3. gunzip it
    4. tar -xvf apache_1.3.14.tar
    5. cd apache directory
    6. ./configure --prefix=/usr/local/apache_1.3.12 --enable-module=so
    7. type make (and of course press enter)
    8. type make install
    9. after that you need to edit the httpd.conf file for the server address and the serveradmin e-mail address
    10. to start it type ./bin/apachectl start (from the apache directory)

    PHP

    1. download the latest verison of php which I beleive is php-4.0.4
    2. copy to the /usr/local directory
    3. gunzip php-4.0.4.tar.gz
    4. tar -xvf php-4.0.4.tar
    5. cd php-4.0.4
    6. type the following to build php4
    7. ./configure --with-mysql=/usr/local/mysql-3.22.32.pc.linux-gnu-i686/ --with-apxs=/usr/local/apache_1.3.14/bin/apxs
    8. type make (enter)
    9. type make install (enter)
    10. open httpd.conf in editor (I like to use vi) and find the section that say 'And for PhP 4.x. use :
    you will see some lines of code that have # in front of them, remove # for both lines, then on the top line insert .phtml infront of .php.

    That should be it !

    Note

    When I tried to install this on to Suse 6.x it said something like the C+ library was out of date .. and to please update it. So I went ahead and installed Suse 7.0 which had most of the current stuff. If you don't know this you can type in the first copy charactors of say a long file name or directory then it tab and it should fill the rest of the file name or directory in.
    The only draw back about this method is that I have yet to get apache to start up at bootup( if anyone out there is reading this and you know how let me know!) But since my server is always up .. and when it goes down I just log on and manually start it again. I never tried to update the C+ libraries because I had Suse 7.0 on disk I was just to lazy to upgrade. But if you want to upgrade the library I am sure that there are some How-to's on the net.

    Good Luck

    Chuck




  3. #3
    SitePoint Wizard
    Join Date
    Apr 2000
    Posts
    1,483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot for the help Chuckie
    I think I should really just get SuSe 7 as its been a pain all day trying to get the GCC libraries updated properly.
    But I'll certainly use your instructions when I manage to get suse 7 running
    Thanks again


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
  •