Solved

PHP..how'd I find it where its installed on CENTOS

Posted on 2008-10-18
5
226 Views
Last Modified: 2013-12-13
I am looking for php.ini and its CENTOS but I couldn't seem to find it. Is it any command in linux that will tell you where the file is located at. I thought grep could do it, but really don't know the syntax for that
0
Comment
Question by:syedasimmeesaq
5 Comments
 

Accepted Solution

by:
raphael_999 earned 250 total points
ID: 22749873
just do :
locate php.ini

if it doesn't find anything you could try to do:
updatedb

then redo:
locate php.ini
0
 
LVL 5

Expert Comment

by:ifreq
ID: 22749981
Good article about finding files in linux (basic) :

http://www.secguru.com/article/quick_tips_find_files_linux_file_system

0
 
LVL 23

Expert Comment

by:Mysidia
ID: 22750374
In CentOS  it's normally   /etc/php/php.ini


rpm -ql php    <-- to see a list of files that the PHP package installed
i.e.  rpm -ql php |fgrep php.ini

find / -xdev -name php.ini

To search the root filesystem for php.ini

0
 
LVL 23

Assisted Solution

by:Mysidia
Mysidia earned 150 total points
ID: 22750395
Err..   it's normally  /etc/php.ini

On CentOS PHP packages there is also a  /etc/php.d  directory
that contains INI files for extension modules that might be installed

I.E.

[root@cacti-3 ~]# ls /etc/php.d
imap.ini  ldap.ini  mysql.ini  odbc.ini  pgsql.ini  rrdtool.ini  snmp.ini
0
 
LVL 8

Assisted Solution

by:MrJemson
MrJemson earned 100 total points
ID: 22755215
The grep syntax you were referring to is:

find / | grep php.ini
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to count occurrences of each item in an array.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

770 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