From: "Wei, Alice J." on
Hi,

I am currently using a Linux box with Fedora 9.0 and I am trying to connect PHP to a MS SQL database. All the permissions on the MS SQL database is up to date and accurate, but I consistently get errors that say

PHP Fatal error: Call to undefined function mssql_connect() in /usr/local/apache/htdocs/create_new_entry_master.php on line 20

I have looked into the options of using FreeBSD, as suggested on the http://us3.php.net/manual/en/function.mssql-connect.php#83196, but I am not sure if I could use it since I don't use a Windows Machine to run my PHP.
Does anyone have any suggestions?

Alice
======================================================
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
ajwei(a)indiana.edu
From: Olavi ivask on
Hi,

you need to install "freetds" before compiling php.

compile php:

../configure [--with-apxs --with-mysql...]
--with-sybase=/usr/local/freetds
make
make install

Olavi Ivask

On Thu, 2008-06-12 at 12:14 -0400, Wei, Alice J. wrote:
> Hi,
>
> I am currently using a Linux box with Fedora 9.0 and I am trying to connect PHP to a MS SQL database. All the permissions on the MS SQL database is up to date and accurate, but I consistently get errors that say
>
> PHP Fatal error: Call to undefined function mssql_connect() in /usr/local/apache/htdocs/create_new_entry_master.php on line 20
>
> I have looked into the options of using FreeBSD, as suggested on the http://us3.php.net/manual/en/function.mssql-connect.php#83196, but I am not sure if I could use it since I don't use a Windows Machine to run my PHP.
> Does anyone have any suggestions?
>
> Alice
> ======================================================
> Alice Wei
> MIS 2009
> School of Library and Information Science
> Indiana University Bloomington
> ajwei(a)indiana.edu
>

From: "Wei, Alice J." on

From: Olavi ivask [olavi(a)city.ee]
Sent: Thursday, June 12, 2008 12:57 PM
To: Wei, Alice J.
Cc: php-db(a)lists.php.net
Subject: Re: [PHP-DB] PHP to MS SQL Package

Hi,

you need to install "freetds" before compiling php.

compile php:

../configure [--with-apxs --with-mysql...]

You actually meant mssql, right? I am getting mine to connect to mssql, and not mysql.

--with-sybase=/usr/local/freetds
make
make install

Olavi Ivask

On Thu, 2008-06-12 at 12:14 -0400, Wei, Alice J. wrote:
> Hi,
>
> I am currently using a Linux box with Fedora 9.0 and I am trying to connect PHP to a MS SQL database. All the permissions on the MS SQL database is up to date and accurate, but I consistently get errors that say
>
> PHP Fatal error: Call to undefined function mssql_connect() in /usr/local/apache/htdocs/create_new_entry_master.php on line 20
>
> I have looked into the options of using FreeBSD, as suggested on the http://us3.php.net/manual/en/function.mssql-connect.php#83196, but I am not sure if I could use it since I don't use a Windows Machine to run my PHP.
> Does anyone have any suggestions?
>
> Alice
> ======================================================
> Alice Wei
> MIS 2009
> School of Library and Information Science
> Indiana University Bloomington
> ajwei(a)indiana.edu
>

From: "Ken Keefe" on
Alice, make sure the php-mssql package is installed.

# yum install php-mssql

You shouldn't have to compile php or freetds as there are packages
available to do what you want...

Ken

On Thu, Jun 12, 2008 at 11:14 AM, Wei, Alice J. <ajwei(a)indiana.edu> wrote:
> Hi,
>
> I am currently using a Linux box with Fedora 9.0 and I am trying to connect PHP to a MS SQL database. All the permissions on the MS SQL database is up to date and accurate, but I consistently get errors that say
>
> PHP Fatal error: Call to undefined function mssql_connect() in /usr/local/apache/htdocs/create_new_entry_master.php on line 20
>
> I have looked into the options of using FreeBSD, as suggested on the http://us3.php.net/manual/en/function.mssql-connect.php#83196, but I am not sure if I could use it since I don't use a Windows Machine to run my PHP.
> Does anyone have any suggestions?
>
> Alice
> ======================================================
> Alice Wei
> MIS 2009
> School of Library and Information Science
> Indiana University Bloomington
> ajwei(a)indiana.edu
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--

Naturally, the common people don't want war, but they can always be
brought to the bidding of the leaders. Tell them they are being
attacked, and denounce the pacifists for lack of patriotism and
endangering the country. It works the same in every country.

--- Herman Goering, Hitler's Reichsmarschall, At the Nuremberg Trials
From: "Wei, Alice J." on
Hi,

After stopping the Apache server, I reinstalled PHP by adding the line you had below, and then restarted Apache.

../configure
--with-apxs2=/usr/local/apache/bin/apxs \
--with-sybase=/usr/local/freetds
--prefix=/usr/local/apache/php \
make
make install

After this has been completed, I am still getting the same error about how the function is not defined.

Fatal error: Call to undefined function mssql_connect() in /usr/local/apache/htdocs/create_new_entry_master.php on line 20

Could there be other options? Or, am I missing something here?

Alice
======================================================
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
ajwei(a)indiana.edu
________________________________________
From: Olavi ivask [olavi(a)city.ee]
Sent: Thursday, June 12, 2008 12:57 PM
To: Wei, Alice J.
Cc: php-db(a)lists.php.net
Subject: Re: [PHP-DB] PHP to MS SQL Package

Hi,

you need to install "freetds" before compiling php.

compile php:

../configure [--with-apxs --with-mysql...]
--with-sybase=/usr/local/freetds
make
make install

Olavi Ivask

On Thu, 2008-06-12 at 12:14 -0400, Wei, Alice J. wrote:
> Hi,
>
> I am currently using a Linux box with Fedora 9.0 and I am trying to connect PHP to a MS SQL database. All the permissions on the MS SQL database is up to date and accurate, but I consistently get errors that say
>
> PHP Fatal error: Call to undefined function mssql_connect() in /usr/local/apache/htdocs/create_new_entry_master.php on line 20
>
> I have looked into the options of using FreeBSD, as suggested on the http://us3.php.net/manual/en/function.mssql-connect.php#83196, but I am not sure if I could use it since I don't use a Windows Machine to run my PHP.
> Does anyone have any suggestions?
>
> Alice
> ======================================================
> Alice Wei
> MIS 2009
> School of Library and Information Science
> Indiana University Bloomington
> ajwei(a)indiana.edu
>