Programming Tutorials

Building PHP with Apache2 on SuSE Professional 9.1/9.2

By: Dan Scott in PHP Tutorials on 2011-03-25  

  1. Install Apache2 and its development headers:

    • Use the package manager (YaST or zypper) to install the Apache2 web server and its development headers.
  2. Install the necessary dependencies:

    • Install the development headers for MySQL, Postgres, and any other databases you may be using with PHP.
    • Install the following packages: libpng-devel, libjpeg-devel, zlib-devel, libxml2-devel, openssl-devel, and gd-devel.
  3. Download the latest version of PHP for SuSE Professional 9.1/9.2:

    • Go to the official PHP website (https://www.php.net/downloads) and download the latest version of PHP for SuSE Professional 9.1/9.2.
    • Extract the downloaded file to a suitable directory.
  4. Configure PHP with Apache2 support:

    • Navigate to the extracted PHP directory and run the configure script by executing "./configure --with-apxs2=/usr/sbin/apxs2".
    • This will configure PHP to use the Apache2 web server installed on your system.
  5. Build and install PHP:

    • Run the "make" command to build PHP from source.
    • Once the build process is complete, run "make install" to install PHP on the system.
  6. Configure Apache2 to use PHP:

    • Open the Apache2 configuration file (/etc/httpd/httpd.conf) in a text editor.
    • Add the following lines to the end of the file:
      LoadModule php7_module /usr/lib64/apache2/mod_php7.so
      AddType application/x-httpd-php .php
      
    • Save and close the file.
  7. Restart Apache2: Restart Apache2 to ensure the changes take effect by running "rcapache2 restart" or "systemctl restart apache2.service".

That's it! You should now have PHP installed and configured with Apache2 on SuSE Professional 9.1/9.2.






Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in PHP )

Latest Articles (in PHP)