Click to See Complete Forum and Search --> : PHP + MSSQL 2000 + Win9x


schajee
05-01-2001, 06:33 AM
Hi,

I was given a project to get an MsSQL Database accessed via PHP. Now, I am using Windows 98SE on my computer with SQL Server 2000 (Personal) and PHP 4.0.5 for Win32.

There is a lot of talk that one needs a file by the name of php_mssql70.dll or something like that.

First of all I would like to know whether I need this file in Windows 98SE or is it needed for Windows NT?

Secondly, when I downloaded PHP it was something like 720K, and there is just one php.exe in the my C:\Php folder. The questions is where is the rest of it?

Thirdly, has anybody done this thing before and if he/she has then how did it go?

Thanks,
Schajee

Anon
05-01-2001, 04:04 PM
Hello,
I downloaded this file "php-4.0.4pl1-Win32.zip" from http://www.php.net/downloads.php - it's size is: 3738KB or the direct link would be: http://www.php.net/do_download.php?download_file=php-4.0.5-Win32.zip&source_site=www.php.net
It looks like you've downloaded the CGI only...
When I packed out the file in C:\php it made a folder: c:\php\extentions with the "php_mssql70.dll" in it. I'm runneing Win ME witch should be almost the same as Win98.
I'm a very PHP-beginner myself, but in the end it worked! So good luck!
:-) Tomas

Anon
05-04-2001, 08:05 AM
Did php_mssql70.dll work with MS SQL 2000? I've just tried this and it did not. It works fine with MS SQL 7.0, but not with MSSQL2K...

Regards,
Marek Matula

schajee
05-04-2001, 10:07 AM
That reminds me... I had to write a reference letter for everybody to learn from my experience. I guess I was too happy that it got connected. Anyway, here it goes.

First of all I have PHP 4.0.5 (4.5 MB one, which includes the php_mssql.dll), MSSQL 2000, Xitami 2.4 d6 and Windows 98 SE.

1. Install MSSQL 2000 the way its supposed to be done.

2. Make a DSN entry via ODBC just in case though it didn't work in the case of "odbc_connect()".

3. Install PHP and Xitami where ever you want.

4. Make sure Xitami is configured to accept PHP by going to the Setup of Xitami and looking under the "Filters" tab.

Now the important part:

5. Copy all DLLs found under the c:\php\extensions and c:\php\dlls directories to the c:\windows\system (c:\winnt\system32 in case of NT) directory. Now this is assuming that your directories are the same as mine.

6: Edit php.ini and look for "extension_dir". It should be under the "Paths and Directories" category. Modify it to c:\windows\system (c:\winnt\system32).

7: Look for "extension=php_mssql.dll" and remove the ";" before the line, or in other words un-comment it. Save the php.ini in "c:\windows".

8: Restart your system just in case.

OR

6. Edit php.ini and look for "extension_dir". It should be under the "Paths and Directories" category. Modify it to "c:\php\extensions" or "c:\php\dlls" depending where the php_mssql.dll is.

7: Look for "extension=php_mssql.dll" and remove the ";" before the line, or in other words un-comment it. Save the php.ini in "c:\windows".

8: Restart your system just in case.

So that was it. Hopefully your PHPs should run now. If they don't fell free to drop by a line. And if you have different web servers, it really shouldn't matter much.

Ciao
Schajee