PHP Module Issue

Posted on 2011-10-20
Last Modified: 2013-11-08
If I run PHP from the vli, i get:

PHP Warning:  PHP Startup: fileinfo: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0

How do I tell which module it is complaining about?
Question by:elong0003
    LVL 19

    Expert Comment

    I would install the 'strace' command if its not already present and then do:

    strace php -v 2> output.txt

    Then go through the mountain of data in output.txt, and you should be able to identify which module it's choking on.
    LVL 2

    Author Comment

    I see the same error message when I do the search, but no detail as to which module.
    LVL 19

    Expert Comment

    It will probably be many (possibly hundreds) of lines prior to the error that you will see it loading the module - you might do a search on each of the module names that are in your system /usr/lib/php/modules and then go downwards from each to see which one leads you to the error.
    LVL 2

    Expert Comment

    It mentions it: it's the fileinfo module.

    Is this the only error that pops up when you do a "php -v" ?
    LVL 11

    Expert Comment

    Isn't php-pecl-Fileinfo-1.0.4-3.el5.centos the package that comes with CentOS 5 / built for PHP 5.1.6? Maybe you need to download a new Fileinfo package for 5.2.10 or install it yourself with pecl (pecl install fileinfo). You could check apache's error_log to see if there's any more information on why the existing failed to load.
    LVL 11

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. Once you open the link you will see …
    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 create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now