Solved

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

Posted on 2008-10-18
5
247 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
[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
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

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.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

690 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