i found some function ober mentioned about mssql_connect() and the like. i don't see it in my php manual. do i have to get this from somewhere? am i missing something? maybe i'm dumb but i need help. hehe. thanks.
Printable View
i found some function ober mentioned about mssql_connect() and the like. i don't see it in my php manual. do i have to get this from somewhere? am i missing something? maybe i'm dumb but i need help. hehe. thanks.
I found it in the php manual:
http://www.php.net/mssql_connect
Here's the page of al the MS SQL functions:
http://uk2.php.net/manual/en/ref.mssql.php
Edit:
A little trick. If you want to go to the documentation for any PHP function just go to:
http://www.php.net/function_name
I.e: for foreach:
http://www.php.net/foreach
thanks for the reply visualAd. i found it in the link you gave. i try this
i'm totally new to this thing but i want to learn. it has an error and saysPHP Code:<?php
mssql_connect("localhost","sa","password");
?>
i've got php version 4.3.5 and i found in the linke that you gave that the function mssql_connect() is featured in 3,4,5. am i missing something? thanks.Code:
Fatal error: Call to undefined function: mssql_connect() in D:\Program Files\Apache Group\Apache2\htdocs\examples\example.php on line 2
From the PHP manual:
Quote:
Requirements
Requirements for Win32 platforms.
The extension requires the MS SQL Client Tools to be installed on the system where PHP is installed. The Client Tools can be installed from the MS SQL Server CD or by copying ntwdblib.dll from \winnt\system32 on the server to \winnt\system32 on the PHP box. Copying ntwdblib.dll will only provide access. Configuration of the client will require installation of all the tools.
Let me know if that doesn't work for you. I've been through the PHP/MSSQL installation a few times.
edit: Don't forget to uncomment the extension in php.ini!!!
hello mates. i know you guys are the best ones here. cheers and thanks for the reply. and oh, sorry for the late reply. still undefined. here's the thing i did
1. look for ntwdblib.dll in c:\windows\system32. it's there.
2. remove the ; in ;extension=php_mssql.dll
i doubt i did the right one. hehe. help mates, please. hehe. the manual says something about compiling with the switch --with-mssql[=DIR] where DIR is the FreeTDS install prefix. what is this FreeTDS? thanks in advance.
You only need to worry about FreeTDS and --with-mssql if you are compiling PHP from source on a UNIX machine.
As you are using Windows this is not an issue and just the modification to the PHP.ini should be necessary and copying the required dll.
thanks. yes i'm in winxp. hehe. please don't ask. hehe. still undefined function: mssql_connect(). every start of my pc, it says something about Unknown(): Unable to load dynamic library './php_mssql.dll' - The specified module could not be found. am i missing something like setting where to put exactly the dll??? and oh. sorry for bothers and thanks.
hoping for ober0330 to drop by. :)
Have you checked that you've got the php_mssql.dll in your extensions directory??
hello mate [visualAd]. yep. how come i can't connect??? :cry: thank you sooo much for being patient mate. thanks.
Its saying that it cannot find the extension file. You'll need to edit the follwoing directive in the php.ini to include the directory your extension lphp_mssql.dll lives or copy it to the same directory as your PHP binary.
Code:; Directory in which the loadable extensions (modules) reside.
extension_dir = ".\" <-- change this to the directory path of extensions
that's it. i'm dumb. hahaha. it's ok now mate. thank you sooooooooo much. good day mate. again, thank you thank you thank you.
thanks times ten to the power of forever. :bigyello: