SlideShare uma empresa Scribd logo
1 de 5
Baixar para ler offline
How to install PHP on Linux | laffers.net                                                                    http://laffers.net/howtos/howto-install-php




            Laffers.net

            Home › Howtos

            How To Install PHP On Linux
            Sat, 04/07/2007 - 03:12 — Richard Laffers

            This tutorial explains the installation of PHP 5, bundled with Apache and MySQL server on a Linux machine. The tutorial
            was written primarily for SuSE 9.2, 9.3, 10.0 & 10.1, but most of the steps ought to be valid for all Linux-like operating
            systems.

            We will set up PHP as a shared module, being loaded into Apache2 dynamically during the server startup. These
            instructions are known to work for PHP versions: 5.0.4 through 5.2.1.

            Prerequisites
            At this point Apache web server must be installed. If you want MySQL support in PHP, MySQL server also must have been
            installed prior to the next steps.

            Download Source
            Get the source from http://www.php.net/downloads.php          . At the time of writing this tutorial the best available version
            was 5.2.1 ( php-5.2.1.tar.gz ).


            Unpack, Configure, Compile
            Go to the directory whith the downloaded file and enter:

                # tar -xzf php-5.2.1.tar.gz
                # cd php-5.2.1
                #         ./configure            --prefix=/usr/local/php              --with-apxs2=/usr/local/apache2/bin/apxs
                --with-mysql=/usr/local/mysql


            The configuration options ought to be self-explaining; --prefix specifies the location where PHP is to be installed,
            --with-apxs2 with correct path pointing to bin/apxs in the Apache installation directory is mandatory for the installator
            to work. Since PHP 5, you need to explicitly bundle PHP with MySQL by --with-mysql directive (make sure you specified
            path to where MySQL is installed on your system).
            There are many other options which turn on additional features. For all available configuration options and their default
            values type ./configure --help.


            Tip: If you are performing an upgrade, you may want to copy config.nice from the old PHP installation directory (if
            available) to where you unpacked the new PHP tarball file. Run ./config.nice instead of ./configure. This way all the
            previous configure options will be applied to the new installation effortlessly.

            Once you entered ./configure with all the options you need, compile and install the software:


                # make
                # make install


            Edit Httpd.conf
            All necessary changes to httpd.conf (Apache configuration file) should have already been made automatically during the
            installation, so usually you need not do anything. Nevertheless, check that following lines were added to the httpd.conf
            file:

                LoadModule php5_module modules/libphp5.so




1 από 5                                                                                                                               13/6/2007 4:57 μμ
How to install PHP on Linux | laffers.net                                                                        http://laffers.net/howtos/howto-install-php


                AddType application/x-httpd-php .php


            If not, add them manually.

            Create Php.ini File
            Importanly, you have to create a php.ini configuration file. Choose one of the pre-made files (preferably
            php.ini-recommended) residing inside the php-5.2.1/ directory (it's the folder to which the downloaded archive was
            extracted). Copy the file to the lib/ directory in the PHP installation directory.


                # cp php-5.2.1/php.ini-recommended /usr/local/php/lib/php.ini


            If you need to, edit the php.ini file:


                # vi /usr/local/php/lib/php.ini


            However, the default settings should work for everyone in most cases.

            Restart Apache Server
            After everything is set up, restart Apache:


                # /usr/local/bin/apachectl restart


            Further Reading
            PHP Manual

            Do you have an idea how to make these instructions better? Did you run into any problems or have any tips? You are
            welcome to share your experience in the comments.


             ‹ How to install Apache on Linux                                up

            Printer-friendly version         Add new comment                                            howto    linux   php    suse    tutorial



            Comments

            » Posted on Tue, 04/04/2006 - 13:37 — Virgil

            Thanks for the information ... Help me very much.


            reply



            » Posted on Fri, 05/05/2006 - 07:36 — Helen McCarthy

            This is great!! Thanks, a lot.


            Helen


            reply



            » Posted on Tue, 06/06/2006 - 00:49 — exkludge

            Bravo! This is a very good and valuable source of information... thank you!


            reply



            » Posted on Tue, 06/06/2006 - 03:36 — Hans

            I hv followed every steps from this how-to. I got mysql, apache and php installed. BUT, why my php script dosnt work? Even phpinfo()




2 από 5                                                                                                                                   13/6/2007 4:57 μμ
How to install PHP on Linux | laffers.net                                                                             http://laffers.net/howtos/howto-install-php


            shows nothing. Only html can be shown. :(


            reply



                 » Posted on Tue, 06/06/2006 - 07:59 — Richard Laffers

                 I would first make sure that .php extension is registered in your httpd.conf - you must have


                     LoadModule php5_module modules/libphp5.so
                     AddType application/x-httpd-php .php




                 somewhere in it. Also, check apache error log to see if any errors/warnings are generated during starting of the server.


                 reply



            » Posted on Tue, 06/06/2006 - 06:07 — PowerEdge

            This is very nice tut, but doesn't really help when you just want to upgrade your php 4.4 to 5.x ... as apache2 is by default in SUSE
            installed under /etc/apache2 and there is neither bin nor apxs folder ... same is for MySQL. Could you please address this issue for
            default SUSE installation paths for both Apache2 and MySQL servers .. thanks :)


            reply



                 » Posted 1 month ago — Richard Laffers

                 I'm afraid you will have to uninstall both PHP and Apache first (using YaST) to start from scratch. Then follow my MySQL, Apache
                 and PHP tutorials.


                 reply



            » Posted 6 days ago — Y2Beck

            A+ article for simple startups. I was having trouble all day installing the "Big 3" until I came across this article. Good documentation as
            well. PLEASE let us know if you are going to work on an advanced article focusing on optimalization and security for small, medium and
            big installs!!!


            reply



                 » Posted on Tue, 06/06/2006 - 21:52 — Richard Laffers

                 Thanks. I haven't much experience with server optimalization, however, I would recommend studying this:


                 http://httpd.apache.org/docs/2.2/misc/security_tips.html

                 http://httpd.apache.org/docs/2.2/misc/perf-tuning.html


                 Also, it is possible to specify 'Resource limits' in php.ini. MySQL distribution contains pre-made configuration files for
                 small/medium/large/huge servers. Hope this helps.


                 reply



            » Posted on Tue, 06/06/2006 - 08:05 — Petrov

            You, my friend, are a legend :) Thank you so much for helping make this task MUCH easier! This is the first time I've compiled from
            source rather than using RPM's and it actually worked! Cheers!


            reply




3 από 5                                                                                                                                          13/6/2007 4:57 μμ
How to install PHP on Linux | laffers.net                                                                          http://laffers.net/howtos/howto-install-php



            » Posted 11 months ago — Valter

            I'm totally new with Linux, but this is what I've got from php.net   :


            "MySQL is not enabled by default, nor is the MySQL library bundled with PHP. Read this FAQ for details on why. Use the
            --with-mysql[=DIR] configure option to include MySQL support. You can download headers and libraries fromMySQL."


            reply



            » Posted 9 months ago — DxJaK

            No problems with the installation , but when I want to open say http://localhost/hello.php   firefox & konqueror want to save the file.
            Have you got any suggestions??


            reply



                » Posted 9 months ago — Richard Laffers

                Make sure that the following line has been added in httpd.conf: AddType application/x-httpd-php .php


                reply



            » Posted 7 months ago — John

            Great instructions for all three apps (Apache, PHP, & MySql). All were successfully loaded up and running. I'm able to call PHP scripts
            fm my HTML files. However, passing variables fm HTML to PHP is unsuccessful. Any thoughts?


            reply



                » Posted 7 months ago — Anonymous

                The variables are passed to $_POST and $_GET superglobal arrays. Look for them in those.


                reply



            » Posted 6 months ago — Jason

            Thanks for the great tutorial. I've leased dedicated servers before, but recently set up my own suse home server, and woah, its a
            whole new ball game when you have to set everything up! Thanks for the concise instructions. Im relatively new to linux
            administration, but I found this guide very easy to follow. Have you thought about putting up a paypal donation button? :)


            reply



                » Posted 6 months ago — Richard Laffers

                I'm glad you find this guide useful. As for the donations, the real gratitude should be directed towards the MySQL, Apache and PHP
                developers. :-)


                reply



            » Posted 6 months ago — SteveMac

            For confirmation, I have just installed the three key apps onto SuSE 10.0. The versions used were: mySQL: 5.0.27 Apache: 2.2.3 PHP:
            5.2.0 Which proves that the tutorials still work with some later versions. (The only thing I needed to add was the curses/termcap for
            mySQL compilation, and the libxml2-devel for PHP compilation. This was done using the yast2 software management utility and the
            distribution CD. Thanks for all the help.




4 από 5                                                                                                                                      13/6/2007 4:57 μμ
How to install PHP on Linux | laffers.net                                                                        http://laffers.net/howtos/howto-install-php


            Steve


            reply



            » Posted 5 months ago — ieee488

            Any articles on how to add phpMyAdmin to the mix? MySQL, Apache2, and PHP5 are working, but I keep getting #2002 - The server is
            not responding (or the local MySQL server's socket is not correctly configured) which appears to be a common problem.


            reply


                                                   © 2005-2007 Richard Laffers. All rights reserved.




5 από 5                                                                                                                                  13/6/2007 4:57 μμ

Mais conteúdo relacionado

Mais procurados

Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Dana Luther
 
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_LeopardAdding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopardtutorialsruby
 
Converting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaConverting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaDana Luther
 
Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02Yazz Atlas
 
WE18_Performance_Up.ppt
WE18_Performance_Up.pptWE18_Performance_Up.ppt
WE18_Performance_Up.pptwebhostingguy
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning InfrastructurePerforce
 
Professional deployment
Professional deploymentProfessional deployment
Professional deploymentIvelina Dimova
 
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam QuestionsRed Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam QuestionsStudy Material
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh thingsMarcus Deglos
 

Mais procurados (18)

Ex407
Ex407Ex407
Ex407
 
Manual 5
Manual 5Manual 5
Manual 5
 
Appache.ppt
Appache.pptAppache.ppt
Appache.ppt
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]
 
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_LeopardAdding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
 
Debian packaging
Debian packagingDebian packaging
Debian packaging
 
BPMS1
BPMS1BPMS1
BPMS1
 
are available here
are available hereare available here
are available here
 
Converting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaConverting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - Cascadia
 
Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02
 
WE18_Performance_Up.ppt
WE18_Performance_Up.pptWE18_Performance_Up.ppt
WE18_Performance_Up.ppt
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure
 
Dev ops for developers
Dev ops for developersDev ops for developers
Dev ops for developers
 
Professional deployment
Professional deploymentProfessional deployment
Professional deployment
 
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam QuestionsRed Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
 
Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9
 
Apache
ApacheApache
Apache
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh things
 

Destaque (8)

Jeni J2 Me Bab11 Topik Topik Tambahan
Jeni J2 Me Bab11 Topik Topik TambahanJeni J2 Me Bab11 Topik Topik Tambahan
Jeni J2 Me Bab11 Topik Topik Tambahan
 
rubyonrails
rubyonrailsrubyonrails
rubyonrails
 
Sexism
SexismSexism
Sexism
 
Zaal 5 david terrar yes ive got
Zaal 5 david terrar yes ive gotZaal 5 david terrar yes ive got
Zaal 5 david terrar yes ive got
 
instaling
instalinginstaling
instaling
 
Perl%20SYLLABUS%20PB
Perl%20SYLLABUS%20PBPerl%20SYLLABUS%20PB
Perl%20SYLLABUS%20PB
 
11-DWR-and-JQuery
11-DWR-and-JQuery11-DWR-and-JQuery
11-DWR-and-JQuery
 
Tutorial
TutorialTutorial
Tutorial
 

Semelhante a How%20to%20install%20PHP%20on%20Linux%20_%20laffers

Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_ServerUpdating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Servertutorialsruby
 
Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_ServerUpdating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Servertutorialsruby
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />tutorialsruby
 
Php hypertext Preprocessor
Php hypertext PreprocessorPhp hypertext Preprocessor
Php hypertext PreprocessorMrsRLakshmiIT
 
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_LeopardAdding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopardtutorialsruby
 
Installation instruction of Testlink
Installation instruction of TestlinkInstallation instruction of Testlink
Installation instruction of Testlinkusha kannappan
 
2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida real2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida realPHP Conference Argentina
 
Create dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLCreate dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLkangaro10a
 
Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationWamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationChetan Soni
 
Php through the eyes of a hoster confoo
Php through the eyes of a hoster confooPhp through the eyes of a hoster confoo
Php through the eyes of a hoster confooCombell NV
 
Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13DanWooster1
 
Single node hadoop cluster installation
Single node hadoop cluster installation Single node hadoop cluster installation
Single node hadoop cluster installation Mahantesh Angadi
 

Semelhante a How%20to%20install%20PHP%20on%20Linux%20_%20laffers (20)

Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_ServerUpdating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Server
 
Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_ServerUpdating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Server
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
Php hypertext Preprocessor
Php hypertext PreprocessorPhp hypertext Preprocessor
Php hypertext Preprocessor
 
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_LeopardAdding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
 
Installation instruction of Testlink
Installation instruction of TestlinkInstallation instruction of Testlink
Installation instruction of Testlink
 
2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida real2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida real
 
Jones_Lamp_Tutorial
Jones_Lamp_TutorialJones_Lamp_Tutorial
Jones_Lamp_Tutorial
 
Create dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLCreate dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQL
 
Sahu
SahuSahu
Sahu
 
Php mysql-tutorial-en
Php mysql-tutorial-enPhp mysql-tutorial-en
Php mysql-tutorial-en
 
Lumen
LumenLumen
Lumen
 
Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationWamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and Configuration
 
Php ppt
Php pptPhp ppt
Php ppt
 
Phalcon - Giant Killer
Phalcon - Giant KillerPhalcon - Giant Killer
Phalcon - Giant Killer
 
Apache ssl
Apache ssl Apache ssl
Apache ssl
 
Php through the eyes of a hoster confoo
Php through the eyes of a hoster confooPhp through the eyes of a hoster confoo
Php through the eyes of a hoster confoo
 
Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13
 
Phalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil ConferencePhalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil Conference
 
Single node hadoop cluster installation
Single node hadoop cluster installation Single node hadoop cluster installation
Single node hadoop cluster installation
 

Mais de tutorialsruby

<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />tutorialsruby
 
TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>tutorialsruby
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>tutorialsruby
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />tutorialsruby
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />tutorialsruby
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 

Mais de tutorialsruby (20)

<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 

Último

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

How%20to%20install%20PHP%20on%20Linux%20_%20laffers

  • 1. How to install PHP on Linux | laffers.net http://laffers.net/howtos/howto-install-php Laffers.net Home › Howtos How To Install PHP On Linux Sat, 04/07/2007 - 03:12 — Richard Laffers This tutorial explains the installation of PHP 5, bundled with Apache and MySQL server on a Linux machine. The tutorial was written primarily for SuSE 9.2, 9.3, 10.0 & 10.1, but most of the steps ought to be valid for all Linux-like operating systems. We will set up PHP as a shared module, being loaded into Apache2 dynamically during the server startup. These instructions are known to work for PHP versions: 5.0.4 through 5.2.1. Prerequisites At this point Apache web server must be installed. If you want MySQL support in PHP, MySQL server also must have been installed prior to the next steps. Download Source Get the source from http://www.php.net/downloads.php . At the time of writing this tutorial the best available version was 5.2.1 ( php-5.2.1.tar.gz ). Unpack, Configure, Compile Go to the directory whith the downloaded file and enter: # tar -xzf php-5.2.1.tar.gz # cd php-5.2.1 # ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql The configuration options ought to be self-explaining; --prefix specifies the location where PHP is to be installed, --with-apxs2 with correct path pointing to bin/apxs in the Apache installation directory is mandatory for the installator to work. Since PHP 5, you need to explicitly bundle PHP with MySQL by --with-mysql directive (make sure you specified path to where MySQL is installed on your system). There are many other options which turn on additional features. For all available configuration options and their default values type ./configure --help. Tip: If you are performing an upgrade, you may want to copy config.nice from the old PHP installation directory (if available) to where you unpacked the new PHP tarball file. Run ./config.nice instead of ./configure. This way all the previous configure options will be applied to the new installation effortlessly. Once you entered ./configure with all the options you need, compile and install the software: # make # make install Edit Httpd.conf All necessary changes to httpd.conf (Apache configuration file) should have already been made automatically during the installation, so usually you need not do anything. Nevertheless, check that following lines were added to the httpd.conf file: LoadModule php5_module modules/libphp5.so 1 από 5 13/6/2007 4:57 μμ
  • 2. How to install PHP on Linux | laffers.net http://laffers.net/howtos/howto-install-php AddType application/x-httpd-php .php If not, add them manually. Create Php.ini File Importanly, you have to create a php.ini configuration file. Choose one of the pre-made files (preferably php.ini-recommended) residing inside the php-5.2.1/ directory (it's the folder to which the downloaded archive was extracted). Copy the file to the lib/ directory in the PHP installation directory. # cp php-5.2.1/php.ini-recommended /usr/local/php/lib/php.ini If you need to, edit the php.ini file: # vi /usr/local/php/lib/php.ini However, the default settings should work for everyone in most cases. Restart Apache Server After everything is set up, restart Apache: # /usr/local/bin/apachectl restart Further Reading PHP Manual Do you have an idea how to make these instructions better? Did you run into any problems or have any tips? You are welcome to share your experience in the comments. ‹ How to install Apache on Linux up Printer-friendly version Add new comment howto linux php suse tutorial Comments » Posted on Tue, 04/04/2006 - 13:37 — Virgil Thanks for the information ... Help me very much. reply » Posted on Fri, 05/05/2006 - 07:36 — Helen McCarthy This is great!! Thanks, a lot. Helen reply » Posted on Tue, 06/06/2006 - 00:49 — exkludge Bravo! This is a very good and valuable source of information... thank you! reply » Posted on Tue, 06/06/2006 - 03:36 — Hans I hv followed every steps from this how-to. I got mysql, apache and php installed. BUT, why my php script dosnt work? Even phpinfo() 2 από 5 13/6/2007 4:57 μμ
  • 3. How to install PHP on Linux | laffers.net http://laffers.net/howtos/howto-install-php shows nothing. Only html can be shown. :( reply » Posted on Tue, 06/06/2006 - 07:59 — Richard Laffers I would first make sure that .php extension is registered in your httpd.conf - you must have LoadModule php5_module modules/libphp5.so AddType application/x-httpd-php .php somewhere in it. Also, check apache error log to see if any errors/warnings are generated during starting of the server. reply » Posted on Tue, 06/06/2006 - 06:07 — PowerEdge This is very nice tut, but doesn't really help when you just want to upgrade your php 4.4 to 5.x ... as apache2 is by default in SUSE installed under /etc/apache2 and there is neither bin nor apxs folder ... same is for MySQL. Could you please address this issue for default SUSE installation paths for both Apache2 and MySQL servers .. thanks :) reply » Posted 1 month ago — Richard Laffers I'm afraid you will have to uninstall both PHP and Apache first (using YaST) to start from scratch. Then follow my MySQL, Apache and PHP tutorials. reply » Posted 6 days ago — Y2Beck A+ article for simple startups. I was having trouble all day installing the "Big 3" until I came across this article. Good documentation as well. PLEASE let us know if you are going to work on an advanced article focusing on optimalization and security for small, medium and big installs!!! reply » Posted on Tue, 06/06/2006 - 21:52 — Richard Laffers Thanks. I haven't much experience with server optimalization, however, I would recommend studying this: http://httpd.apache.org/docs/2.2/misc/security_tips.html http://httpd.apache.org/docs/2.2/misc/perf-tuning.html Also, it is possible to specify 'Resource limits' in php.ini. MySQL distribution contains pre-made configuration files for small/medium/large/huge servers. Hope this helps. reply » Posted on Tue, 06/06/2006 - 08:05 — Petrov You, my friend, are a legend :) Thank you so much for helping make this task MUCH easier! This is the first time I've compiled from source rather than using RPM's and it actually worked! Cheers! reply 3 από 5 13/6/2007 4:57 μμ
  • 4. How to install PHP on Linux | laffers.net http://laffers.net/howtos/howto-install-php » Posted 11 months ago — Valter I'm totally new with Linux, but this is what I've got from php.net : "MySQL is not enabled by default, nor is the MySQL library bundled with PHP. Read this FAQ for details on why. Use the --with-mysql[=DIR] configure option to include MySQL support. You can download headers and libraries fromMySQL." reply » Posted 9 months ago — DxJaK No problems with the installation , but when I want to open say http://localhost/hello.php firefox & konqueror want to save the file. Have you got any suggestions?? reply » Posted 9 months ago — Richard Laffers Make sure that the following line has been added in httpd.conf: AddType application/x-httpd-php .php reply » Posted 7 months ago — John Great instructions for all three apps (Apache, PHP, & MySql). All were successfully loaded up and running. I'm able to call PHP scripts fm my HTML files. However, passing variables fm HTML to PHP is unsuccessful. Any thoughts? reply » Posted 7 months ago — Anonymous The variables are passed to $_POST and $_GET superglobal arrays. Look for them in those. reply » Posted 6 months ago — Jason Thanks for the great tutorial. I've leased dedicated servers before, but recently set up my own suse home server, and woah, its a whole new ball game when you have to set everything up! Thanks for the concise instructions. Im relatively new to linux administration, but I found this guide very easy to follow. Have you thought about putting up a paypal donation button? :) reply » Posted 6 months ago — Richard Laffers I'm glad you find this guide useful. As for the donations, the real gratitude should be directed towards the MySQL, Apache and PHP developers. :-) reply » Posted 6 months ago — SteveMac For confirmation, I have just installed the three key apps onto SuSE 10.0. The versions used were: mySQL: 5.0.27 Apache: 2.2.3 PHP: 5.2.0 Which proves that the tutorials still work with some later versions. (The only thing I needed to add was the curses/termcap for mySQL compilation, and the libxml2-devel for PHP compilation. This was done using the yast2 software management utility and the distribution CD. Thanks for all the help. 4 από 5 13/6/2007 4:57 μμ
  • 5. How to install PHP on Linux | laffers.net http://laffers.net/howtos/howto-install-php Steve reply » Posted 5 months ago — ieee488 Any articles on how to add phpMyAdmin to the mix? MySQL, Apache2, and PHP5 are working, but I keep getting #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured) which appears to be a common problem. reply © 2005-2007 Richard Laffers. All rights reserved. 5 από 5 13/6/2007 4:57 μμ