473,387 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Check php config from Linux command line?

Hi All,

Is there any way to check the setup of a php install (in particular, the
installed extensions, eg mbstring) from the Linux command-line ie *without*
using a phpinfo page?

If it makes any difference, I'd like to do this on both Fedora and Gentoo.

TIA,

JON


Jan 9 '06 #1
7 4287
Jon Maz wrote:
Hi All,

Is there any way to check the setup of a php install (in particular, the
installed extensions, eg mbstring) from the Linux command-line ie *without*
using a phpinfo page?

If it makes any difference, I'd like to do this on both Fedora and Gentoo.


$ php -m
[PHP Modules]
bcmath
bz2
calendar
....

Hope this helps.

-- David

Jan 9 '06 #2
Hi David,

That's great! What other switches are available, do you know?

Cheers,

J
Jan 9 '06 #3
I think I just answered my own question. There's a whole list here:

http://www.usphp.com/features.commandline.html

J
Jan 9 '06 #4
Jon Maz wrote:
Hi David,

That's great! What other switches are available, do you know?


ever tried: php -h
or: man php
Jan 9 '06 #5
I did try man php, actually - doesn't work! And I eventually found php -h
along with all the other switches at the url I posted previously:
http://www.usphp.com/features.commandline.html

;-)

J
Jan 9 '06 #6
Errr... echo "<?phpinfo()?>" | /usr/local/bin/php ?

Jan 10 '06 #7
Yup, that works too!

;-)
Jan 10 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Arne Lund | last post by:
I've to read variables out of a config-file, that is stored on a Linux-machine. When I connect to the server with puTTY, I can execute the config with: .. /usr/local/webspace/config then I can...
2
by: Andrew Pasetti | last post by:
Hello, Executing phpinfo() from the command line and on the browser reveal that the CLI and Apache API have different config statements. How would I resolve this? I would like the CLI API to...
1
by: me | last post by:
I have been looking online for a year, and cant find one. I used to use the int86() command in dos command-line mode, but it can't work in linux. I am using Allegro to make my program work, but I...
383
by: John Bailo | last post by:
The war of the OSes was won a long time ago. Unix has always been, and will continue to be, the Server OS in the form of Linux. Microsoft struggled mightily to win that battle -- creating a...
3
by: Frank Rizzo | last post by:
How can I force an .EXE to use a different app.config file? For instance, I have an MyApp.exe which by default uses MyApp.exe.config file. Can I force it to use ThatApp.exe.config? Thanks
2
by: PMac | last post by:
I'm trying to execute a stand-alone console application from an aspx page when a use clicks a button on that page. On the aspx page is the following lines of pertinent code: private void...
4
by: Ignoramus6539 | last post by:
There were some strange requests to my server asking for config.php file (which I do not have in the requested location). I did some investigation. Seems to be a virus written in perl,...
4
by: peter | last post by:
I've come across a weird difference between the behaviour of the Tkinter checkbox in Windows and Linux. The issue became apparent in some code I wrote to display an image in a fixed size canvas...
4
by: interec | last post by:
Hi Folks, I am writing a c++ program on redhat linux using main(int argc, wchar_t *argv). $LANG on console is set to "en_US.UTF-8". g++ compiler version is 3.4.6. Q1. what is the encoding of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.