how to install php in solaris 111 min read

We need your support!!
Other Amount:
techrunnr.com:
24-Hour Flash Sale. Courses from just ₹ 490.
Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me

How to install php in solaris 11.

Hi All, Today we will show you how to install php in solaris 11.

PHP: Hypertext Preprocessor is a server-side scripting language designed for Web development, but also used as a general-purpose programming language

Solaris is a Unix operating system originally developed by Sun Microsystems. It superseded their earlier SunOS in 1993. In 2010, after the Sun acquisition by Oracle, it was renamed Oracle Solaris

php

Prerequisites

 

Installing PHP

1: Locate the file php 5.x.x.tar.gz which you just download earlier
unzip the downloaded tar.gz file

tar -zxvf php-5.x.x.tar.gz

2: change directory to the newly unzip file

cd php-5.x.x
configure PHP
./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-gd –with-zlib –disable-ipv6 –with-jpeg-dir=/usr –with-png-dir=/usr –with-freetype-dir=/usr –with-pear –with-openssl

 

gmake
gmake install

3: Enabling PHP on Apache

vi /usr/local/apache2/conf/httpd.conf

locate LoadModule php5-module modules/libphp5.so and Add the following below

AddHandler php5-script php
AddType application/x-httpd-php .php

4: locate DirectoryIndex and Add index.php

DirectoryIndex index.html index.php

5:  save all changes by pressing “esc : wq!” without “”

Once you completed all the previous steps test the php is working or not

/usr/local/apache2/bin/apachectl start

echo “<?php phpinfo (); ?>” > /usr/local/apache2/htdocs/test.php

2. open internet browser and goto http://localhost/test.php

You should be able to see PHP status result

3. stop apache

/usr/local/apache2/bin/apachectl stop

We need your support!!
Other Amount:
techrunnr.com:
#1
#2
#3
Questions Answered
Articles Written
Overall Points

Prabhin Prabharkaran

He is Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!!

You may also like...

1 Response

  1. Greg Land says:

    FWIW, I finally got a good build of php 7.2.14 on Solaris 11.3.36.7.0 (SPARC) with ‘./configure –enable-libgcc –without-pcre-jit …’ Sloppy workaround for 2 year old bug that may never get fixed: https://bugs.php.net/bug.php?id=73880.

Leave a Reply