Re: PHP to MS SQL Package

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make sure some where in your php.ini you have a line that looks like
this and is not commented out:

extension=mssql.so

I haven't used a fedora box as a php webserver in over a year, so my
memory of their config file layout is pretty rusty. However, I'm
pretty sure they consolidate everything into a single .ini file. I
always add a phpinfo.php file to my project so I can run it and see
which .ini file apache is using to configure php. All you have to put
in the phpinfo.php file is this line:

<?php phpinfo(); ?>

If you visit that page and look around, it will tell you where the
php.ini file is. Also, once you have mssql enabled, there will be a
section in the phpinfo.php page with all the mssql options. So,
looking at the phpinfo.php file is another good way to tell if you
have mssql installed properly.

Good luck!

Ken

On Thu, Jun 12, 2008 at 12:58 PM, Wei, Alice J. <ajwei@xxxxxxxxxxx> wrote:
> ________________________________________
> From: Ken Keefe [kjkeefe@xxxxxxxxx]
> Sent: Thursday, June 12, 2008 1:44 PM
> To: Wei, Alice J.
> Cc: php-db@xxxxxxxxxxxxx
> Subject: Re:  PHP to MS SQL Package
>
> 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...
>
>
> I have just installed this gadget as you have listed, and then I have . The problem is that this does not get rid of what I had in my errors previously.
>
>  PHP Fatal error:  Call to undefined function mssql_connect() in /usr/local/apache/htdocs/create_new_entry_master.php on line 20
>
> Code snippet:
> // connection to the database
> $dbhandle= mssql_connect($myServer, $myUser, $myPass)
>    or die("Couldn't connect to SQL Server on $myServer");
>
> Ken
>
> On Thu, Jun 12, 2008 at 11:14 AM, Wei, Alice J. <ajwei@xxxxxxxxxxx> 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@xxxxxxxxxxx
>>
>> --
>> 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
>



-- 

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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux