undefined function:  mssql_connect()

Posted on 2006-05-02
Last Modified: 2013-12-12
I use an apache server on linux machine and try to run a simple php script including mssql_connect() to retrive data in windows machine. However, the problem is it works fine running browsers but not command line.  When I run it on the command line, it complains like this following:

PHP Fatal error:  Call to undefined function:  mssql_connect() in /var/www/html/cron_job/Joon_db_connect_test.php on line 10
Content-type: text/html
X-Powered-By: PHP/4.3.4

<br />
<b>Fatal error</b>:  Call to undefined function:  mssql_connect() in <b>/var/www/html/cron_job/Joon_db_connect_test.php</b> on line <b>10</b><br />

I am eager to hear back from you to solve this problem.
Question by:joonjoejo
    LVL 142

    Accepted Solution

    did you properly configure the php.ini to allow the mssql extensions, resp is the binary for mssql installed on the box?
    LVL 13

    Assisted Solution

    Per , you must have the MS SQL Client Tools installed on the system where PHP is installed.

    As suggested above the MSSQL extension is enabled by adding extension=php_mssql.dll to php.ini.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    The viewer will learn how to dynamically set the form action using jQuery.
    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.

    733 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

    17 Experts available now in Live!

    Get 1:1 Help Now