Solved

how to check installed php54 and its modules enabled in linux

Posted on 2014-12-17
12
356 Views
Last Modified: 2014-12-27
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
0
Comment
Question by:D_wathi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
12 Comments
 
LVL 11

Expert Comment

by:Radek Baranowski
ID: 40504356
You should know where the php54 has been installed, so just add it to the .bashrc or whatever shell's you are using default profile PATH
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.
0
 

Author Comment

by:D_wathi
ID: 40504501
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/bin/

if incorrect please suggest correct o
0
 
LVL 11

Expert Comment

by:Radek Baranowski
ID: 40504532
it should be ok. just do it, try if php works from any location then.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:D_wathi
ID: 40504553
did set the path as below
export PATH=$PATH:/opt/rh/php54/root/usr/bin/

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-debuginfo.x86_64                                           3.1.15-0.4.20130912.el6                                    @rhel-server-rhscl-6-debug-rpms
php54-php-pecl-apc-devel.x86_64                                               3.1.15-0.4.20130912.el6                                    @rhel-server-rhscl-6-rpms
php54-php-pecl-memcache.x86_64                                                3.0.8-3.el6                                                @rhel-server-rhscl-6-rpms
php54-php-pecl-memcache-debuginfo.x86_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
0
 
LVL 11

Expert Comment

by:Radek Baranowski
ID: 40506523
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.
0
 

Author Comment

by:D_wathi
ID: 40506531
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/www/html/

as indicated at:

/opt/rh/httpd24/root/etc/httpd/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.
0
 
LVL 11

Expert Comment

by:Radek Baranowski
ID: 40506540
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
0
 

Author Comment

by:D_wathi
ID: 40506573
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/libphp54-php5.so
#
Include conf.modules.d/*.conf

this is given an error when restart the httpd , can you please suggest how to loadmodule should be ,
0
 
LVL 11

Expert Comment

by:Radek Baranowski
ID: 40506580
What is this ?

Include conf.modules.d/*.conf

I guess this causes the error
0
 

Author Comment

by:D_wathi
ID: 40506589
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/httpd/conf/httpd.conf: Cannot load /usr/lib64/httpd/modules/libphp54-php5.so into server: /usr/lib64/httpd/modules/libphp54-php5.so: undefined symbol: unixd_config
                                                           [FAILED]
0
 

Author Comment

by:D_wathi
ID: 40506593
0
 
LVL 11

Accepted Solution

by:
Radek Baranowski earned 500 total points
ID: 40506608
it sounds like there's something wrong with php version you installed against apache version you are using.

google search points to wrong version of API being attempted to be used.

unfortunately I can't help you with that, maybe other experts can
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ifconfig related commands 6 25
Sleep one hour while in loop 4 44
sitemap.xml 3 32
Parsing RSyslog entries 5 10
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question