Solved

How do i find out using php if certain php functions are installed

Posted on 2008-06-25
3
195 Views
Last Modified: 2010-04-21
Hi

I'm writing a php program that I'm going to release as open source, I'm used to developing just for my company and have full access to the servers and configs so if anything is needed it simply gets installed.

In my code, is there any way I can check if certain extensions are running and advise the user if not? (such as php_xmlrpc.dll php_mysql.dll, )
0
Comment
Question by:NeilT
3 Comments
 
LVL 24

Accepted Solution

by:
glcummins earned 400 total points
ID: 21869578
You should use the function_exists() function to check:

if (function_exists('myFunction'))
{
   // Call myFunction
   $result = myFunction();
}
0
 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 100 total points
ID: 21869609
0
 
LVL 3

Author Closing Comment

by:NeilT
ID: 31470747
Superb, damn easy when you ask the gurus!
Neil
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now