Re: [PHP-DB] PHP & MSSQL on Linux

2005-11-01 Thread php

See what perplexes me is that the extension seems to be installed (I
uninstalled the php-mssql rpm and got an error that the extension
wasn't installed).  Reinstalling the rpm returned me to my original
error that the connection failed. As I mentioned TCPDUMP tells me that
there is no traffic going to my database server.  The website where I
got the php-mssql and freetds RPMs told me that I wouldn't need to
recompile PHP but other sites tell me that I need to configure php with
freetds.  

Since I'm running on a linux box, the solution to your problem doesn't
apply to me.

Thanks for your continued help,
Robbert

Micah Stevens <[EMAIL PROTECTED]> wrote on 11/02/2005, 12:24:48
AM:
> 
> Hmm.. if you're using a function like mssql_error or something like that, 
> it's 
> likely coming from the driver and not php.. 
> 
> Did you see this on the docs page?
> 
> I have spent the last 2 days trying to get PHP to connect to MSDE on Windows 
> 2003 Web Edition.
>  
>  Although initally PHP would connect to the database without a problem, it 
> would then refuse to connect, hitting F5 enough times would eventually 
> connect to the database. As you can imagine this intermittent problem was 
> hard to trace.
>  
>  I was using PHP 5.0.5 (although 5.0.4 has the same problem) on a Windows 
> 2003 
> Web Edition SP1 server, and was trying to connect to MSDE Rel A.
>  
>  Solution:
>  ~
>  
>  Firstly MSDE needed to be installed with the following arguments: 
> SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0.
>  
>  Secondly it was necessary to delete ntwdblib.dll from c:\php
>  
>  Thirdly I downloaded the SQL 2000 evaluation and installed only the client 
> tools on a seperate PC (Ent. Manager will now connect to the database).
>  
>  Lastly I copied the version of ntwdblib.dll from the PC with Ent. Manager on 
> it (ver 2000.80.2039.0) to c:\windows\system32\
>  
>  After a re-boot no more connection problems.
>  
>  Pls note that this is only for 2003 Web Edition with MSDE, this problem does 
> not seem to occour with Standard Edition
> 
> -Micah
> 
> On Tuesday 01 November 2005 3:18 pm, [EMAIL PROTECTED] wrote:
> > The error I'm getting is from the PHP function. Both mssql_connect and
> > PEAR are returning the same error.  As far as I can tell, mssql only
> > returns the last line of an error message so I can't be sure that the
> > error I'm seeing is from MSSQL or PHP.  Running TCPdump shows no
> > traffic is going to my sql database from the webserver.  But when I run
> > tsql,it shows that communication occurred.
> >
> > This looks like a problem with my PHP configuration but I'm at a loss as
> > to what it is.
> >
> > Robbert
> >
> > Micah Stevens  wrote on 11/01/2005, 11:55:52
> >
> > PM:
> > > Is it from php or the mssql driver? If it's from the driver, then the
> > > library is installed at least partially correctly. If it's from php,
> > > perhaps not.
> > >
> > > From there you can narrow it down by checking the connection parameters
> > > outside of php to make sure they're right, is there a mssql client for
> > > linux?
> > >
> > > If the driver is loading, I would hope it would give better error
> > > messages than just 'connection failed'.. but as I've never used the
> > > driver I might be wrong.
> > >
> > > You can also packet sniff the network during the connection attempt to
> > > see what goes on there, there's lots of clues that could be helpful in
> > > the packet stream.
> > >
> > > -Micah
> > >
> > > On Tuesday 01 November 2005 2:30 pm, [EMAIL PROTECTED] wrote:
> > > > A few months back I wrote the list asking for help making a connection
> > > > to a MS SQL database from our linux webserver.  At that time I was able
> > > > to make a successfull connection on Fedora Core 1 after installing
> > > > php-mssql.rpm and a freetds rpm.  When I upgradd to FC4, I was unable
> > > > to continue my project because the RPMs had not been built for
> > > > PHP5.0.4, whic is the version we run now.
> > > >
> > > > Today, I was able to get the version of php-mssql I needed and
> > > > installed it successfully.  I am able to make a connection to our ms
> > > > sql server using tsql.  There is a mssql.ini file in the php.d
> > > > directory and the mssql.so file is in /usr/lib/php/modules/.  Using the
> > > > get_loaded_extensions fuction, I see that mssql is a loaded module and
> > > > the phpinfo() function shows me mssql configuration files.  All
> > > > indicators tell me that I should be able to connect.
> > > >
> > > > Obvsiously, since I'm posting to the list, you can guess that it's not
> > > > working.  The error message I get back is useless as I'm only told that
> > > > the connection failed.  Does anyone know anything else I need to check
> > > > to get the connection working?
> > > >
> > > > Thank you,
> > > > Robbert van Andel
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> -- 
> PHP Database Mailing List (h

Re: [PHP-DB] PHP & MSSQL on Linux

2005-11-01 Thread Micah Stevens

There's actually a few issues with php5 connecting that have solutions on this 
page:

http://us2.php.net/manual/en/function.mssql-connect.php

You may of read it already though.. 

On Tuesday 01 November 2005 3:24 pm, Micah Stevens wrote:
> Hmm.. if you're using a function like mssql_error or something like that,
> it's likely coming from the driver and not php..
>
> Did you see this on the docs page?
>
> I have spent the last 2 days trying to get PHP to connect to MSDE on
> Windows 2003 Web Edition.
>
>  Although initally PHP would connect to the database without a problem, it
> would then refuse to connect, hitting F5 enough times would eventually
> connect to the database. As you can imagine this intermittent problem was
> hard to trace.
>
>  I was using PHP 5.0.5 (although 5.0.4 has the same problem) on a Windows
> 2003 Web Edition SP1 server, and was trying to connect to MSDE Rel A.
>
>  Solution:
>  ~
>
>  Firstly MSDE needed to be installed with the following arguments:
> SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0.
>
>  Secondly it was necessary to delete ntwdblib.dll from c:\php
>
>  Thirdly I downloaded the SQL 2000 evaluation and installed only the client
> tools on a seperate PC (Ent. Manager will now connect to the database).
>
>  Lastly I copied the version of ntwdblib.dll from the PC with Ent. Manager
> on it (ver 2000.80.2039.0) to c:\windows\system32\
>
>  After a re-boot no more connection problems.
>
>  Pls note that this is only for 2003 Web Edition with MSDE, this problem
> does not seem to occour with Standard Edition
>
> -Micah
>
> On Tuesday 01 November 2005 3:18 pm, [EMAIL PROTECTED] wrote:
> > The error I'm getting is from the PHP function. Both mssql_connect and
> > PEAR are returning the same error.  As far as I can tell, mssql only
> > returns the last line of an error message so I can't be sure that the
> > error I'm seeing is from MSSQL or PHP.  Running TCPdump shows no
> > traffic is going to my sql database from the webserver.  But when I run
> > tsql,it shows that communication occurred.
> >
> > This looks like a problem with my PHP configuration but I'm at a loss as
> > to what it is.
> >
> > Robbert
> >
> > Micah Stevens <[EMAIL PROTECTED]> wrote on 11/01/2005, 11:55:52
> >
> > PM:
> > > Is it from php or the mssql driver? If it's from the driver, then the
> > > library is installed at least partially correctly. If it's from php,
> > > perhaps not.
> > >
> > > From there you can narrow it down by checking the connection parameters
> > > outside of php to make sure they're right, is there a mssql client for
> > > linux?
> > >
> > > If the driver is loading, I would hope it would give better error
> > > messages than just 'connection failed'.. but as I've never used the
> > > driver I might be wrong.
> > >
> > > You can also packet sniff the network during the connection attempt to
> > > see what goes on there, there's lots of clues that could be helpful in
> > > the packet stream.
> > >
> > > -Micah
> > >
> > > On Tuesday 01 November 2005 2:30 pm, [EMAIL PROTECTED] wrote:
> > > > A few months back I wrote the list asking for help making a
> > > > connection to a MS SQL database from our linux webserver.  At that
> > > > time I was able to make a successfull connection on Fedora Core 1
> > > > after installing php-mssql.rpm and a freetds rpm.  When I upgradd to
> > > > FC4, I was unable to continue my project because the RPMs had not
> > > > been built for PHP5.0.4, whic is the version we run now.
> > > >
> > > > Today, I was able to get the version of php-mssql I needed and
> > > > installed it successfully.  I am able to make a connection to our ms
> > > > sql server using tsql.  There is a mssql.ini file in the php.d
> > > > directory and the mssql.so file is in /usr/lib/php/modules/.  Using
> > > > the get_loaded_extensions fuction, I see that mssql is a loaded
> > > > module and the phpinfo() function shows me mssql configuration files.
> > > >  All indicators tell me that I should be able to connect.
> > > >
> > > > Obvsiously, since I'm posting to the list, you can guess that it's
> > > > not working.  The error message I get back is useless as I'm only
> > > > told that the connection failed.  Does anyone know anything else I
> > > > need to check to get the connection working?
> > > >
> > > > Thank you,
> > > > Robbert van Andel
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] PHP & MSSQL on Linux

2005-11-01 Thread Micah Stevens

Hmm.. if you're using a function like mssql_error or something like that, it's 
likely coming from the driver and not php.. 

Did you see this on the docs page?

I have spent the last 2 days trying to get PHP to connect to MSDE on Windows 
2003 Web Edition.
 
 Although initally PHP would connect to the database without a problem, it 
would then refuse to connect, hitting F5 enough times would eventually 
connect to the database. As you can imagine this intermittent problem was 
hard to trace.
 
 I was using PHP 5.0.5 (although 5.0.4 has the same problem) on a Windows 2003 
Web Edition SP1 server, and was trying to connect to MSDE Rel A.
 
 Solution:
 ~
 
 Firstly MSDE needed to be installed with the following arguments: 
SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0.
 
 Secondly it was necessary to delete ntwdblib.dll from c:\php
 
 Thirdly I downloaded the SQL 2000 evaluation and installed only the client 
tools on a seperate PC (Ent. Manager will now connect to the database).
 
 Lastly I copied the version of ntwdblib.dll from the PC with Ent. Manager on 
it (ver 2000.80.2039.0) to c:\windows\system32\
 
 After a re-boot no more connection problems.
 
 Pls note that this is only for 2003 Web Edition with MSDE, this problem does 
not seem to occour with Standard Edition

-Micah

On Tuesday 01 November 2005 3:18 pm, [EMAIL PROTECTED] wrote:
> The error I'm getting is from the PHP function. Both mssql_connect and
> PEAR are returning the same error.  As far as I can tell, mssql only
> returns the last line of an error message so I can't be sure that the
> error I'm seeing is from MSSQL or PHP.  Running TCPdump shows no
> traffic is going to my sql database from the webserver.  But when I run
> tsql,it shows that communication occurred.
>
> This looks like a problem with my PHP configuration but I'm at a loss as
> to what it is.
>
> Robbert
>
> Micah Stevens <[EMAIL PROTECTED]> wrote on 11/01/2005, 11:55:52
>
> PM:
> > Is it from php or the mssql driver? If it's from the driver, then the
> > library is installed at least partially correctly. If it's from php,
> > perhaps not.
> >
> > From there you can narrow it down by checking the connection parameters
> > outside of php to make sure they're right, is there a mssql client for
> > linux?
> >
> > If the driver is loading, I would hope it would give better error
> > messages than just 'connection failed'.. but as I've never used the
> > driver I might be wrong.
> >
> > You can also packet sniff the network during the connection attempt to
> > see what goes on there, there's lots of clues that could be helpful in
> > the packet stream.
> >
> > -Micah
> >
> > On Tuesday 01 November 2005 2:30 pm, [EMAIL PROTECTED] wrote:
> > > A few months back I wrote the list asking for help making a connection
> > > to a MS SQL database from our linux webserver.  At that time I was able
> > > to make a successfull connection on Fedora Core 1 after installing
> > > php-mssql.rpm and a freetds rpm.  When I upgradd to FC4, I was unable
> > > to continue my project because the RPMs had not been built for
> > > PHP5.0.4, whic is the version we run now.
> > >
> > > Today, I was able to get the version of php-mssql I needed and
> > > installed it successfully.  I am able to make a connection to our ms
> > > sql server using tsql.  There is a mssql.ini file in the php.d
> > > directory and the mssql.so file is in /usr/lib/php/modules/.  Using the
> > > get_loaded_extensions fuction, I see that mssql is a loaded module and
> > > the phpinfo() function shows me mssql configuration files.  All
> > > indicators tell me that I should be able to connect.
> > >
> > > Obvsiously, since I'm posting to the list, you can guess that it's not
> > > working.  The error message I get back is useless as I'm only told that
> > > the connection failed.  Does anyone know anything else I need to check
> > > to get the connection working?
> > >
> > > Thank you,
> > > Robbert van Andel
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re: [PHP-DB] PHP & MSSQL on Linux

2005-11-01 Thread php

The error I'm getting is from the PHP function. Both mssql_connect and
PEAR are returning the same error.  As far as I can tell, mssql only
returns the last line of an error message so I can't be sure that the
error I'm seeing is from MSSQL or PHP.  Running TCPdump shows no
traffic is going to my sql database from the webserver.  But when I run
tsql,it shows that communication occurred. 

This looks like a problem with my PHP configuration but I'm at a loss as
to what it is.

Robbert

Micah Stevens <[EMAIL PROTECTED]> wrote on 11/01/2005, 11:55:52
PM:
> Is it from php or the mssql driver? If it's from the driver, then the library 
> is installed at least partially correctly. If it's from php, perhaps not. 
> 
> From there you can narrow it down by checking the connection parameters 
> outside of php to make sure they're right, is there a mssql client for linux?
> 
> If the driver is loading, I would hope it would give better error messages 
> than just 'connection failed'.. but as I've never used the driver I might be 
> wrong. 
> 
> You can also packet sniff the network during the connection attempt to see 
> what goes on there, there's lots of clues that could be helpful in the packet 
> stream. 
> 
> -Micah 
> 
> On Tuesday 01 November 2005 2:30 pm, [EMAIL PROTECTED] wrote:
> > A few months back I wrote the list asking for help making a connection
> > to a MS SQL database from our linux webserver.  At that time I was able
> > to make a successfull connection on Fedora Core 1 after installing
> > php-mssql.rpm and a freetds rpm.  When I upgradd to FC4, I was unable
> > to continue my project because the RPMs had not been built for
> > PHP5.0.4, whic is the version we run now.
> >
> > Today, I was able to get the version of php-mssql I needed and installed
> > it successfully.  I am able to make a connection to our ms sql server
> > using tsql.  There is a mssql.ini file in the php.d directory and the
> > mssql.so file is in /usr/lib/php/modules/.  Using the
> > get_loaded_extensions fuction, I see that mssql is a loaded module and
> > the phpinfo() function shows me mssql configuration files.  All
> > indicators tell me that I should be able to connect.
> >
> > Obvsiously, since I'm posting to the list, you can guess that it's not
> > working.  The error message I get back is useless as I'm only told that
> > the connection failed.  Does anyone know anything else I need to check
> > to get the connection working?
> >
> > Thank you,
> > Robbert van Andel
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] PHP & MSSQL on Linux

2005-11-01 Thread Micah Stevens
Is it from php or the mssql driver? If it's from the driver, then the library 
is installed at least partially correctly. If it's from php, perhaps not. 

From there you can narrow it down by checking the connection parameters 
outside of php to make sure they're right, is there a mssql client for linux?

If the driver is loading, I would hope it would give better error messages 
than just 'connection failed'.. but as I've never used the driver I might be 
wrong. 

You can also packet sniff the network during the connection attempt to see 
what goes on there, there's lots of clues that could be helpful in the packet 
stream. 

-Micah 

On Tuesday 01 November 2005 2:30 pm, [EMAIL PROTECTED] wrote:
> A few months back I wrote the list asking for help making a connection
> to a MS SQL database from our linux webserver.  At that time I was able
> to make a successfull connection on Fedora Core 1 after installing
> php-mssql.rpm and a freetds rpm.  When I upgradd to FC4, I was unable
> to continue my project because the RPMs had not been built for
> PHP5.0.4, whic is the version we run now.
>
> Today, I was able to get the version of php-mssql I needed and installed
> it successfully.  I am able to make a connection to our ms sql server
> using tsql.  There is a mssql.ini file in the php.d directory and the
> mssql.so file is in /usr/lib/php/modules/.  Using the
> get_loaded_extensions fuction, I see that mssql is a loaded module and
> the phpinfo() function shows me mssql configuration files.  All
> indicators tell me that I should be able to connect.
>
> Obvsiously, since I'm posting to the list, you can guess that it's not
> working.  The error message I get back is useless as I'm only told that
> the connection failed.  Does anyone know anything else I need to check
> to get the connection working?
>
> Thank you,
> Robbert van Andel

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php