|
-
Jul 19th, 2004, 10:37 PM
#1
Thread Starter
Fanatic Member
[solved] php to ms sql
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.
Last edited by brown monkey; Jul 22nd, 2004 at 02:37 AM.
-
Jul 20th, 2004, 03:59 AM
#2
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
Last edited by visualAd; Jul 20th, 2004 at 04:03 AM.
-
Jul 20th, 2004, 04:09 AM
#3
Thread Starter
Fanatic Member
thanks for the reply visualAd. i found it in the link you gave. i try this
PHP Code:
<?php
mssql_connect("localhost","sa","password");
?>
i'm totally new to this thing but i want to learn. it has an error and says
Code:
Fatal error: Call to undefined function: mssql_connect() in D:\Program Files\Apache Group\Apache2\htdocs\examples\example.php on line 2
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.
Last edited by brown monkey; Jul 20th, 2004 at 04:12 AM.
-
Jul 20th, 2004, 04:18 AM
#4
From the PHP manual:
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.
-
Jul 20th, 2004, 07:34 AM
#5
Frenzied Member
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!!!
-
Jul 21st, 2004, 12:35 AM
#6
Thread Starter
Fanatic Member
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.
-
Jul 21st, 2004, 03:08 AM
#7
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.
-
Jul 21st, 2004, 03:22 AM
#8
Thread Starter
Fanatic Member
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.
-
Jul 21st, 2004, 08:44 PM
#9
Thread Starter
Fanatic Member
hoping for ober0330 to drop by.
-
Jul 22nd, 2004, 02:11 AM
#10
Have you checked that you've got the php_mssql.dll in your extensions directory??
-
Jul 22nd, 2004, 02:14 AM
#11
Thread Starter
Fanatic Member
hello mate [visualAd]. yep. how come i can't connect??? thank you sooo much for being patient mate. thanks.
-
Jul 22nd, 2004, 02:24 AM
#12
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
-
Jul 22nd, 2004, 02:36 AM
#13
Thread Starter
Fanatic Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|