[PHP-DB] Re: php4 to php5 upgradation

2006-06-09 Thread cyril PIERRE de GEYER


You just need to install PHP5 and to change your apache configuration 
(httpd.conf).


If you are a windows user i guess it would be easier for you to use 
wampserver which allow to switch from PHP5 to PHP4 easily.


Regards

Cyril

Manoj Singh a écrit :

Hello all,

I am using php4 in windows server. Now i want to use php5, will it is
possible to upgrade  php4 to php5 or i  have to remove php4 and then 
install

php5?

Please  advise me.

Regards
Manoj



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



[PHP-DB] Re: PHP4 with MYSQL5

2006-03-06 Thread João Cândido de Souza Neto
I receive aa answer by e-mail in order this telling me that i must upgrade
my php4 to php5.

It means that a php4 server don't works fine with mysql5 server?

João Cândido de Souza Neto wrote:

 Hello everyone.
 
 I'm trying to use my php4 conecting to a mysql5 server, and then executing
 some command lines to create a stored procedure but it's not working.
 
 When a tried to execute delimiter |, my php gets de follow error:
 
 You have an error in your SQL syntax; check the manual that corresponds to
 your MySQL server version for the right syntax to use near 'delimiter |'
 at line 1
 
 If I connect to server as local and try to execute the above command, it
 works fine.
 
 Could anyone help me about this? I'll be pleased by any tips.
 
 Thanks.

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



RE: [PHP-DB] Re: PHP4 with MYSQL5

2006-03-06 Thread Bastien Koert
it does, you need the updated mysql library that comes with the php 5 files 
(libmysql.dll for windows)


bastien



From: João Cândido de Souza Neto [EMAIL PROTECTED]
To: php-db@lists.php.net,php-general@lists.php.net
Subject: [PHP-DB] Re: PHP4 with MYSQL5
Date: Mon, 06 Mar 2006 18:38:56 -0300

I receive aa answer by e-mail in order this telling me that i must upgrade
my php4 to php5.

It means that a php4 server don't works fine with mysql5 server?

João Cândido de Souza Neto wrote:

 Hello everyone.

 I'm trying to use my php4 conecting to a mysql5 server, and then 
executing

 some command lines to create a stored procedure but it's not working.

 When a tried to execute delimiter |, my php gets de follow error:

 You have an error in your SQL syntax; check the manual that corresponds 
to

 your MySQL server version for the right syntax to use near 'delimiter |'
 at line 1

 If I connect to server as local and try to execute the above command, it
 works fine.

 Could anyone help me about this? I'll be pleased by any tips.

 Thanks.

--
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



[PHP-DB] re: PHP4

2003-06-21 Thread Jon Miller
Does anyone know if PHP 4 on the Red Hat distro is only available on RHL8 or better?

Thanks

Jon L. Miller, MCNE, CNS
Director/Sr Systems Consultant
MMT Networks Pty Ltd
http://www.mmtnetworks.com.au

I don't know the key to success, but the key to failure
 is trying to please everybody. -Bill Cosby





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



[PHP-DB] RE: PHP4 on Windows using MSSQL

2003-02-26 Thread Kevin Gordon
Thanks Ollie. I will check Tcp or Named Pipes.

I have found a Linux Journal article dated 14 Feb 2003 using a FreeTDS
driver and ODBC to MSSQL and will try that.
Cheers,
Kevin

On Tue, 2003-02-25 at 23:25, Oliver Cronk wrote:
 Yes, but I have never personally used Linux to connect to MSSQL so I can't
 really help you on that one.  Although I hear that several people have done
 this I would really recommend it (as Linux isn't a supported client O/S for
 MSSQL).  It is *fairly* straightforward on Windows - the hardest bit is
 making sure you have all the correct DLL's in the right places etc etc.
 
 I use MySQL/ Postgres these days so I can't really remember all the stuff I
 had to do to get MSSQL working with PHP but I will have a think and let you
 know if I think of anything that might be useful.
 
 After having another quick look at your error message at the bottom of your
 original email it might be worth looking at your MSSQL Server connection
 config dialogs - make sure that TCP/IP has been enabled (looks like you
 might just have named pipes).
 
 Regards
 
 Ollie Cronk
 
 -Original Message-
 From: Kevin Gordon [mailto:[EMAIL PROTECTED]
 Sent: 25 February 2003 08:05
 To: Oliver Cronk
 Cc: PHP Mail
 Subject: RE: PHP4 on Windows  using MSSQL
 
 
 Thanks Ollie
 I guess this means using PHP4 MSSQL functions in Windows and PHP4 Sybase
 functions in Linux?
 
 
 On Tue, 2003-02-25 at 04:47, Oliver Cronk wrote:
  The MSSQL module for PHP DOES NOT USE ODBC.  It uses the C library direct
  style of connecting to MSSQL.  Use your enterprise manager to configure
 the
  appropriate users and permissions and you should be fine.
 
  Ollie Cronk
  www.cronky.net
 
  -Original Message-
  From: Kevin Gordon [mailto:[EMAIL PROTECTED]
  Sent: 24 February 2003 07:09
  To: PHP Mail
  Subject: PHP4 on Windows  using MSSQL
 
 
  Hi Everyone,
 
  From a Linux session:
  ~ # telnet 10.1.1.1 1433
  Trying 10.1.1.1...
  Connected to 10.1.1.1.
  Escape character is '^]'.
  Connection closed by foreign host.
 
  From within NT4 Primary Domain Server:
  SQL Server Query Analyzer using the user login  password applied in PHP
  (and created in MSSQL) Queries processed ok.
 
  In PHP must I use NT authenticated login / password?
 
  Both a PHP client on Linux and Windows receive the same error message:
  Warning: SQL error: [Microsoft][ODBC SQL Server Driver][Named
  Pipes]Specified SQL server not found., SQL state 08001 in SQLConnect in
  E:\Inetpub\wwwroot\php\ODBC_Driver.php on line 174
 
  The PHP.ini file on NT4 has:
  **
  [MSSQL]
  ; Allow or prevent persistent links.
  mssql.allow_persistent = On
 
  ; Maximum number of persistent links.  -1 means no limit.
  mssql.max_persistent = -1
 
  ; Maximum number of links (persistent+non persistent).  -1 means no
  limit.
  mssql.max_links = -1
 
  ; Minimum error severity to display.
  mssql.min_error_severity = 10
 
  ; Minimum message severity to display.
  mssql.min_message_severity = 10
 
  ; Compatability mode with old versions of PHP 3.0.
  mssql.compatability_mode = Off
 
  ; Valid range 0 - 2147483647.  Default = 4096.
  ;mssql.textlimit = 4096
 
  ; Valid range 0 - 2147483647.  Default = 4096.
  ;mssql.textsize = 4096
 
  ; Limits the number of records in each batch.  0 = all records in one
  batch.
  ;mssql.batchsize = 0
 
  ; Use NT authentication when connecting to the server
  mssql.secure_connection = Off
 
  ; Specify max number of processes. Default = 25
  ;mssql.max_procs = 25
 
  
  ntwdblib.dll is in the correct Windows directory.
 
  Using a System DNS for ODBC. Should I be using a File DNS?
 
  Can I open up NT4 PDS to telenet to it?
 
  Any thoughts, comments?
  Many thanks,
 
  Kevin Gordon
  New Zealand
 
 
 
 
 
 
 



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



[PHP-DB] RE: PHP4 on Windows using MSSQL

2003-02-26 Thread Oliver Cronk
Sorry made a typo in my last email - I mean't to say wouldn't recommend it
rather than would (in reference to using MSSQL from Linux).

Hope you get the issue sorted

Cheers

Ollie

-Original Message-
From: Kevin Gordon [mailto:[EMAIL PROTECTED]
Sent: 26 February 2003 08:23
To: Oliver Cronk
Cc: PHP Mail
Subject: RE: PHP4 on Windows  using MSSQL


Thanks Ollie. I will check Tcp or Named Pipes.

I have found a Linux Journal article dated 14 Feb 2003 using a FreeTDS
driver and ODBC to MSSQL and will try that.
Cheers,
Kevin

On Tue, 2003-02-25 at 23:25, Oliver Cronk wrote:
 Yes, but I have never personally used Linux to connect to MSSQL so I can't
 really help you on that one.  Although I hear that several people have
done
 this I would really recommend it (as Linux isn't a supported client O/S
for
 MSSQL).  It is *fairly* straightforward on Windows - the hardest bit is
 making sure you have all the correct DLL's in the right places etc etc.

 I use MySQL/ Postgres these days so I can't really remember all the stuff
I
 had to do to get MSSQL working with PHP but I will have a think and let
you
 know if I think of anything that might be useful.

 After having another quick look at your error message at the bottom of
your
 original email it might be worth looking at your MSSQL Server connection
 config dialogs - make sure that TCP/IP has been enabled (looks like you
 might just have named pipes).

 Regards

 Ollie Cronk

 -Original Message-
 From: Kevin Gordon [mailto:[EMAIL PROTECTED]
 Sent: 25 February 2003 08:05
 To: Oliver Cronk
 Cc: PHP Mail
 Subject: RE: PHP4 on Windows  using MSSQL


 Thanks Ollie
 I guess this means using PHP4 MSSQL functions in Windows and PHP4 Sybase
 functions in Linux?


 On Tue, 2003-02-25 at 04:47, Oliver Cronk wrote:
  The MSSQL module for PHP DOES NOT USE ODBC.  It uses the C library
direct
  style of connecting to MSSQL.  Use your enterprise manager to configure
 the
  appropriate users and permissions and you should be fine.
 
  Ollie Cronk
  www.cronky.net
 
  -Original Message-
  From: Kevin Gordon [mailto:[EMAIL PROTECTED]
  Sent: 24 February 2003 07:09
  To: PHP Mail
  Subject: PHP4 on Windows  using MSSQL
 
 
  Hi Everyone,
 
  From a Linux session:
  ~ # telnet 10.1.1.1 1433
  Trying 10.1.1.1...
  Connected to 10.1.1.1.
  Escape character is '^]'.
  Connection closed by foreign host.
 
  From within NT4 Primary Domain Server:
  SQL Server Query Analyzer using the user login  password applied in PHP
  (and created in MSSQL) Queries processed ok.
 
  In PHP must I use NT authenticated login / password?
 
  Both a PHP client on Linux and Windows receive the same error message:
  Warning: SQL error: [Microsoft][ODBC SQL Server Driver][Named
  Pipes]Specified SQL server not found., SQL state 08001 in SQLConnect in
  E:\Inetpub\wwwroot\php\ODBC_Driver.php on line 174
 
  The PHP.ini file on NT4 has:
  **
  [MSSQL]
  ; Allow or prevent persistent links.
  mssql.allow_persistent = On
 
  ; Maximum number of persistent links.  -1 means no limit.
  mssql.max_persistent = -1
 
  ; Maximum number of links (persistent+non persistent).  -1 means no
  limit.
  mssql.max_links = -1
 
  ; Minimum error severity to display.
  mssql.min_error_severity = 10
 
  ; Minimum message severity to display.
  mssql.min_message_severity = 10
 
  ; Compatability mode with old versions of PHP 3.0.
  mssql.compatability_mode = Off
 
  ; Valid range 0 - 2147483647.  Default = 4096.
  ;mssql.textlimit = 4096
 
  ; Valid range 0 - 2147483647.  Default = 4096.
  ;mssql.textsize = 4096
 
  ; Limits the number of records in each batch.  0 = all records in one
  batch.
  ;mssql.batchsize = 0
 
  ; Use NT authentication when connecting to the server
  mssql.secure_connection = Off
 
  ; Specify max number of processes. Default = 25
  ;mssql.max_procs = 25
 
  
  ntwdblib.dll is in the correct Windows directory.
 
  Using a System DNS for ODBC. Should I be using a File DNS?
 
  Can I open up NT4 PDS to telenet to it?
 
  Any thoughts, comments?
  Many thanks,
 
  Kevin Gordon
  New Zealand
 
 
 








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



RE: [PHP-DB] RE: PHP4 on Windows using MSSQL

2003-02-26 Thread Ryan Jameson (USA)
I use this combination very successfully. I stick with ODBC for the SQL access though.

 Ryan

-Original Message-
From: Oliver Cronk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 3:23 AM
To: Kevin Gordon
Cc: PHP Mail
Subject: [PHP-DB] RE: PHP4 on Windows  using MSSQL


Sorry made a typo in my last email - I mean't to say wouldn't recommend it
rather than would (in reference to using MSSQL from Linux).

Hope you get the issue sorted

Cheers

Ollie

-Original Message-
From: Kevin Gordon [mailto:[EMAIL PROTECTED]
Sent: 26 February 2003 08:23
To: Oliver Cronk
Cc: PHP Mail
Subject: RE: PHP4 on Windows  using MSSQL


Thanks Ollie. I will check Tcp or Named Pipes.

I have found a Linux Journal article dated 14 Feb 2003 using a FreeTDS
driver and ODBC to MSSQL and will try that.
Cheers,
Kevin

On Tue, 2003-02-25 at 23:25, Oliver Cronk wrote:
 Yes, but I have never personally used Linux to connect to MSSQL so I can't
 really help you on that one.  Although I hear that several people have
done
 this I would really recommend it (as Linux isn't a supported client O/S
for
 MSSQL).  It is *fairly* straightforward on Windows - the hardest bit is
 making sure you have all the correct DLL's in the right places etc etc.

 I use MySQL/ Postgres these days so I can't really remember all the stuff
I
 had to do to get MSSQL working with PHP but I will have a think and let
you
 know if I think of anything that might be useful.

 After having another quick look at your error message at the bottom of
your
 original email it might be worth looking at your MSSQL Server connection
 config dialogs - make sure that TCP/IP has been enabled (looks like you
 might just have named pipes).

 Regards

 Ollie Cronk

 -Original Message-
 From: Kevin Gordon [mailto:[EMAIL PROTECTED]
 Sent: 25 February 2003 08:05
 To: Oliver Cronk
 Cc: PHP Mail
 Subject: RE: PHP4 on Windows  using MSSQL


 Thanks Ollie
 I guess this means using PHP4 MSSQL functions in Windows and PHP4 Sybase
 functions in Linux?


 On Tue, 2003-02-25 at 04:47, Oliver Cronk wrote:
  The MSSQL module for PHP DOES NOT USE ODBC.  It uses the C library
direct
  style of connecting to MSSQL.  Use your enterprise manager to configure
 the
  appropriate users and permissions and you should be fine.
 
  Ollie Cronk
  www.cronky.net
 
  -Original Message-
  From: Kevin Gordon [mailto:[EMAIL PROTECTED]
  Sent: 24 February 2003 07:09
  To: PHP Mail
  Subject: PHP4 on Windows  using MSSQL
 
 
  Hi Everyone,
 
  From a Linux session:
  ~ # telnet 10.1.1.1 1433
  Trying 10.1.1.1...
  Connected to 10.1.1.1.
  Escape character is '^]'.
  Connection closed by foreign host.
 
  From within NT4 Primary Domain Server:
  SQL Server Query Analyzer using the user login  password applied in PHP
  (and created in MSSQL) Queries processed ok.
 
  In PHP must I use NT authenticated login / password?
 
  Both a PHP client on Linux and Windows receive the same error message:
  Warning: SQL error: [Microsoft][ODBC SQL Server Driver][Named
  Pipes]Specified SQL server not found., SQL state 08001 in SQLConnect in
  E:\Inetpub\wwwroot\php\ODBC_Driver.php on line 174
 
  The PHP.ini file on NT4 has:
  **
  [MSSQL]
  ; Allow or prevent persistent links.
  mssql.allow_persistent = On
 
  ; Maximum number of persistent links.  -1 means no limit.
  mssql.max_persistent = -1
 
  ; Maximum number of links (persistent+non persistent).  -1 means no
  limit.
  mssql.max_links = -1
 
  ; Minimum error severity to display.
  mssql.min_error_severity = 10
 
  ; Minimum message severity to display.
  mssql.min_message_severity = 10
 
  ; Compatability mode with old versions of PHP 3.0.
  mssql.compatability_mode = Off
 
  ; Valid range 0 - 2147483647.  Default = 4096.
  ;mssql.textlimit = 4096
 
  ; Valid range 0 - 2147483647.  Default = 4096.
  ;mssql.textsize = 4096
 
  ; Limits the number of records in each batch.  0 = all records in one
  batch.
  ;mssql.batchsize = 0
 
  ; Use NT authentication when connecting to the server
  mssql.secure_connection = Off
 
  ; Specify max number of processes. Default = 25
  ;mssql.max_procs = 25
 
  
  ntwdblib.dll is in the correct Windows directory.
 
  Using a System DNS for ODBC. Should I be using a File DNS?
 
  Can I open up NT4 PDS to telenet to it?
 
  Any thoughts, comments?
  Many thanks,
 
  Kevin Gordon
  New Zealand
 
 
 








-- 
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



[PHP-DB] RE: PHP4 on Windows using MSSQL

2003-02-25 Thread Kevin Gordon
Thanks Ollie
I guess this means using PHP4 MSSQL functions in Windows and PHP4 Sybase
functions in Linux?


On Tue, 2003-02-25 at 04:47, Oliver Cronk wrote:
 The MSSQL module for PHP DOES NOT USE ODBC.  It uses the C library direct
 style of connecting to MSSQL.  Use your enterprise manager to configure the
 appropriate users and permissions and you should be fine.
 
 Ollie Cronk
 www.cronky.net
 
 -Original Message-
 From: Kevin Gordon [mailto:[EMAIL PROTECTED]
 Sent: 24 February 2003 07:09
 To: PHP Mail
 Subject: PHP4 on Windows  using MSSQL
 
 
 Hi Everyone,
 
 From a Linux session:
 ~ # telnet 10.1.1.1 1433
 Trying 10.1.1.1...
 Connected to 10.1.1.1.
 Escape character is '^]'.
 Connection closed by foreign host.
 
 From within NT4 Primary Domain Server:
 SQL Server Query Analyzer using the user login  password applied in PHP
 (and created in MSSQL) Queries processed ok.
 
 In PHP must I use NT authenticated login / password?
 
 Both a PHP client on Linux and Windows receive the same error message:
 Warning: SQL error: [Microsoft][ODBC SQL Server Driver][Named
 Pipes]Specified SQL server not found., SQL state 08001 in SQLConnect in
 E:\Inetpub\wwwroot\php\ODBC_Driver.php on line 174
 
 The PHP.ini file on NT4 has:
 **
 [MSSQL]
 ; Allow or prevent persistent links.
 mssql.allow_persistent = On
 
 ; Maximum number of persistent links.  -1 means no limit.
 mssql.max_persistent = -1
 
 ; Maximum number of links (persistent+non persistent).  -1 means no
 limit.
 mssql.max_links = -1
 
 ; Minimum error severity to display.
 mssql.min_error_severity = 10
 
 ; Minimum message severity to display.
 mssql.min_message_severity = 10
 
 ; Compatability mode with old versions of PHP 3.0.
 mssql.compatability_mode = Off
 
 ; Valid range 0 - 2147483647.  Default = 4096.
 ;mssql.textlimit = 4096
 
 ; Valid range 0 - 2147483647.  Default = 4096.
 ;mssql.textsize = 4096
 
 ; Limits the number of records in each batch.  0 = all records in one
 batch.
 ;mssql.batchsize = 0
 
 ; Use NT authentication when connecting to the server
 mssql.secure_connection = Off
 
 ; Specify max number of processes. Default = 25
 ;mssql.max_procs = 25
 
 
 ntwdblib.dll is in the correct Windows directory.
 
 Using a System DNS for ODBC. Should I be using a File DNS?
 
 Can I open up NT4 PDS to telenet to it?
 
 Any thoughts, comments?
 Many thanks,
 
 Kevin Gordon
 New Zealand
 
 
 



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



[PHP-DB] RE: PHP4 on Windows using MSSQL

2003-02-25 Thread Oliver Cronk
Yes, but I have never personally used Linux to connect to MSSQL so I can't
really help you on that one.  Although I hear that several people have done
this I would really recommend it (as Linux isn't a supported client O/S for
MSSQL).  It is *fairly* straightforward on Windows - the hardest bit is
making sure you have all the correct DLL's in the right places etc etc.

I use MySQL/ Postgres these days so I can't really remember all the stuff I
had to do to get MSSQL working with PHP but I will have a think and let you
know if I think of anything that might be useful.

After having another quick look at your error message at the bottom of your
original email it might be worth looking at your MSSQL Server connection
config dialogs - make sure that TCP/IP has been enabled (looks like you
might just have named pipes).

Regards

Ollie Cronk

-Original Message-
From: Kevin Gordon [mailto:[EMAIL PROTECTED]
Sent: 25 February 2003 08:05
To: Oliver Cronk
Cc: PHP Mail
Subject: RE: PHP4 on Windows  using MSSQL


Thanks Ollie
I guess this means using PHP4 MSSQL functions in Windows and PHP4 Sybase
functions in Linux?


On Tue, 2003-02-25 at 04:47, Oliver Cronk wrote:
 The MSSQL module for PHP DOES NOT USE ODBC.  It uses the C library direct
 style of connecting to MSSQL.  Use your enterprise manager to configure
the
 appropriate users and permissions and you should be fine.

 Ollie Cronk
 www.cronky.net

 -Original Message-
 From: Kevin Gordon [mailto:[EMAIL PROTECTED]
 Sent: 24 February 2003 07:09
 To: PHP Mail
 Subject: PHP4 on Windows  using MSSQL


 Hi Everyone,

 From a Linux session:
 ~ # telnet 10.1.1.1 1433
 Trying 10.1.1.1...
 Connected to 10.1.1.1.
 Escape character is '^]'.
 Connection closed by foreign host.

 From within NT4 Primary Domain Server:
 SQL Server Query Analyzer using the user login  password applied in PHP
 (and created in MSSQL) Queries processed ok.

 In PHP must I use NT authenticated login / password?

 Both a PHP client on Linux and Windows receive the same error message:
 Warning: SQL error: [Microsoft][ODBC SQL Server Driver][Named
 Pipes]Specified SQL server not found., SQL state 08001 in SQLConnect in
 E:\Inetpub\wwwroot\php\ODBC_Driver.php on line 174

 The PHP.ini file on NT4 has:
 **
 [MSSQL]
 ; Allow or prevent persistent links.
 mssql.allow_persistent = On

 ; Maximum number of persistent links.  -1 means no limit.
 mssql.max_persistent = -1

 ; Maximum number of links (persistent+non persistent).  -1 means no
 limit.
 mssql.max_links = -1

 ; Minimum error severity to display.
 mssql.min_error_severity = 10

 ; Minimum message severity to display.
 mssql.min_message_severity = 10

 ; Compatability mode with old versions of PHP 3.0.
 mssql.compatability_mode = Off

 ; Valid range 0 - 2147483647.  Default = 4096.
 ;mssql.textlimit = 4096

 ; Valid range 0 - 2147483647.  Default = 4096.
 ;mssql.textsize = 4096

 ; Limits the number of records in each batch.  0 = all records in one
 batch.
 ;mssql.batchsize = 0

 ; Use NT authentication when connecting to the server
 mssql.secure_connection = Off

 ; Specify max number of processes. Default = 25
 ;mssql.max_procs = 25

 
 ntwdblib.dll is in the correct Windows directory.

 Using a System DNS for ODBC. Should I be using a File DNS?

 Can I open up NT4 PDS to telenet to it?

 Any thoughts, comments?
 Many thanks,

 Kevin Gordon
 New Zealand







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



[PHP-DB] RE: PHP4 on Windows using MSSQL

2003-02-24 Thread Oliver Cronk
The MSSQL module for PHP DOES NOT USE ODBC.  It uses the C library direct
style of connecting to MSSQL.  Use your enterprise manager to configure the
appropriate users and permissions and you should be fine.

Ollie Cronk
www.cronky.net

-Original Message-
From: Kevin Gordon [mailto:[EMAIL PROTECTED]
Sent: 24 February 2003 07:09
To: PHP Mail
Subject: PHP4 on Windows  using MSSQL


Hi Everyone,

From a Linux session:
~ # telnet 10.1.1.1 1433
Trying 10.1.1.1...
Connected to 10.1.1.1.
Escape character is '^]'.
Connection closed by foreign host.

From within NT4 Primary Domain Server:
SQL Server Query Analyzer using the user login  password applied in PHP
(and created in MSSQL) Queries processed ok.

In PHP must I use NT authenticated login / password?

Both a PHP client on Linux and Windows receive the same error message:
Warning: SQL error: [Microsoft][ODBC SQL Server Driver][Named
Pipes]Specified SQL server not found., SQL state 08001 in SQLConnect in
E:\Inetpub\wwwroot\php\ODBC_Driver.php on line 174

The PHP.ini file on NT4 has:
**
[MSSQL]
; Allow or prevent persistent links.
mssql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
mssql.max_persistent = -1

; Maximum number of links (persistent+non persistent).  -1 means no
limit.
mssql.max_links = -1

; Minimum error severity to display.
mssql.min_error_severity = 10

; Minimum message severity to display.
mssql.min_message_severity = 10

; Compatability mode with old versions of PHP 3.0.
mssql.compatability_mode = Off

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textlimit = 4096

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textsize = 4096

; Limits the number of records in each batch.  0 = all records in one
batch.
;mssql.batchsize = 0

; Use NT authentication when connecting to the server
mssql.secure_connection = Off

; Specify max number of processes. Default = 25
;mssql.max_procs = 25


ntwdblib.dll is in the correct Windows directory.

Using a System DNS for ODBC. Should I be using a File DNS?

Can I open up NT4 PDS to telenet to it?

Any thoughts, comments?
Many thanks,

Kevin Gordon
New Zealand



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



[PHP-DB] Re: PHP4/mssql_query INSERT problems

2002-07-15 Thread Salve Tinkerworth

I updated the mdac drivers on the Win2000 that was running PHP4 on IIS and
it  seemed to resolve the problem. If anyone has good code for detecting
errors after issuing mssql_query please post them. Thanks!

Salve


Salve Tinkerworth [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Why do I keep getting messages like:

 INSERT INTO OPS (CampaignID,[Description],PhoneInventory,URLInventory)
 VALUES (463,'In and Out','','')
 Warning: MS SQL message: Line 1: Incorrect syntax near '463'. (severity
15)
 in c:\inetpub\wwwroot\intranet2\ccp\campaign_edit.html on line 62

 Warning: MS SQL: Query failed in
 c:\inetpub\wwwroot\intranet2\ccp\campaign_edit.html on line 62

 for a simple insert like:

 $sql2=INSERT INTO OPS
 (CampaignID,[Description],PhoneInventory,URLInventory) VALUES
 ($new_campaignid,'$Description','$PhoneInventory','$URLInventory');

 echo $sql2;

 $result=mssql_query($sql2);
 $error=mssql_query('SELECT @@ERROR As ErrorCode');

 if($error['ErrorCode'] != 0) {
   echo $error['ErrorCode'];
   echo $sql2;
   die('Inserting OPS failed');
 }





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




[PHP-DB] Re: PHP4 LDAP

2002-03-20 Thread David Christensen

Just in case anyone was wondering, here's a bit more info.  I'm not sure 
why some attributes show up the other way though:


?

$baseDN = dc=mydomain,dc=com;
$bindDN = uid=dumbuser,dc=mydomain,dc=com;
$bindPass = mypass;

$linkID = ldap_connect(ldapServer,ldapPort);
if ($linkID)
if (ldap_bind($linkID,$bindDN,$bindPass) == false)
DO SOME ERROR PARSING

$filter = uid=dumbuser;
$search = ldap_search($linkID,$baseDN,$filter);
$entry = ldap_first_entry($linkID,$search);  #- ALL TOO IMPORTANT LINE
$values = ldap_get_values($linkID,$entry,departmentNumber);
for ($i = 0; $i  $values[count]; $i++)
print $i . : . $values[$i] . br\n;
ldap_close($linkID);

?

Now (for some reason I haven't figured out yet) if you don't do the 
ldap_first_entry() step, you cannot access all of the attribute values 
returned from the $search!

You can test by commenting it out and changing the $values line to use 
the $search value as the second arg.

I hope that helps someone.  I could have used it for sure.



David Christensen wrote:

 Not sure if this is the right list for this, but I didn't see any others 
 on the PHP web site that made sense...
 
 I'm using the following packages:
 
 php-common-4.1.2-1mdk
 php-4.1.2-1mdk
 mod_php-4.1.2-1mdk
 php-ldap-4.1.2-1mdk
 openldap-clients-2.0.21-1.1mdk
 openldap-servers-2.0.21-1.1mdk
 openldap-2.0.21-1.1mdk
 libldap2-2.0.21-1.1mdk
 php-ldap-4.1.2-1mdk
 apache-modules-1.3.23-4mdk
 apache-common-1.3.23-4mdk
 apache-conf-1.3.23-3mdk
 apache-1.3.23-4mdk
 
 
 I'm trying to use my LDAP server for privilege access to certain 
 portions of the site.  I'm verifying the user's account information via 
 LDAP and that seems to work ok, because I can bind and do a modify on 
 the user's information.  I'm updating a particular field to hold the 
 sessionID and a time stamp.  The record updates just fine, because I can 
 do a ldapsearch from the command line on the server using the same 
 credentials I use in PHP and I can see the update.
 
 I also have the server WIDE OPEN at the moment to test.  I didn't want 
 any stray ACL's to get in the way of debugging this.
 
 The problem arises when I try to read back all of the attributes within 
 the PHP script.  I can see only certain attributes: uid, mail, cn (the 
 normal stuff) but if I try to read these fields that I want to use for 
 the session, they don't print in PHP, but the show up from the LDAP 
 command line util.  The fields include: employeeNumber, carLicense, 
 departmentNumber.
 
 Like I said earlier, I can update them from PHP, just can't read them back.
 
 Any ideas are greatly appreciated!
 
 David Christensen
 



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




[PHP-DB] Re: PHP4, MySQL, errors....

2001-08-10 Thread Cato Larsen

Hey!
Thanks for the help Mr. Bothwell.
But now it seems I get a new error:
Parse error: parse error in C:\Program Files\Apache
Group\Apache\htdocs/oiamemb/members.php on line 89

I don't know why, or if it's the MySQL database who's moching with me.

The current source is as follows: (Guess I've screwed it up worse than
ever...)

Thanks to all the people who have helped me. This is my first try at PHP,
and MySQL for that matter so I realy apreciate it!

Best regards Cato

 Code start

?
 $usr = Xephiroth;
 $pwd = lordoftherings;
 $db = members;
 $host = localhost;

 # connect to database
$cid = mysql_connect($host,$usr,$pwd);
 if (!$cid) {
echo Error: .mysql_error();
exit;
}
?
html
head
titleProfiles/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#00 text=#FF leftmargin=0 topmargin=0
marginwidth=0 marginheight=0 background=../images/back.gif
bgproperties=fixed
?
$str = PHP is not running!;
echo substr($str, 0, 7) . substr($str, 11);
?
?
$prof = Nano-Technician; # setup SQL statement
$SQL = SELECT * FROM memberinfo ;
$retid = mysql_db_query($db, $SQL, $cid); # check for errors
if (!$retid) { echo( mysql_error()); } else { # display results

while ($row = mysql_fetch_array($retid)) {
$email = $row[email];
$loc = $row[loc];
$aim = $row[aim];
$icq = $row[icq];
$msn = $row[msn];
$yahoo = $row[yahoo];
$charname = $row[charname];
$charsname = $row[charsname];
$charnick = $row[charnick];
$tit = $row[tit];
$lvl = $row[lvl];
$picurl = $row[picurl];
$born = $row[born];
$apperiance = $row[apperiance];
$charac = $row[charac];
$streng = $row[streng];
$bio = $row[bio];
$breed = $row[breed];
$prof = $row[prof];
$posn = $row[posn];

$contents = row(cell(, 150) . cell(, 200) . cell(, 200));

while ($row = mysql_fetch_array($retid))
$contents .= row(
cell(img src='{$row[picurl]}')
   .cell(
bold(
{$row[tit]} {$row[charname]} 
.quot;{$row[charnick]}quot;
.{$row[charsname]}
 ).br
.bold(Contact: ).$row[email].br
.bold(Level: ).$row[lvl].br
.bold(Breed: ).$row[breed].br
.bold(Profession: ).$prof.br
.bold(Location: ).$row[loc].br
.bold(AIM: ).$row[aim].br
.bold(ICQ: ).$row[icq].br
.bold(MSN: ).$row[msn].br
.bold(Yahoo!: ).$row[yahoo].br
 )
.cell(
br
.bold(Born: ).$row[born].br
.bold(Appearance: ).$row[appearance].br
.bold(Position: ).$row[posn].br
.bold(Characteristics: ).$row[charac].br
.bold(Strengths/weaknesses: ).$row[streng].br
.bold(Bio: ).$row[bio].br
 )
);

echo table($contents);
)
?

/body
/html

-- Code end



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: PHP4, MySQL, errors....

2001-08-10 Thread Hugh Bothwell


Cato Larsen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hey!
 Thanks for the help Mr. Bothwell.
 But now it seems I get a new error:

;-) The error of my ways is apparent - I typed
that off the top of my head, and I got bit by
my own bug - using unescaped double-quotes
inside a double-quoted string.

Try this:

?php
$prof = Nano-Technician; // setup SQL statement
$SQL = SELECT * FROM memberinfo WHERE prof='$prof' ;

if (!($retid = mysql_db_query($db, $SQL, $cid))) {
 echo( Error: .mysql_error());
 exit;
}

// header row, just to set column widths
$contents = row(cell(, 150) . cell(, 200) . cell(, 200));

// for each character...
while ($row = mysql_fetch_array($retid)) {
$contents .= row(
cell(img src='.$row[picurl].')
   .cell(
bold(
$row[tit]. .$row[charname]
. quot;.$row[charnick].quot; 
.$row[charsname]
 ).br
.bold(Contact: ).$row[email].br
.bold(Level: ).$row[lvl].br
.bold(Breed: ).$row[breed].br
.bold(Profession: ).$prof.br
.bold(Location: ).$row[loc].br
.bold(AIM: ).$row[aim].br
.bold(ICQ: ).$row[icq].br
.bold(MSN: ).$row[msn].br
.bold(Yahoo!: ).$row[yahoo].br
 )
.cell(
 bold(Born: ).$row[born].br
.bold(Appearance: ).$row[appearance].br
.bold(Position: ).$row[posn].br
.bold(Characteristics: ).$row[charac].br
.bold(Strengths/weaknesses: ).$row[streng].br
.bold(Bio: ).$row[bio].br
 )
);
}

// print it.
echo table($contents);

?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: PHP4, MySQL, errors....

2001-08-10 Thread biorn

It appears that the error is pointing to the last line of your code (just by a
quick count of the lines).  This normally means that you are missing a closing
bracket somewhere in your code.In glancing through your code, the first
while statement has an opening, but no closing bracket (unless that is a
typo).  I also noted that your second while statement has no opening or
closing brackets.

HTH

Maureen

Cato Larsen [EMAIL PROTECTED] said:

 Hey!
 Thanks for the help Mr. Bothwell.
 But now it seems I get a new error:
 Parse error: parse error in C:Program FilesApache
 GroupApachehtdocs/oiamemb/members.php on line 89
 
 I don't know why, or if it's the MySQL database who's moching with me.
 
 The current source is as follows: (Guess I've screwed it up worse than
 ever...)
 
 Thanks to all the people who have helped me. This is my first try at PHP,
 and MySQL for that matter so I realy apreciate it!
 
 Best regards Cato
 
  Code start
 
 ?
  $usr = Xephiroth;
  $pwd = lordoftherings;
  $db = members;
  $host = localhost;
 
  # connect to database
 $cid = mysql_connect($host,$usr,$pwd);
  if (!$cid) {
 echo Error: .mysql_error();
 exit;
 }
 ?
 html
 head
 titleProfiles/title
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
 /head
 
 body bgcolor=#00 text=#FF leftmargin=0 topmargin=0
 marginwidth=0 marginheight=0 background=../images/back.gif
 bgproperties=fixed
 ?
 $str = PHP is not running!;
 echo substr($str, 0, 7) . substr($str, 11);
 ?
 ?
 $prof = Nano-Technician; # setup SQL statement
 $SQL = SELECT * FROM memberinfo ;
 $retid = mysql_db_query($db, $SQL, $cid); # check for errors
 if (!$retid) { echo( mysql_error()); } else { # display results
 
 while ($row = mysql_fetch_array($retid)) {
 $email = $row[email];
 $loc = $row[loc];
 $aim = $row[aim];
 $icq = $row[icq];
 $msn = $row[msn];
 $yahoo = $row[yahoo];
 $charname = $row[charname];
 $charsname = $row[charsname];
 $charnick = $row[charnick];
 $tit = $row[tit];
 $lvl = $row[lvl];
 $picurl = $row[picurl];
 $born = $row[born];
 $apperiance = $row[apperiance];
 $charac = $row[charac];
 $streng = $row[streng];
 $bio = $row[bio];
 $breed = $row[breed];
 $prof = $row[prof];
 $posn = $row[posn];
 
 $contents = row(cell(, 150) . cell(, 200) . cell(, 200));
 
 while ($row = mysql_fetch_array($retid))
 $contents .= row(
 cell(img src='{$row[picurl]}')
.cell(
 bold(
 {$row[tit]} {$row[charname]} 
 .quot;{$row[charnick]}quot;
 .{$row[charsname]}
  ).br
 .bold(Contact: ).$row[email].br
 .bold(Level: ).$row[lvl].br
 .bold(Breed: ).$row[breed].br
 .bold(Profession: ).$prof.br
 .bold(Location: ).$row[loc].br
 .bold(AIM: ).$row[aim].br
 .bold(ICQ: ).$row[icq].br
 .bold(MSN: ).$row[msn].br
 .bold(Yahoo!: ).$row[yahoo].br
  )
 .cell(
 br
 .bold(Born: ).$row[born].br
 .bold(Appearance: ).$row[appearance].br
 .bold(Position: ).$row[posn].br
 .bold(Characteristics: ).$row[charac].br
 .bold(Strengths/weaknesses: ).$row[streng].br
 .bold(Bio: ).$row[bio].br
  )
 );
 
 echo table($contents);
 )
 ?
 
 /body
 /html
 
 -- Code end
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



-- 




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: PHP4, MySQL, errors....

2001-08-09 Thread Hugh Bothwell


Cato Larsen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Just to have said it... Im green in both PHP4 and MySQL.
 Can anyone say what I've been doing wrong here, and how to fix it, or even
 better. Debug the whole shit! =)

First, make sure PHP is actually running.
Try this:
?php
$str = PHP is not running!;
echo substr($str, 0, 7) . substr($str, 11);
?

For one thing, trying to echo unescaped double-quotes
won't work, ie
echo table leftmargin = 0;// no good!
Use ' or \ instead.

Second, all this variable-renaming seems like a waste
of effort; just use the array directly.


  $cid = mysql_connect($host,$usr,$pwd);
  if (!$cid) { echo(ERROR:  . mysql_error() . \n); }

If the connection fails, your script prints an
error message, then continues trying to query...
if (!$cid) {
echo Error: .mysql_error();
exit;
}
... or redirect them back to a different page.


  # setup SQL statement
  $SQL =  SELECT * FROM memberinfo ;
  $SQL = $SQL .  WHERE prof = '$prof' ;

$sql = SELECT * FROM memberingo 
.WHERE prof='$prof' ;


   echo (PDTBMembers who are $prof s/BBR\n);

dt should only occur in dl.../dl


$apperiance = $row[apperiance];

'appearance'


$prof = $row[prof];

? you already know prof; why query for it?


First thing to do is write a couple of
functions to take care of the formatting
for you:

// Generic tag-formatting routine
//   Ensures all tags are closed properly;
//   Also forces you to think about tag-clause formatting
//so the final result is readable.
function clause($preopen, $tag, $opts, $pretext, $text, $preclose) {
return $preopen$tag $opts$pretext$text$preclose/$tag;
}

function table($contents) {
return clause(\n, table, style='margin-left: 80px;', ,
$contents, \n);
}

function row($contents) {
return clause(\n\t, tr, style='margin-top: 30px;', ,
$contents, \n\t);
}

function cell($text, $width=0) {
if ($text == )// check for empty str
$text = nbsp;;

$opts = ($width  0 ? style='width: $widthpx;' : );

return clause(\n\t\t, td, $opts, , $text, );
}

function bold($text) {
return clause(, b, , , $text, );
}


I would simplify your table, too, at least until
you get it working; play with it after that.


$contents = row(cell(, 150) . cell(, 200) . cell(, 200));

while ($row = mysql_fetch_array($retid))
$contents .= row(
cell(img src='{$row[picurl]}')
   .cell(
bold(
{$row[tit]} {$row[charname]} 
.quot;{$row[charnick]}quot;
.{$row[charsname]}
 ).br
.bold(Contact: ).$row[email].br
.bold(Level: ).$row[lvl].br
.bold(Breed: ).$row[breed].br
.bold(Profession: ).$prof.br
.bold(Location: ).$row[loc].br
.bold(AIM: ).$row[aim].br
.bold(ICQ: ).$row[icq].br
.bold(MSN: ).$row[msn].br
.bold(Yahoo!: ).$row[yahoo].br
 )
.cell(
br
.bold(Born: ).$row[born].br
.bold(Appearance: ).$row[appearance].br
.bold(Position: ).$row[posn].br
.bold(Characteristics: ).$row[charac].br
.bold(Strengths/weaknesses: ).$row[streng].br
.bold(Bio: ).$row[bio].br
 )
);

echo table($contents);


(Note: this approach builds the whole table in memory, in order
to print it out using the clause() function; it might be worth breaking
that out and printing the table a row at a time if there are
many rows in the table.)



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]