|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
We are currently on a large project in which we need to use a shopping cart that has been written in PHP and talks to MySql on Linux. This is fine, we have one and it works great, however we need to modify it to update an MSSQL 7 Database running on WINDOZE 2000 (I know WINDOZE bad!) however it is a fact of life that we have to live with because the existing application that we have to integrate with lives on WINDOZE 2000 and uses MS SQL 7 as its database. We have tried unsuccessfuly to use FreeTDS to talk to MS SQL followed the tutorial on installing it and after multiple tries (15 or more) finally came up with a combination that compiled successfuly. When trying to connect with mssql_connect () we get the message: call to undefined function mssql_connect (), also have tried to use sybase_connect () with the same basic result. Can anyone shed some light on this?
|
|
#2
|
|||
|
|||
|
In your php.ini file, there is a line with "extension=" and "mssql" in it which is commented out. Uncomment it.
And _yes_, PHP can talk to both DBs.
__________________
PHP manual | MySQL manual | Apache docs | Linux Documentation Project | Free Software Foundation Smart Questions HOWTO | PHP security | PHP FAQ | Posting HOWTO Wikipedia | English dictionary | Google | News | RFCs Thus Spoke Zarathustra | A Skeptic's Guide to Christianity | Project Gutenberg | Skeptic's Annotated Bible ParEcon | Marxists Internet Archive | The Memory Hole | Landover Baptist | DHMO Research Universal Declaration of Human Rights | UN Charter | Geneva Conventions Sinfest | Chopping Block | Filthy Lies | Bob the Angry Flower | How to Shoot Yourself In the Foot |
|
#3
|
|||
|
|||
|
And when in doubt about what PHP natively supports... Check out the functions listing in the manual!
http://www.php.net/manual/ - S A Curnew, MCP |
|
#4
|
||||
|
||||
|
I take it as you're running PHP, MySQL and Apache on a Linux box, from where you wish to connect to a W2K box running MS SQL.
Well, I've also done that. There's a tutorial over at PHPBuilder that worked for me, although I had to change one configure parameter when I recompiled PHP. --with-sybase-something, if I recall it correctly... Then just add your config stuff in the FreeTDS config file, and it is supposed to work... But the undefined function error you get is not fixed by changing the extension stuff in php.ini (if you're running *nix). The support for MSSQL has to be compiled into PHP, and it doesn't sound as if you've got that part working, and hence the error. Probably a dumb question, but I got to ask it: Have you recompiled PHP? If so, did you see the 'support for sybase... YES' line? And you're supposed to use the mssql_* functions in PHP for this... //NoXcuz
__________________
UN*X is sexy! who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep |
|
#5
|
|||
|
|||
|
Yes, I have recompiled PHP but didn't sit and watch it so I didn't see (support for sybase....yes) I can only ***-u-me that it said that since I configured it to use sybase before compiling and it compiled clean reporting no errors. Also the functions listing in the PHP Manual says mssql support can only be used if PHP is running on a Windoze box and I really wish to use windows only where absolutely necessary (Windoze=BAD, and I don't wish to be forever tied to it. If I could talk the client into it I would move thier data to MySQL and not use Windoze at all.)
|
|
#6
|
||||
|
||||
|
|
![]() |
| Viewing: Dev Shed Forums > Other > Dev Shed Lounge > Can PHP talk to MSSQL & MySQL both? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|