Goutham
asked on
how to check installed php54 and its modules enabled in linux
Dear Experts:
Have installed php54 would like to check is the installed php54 is working perfectly, how to check also installed many modules packages, earlier in older version if execute php -m I could see the installed modules but now when execute php -m command not found.
please let me know
1. how to check also is it required to set the path for php54 to work on rhel6 , if yes how to set the same please
2. how to check the installed php modules /extensions for example is mbstring loaded
thanks in advance
Have installed php54 would like to check is the installed php54 is working perfectly, how to check also installed many modules packages, earlier in older version if execute php -m I could see the installed modules but now when execute php -m command not found.
please let me know
1. how to check also is it required to set the path for php54 to work on rhel6 , if yes how to set the same please
2. how to check the installed php modules /extensions for example is mbstring loaded
thanks in advance
ASKER
thanks for the reply, php54 is installed in /opt/rh/php54/root/usr/bin
pwd
/opt/rh/php54/root/usr/bin
[root@crm1 bin]# ls -la
total 7892
dr-xr-xr-x 2 root root 4096 Dec 17 06:40 .
drwxr-xr-x 13 root root 4096 Dec 17 06:40 ..
-rwxr-xr-x 1 root root 390 Feb 4 2014 pear
-rwxr-xr-x 1 root root 417 Feb 4 2014 peardev
-rwxr-xr-x 1 root root 305 Feb 4 2014 pecl
lrwxrwxrwx 1 root root 9 Dec 17 06:40 phar -> phar.phar
-rwxr-xr-x 1 root root 0 Dec 17 11:27 phar.phar
-rwxr-xr-x 1 root root 4026848 Oct 23 14:36 php
-rwxr-xr-x 1 root root 4010048 Oct 23 14:36 php-cgi
-rwxr-xr-x 1 root root 4979 Oct 23 14:36 php-config
-rwxr-xr-x 1 root root 4864 Oct 23 14:36 phpize
-------------------------- ----------
please suggest will the below work
EXPORT $PATH=$PATH:/opt/rh/php54/ root/usr/b in/
if incorrect please suggest correct o
pwd
/opt/rh/php54/root/usr/bin
[root@crm1 bin]# ls -la
total 7892
dr-xr-xr-x 2 root root 4096 Dec 17 06:40 .
drwxr-xr-x 13 root root 4096 Dec 17 06:40 ..
-rwxr-xr-x 1 root root 390 Feb 4 2014 pear
-rwxr-xr-x 1 root root 417 Feb 4 2014 peardev
-rwxr-xr-x 1 root root 305 Feb 4 2014 pecl
lrwxrwxrwx 1 root root 9 Dec 17 06:40 phar -> phar.phar
-rwxr-xr-x 1 root root 0 Dec 17 11:27 phar.phar
-rwxr-xr-x 1 root root 4026848 Oct 23 14:36 php
-rwxr-xr-x 1 root root 4010048 Oct 23 14:36 php-cgi
-rwxr-xr-x 1 root root 4979 Oct 23 14:36 php-config
-rwxr-xr-x 1 root root 4864 Oct 23 14:36 phpize
--------------------------
please suggest will the below work
EXPORT $PATH=$PATH:/opt/rh/php54/
if incorrect please suggest correct o
it should be ok. just do it, try if php works from any location then.
ASKER
did set the path as below
export PATH=$PATH:/opt/rh/php54/r oot/usr/bi n/
later when executed php it stops there,
[root@crm1 ~]# php
------------------------
below installed packages but php not working please suggest to resolve this
Installed Packages
php54.x86_64 1.1-5.el6 @rhel-server-rhscl-6-rpms
php54-apc-panel.noarch 3.1.15-0.4.20130912.el6 @rhel-server-rhscl-6-rpms
php54-php.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-bcmath.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-cli.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-common.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-dba.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-debuginfo.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-debug -rpms
php54-php-devel.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-enchant.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-fpm.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-gd.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-imap.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-intl.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-ldap.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-mbstring.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-mysqlnd.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-odbc.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-pdo.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-pear.noarch 1:1.9.4-10.el6 @rhel-server-rhscl-6-rpms
php54-php-pecl-apc.x86_64 3.1.15-0.4.20130912.el6 @rhel-server-rhscl-6-rpms
php54-php-pecl-apc-debugin fo.x86_64 3.1.15-0.4.20130912.el6 @rhel-server-rhscl-6-debug -rpms
php54-php-pecl-apc-devel.x 86_64 3.1.15-0.4.20130912.el6 @rhel-server-rhscl-6-rpms
php54-php-pecl-memcache.x8 6_64 3.0.8-3.el6 @rhel-server-rhscl-6-rpms
php54-php-pecl-memcache-de buginfo.x8 6_64 3.0.8-3.el6 @rhel-server-rhscl-6-debug -rpms
php54-php-pecl-zendopcache .x86_64 7.0.2-4.el6 @rhel-server-rhscl-6-rpms
php54-php-pecl-zendopcache -debuginfo .x86_64 7.0.2-4.el6 @rhel-server-rhscl-6-debug -rpms
php54-php-pgsql.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-process.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-pspell.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-recode.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-snmp.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-soap.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-tidy.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-xml.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-xmlrpc.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-runtime.x86_64 1.1-5.el6 @rhel-server-rhscl-6-rpms
php54-scldevel.x86_64
export PATH=$PATH:/opt/rh/php54/r
later when executed php it stops there,
[root@crm1 ~]# php
------------------------
below installed packages but php not working please suggest to resolve this
Installed Packages
php54.x86_64 1.1-5.el6 @rhel-server-rhscl-6-rpms
php54-apc-panel.noarch 3.1.15-0.4.20130912.el6 @rhel-server-rhscl-6-rpms
php54-php.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-bcmath.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-cli.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-common.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-dba.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-debuginfo.x86_64
php54-php-devel.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-enchant.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-fpm.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-gd.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-imap.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-intl.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-ldap.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-mbstring.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-mysqlnd.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-odbc.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-pdo.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-pear.noarch 1:1.9.4-10.el6 @rhel-server-rhscl-6-rpms
php54-php-pecl-apc.x86_64 3.1.15-0.4.20130912.el6 @rhel-server-rhscl-6-rpms
php54-php-pecl-apc-debugin
php54-php-pecl-apc-devel.x
php54-php-pecl-memcache.x8
php54-php-pecl-memcache-de
php54-php-pecl-zendopcache
php54-php-pecl-zendopcache
php54-php-pgsql.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-process.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-pspell.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-recode.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-snmp.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-soap.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-tidy.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-xml.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-php-xmlrpc.x86_64 5.4.16-22.el6 @rhel-server-rhscl-6-rpms
php54-runtime.x86_64 1.1-5.el6 @rhel-server-rhscl-6-rpms
php54-scldevel.x86_64
it's working! response as expected, what you see is a php interpreter.
try to do php -m., you'll see list of php modules installed.
try to do php -m., you'll see list of php modules installed.
ASKER
Hi sir, thanks for the reply, I was eagerly waiting for your response , below response from sugar support team, can you please suggest
I was able to determine that the web root being used by apache is :
/opt/rh/httpd24/root/var/w ww/html/
as indicated at:
/opt/rh/httpd24/root/etc/h ttpd/conf/ httpd.conf
I created a directory "test" with one script inside "test.php", which has the simple code:
<?php
echo "Testing.";
I then set the permissions for the test directory and its contents to 777 and ran chmod to set the owner and group to 'apache'.
I then went to :
http://182.72.97.91/test/
and got back the same 'Forbidden' message. I then tried:
http://182.72.97.91/test/test.php
which output the raw contents of the test script rather than running the code. Based on this, I then went to:
http://182.72.97.91/sugarcrm/install.php
which also returned the raw contents of that script.
This would indicate that this an issue with apache and it's configuration, not with Sugar, as any requests to directories in the web root return a 'Forbidden' response, while requests to php scripts are returned as flat files, not executed. The serving of php scripts as plain text could also indicate that php isn't installed correctly.
I was able to determine that the web root being used by apache is :
/opt/rh/httpd24/root/var/w
as indicated at:
/opt/rh/httpd24/root/etc/h
I created a directory "test" with one script inside "test.php", which has the simple code:
<?php
echo "Testing.";
I then set the permissions for the test directory and its contents to 777 and ran chmod to set the owner and group to 'apache'.
I then went to :
http://182.72.97.91/test/
and got back the same 'Forbidden' message. I then tried:
http://182.72.97.91/test/test.php
which output the raw contents of the test script rather than running the code. Based on this, I then went to:
http://182.72.97.91/sugarcrm/install.php
which also returned the raw contents of that script.
This would indicate that this an issue with apache and it's configuration, not with Sugar, as any requests to directories in the web root return a 'Forbidden' response, while requests to php scripts are returned as flat files, not executed. The serving of php scripts as plain text could also indicate that php isn't installed correctly.
it seems you have installed php, but did not configure apache to use it
please follow steps described here:
http://php.net/manual/en/install.unix.apache2.php
please follow steps described here:
http://php.net/manual/en/install.unix.apache2.php
ASKER
Hi sir, thanks looks near by to resolve, httpd.cof as like the below, not able to locate the
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
LoadModule php5_module /usr/lib64/httpd/modules/l ibphp54-ph p5.so
#
Include conf.modules.d/*.conf
this is given an error when restart the httpd , can you please suggest how to loadmodule should be ,
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
LoadModule php5_module /usr/lib64/httpd/modules/l
#
Include conf.modules.d/*.conf
this is given an error when restart the httpd , can you please suggest how to loadmodule should be ,
What is this ?
Include conf.modules.d/*.conf
I guess this causes the error
Include conf.modules.d/*.conf
I guess this causes the error
ASKER
Hi sir, did comment but still the below error
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/h ttpd/conf/ httpd.conf : Cannot load /usr/lib64/httpd/modules/l ibphp54-ph p5.so into server: /usr/lib64/httpd/modules/l ibphp54-ph p5.so: undefined symbol: unixd_config
[FAILED]
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/h
[FAILED]
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To do it just for the current session do
EXPORT $PATH=$PATH:<your php54 path>
To check modules, go to php's install dir and use
php -m - as you mentioned, only you need to be either in php's install path or add it to the PATH beforehand.