Solved

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

Posted on 2008-06-25
3
203 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:Neil Thompson
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:Neil Thompson
ID: 31470747
Superb, damn easy when you ask the gurus!
Neil
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

803 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