Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDev Shed Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old January 18th, 2002, 10:26 AM
mark_wat mark_wat is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 2 mark_wat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Can PHP talk to MSSQL & MySQL both?

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?

Reply With Quote
  #2  
Old January 18th, 2002, 12:42 PM
realnowhereman realnowhereman is offline
Not there when you need me
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Oct 2001
Location: Berlin, Germany
Posts: 1,438 realnowhereman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 46 sec
Reputation Power: 8
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.

Reply With Quote
  #3  
Old January 24th, 2002, 12:38 AM
SACurnew SACurnew is offline
MCP
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: Canada
Posts: 66 SACurnew User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via AIM to SACurnew
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

Reply With Quote
  #4  
Old January 24th, 2002, 01:40 AM
NoXcuz's Avatar
NoXcuz NoXcuz is offline
Wiking
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Sep 2000
Location: Sweden
Posts: 3,608 NoXcuz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 49 m 27 sec
Reputation Power: 11
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

Reply With Quote
  #5  
Old January 28th, 2002, 10:06 AM
mark_wat mark_wat is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 2 mark_wat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.)

Reply With Quote
  #6  
Old January 28th, 2002, 10:15 AM
NoXcuz's Avatar
NoXcuz NoXcuz is offline
Wiking
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Sep 2000
Location: Sweden
Posts: 3,608 NoXcuz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 49 m 27 sec
Reputation Power: 11
Does this give you any help? http://forums.devshed.com/showthrea...29593&forumid=5

//NoXcuz

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDev Shed Lounge > Can PHP talk to MSSQL & MySQL both?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway