Re: connecting to a mssql database




Jerry Stuckle wrote:
Advo wrote:
php etc is installed on our hosting, so not sure about that, i could
possibly look into it if needs be. I just develop the php files, and
then upload to our fasthosts dedicated server.. but we are running
Microsoft SQL Server 2000 on our server..


Chung Leong wrote:


Advo wrote:

Im having major problems trying to connect to a mssql database thats
hosted on our server.

I've got the ip, username, password and database name, yet no matter
what i try, I cant seem to connect. I've trawled the net for hours
looking for code, has anyone got any that definately works, or just a
simple way I can check the connection.


Thanks

What platform is PHP running on? What version of PHP? What API are you
using? Are you using integrated security? What version of SQL Server?
Without more information no one will be able to help you.



Turn on all errors and display them to see what you're getting:

ini_set('display_errors', '1');
error_reporting(E_ALL);

And phpinfo() will tell you if the mssql extensions are loaded in PHP.

Just having SQL Server on the system isn't enough. You also have to
enable it in php.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================




yea i think thats the problem because ive got this now, with errors
turned on:

start
Fatal error: Call to undefined function mssql_connect() in
/home/default/site/user/htdocs/testmssql.php on line 5



so basically i need to do extension=php_mssql.dll in my php.ini?

.



Relevant Pages

  • Re: PHP Instalation problems. Browser doesnt know what to do
    ... This is loaded and run as a local server (for class ... PHP 5.2.0 from php-5.2.0-win32-installer.msi ... # configuration directives that give the server its instructions. ...
    (comp.lang.php)
  • Re: PHP Instalation problems. Browser doesnt know what to do
    ... This is loaded and run as a local server (for class ... PHP 5.2.0 from php-5.2.0-win32-installer.msi ... # configuration directives that give the server its instructions. ...
    (comp.lang.php)
  • Re: write with cURL
    ... execute permissions. ... This is assuming that the PHP script runs ... of potential security risks from other users on the same server. ... Apache as the global web server user and thus needs world write ...
    (alt.php)
  • mysqli error?
    ... I'm just setting up my php enviroment and I typed in a simple script ... # configuration directives that give the server its instructions. ...
    (comp.lang.php)
  • Re: What is the difference between php & asp?
    ... >ASP is a Microsoft product based on the very ackward Visual Basic syntax ... >PHP is a C-Like, ... >need to physically register on the server. ... It works fine with SQL Server and Access if you really really ...
    (alt.php)