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 )

PHP code to write to a CSV file from MySQL query

Different versions of PHP - History and evolution of PHP

PHP code to import from CSV file to MySQL

Encrypting files using GnuPG (GPG) via PHP

Send push notifications using Expo tokens in PHP

PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/php4/lib/php/extensions/no-debug ......

Decrypting files using GnuPG (GPG) via PHP

A Basic Example using PHP in AWS (Amazon Web Services)

Error: Length parameter must be greater than 0

Parent: child process exited with status 3221225477 -- Restarting

Password must include both numeric and alphabetic characters - Magento

Count occurrences of a character in a String in PHP

Convert a hex string into a 32-bit IEEE 754 float number in PHP

Reading word by word from a file in PHP

PHP file upload prompts authentication for anonymous users

Latest Articles (in PHP)