Announcement

Collapse
No announcement yet.

PHP install

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    PHP install

    My dist comes with php5.0.5 but the software I am trying to install tells me it wont work on anything below 5.1.x, I have downloaded the 5.1.6 software but don't know how to install it, please help
    0
    1
    0%
    0
    12
    0%
    0

    #2
    Re: PHP install

    Hi,

    First you need to install build-essential (by adept, apt-get, aptitude or something else of your choice).
    then follow the instructions in the INSTALL file. Last time I did it, it was something like this :
    - sudo -i (to be root)
    - uncompress the file in a place of your choice and go there
    - ./configure --prefix=<place where you want it to be installed> --with-apxs2=<path_to_apache2_apxs_dir>
    - make
    - make install

    Then it should work. If you want to follow a full howto, you can do it following to this link :
    http://www.hostlibrary.com/installin...l_php_on_linux

    Good luck

    Comment


      #3
      Re: PHP install

      Thanks for the advice, but when I type ./configure ...... I get
      configure error: error: cannot find output from lex; giving up

      Please let me know your thoughts on this.

      Comment


        #4
        Re: PHP install

        On php website you should read the prerequisite for install (usually there's few like "flex" which is missing you now)
        to install it :
        sudo apt-get install flex

        Hope it helps

        Comment


          #5
          Re: PHP install

          Thanks I sussed it out, however...

          I have managed to compile php, I also updated from breezy to dapper.
          everything seems fine, BUT

          php still doesn't work I have a test.php file which contains
          <?php phpinfo(); ?>
          but thats what is displayed in the browser instead of the php info!

          if i do dpkg -l ¦ grep php it does not list php mod and the php stuff that is in there is not 5.2.0 which is the version I compiled and made

          thanks for the advice so far

          Comment


            #6
            Re: PHP install

            Hi,

            After compiling it correctly with the good apxs2, it will installed a library in the apache2 directory. Then in apache conf, you should activate it, it's somewhere in the file httpd.conf (I don't remember where exactly I guess it should be in /etc/apache2/conf) then activate this module, look in the documentation in php, it's something like LoadModule .....)

            Then restart apache, /etc/init.d/httpd restart

            It should work.

            Hope it helps.

            Comment

            Working...
            X