[PHP] MSSQL Stored Proc
Greetings all, I am having some trouble with running a stored proc on an MSSQL DB. I am new to using MSSQL. $link = mssql_connect($server, $db, $password); if(!$link){ die('Error connecting to MSSQL database at '.$server); } else { $storedproc = SP_DialerValidLead; $param = ValidLeadText; $stmt = mssql_init($storedproc, $link) or die(Unable to initialize); mssql_bind($stmt, @.$param, $xmlstring, SQLTEXT, FALSE) or die(Unable to bind $param:$storedprocbr.mssql_get_last_message()); $result = mssql_execute($stmt); var_dump($result); mssql_close($link); } Apparently there is no data getting passed to the stored proc. The $xmlstring is a valid xml string and the variable is properly set in the code above. Is there something obvious in how I am trying to call the stored proc with the PHP code? Any ideas or further questions? Blessed Be Phillip In the Jim Crow South, for example, government failed and indeed refused to protect blacks from extra-legal violence. Given our history, it's stunning we fail to question those who would force upon us a total reliance on the state for defense. -- Robert J. Cottrol
Re: [PHP] MSSQL Stored Proc
On Tue, Aug 28, 2012 at 1:03 PM, Phillip Baker phil...@freewolf.net wrote: Greetings all, I am having some trouble with running a stored proc on an MSSQL DB. I am new to using MSSQL. $link = mssql_connect($server, $db, $password); if(!$link){ die('Error connecting to MSSQL database at '.$server); } else { $storedproc = SP_DialerValidLead; $param = ValidLeadText; $stmt = mssql_init($storedproc, $link) or die(Unable to initialize); mssql_bind($stmt, @.$param, $xmlstring, SQLTEXT, FALSE) or die(Unable to bind $param:$storedprocbr.mssql_get_last_message()); $result = mssql_execute($stmt); var_dump($result); mssql_close($link); } Apparently there is no data getting passed to the stored proc. The $xmlstring is a valid xml string and the variable is properly set in the code above. Is there something obvious in how I am trying to call the stored proc with the PHP code? Any ideas or further questions? I just skimmed your code, but the only thing that sticks out is your call to mssql_connect(). The second parameter should be the username, not the database. To select a specific database, you use mssql_select_db() after mssql_connect() returns a valid resource. However, if you have the choice, you really should switch to the SQL Server driver for PHP developed by Microsoft. The mssql library has been phased out. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL failing.
What am I missing? Is the slash before the domain name above just a typo in your e-mail? It took a while to get mssql configured to where I could test it here since we're using Microsoft's SQL Server Driver for PHP (if you are running PHP under Windows, I'd strongly recommend this over the old mssql library anyway), but this worked: ?php $hostname = 'hostname:1433'; $username = 'DOMAIN\Username'; $password = 'password'; $conn = mssql_connect($hostname, $username, $password) or die('Unable to connect'); var_dump($conn); ? Andrew It was a typo :) The installation is running on FreeBSD. I am looking at TDS right now as a possible cause. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL failing.
On Fri, Jul 9, 2010 at 7:12 AM, Paul Halliday paul.halli...@gmail.com wrote: What am I missing? Is the slash before the domain name above just a typo in your e-mail? It took a while to get mssql configured to where I could test it here since we're using Microsoft's SQL Server Driver for PHP (if you are running PHP under Windows, I'd strongly recommend this over the old mssql library anyway), but this worked: ?php $hostname = 'hostname:1433'; $username = 'DOMAIN\Username'; $password = 'password'; $conn = mssql_connect($hostname, $username, $password) or die('Unable to connect'); var_dump($conn); ? Andrew It was a typo :) The installation is running on FreeBSD. I am looking at TDS right now as a possible cause. Got it: In /usr/local/etc/freetds.conf: [global] host = 10.x.x.x port = 1433 client charset = UTF-8 tds version = 8.0 text size = 20971520 Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL failing.
On Fri, Jul 9, 2010 at 7:10 AM, Paul Halliday paul.halli...@gmail.com wrote: On Fri, Jul 9, 2010 at 7:12 AM, Paul Halliday paul.halli...@gmail.com wrote: It was a typo :) The installation is running on FreeBSD. I am looking at TDS right now as a possible cause. Got it: In /usr/local/etc/freetds.conf: [global] host = 10.x.x.x port = 1433 client charset = UTF-8 tds version = 8.0 text size = 20971520 Thanks. I'm glad you got it working. That's pretty much what I found when I tried to set it up here as well. I left the host and port out of my freetds.conf file, though. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL failing.
Is there something that needs to be tweaked or added to get this to work? I am trying to connect to server 2008 w/ MS SQL 2008. I can see the connections fail in the servers event logs if I take away \domain from \domain\username (mixed auth is turned off) so the communication is somewhat working. What am I missing? Settings are as follows: MSSQL Support enabled Active Persistent Links 0 Active Links0 Library version FreeTDS Directive Local Value Master Value mssql.allow_persistent On On mssql.batchsize 0 0 mssql.charset no valueno value mssql.compatability_modeOff Off mssql.connect_timeout 5 5 mssql.datetimeconvert On On mssql.max_links Unlimited Unlimited mssql.max_persistentUnlimited Unlimited mssql.max_procs Unlimited Unlimited mssql.min_error_severity10 10 mssql.min_message_severity 10 10 mssql.secure_connection Off Off mssql.textlimit Server default Server default mssql.textsize Server default Server default mssql.timeout 60 60 Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MSSQL failing.
-Original Message- From: Paul Halliday [mailto:paul.halli...@gmail.com] Sent: Thursday, July 08, 2010 10:01 AM To: php-general@lists.php.net Subject: [PHP] MSSQL failing. Is there something that needs to be tweaked or added to get this to work? I am trying to connect to server 2008 w/ MS SQL 2008. I can see the connections fail in the servers event logs if I take away \domain from \domain\username (mixed auth is turned off) so the communication is somewhat working. What am I missing? Settings are as follows: MSSQL Support enabled Active Persistent Links 0 Active Links 0 Library version FreeTDS Directive Local Value Master Value mssql.allow_persistentOn On mssql.batchsize 0 0 mssql.charset no valueno value mssql.compatability_mode Off Off mssql.connect_timeout 5 5 mssql.datetimeconvert On On mssql.max_links Unlimited Unlimited mssql.max_persistent Unlimited Unlimited mssql.max_procs Unlimited Unlimited mssql.min_error_severity 10 10 mssql.min_message_severity10 10 mssql.secure_connection Off Off mssql.textlimit Server default Server default mssql.textsizeServer default Server default mssql.timeout 60 60 Thanks What driver are you using? MS SQL Server driver for PHP? http://www.microsoft.com/downloads/details.aspx?displaylang=enFamilyID=ccdf 728b-1ea0-48a8-a84a-5052214caad9 Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL failing.
On Thu, Jul 8, 2010 at 1:01 PM, Paul Halliday paul.halli...@gmail.com wrote: Is there something that needs to be tweaked or added to get this to work? I am trying to connect to server 2008 w/ MS SQL 2008. I can see the connections fail in the servers event logs if I take away \domain from \domain\username (mixed auth is turned off) so the communication is somewhat working. What am I missing? Is the slash before the domain name above just a typo in your e-mail? It took a while to get mssql configured to where I could test it here since we're using Microsoft's SQL Server Driver for PHP (if you are running PHP under Windows, I'd strongly recommend this over the old mssql library anyway), but this worked: ?php $hostname = 'hostname:1433'; $username = 'DOMAIN\Username'; $password = 'password'; $conn = mssql_connect($hostname, $username, $password) or die('Unable to connect'); var_dump($conn); ? Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mssql extension
Hello ! My Workstation/server: Window XPApache 2.2.4 (win32) PHP/5.2.3SQl Server 2003 I have never been able to load mssql extension in my life...In my php .ini file, I removed the ; correctly : extension=php_mssql.dll Other extensions work fine, for example I use the PDF extension : extension=libpdf_php.dll When I call phpinfo(), I can see informations about PDF, but nothing about mssql. I was wondering if I have the good version of the dll in my ext directory..Or is SQl server 2003 compatible with XP and the latest version of php? By the way, SQLServer works fine on my computer. Thank you very much Mathieu _
RE: [PHP] mssql and latin characters
Thanks a lot Eric, I read those links and are really interesting. The solution of the problem was changing the OEM character conversion option of MSSql (see attached image) as Frank answer me in PHP-Windows list. Original answer of Frank: -Original Message- From: Frank M. Kromann [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 22, 2008 3:25 PM To: Leticia Larrosa Cc: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] mssql and latin characters Hi Leticia, MS SQL server comes with a set of client tools that allows you to specify the encoding. There is a checkbox in the Client Network Tool that allows you to enable/disable OEM character conversion. Flipping that for the alias you are using to connect to the database should fix the problem. Remember this must be done on the box where PHP is running if that's different from the SQL server box. - Frank Regards Leticia Larrosa -Original Message- From: Eric Butera [mailto:[EMAIL PROTECTED] Sent: Monday, January 21, 2008 5:43 PM To: Leticia Larrosa Cc: php-general@lists.php.net Subject: Re: [PHP] mssql and latin characters On Jan 20, 2008 9:53 PM, Leticia Larrosa [EMAIL PROTECTED] wrote: Hello I have a MSSql 2000 database that have stored data with the follow special characters: ó, í, Ñ, á, é, ú. When I see the data through any MsSql Client I see exactly those characters. The Collation of database is: SQL_Latin1_General_CP1_CI_AS I can't change the method of insert data in database. When I get (with MSSQL PHP extension) data that have some of those characters, I get weird characters instead. For example: A data that in database appears as Girón is obtained by PHP as Gir¢n The problem with the encoding of browser is discarded, because wherever I saw the data appears with weird characters. The code I use to get the data is: ?php mssql_connect('server','user','pass'); mssql_select_db('db'); $r = mssql_query(select some_column from some_table); $d = mssql_fetch_assoc($r); echo $d['some_column']; ? My PHP is 4.4.3, and my SO is XP. Other people ask the same as I'm and get no answer proper are: http://www.psicofxp.com/forums/desarrollo-web.264/226703-php-mssql-y-acento s.html http://www.psicofxp.com/forums/desarrollo-web.264/226703-php-mssql-y-acentos .html http://www.bdat.net/cuestiones_php/php3/0702.html http://www.bdat.net/cuestiones_php/php3/0702.html http://www.forosdelweb.com/f18/problemas-con-caracteres-especiales-acentos- php-mssql-server-364345/ http://www.forosdelweb.com/f18/problemas-con-caracteres-especiales-acentos-p hp-mssql-server-364345/ http://markmail.org/message/7rksvz44sj2te5sl http://markmail.org/message/7rksvz44sj2te5sl http://www.phpbuilder.com/board/archive/index.php/t-10208269.html http://www.phpbuilder.com/board/archive/index.php/t-10208269.html Thanks in advanced. Leticia Larrosa __ Participe en Universidad 2008. 11 al 15 de febrero del 2008. Palacio de las Convenciones, Ciudad de la Habana, Cuba http://www.universidad2008.cu Hi Leticia, You should be using utf-8, really. What you're dealing with are encoding issues. 8bit character sets just can't hold all known characters, so people invented lots of them to make up for this. See my links below for an in depth look. Maybe, just maybe, we can trick the browser into showing your text right. Below the header and the meta tag are the key parts to it. Try this: ?php header(Content-Type: text/html; charset=iso-8859-1); ? html head meta http-equiv=content-type content=text/html; charset=iso-8859-1 /head body i18n ftw! /body /html You might also take a look at: http://www.microsoft.com/sql/technologies/php/default.mspx Also please read this: http://www.phpwact.org/php/i18n/charsets. And this too: http://talks.php.net/show/wereldveroverend-ffm2004 Have fun! __ NOD32 2808 (20080120) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com __ Participe en Universidad 2008. 11 al 15 de febrero del 2008. Palacio de las Convenciones, Ciudad de la Habana, Cuba http://www.universidad2008.cu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mssql and latin characters
On Jan 22, 2008 6:00 PM, Leticia Larrosa [EMAIL PROTECTED] wrote: Thanks a lot Eric, I read those links and are really interesting. The solution of the problem was changing the OEM character conversion option of MSSql (see attached image) as Frank answer me in PHP-Windows list. Original answer of Frank: -Original Message- From: Frank M. Kromann [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 22, 2008 3:25 PM To: Leticia Larrosa Cc: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] mssql and latin characters Hi Leticia, MS SQL server comes with a set of client tools that allows you to specify the encoding. There is a checkbox in the Client Network Tool that allows you to enable/disable OEM character conversion. Flipping that for the alias you are using to connect to the database should fix the problem. Remember this must be done on the box where PHP is running if that's different from the SQL server box. - Frank Regards Leticia Larrosa -Original Message- From: Eric Butera [mailto:[EMAIL PROTECTED] Sent: Monday, January 21, 2008 5:43 PM To: Leticia Larrosa Cc: php-general@lists.php.net Subject: Re: [PHP] mssql and latin characters On Jan 20, 2008 9:53 PM, Leticia Larrosa [EMAIL PROTECTED] wrote: Hello I have a MSSql 2000 database that have stored data with the follow special characters: ó, í, Ñ, á, é, ú. When I see the data through any MsSql Client I see exactly those characters. The Collation of database is: SQL_Latin1_General_CP1_CI_AS I can't change the method of insert data in database. When I get (with MSSQL PHP extension) data that have some of those characters, I get weird characters instead. For example: A data that in database appears as Girón is obtained by PHP as Gir¢n The problem with the encoding of browser is discarded, because wherever I saw the data appears with weird characters. The code I use to get the data is: ?php mssql_connect('server','user','pass'); mssql_select_db('db'); $r = mssql_query(select some_column from some_table); $d = mssql_fetch_assoc($r); echo $d['some_column']; ? My PHP is 4.4.3, and my SO is XP. Other people ask the same as I'm and get no answer proper are: http://www.psicofxp.com/forums/desarrollo-web.264/226703-php-mssql-y-acento s.html http://www.psicofxp.com/forums/desarrollo-web.264/226703-php-mssql-y-acentos .html http://www.bdat.net/cuestiones_php/php3/0702.html http://www.bdat.net/cuestiones_php/php3/0702.html http://www.forosdelweb.com/f18/problemas-con-caracteres-especiales-acentos- php-mssql-server-364345/ http://www.forosdelweb.com/f18/problemas-con-caracteres-especiales-acentos-p hp-mssql-server-364345/ http://markmail.org/message/7rksvz44sj2te5sl http://markmail.org/message/7rksvz44sj2te5sl http://www.phpbuilder.com/board/archive/index.php/t-10208269.html http://www.phpbuilder.com/board/archive/index.php/t-10208269.html Thanks in advanced. Leticia Larrosa __ Participe en Universidad 2008. 11 al 15 de febrero del 2008. Palacio de las Convenciones, Ciudad de la Habana, Cuba http://www.universidad2008.cu Hi Leticia, You should be using utf-8, really. What you're dealing with are encoding issues. 8bit character sets just can't hold all known characters, so people invented lots of them to make up for this. See my links below for an in depth look. Maybe, just maybe, we can trick the browser into showing your text right. Below the header and the meta tag are the key parts to it. Try this: ?php header(Content-Type: text/html; charset=iso-8859-1); ? html head meta http-equiv=content-type content=text/html; charset=iso-8859-1 /head body i18n ftw! /body /html You might also take a look at: http://www.microsoft.com/sql/technologies/php/default.mspx Also please read this: http://www.phpwact.org/php/i18n/charsets. And this too: http://talks.php.net/show/wereldveroverend-ffm2004 Have fun! __ NOD32 2808 (20080120) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com __ Participe en Universidad 2008. 11 al 15 de febrero del 2008. Palacio de las Convenciones, Ciudad de la Habana, Cuba http://www.universidad2008.cu Thank you for posting the answer to the list for archives! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mssql and latin characters
On Jan 20, 2008 9:53 PM, Leticia Larrosa [EMAIL PROTECTED] wrote: Hello I have a MSSql 2000 database that have stored data with the follow special characters: ó, í, Ñ, á, é, ú. When I see the data through any MsSql Client I see exactly those characters. The Collation of database is: SQL_Latin1_General_CP1_CI_AS I can't change the method of insert data in database. When I get (with MSSQL PHP extension) data that have some of those characters, I get weird characters instead. For example: A data that in database appears as Girón is obtained by PHP as Gir¢n The problem with the encoding of browser is discarded, because wherever I saw the data appears with weird characters. The code I use to get the data is: ?php mssql_connect('server','user','pass'); mssql_select_db('db'); $r = mssql_query(select some_column from some_table); $d = mssql_fetch_assoc($r); echo $d['some_column']; ? My PHP is 4.4.3, and my SO is XP. Other people ask the same as I'm and get no answer proper are: http://www.psicofxp.com/forums/desarrollo-web.264/226703-php-mssql-y-acento s.html http://www.psicofxp.com/forums/desarrollo-web.264/226703-php-mssql-y-acentos .html http://www.bdat.net/cuestiones_php/php3/0702.html http://www.bdat.net/cuestiones_php/php3/0702.html http://www.forosdelweb.com/f18/problemas-con-caracteres-especiales-acentos- php-mssql-server-364345/ http://www.forosdelweb.com/f18/problemas-con-caracteres-especiales-acentos-p hp-mssql-server-364345/ http://markmail.org/message/7rksvz44sj2te5sl http://markmail.org/message/7rksvz44sj2te5sl http://www.phpbuilder.com/board/archive/index.php/t-10208269.html http://www.phpbuilder.com/board/archive/index.php/t-10208269.html Thanks in advanced. Leticia Larrosa __ Participe en Universidad 2008. 11 al 15 de febrero del 2008. Palacio de las Convenciones, Ciudad de la Habana, Cuba http://www.universidad2008.cu Hi Leticia, You should be using utf-8, really. What you're dealing with are encoding issues. 8bit character sets just can't hold all known characters, so people invented lots of them to make up for this. See my links below for an in depth look. Maybe, just maybe, we can trick the browser into showing your text right. Below the header and the meta tag are the key parts to it. Try this: ?php header(Content-Type: text/html; charset=iso-8859-1); ? html head meta http-equiv=content-type content=text/html; charset=iso-8859-1 /head body i18n ftw! /body /html You might also take a look at: http://www.microsoft.com/sql/technologies/php/default.mspx Also please read this: http://www.phpwact.org/php/i18n/charsets. And this too: http://talks.php.net/show/wereldveroverend-ffm2004 Have fun! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mssql and latin characters
Hello I have a MSSql 2000 database that have stored data with the follow special characters: ó, í, Ñ, á, é, ú. When I see the data through any MsSql Client I see exactly those characters. The Collation of database is: SQL_Latin1_General_CP1_CI_AS I cant change the method of insert data in database. When I get (with MSSQL PHP extension) data that have some of those characters, I get weird characters instead. For example: A data that in database appears as Girón is obtained by PHP as Gir¢n The problem with the encoding of browser is discarded, because wherever I saw the data appears with weird characters. The code I use to get the data is: ?php mssql_connect('server','user','pass'); mssql_select_db('db'); $r = mssql_query(select some_column from some_table); $d = mssql_fetch_assoc($r); echo $d['some_column']; ? My PHP is 4.4.3, and my SO is XP. Other people ask the same as Im and get no answer proper are: http://www.psicofxp.com/forums/desarrollo-web.264/226703-php-mssql-y-acento s.html http://www.psicofxp.com/forums/desarrollo-web.264/226703-php-mssql-y-acentos .html http://www.bdat.net/cuestiones_php/php3/0702.html http://www.bdat.net/cuestiones_php/php3/0702.html http://www.forosdelweb.com/f18/problemas-con-caracteres-especiales-acentos- php-mssql-server-364345/ http://www.forosdelweb.com/f18/problemas-con-caracteres-especiales-acentos-p hp-mssql-server-364345/ http://markmail.org/message/7rksvz44sj2te5sl http://markmail.org/message/7rksvz44sj2te5sl http://www.phpbuilder.com/board/archive/index.php/t-10208269.html http://www.phpbuilder.com/board/archive/index.php/t-10208269.html Thanks in advanced. Leticia Larrosa __ Participe en Universidad 2008. 11 al 15 de febrero del 2008. Palacio de las Convenciones, Ciudad de la Habana, Cuba http://www.universidad2008.cu
Re: [PHP] MSSQL
On Tue, January 8, 2008 4:06 pm, Alexis wrote: I am pulling my hair out trying to set up PHP to connect to SQL Server. The office server, running Server 2003, has SQL Server on it. One of my computers is running XP with Apache 2.2 and PHP 5.2.3. Another one has Ubuntu Gusty Gibbon, Apache 2.2 and PHP 5.2.3 Ideally I would like to get the Linux box to connect to the main server, but I can't even get it to recognise the server, let alone create a MSSQL link, so I'll start off with the windows box. I have read all the various comments in http://ca3.php.net/mssql and have tried all the relevant ones but still no joy. It just will not connect. I have tried the ADO approach but get the following error: Fatal error: Uncaught exception 'com_exception' with message 'bSource:/b Microsoft OLE DB Provider for SQL Serverbr/bDescription:/b [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.' in D:\Apache2.2\htdocs\includes\mssqlinfo.inc:9 Stack trace: #0 D:\Apache2.2\htdocs\includes\mssqlinfo.inc(9): com-Open('Provider=SQLOLE...') #1 D:\Apache2.2\htdocs\mssql.php(3): include('D:\Apache2.2\ht...') #2 {main} thrown in D:\Apache2.2\htdocs\includes\mssqlinfo.inc on line 9 Does anyone have a definite and easy to understand set of instructions as to how to get PHP to talk to SQL Server please? The most likely cause is SQL server rejecting the login based on IP/host/username/password. Take PHP out of the picture for a moment, and use whatever command line tool or Windows GUI thingie that you can to connect from the Linux box to the SQL Server. You may also want to look at using the Sybase drivers instead of the Microsoft ones. MS bought the Sybase codebase, and the APIs still work, and may be faster and easier to work with than MS-originated stuff. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL
Hi, I am pulling my hair out trying to set up PHP to connect to SQL Server. The office server, running Server 2003, has SQL Server on it. One of my computers is running XP with Apache 2.2 and PHP 5.2.3. Another one has Ubuntu Gusty Gibbon, Apache 2.2 and PHP 5.2.3 Ideally I would like to get the Linux box to connect to the main server, but I can't even get it to recognise the server, let alone create a MSSQL link, so I'll start off with the windows box. I have read all the various comments in http://ca3.php.net/mssql and have tried all the relevant ones but still no joy. It just will not connect. I have tried the ADO approach but get the following error: Fatal error: Uncaught exception 'com_exception' with message 'bSource:/b Microsoft OLE DB Provider for SQL Serverbr/bDescription:/b [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.' in D:\Apache2.2\htdocs\includes\mssqlinfo.inc:9 Stack trace: #0 D:\Apache2.2\htdocs\includes\mssqlinfo.inc(9): com-Open('Provider=SQLOLE...') #1 D:\Apache2.2\htdocs\mssql.php(3): include('D:\Apache2.2\ht...') #2 {main} thrown in D:\Apache2.2\htdocs\includes\mssqlinfo.inc on line 9 Does anyone have a definite and easy to understand set of instructions as to how to get PHP to talk to SQL Server please? Cheers Alexis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MSSQL
Did you check that you have enabled MSSQL extension? That is, On XP system, you should have this line 'extension=php_msql.dll' in php.ini file and the leading ';' be removed. On Ubuntu, you should also install mssql extension, which is a little more complex. There should be no problem once you have managed mssql. It talks to sql server 2005/2000 quite well. Regards, Shelley -Original Message- From: Alexis [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 6:07 AM To: php-general@lists.php.net Subject: [PHP] MSSQL Hi, I am pulling my hair out trying to set up PHP to connect to SQL Server. The office server, running Server 2003, has SQL Server on it. One of my computers is running XP with Apache 2.2 and PHP 5.2.3. Another one has Ubuntu Gusty Gibbon, Apache 2.2 and PHP 5.2.3 Ideally I would like to get the Linux box to connect to the main server, but I can't even get it to recognise the server, let alone create a MSSQL link, so I'll start off with the windows box. I have read all the various comments in http://ca3.php.net/mssql and have tried all the relevant ones but still no joy. It just will not connect. I have tried the ADO approach but get the following error: Fatal error: Uncaught exception 'com_exception' with message 'bSource:/b Microsoft OLE DB Provider for SQL Serverbr/bDescription:/b [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.' in D:\Apache2.2\htdocs\includes\mssqlinfo.inc:9 Stack trace: #0 D:\Apache2.2\htdocs\includes\mssqlinfo.inc(9): com-Open('Provider=SQLOLE...') #1 D:\Apache2.2\htdocs\mssql.php(3): include('D:\Apache2.2\ht...') #2 {main} thrown in D:\Apache2.2\htdocs\includes\mssqlinfo.inc on line 9 Does anyone have a definite and easy to understand set of instructions as to how to get PHP to talk to SQL Server please? Cheers Alexis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL
On Jan 8, 2008 8:58 PM, Shelley Shyan [EMAIL PROTECTED] wrote: Did you check that you have enabled MSSQL extension? That is, On XP system, you should have this line 'extension=php_msql.dll' in php.ini file and the leading ';' be removed. On Ubuntu, you should also install mssql extension, which is a little more complex. There should be no problem once you have managed mssql. It talks to sql server 2005/2000 quite well. Regards, Shelley Just to be clear, the post above has a typo and should read 'extension=php_mssql.dll'. I have found that for PHP hosted on a Windows box to talk to SQL Server 2005 you have to have the latest version of the library ntwdblib.dll or it won't connect. (The details were in the comments in the manual page for mssql if you haven't checked this already.) SQL Server 2000 doesn't usually have a problem. I haven't tried to connect to SQL Server from a Linux box, though. Other than that, the only tricks I have found involve making sure you are using the correct server address syntax if SQL Server is using something other than the default port (pretty simple, but I've seen it trip a few folks up) and using SQL Authentication rather than Windows (trusted) authentication. If you are ultimately looking to connect from a Linux box I am guessing this is already the case. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Size Limit PHP + MSSQL
Is there size limit for select queries in php? I am trying to grab a very long string that exists in the database. When I do a select and print it out, php keep truncating the string - only outputing the first half or so when the string is too long. I have checked the actual database and the string is complete. I havent gone as far as checking the actual length of the string and the length that is being printed.. Any ideas why php keep truncating my data? I've tested it with asp and it successfully outputs the complete data... Thank you!
Re: [PHP] Size Limit PHP + MSSQL
There are two settings in php.ini mssql.textsize and mssql.textlimit. When tese are set to -1 (default) the values used are configured on the server and is usually 4k. - Frank Is there size limit for select queries in php? I am trying to grab a very long string that exists in the database. When I do a select and print it out, php keep truncating the string - only outputing the first half or so when the string is too long. I have checked the actual database and the string is complete. I havent gone as far as checking the actual length of the string and the length that is being printed.. Any ideas why php keep truncating my data? I've tested it with asp and it successfully outputs the complete data... Thank you! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mssql conflict with sybase...
Dear all, I use php version 4.4.2. When i use mssql and sybase extention, they are conflict together. I don't know how to using them together. Please help me... Thanks Best Regard
Re: [PHP] mssql conflict with sybase...
On Fri, December 1, 2006 2:28 am, Le Phuoc Canh wrote: I use php version 4.4.2. When i use mssql and sybase extention, they are conflict together. I don't know how to using them together. It might be easiest to dump mssql and use sybase exclusively. Last I heard, Microsoft hasn't actually changed the low-level drives since they acquired Sybase code-base ages ago, and the sybase drivers go direct to that, while the mssql drivers, I THINK, are slower. [the rest of this email is pure speculation, based on heresay only] I SUSPECT that's because mssql drivers have followed the Microsoft codebase which has, over the years, wrapped the Jet API around the sybase, and then the OLE API around that and then some other layer I forgot around that, and... The net result being that you are comparing function call stacks: MSSQL SYBASE mssql_xyz sybase_xyz | | v . oledb_xyz. | . v . jet_xyz . | . v . iforgot_xyz . | . v . odbc_xyz . | . v v xyz() xyz() Multiply that by every db function call, across the entire application, and the minor performance hit of another function call on the stack adds up -- Especially if the queries/data being passed around get large... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL Server 2005
I am currently working on a project using SQL Server 2000. I don't think there would be a big advantage to switching to sql server 2005 for this project, but is anyone using 2005 (or one of the Express versions) with PHP? Looks like it only uses the native client? -- Thanks, Mike Smith -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mssql 20020429
Hey guys, I'm looking for the php_mssql.dll with api version: 20020429 Does anyone know where I can translate that to a version release in order to find the release with that version dll or something? Or have a resource for finding modules based on API version? Regards, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mssql 20020429
Never mind I found it. It was 4.2.1 But... now I get IIS complaining the CGI module hasn't returned a full set of headers :( -Original Message- From: Daniel Baughman [mailto:[EMAIL PROTECTED] Sent: Monday, August 15, 2005 2:58 PM To: php-general@lists.php.net Subject: [PHP] mssql 20020429 Hey guys, I'm looking for the php_mssql.dll with api version: 20020429 Does anyone know where I can translate that to a version release in order to find the release with that version dll or something? Or have a resource for finding modules based on API version? Regards, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mssql 20020429
The mssql_connect function with api# 20020429 does not do name resolution via the system get host by name?? Maybe that one of the reasons they upgraded -Original Message- From: Daniel Baughman [mailto:[EMAIL PROTECTED] Sent: Monday, August 15, 2005 3:02 PM To: 'Daniel Baughman'; php-general@lists.php.net Subject: RE: [PHP] mssql 20020429 Never mind I found it. It was 4.2.1 But... now I get IIS complaining the CGI module hasn't returned a full set of headers :( -Original Message- From: Daniel Baughman [mailto:[EMAIL PROTECTED] Sent: Monday, August 15, 2005 2:58 PM To: php-general@lists.php.net Subject: [PHP] mssql 20020429 Hey guys, I'm looking for the php_mssql.dll with api version: 20020429 Does anyone know where I can translate that to a version release in order to find the release with that version dll or something? Or have a resource for finding modules based on API version? Regards, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mssql and paging
Hello Is there anybody who succed in doing per/page listing from a MS SQL Server db. knowing that mssql doesnt support LIMIT like mysql and it uses TOP. i didnt find an optimized way to make a per/page script. Here's what am doing know : to replace a MySQL SELECT FROM LIMIT $x,$y i did this with MSSQL : :1 $query = SELECT FROM ; //Without limit :2 $ligne = fetch_assoc(query_bd($query)); :3 $temp = Array(); :4 for ($i=$debut;$i($x+$y);$i++) { :5 if (isset($ligne[$i])) :6 $temp[] = $ligne[$i]; :7 } :8 $ligne = $temp; am loosing time between lines 4 to 7 when i have a big big array :( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mssql Connection
Hi there.. I´m connecting to a Ms Sql Server 2000, with the system administrator´s name, and its password. It always works fine, but... I know it´s not the safest way of connecting, so I want to use some ordinary user names and passwords. The problem is that I just can´t make it work, it always throws username errors. How should I configure this, in order to connect to mssql with ordinary usernames and passwords from php code? Here is my function code: function conectar () { $conexion = mssql_connect(localhost,sa,apr); if (!$conexion) { ? DIV align=center FONT face=Arial color=FF size=3 B# Can´t establish connection with database server pc./B /FONT /DIV ?php exit (0); } if (!mssql_select_db(GES_WEB)) { ? DIV align=center FONT face=Arial color=FF size=3 B# Can´t establish connection with the specified database./B /FONT /DIV ?php exit (0); } return $conexion; } Thanks!! Pablo American Express made the following annotations on 01/19/05 13:57:56 -- ** This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you. ** == -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mssql Connection
Pablo D Marotta wrote: Hi there.. I´m connecting to a Ms Sql Server 2000, with the system administrator´s name, and its password. It always works fine, but... I know it´s not the safest way of connecting, so I want to use some ordinary user names and passwords. The problem is that I just can´t make it work, it always throws username errors. How should I configure this, in order to connect to mssql with ordinary usernames and passwords from php code? Here is my function code: function conectar () { $conexion = mssql_connect(localhost,sa,apr); if (!$conexion) { ? DIV align=center FONT face=Arial color=FF size=3 B# Can´t establish connection with database server pc./B /FONT FONT face=Arial color=FF size=3font/FONT FONT face=Arial color=FF size=3tags/FONT FONT face=Arial color=FF size=3suck/FONT I know nothing about MSSQL - thankgod (sorry I really can't help you there) - but I can recommend eradicating all font tags... everywhere... take no prisoners... death to frontpage (oh sorry got carried away :-). try this instead: p style=color: #f00; font: large Arial; text-align: center; # Can´t establish connection with database server pc. /p rgds, Jochem /DIV ?php exit (0); } if (!mssql_select_db(GES_WEB)) { ? DIV align=center FONT face=Arial color=FF size=3 B# Can´t establish connection with the specified database./B /FONT /DIV ?php exit (0); } return $conexion; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mssql Connection
Jochem Maas wrote: FONT face=Arial color=FF size=3font/FONT FONT face=Arial color=FF size=3tags/FONT FONT face=Arial color=FF size=3suck/FONT I know nothing about MSSQL - thankgod (sorry I really can't help you there) - but I can recommend eradicating all font tags... everywhere... take no prisoners... death to frontpage (oh sorry got carried away :-). try this instead: p style=color: #f00; font: large Arial; text-align: center; # Can´t establish connection with database server pc. /p Unless, of course, your user base includes the very poor who are (still) using ancient browsers (because they have ancient hardware) that don't support CSS, and you want to use font tags which actually work on *ALL* browsers... I can't count the number of CSS sites I've skipped because their links don't work (in my browser) due to CSS. Buh-bye. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mssql Connection
Richard Lynch wrote: Jochem Maas wrote: FONT face=Arial color=FF size=3font/FONT FONT face=Arial color=FF size=3tags/FONT FONT face=Arial color=FF size=3suck/FONT I know nothing about MSSQL - thankgod (sorry I really can't help you there) - but I can recommend eradicating all font tags... everywhere... take no prisoners... death to frontpage (oh sorry got carried away :-). try this instead: p style=color: #f00; font: large Arial; text-align: center; # Can´t establish connection with database server pc. /p Unless, of course, your user base includes the very poor who are (still) using ancient browsers (because they have ancient hardware) that don't support CSS, and you want to use font tags which actually work on *ALL* browsers... you have a point - but even Netscape4 and IE4 support rudimentary CSS AFAICR. I dont think his userbase is too poor though, considering he works for American Express :-) having said that any HTML in production envs should degrade nicely for older browsers. it doesn't have to look the same but it should be accessible. I can't count the number of CSS sites I've skipped because their links don't work (in my browser) due to CSS. Buh-bye. exactly what browser do you use? and how does CSS break links? (let me guess you disable background images?) besides you can turn off stylesheets completely if you want. CSS is a good thing. semantic mark and decoupling of style is a good ting too. its a bit weird if you consider that you seem to be willing to view an all image page with loads of nested tables for positioning and tons of font tags. but the same page written in a 10th of the HTML with a nifty stylesheet which references a number of bg images is told to bugger off. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mssql Connection
having said that any HTML in production envs should degrade nicely for older browsers. it doesn't have to look the same but it should be accessible. It won't be if you use CSS. I can't count the number of CSS sites I've skipped because their links don't work (in my browser) due to CSS. Buh-bye. exactly what browser do you use? and how does CSS break links? (let me guess you disable background images?) besides you can turn off stylesheets completely if you want. Until the hard drive crashed a few months ago, I was using a Mac PPC 9100/100 with OS 8.6, the most stable OS for that hardware. I was using IE 4.01 (?) the most stable browser for that OS -- Though even that meant at least one crash a day :-( But nobody was buying me a new computer, so there it stayed. Randomly selected links would simply NOT WORK in HTML that was perfectly valid, if that HTML used CSS extensively. If I really wanted the content, I'd view the source and copy/paste the link. But if I was just surfing? I'd just go on to a different site. CSS is a good thing. semantic mark and decoupling of style is a good ting too. Sure, up to a point. But since I generally use PHP to de-couple my business logic from my output, enough to make it easy to alter the look-and-feel any time I want, I don't see the need to use CSS to do the same thing, and then not be degrading nicely on ancient browsers. I've also seen a TON of man-hours wasted separating interface logic from interface, which seems kind of silly to me... I mean, if your interface elements change, your interface logic is going to HAVE to change, if you're going to have any decent scrubbing/validation at all, or any kind of nice layout that isn't all generic looking. Not that I'm a good enough designer to actually achieve that :-) I guess I've always seen the separation more along the lines of: Interface Elements (HTML) and Input/Output to Interface Elements -- layer --- Business Logic -- layer --- Underlying Libraries of common code -- layer --- . . . -- layer --- Operating System I know I'm a heretic to leave the I/O to Interface with the actual interface, but I've never yet seen a case where separating them in the real world caused anything but wastage. YMMV. its a bit weird if you consider that you seem to be willing to view an all image page with loads of nested tables for positioning and tons of font tags. but the same page written in a 10th of the HTML with a nifty stylesheet which references a number of bg images is told to bugger off. I don't know about the all image page, as they tend to be awfully slow sometimes, but I've never had a problem with tables -- writing them or having them work, and since my font tags all come from a single PHP function, it's not like a big hairy deal to do the exact same thing you'd do with CSS -- I change the font in one place for the whole site, and I'm done. And the CSS positioning in older browsers invariably ends up being completely whack. You get some image floating right on top of, and obscuring, the text content I want to read, and I'm not a happy surfer. So I achieve the same goals as CSS, only it actually degrades nicely on those older browsers. [shrug] Yes, CSS sites look much nicer, and have cleaner-looking text, and that image placement with text wrapping around it is really pretty... But I'm simply not (yet) willing to abandon that .01% == hundreds of thousands of users who can't view CSS sites. Maybe in a year or so, and already for sites where I have prior knowledge of the userbase/browser not being *that* old. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP + MSSQL win32 / SOLVED
Hello, I found the problem about my last message (see below). This relates to a bug in 4.3.10 release with MSSQL extension Bug #31372 I downgraded to PHP 4.3.8 and the problem was solved. Thank you for your attention and replies Vincent -Original Message- From: Vincent DUPONT Sent: mercredi 12 janvier 2005 21:54 To: php-general@lists.php.net Subject: [PHP] PHP + MSSQL win32 Hi I try to use PHP with MSSQL on a WINXP station. Usually, on win32 systems this works very well, but today I can't understand the problem. I can connect and execute SELECT statements When I try to INSERT , DELETE or UPDATE a record, I have a PHP ERROR, and a MSSQL error code 15457 in the mssql logs The insert executes, but I would like not to have the php error... This seem to be a problem with grants or permissions, but I can't find where. Even if I log with the 'sa' account I have the error. I use PHP 4.3.10 and MSSQL2000 on winXP pro Any tip would be nice. Moreover, I have found a ini file parameter that is not documented : mssql.datetimeconvert=Off Do you know what does this mean?? Thank you Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP + MSSQL win32
Hi I try to use PHP with MSSQL on a WINXP station. Usually, on win32 systems this works very well, but today I can't understand the problem. I can connect and execute SELECT statements When I try to INSERT , DELETE or UPDATE a record, I have a PHP ERROR, and a MSSQL error code 15457 in the mssql logs The insert executes, but I would like not to have the php error... This seem to be a problem with grants or permissions, but I can't find where. Even if I log with the 'sa' account I have the error. I use PHP 4.3.10 and MSSQL2000 on winXP pro Any tip would be nice. Moreover, I have found a ini file parameter that is not documented : mssql.datetimeconvert=Off Do you know what does this mean?? Thank you Vincent
Re: [PHP] PHP + MSSQL Problem
Alaor Barroso wrote: I changed the php.ini and enabled the support for MSSQL and now i can connect without errors, BUT when make an query to an table the query return NO MATCHES, i have sure that the SQL line is correct (i already used it on(or in? i don't know the difference =P) other site - in other server - and it works AND i have sure that the SQL should return data because the WHERE point to an fiels value that exists... It looks like PHP can't communicate with MSSQL but it connect! Strange... Show us some source code. Any error messages show up? If not, try to use http://php.net/mssql_error to get some error messages to show up. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP + MSSQL Problem
Hello guyz, sorry my bad english, im brazilian and i'll try to write in english... I use actually PHP 5.02 with MySQL in my site, but now i have to access an external server that use MS SQL Server running at windows 2000 server edition, firtly i tried to connect and it fails, because i don't have activately properly MSSQL support in php.ini... I changed the php.ini and enabled the support for MSSQL and now i can connect without errors, BUT when make an query to an table the query return NO MATCHES, i have sure that the SQL line is correct (i already used it on(or in? i don't know the difference =P) other site - in other server - and it works AND i have sure that the SQL should return data because the WHERE point to an fiels value that exists... It looks like PHP can't communicate with MSSQL but it connect! Strange... I need help friends, waiting for replys, hugs. Sorry my bad english, cya. ___ Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP + MSSQL Problem
Alaor Barroso wrote: It looks like PHP can't communicate with MSSQL but it connect! Strange... What server platform are you using? If you are on *nix you will need to install freetds and then build php with freetds support before you can use mssql with it. Under a windows server platform this may not be necessary, I have never tried on windows. - Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MSSQL, PHP and Linux
[snip] On Thursday 02 September 2004 08:30, blackwater dev wrote: the date is a very good question? Here is the info from my system -rwxr-xr-x1 root root 1371932 Sep 1 19:50 /usr/bin/php Not sure why its showing that date - Apache has been restarted. But that's probably your php-cli version. Are you using the Apache module version of PHP? I didn't see it in the configure command you posted previously. [/snip] Make sure that you do a 'make clean'. I have found that phpinfo() does not get updated properly but the functions may still work. Doing a 'make clean' will insure that the info is updated properly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL, PHP and Linux
I need some help...I am helping a local business with a site which needs to connect to a mssql db, my webhost uses linux and compiled php with the freetds library and when I go to the info page..it does show Microsoft SQL Server under dbx yet I still get the errors called to undefined function mssql_pconnect()...what can I try next? Is there anything that needs to be changed in the linux php ini file? It looked like most things where uncommented. here is the info page... http://mwvre.ht-tech.net/info.php This is something we have to get fixed today. Thanks!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
Hi, You should compile php with this option --with-mssql or --with-mssql=/path/to/freetds. This will enable the mssql extension. Enabling the DBX extension is not enough. DBX is just a wrapper arround other extensions. You still need to compile each of these extensions. - Frank I need some help...I am helping a local business with a site which needs to connect to a mssql db, my webhost uses linux and compiled php with the freetds library and when I go to the info page..it does show Microsoft SQL Server under dbx yet I still get the errors called to undefined function mssql_pconnect()...what can I try next? Is there anything that needs to be changed in the linux php ini file? It looked like most things where uncommented. here is the info page... http://mwvre.ht-tech.net/info.php This is something we have to get fixed today. Thanks!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
blackwater dev wrote: I need some help...I am helping a local business with a site which needs to connect to a mssql db, my webhost uses linux and compiled php with the freetds library and when I go to the info page..it does show Microsoft SQL Server under dbx yet I still get the errors called to undefined function mssql_pconnect()...what can I try next? Is there anything that needs to be changed in the linux php ini file? It looked like most things where uncommented. here is the info page... http://mwvre.ht-tech.net/info.php This is something we have to get fixed today. Thanks!! dbx is not mssql. dbx functions start with dbx_* http://sk.php.net/dbx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
-- Original message from blackwater dev : -- I need some help...I am helping a local business with a site which needs to connect to a mssql db, my webhost uses linux and compiled php with the freetds library and when I go to the info page..it does show Microsoft SQL Server under dbx yet I still get the errors called to undefined function mssql_pconnect()...what can I try next? The dbx extension is compiled in, not the mssql extension. You need to either use the functions in the dbx extension to do what you want, or if you would rather use the mssql functions you need to compile in the mssql extension. http://us3.php.net/manual/en/ref.dbx.php http://us3.php.net/manual/en/ref.mssql.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
From: blackwater dev [EMAIL PROTECTED] I need some help...I am helping a local business with a site which needs to connect to a mssql db, my webhost uses linux and compiled php with the freetds library and when I go to the info page..it does show Microsoft SQL Server under dbx yet I still get the errors called to undefined function mssql_pconnect()...what can I try next? Are you using the dbx functions and not mssql_connect/pconnect()?? http://www.php.net/manual/en/ref.dbx.php ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MSSQL, PHP and Linux
Hmm, I do see the MS SQL listed under DBX, but I don't see the --with=mssql in the configure line. Only psql and mysql. Does that need to be in there also? -Dan Joseph -Original Message- From: blackwater dev [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 01, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: [PHP] MSSQL, PHP and Linux I need some help...I am helping a local business with a site which needs to connect to a mssql db, my webhost uses linux and compiled php with the freetds library and when I go to the info page..it does show Microsoft SQL Server under dbx yet I still get the errors called to undefined function mssql_pconnect()...what can I try next? Is there anything that needs to be changed in the linux php ini file? It looked like most things where uncommented. here is the info page... http://mwvre.ht-tech.net/info.php This is something we have to get fixed today. Thanks!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
No, I was using the mssql functions which I want to use. I tried the dbx functions example: $link = dbx_connect('mssql', $mssqldbhost,,$mssqldbuser,$mssqldbpass); but go the error that the mssql module isn't loaded. On Wed, 1 Sep 2004 14:06:55 -0400, John Holmes [EMAIL PROTECTED] wrote: From: blackwater dev [EMAIL PROTECTED] I need some help...I am helping a local business with a site which needs to connect to a mssql db, my webhost uses linux and compiled php with the freetds library and when I go to the info page..it does show Microsoft SQL Server under dbx yet I still get the errors called to undefined function mssql_pconnect()...what can I try next? Are you using the dbx functions and not mssql_connect/pconnect()?? http://www.php.net/manual/en/ref.dbx.php ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
Like I and others have said, you need to compile PHP --with-mssql Blackwater Dev wrote: No, I was using the mssql functions which I want to use. I tried the dbx functions example: $link = dbx_connect('mssql', $mssqldbhost,,$mssqldbuser,$mssqldbpass); but go the error that the mssql module isn't loaded. On Wed, 1 Sep 2004 14:06:55 -0400, John Holmes [EMAIL PROTECTED] wrote: From: blackwater dev [EMAIL PROTECTED] I need some help...I am helping a local business with a site which needs to connect to a mssql db, my webhost uses linux and compiled php with the freetds library and when I go to the info page..it does show Microsoft SQL Server under dbx yet I still get the errors called to undefined function mssql_pconnect()...what can I try next? Are you using the dbx functions and not mssql_connect/pconnect()?? http://www.php.net/manual/en/ref.dbx.php ---John Holmes... -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- PGP Key ID: 0x3968B5EE -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
We just tried again with the -mssql switch but it still doesn't seem to be therethe -mssql isn't on the info page...I don't have a clue... http://mwvre.ht-tech.net/info.php On Wed, 01 Sep 2004 15:08:41 -0400, Ben Ramsey [EMAIL PROTECTED] wrote: Like I and others have said, you need to compile PHP --with-mssql Blackwater Dev wrote: No, I was using the mssql functions which I want to use. I tried the dbx functions example: $link = dbx_connect('mssql', $mssqldbhost,,$mssqldbuser,$mssqldbpass); but go the error that the mssql module isn't loaded. On Wed, 1 Sep 2004 14:06:55 -0400, John Holmes [EMAIL PROTECTED] wrote: From: blackwater dev [EMAIL PROTECTED] I need some help...I am helping a local business with a site which needs to connect to a mssql db, my webhost uses linux and compiled php with the freetds library and when I go to the info page..it does show Microsoft SQL Server under dbx yet I still get the errors called to undefined function mssql_pconnect()...what can I try next? Are you using the dbx functions and not mssql_connect/pconnect()?? http://www.php.net/manual/en/ref.dbx.php ---John Holmes... -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- PGP Key ID: 0x3968B5EE -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
I have tried recompiling with --with-mssql and --with-mssql=/usr/include/freetds It all appears to compile correctly, except the info page does not reflect the config was done with mssql at all. below is a snippet of the config switches that were used. --enable-ftp \ --enable-magic-quotes \ --enable-safe-mode \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-discard-path \ --enable-track-vars \ --enable-trans-sid \ --enable-yp \ --enable-wddx \ --without-oci8 \ --with-pear=/usr/share/pear \ --with-imap=shared \ --with-imap-ssl \ --with-kerberos=/usr/kerberos \ --with-ldap=shared \ --with-mysql=shared,%{_prefix} \ --with-sybase=/usr/include/freetds \ --with-mssql=/usr/include/freetds \ Any help would be appreciated. thanks, On Wed, 1 Sep 2004 08:29:55 -1200, blackwater dev [EMAIL PROTECTED] wrote: We just tried again with the -mssql switch but it still doesn't seem to be therethe -mssql isn't on the info page...I don't have a clue... http://mwvre.ht-tech.net/info.php On Wed, 01 Sep 2004 15:08:41 -0400, Ben Ramsey [EMAIL PROTECTED] wrote: Like I and others have said, you need to compile PHP --with-mssql Blackwater Dev wrote: No, I was using the mssql functions which I want to use. I tried the dbx functions example: $link = dbx_connect('mssql', $mssqldbhost,,$mssqldbuser,$mssqldbpass); but go the error that the mssql module isn't loaded. On Wed, 1 Sep 2004 14:06:55 -0400, John Holmes [EMAIL PROTECTED] wrote: From: blackwater dev [EMAIL PROTECTED] I need some help...I am helping a local business with a site which needs to connect to a mssql db, my webhost uses linux and compiled php with the freetds library and when I go to the info page..it does show Microsoft SQL Server under dbx yet I still get the errors called to undefined function mssql_pconnect()...what can I try next? Are you using the dbx functions and not mssql_connect/pconnect()?? http://www.php.net/manual/en/ref.dbx.php ---John Holmes... -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- PGP Key ID: 0x3968B5EE -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
Just try --with-mssql=/usr/include instead. Is that where freetds is installed for you? I think it's in /usr/local for me, so I use --with-mssql=/usr/local. Blackwater Dev wrote: I have tried recompiling with --with-mssql and --with-mssql=/usr/include/freetds It all appears to compile correctly, except the info page does not reflect the config was done with mssql at all. below is a snippet of the config switches that were used. --enable-ftp \ --enable-magic-quotes \ --enable-safe-mode \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-discard-path \ --enable-track-vars \ --enable-trans-sid \ --enable-yp \ --enable-wddx \ --without-oci8 \ --with-pear=/usr/share/pear \ --with-imap=shared \ --with-imap-ssl \ --with-kerberos=/usr/kerberos \ --with-ldap=shared \ --with-mysql=shared,%{_prefix} \ --with-sybase=/usr/include/freetds \ --with-mssql=/usr/include/freetds \ Any help would be appreciated. thanks, On Wed, 1 Sep 2004 08:29:55 -1200, blackwater dev [EMAIL PROTECTED] wrote: We just tried again with the -mssql switch but it still doesn't seem to be therethe -mssql isn't on the info page...I don't have a clue... http://mwvre.ht-tech.net/info.php On Wed, 01 Sep 2004 15:08:41 -0400, Ben Ramsey [EMAIL PROTECTED] wrote: Like I and others have said, you need to compile PHP --with-mssql Blackwater Dev wrote: No, I was using the mssql functions which I want to use. I tried the dbx functions example: $link = dbx_connect('mssql', $mssqldbhost,,$mssqldbuser,$mssqldbpass); but go the error that the mssql module isn't loaded. On Wed, 1 Sep 2004 14:06:55 -0400, John Holmes [EMAIL PROTECTED] wrote: From: blackwater dev [EMAIL PROTECTED] I need some help...I am helping a local business with a site which needs to connect to a mssql db, my webhost uses linux and compiled php with the freetds library and when I go to the info page..it does show Microsoft SQL Server under dbx yet I still get the errors called to undefined function mssql_pconnect()...what can I try next? Are you using the dbx functions and not mssql_connect/pconnect()?? http://www.php.net/manual/en/ref.dbx.php ---John Holmes... -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- PGP Key ID: 0x3968B5EE -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
-- Original message from blackwater dev : -- I have tried recompiling with --with-mssql and --with-mssql=/usr/include/freetds It all appears to compile correctly, except the info page does not reflect the config was done with mssql at all. below is a snippet of the config switches that were used. http://mwvre.ht-tech.net/info.php It also shows a build date in June. Did you restart apache? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
On Wed, Sep 01, 2004 at 04:39:51PM -0400, blackwater dev wrote: I have tried recompiling with --with-mssql and --with-mssql=/usr/include/freetds It all appears to compile correctly, except the info page does not reflect the config was done with mssql at all. below is a snippet of the config switches that were used. --enable-ftp \ --enable-magic-quotes \ --enable-safe-mode \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-discard-path \ --enable-track-vars \ --enable-trans-sid \ --enable-yp \ --enable-wddx \ --without-oci8 \ --with-pear=/usr/share/pear \ --with-imap=shared \ --with-imap-ssl \ --with-kerberos=/usr/kerberos \ --with-ldap=shared \ --with-mysql=shared,%{_prefix} \ --with-sybase=/usr/include/freetds \ --with-mssql=/usr/include/freetds \ Any help would be appreciated. thanks, It looks like you compiled it OK. Did you do a 'make install' afterwards? Did you restart the Apache server? I recently built PHP (4.3.8) with support for MS SQL and that was all I needed to do. -- Jim Kaufman Linux Evangelist public key 0x6D802619 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
the date is a very good question? Here is the info from my system -rwxr-xr-x1 root root 1371932 Sep 1 19:50 /usr/bin/php Not sure why its showing that date - Apache has been restarted. On Wed, 01 Sep 2004 22:29:41 +, Jennifer Goodie [EMAIL PROTECTED] wrote: -- Original message from blackwater dev : -- I have tried recompiling with --with-mssql and --with-mssql=/usr/include/freetds It all appears to compile correctly, except the info page does not reflect the config was done with mssql at all. below is a snippet of the config switches that were used. http://mwvre.ht-tech.net/info.php It also shows a build date in June. Did you restart apache? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
-- Original message from blackwater dev : -- the date is a very good question? Here is the info from my system -rwxr-xr-x 1 root root 1371932 Sep 1 19:50 /usr/bin/php Not sure why its showing that date - Apache has been restarted. Are you sure apache is loading the version you just built and not an old one in some other location (possibly /etc)? Did you read the install instructions for PHP with Apache 2.0 on a Linux system? Check step 14 and make sure you are loading the module from the correct location. Just a guess, but since none of your new configure flags are showing on the php info page and the build time is old, it looks like you are not running from the location you think you are. http://us3.php.net/manual/en/install.unix.apache2.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL, PHP and Linux
On Thursday 02 September 2004 08:30, blackwater dev wrote: the date is a very good question? Here is the info from my system -rwxr-xr-x1 root root 1371932 Sep 1 19:50 /usr/bin/php Not sure why its showing that date - Apache has been restarted. But that's probably your php-cli version. Are you using the Apache module version of PHP? I didn't see it in the configure command you posted previously. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* A father doesn't destroy his children. -- Lt. Carolyn Palamas, Who Mourns for Adonais?, stardate 3468.1. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL stored proc
hi everyone can you give me a sample code of using MSSQL stored procedures? and its explanation.. thanks
Re: [PHP] MSSQL stored proc
* Thus wrote Aris Santillan ([EMAIL PROTECTED]): hi everyone can you give me a sample code of using MSSQL stored procedures? and its explanation.. Here's a good place to start. http://php.net/mssql_execute Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php/mssql character limit?
I posted this message the other day, and no one has responded. I'm replying to it to refresh it in the list. I guess if no one responds or helps me out this time, then I'll just forget about it and let my client go unhappy. ;-) Seriously, if anyone can help me out, I would be much appreciative. Ben Ramsey wrote: Anyone know of any kind of character limit in php or mssql (yes, Microsoft SQL Server) for entering long text into a text column (of around 4,055 characters in length--that's where it's cutting off)? -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: php/mssql character limit?
are you using a 'Text' or a 'varchar' column type? I guess the max size for varchars is 4000; text should be larger vincent -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: lundi 8 mars 2004 17:30 To: [EMAIL PROTECTED] Subject: [PHP] Re: php/mssql character limit? I posted this message the other day, and no one has responded. I'm replying to it to refresh it in the list. I guess if no one responds or helps me out this time, then I'll just forget about it and let my client go unhappy. ;-) Seriously, if anyone can help me out, I would be much appreciative. Ben Ramsey wrote: Anyone know of any kind of character limit in php or mssql (yes, Microsoft SQL Server) for entering long text into a text column (of around 4,055 characters in length--that's where it's cutting off)? -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php/mssql character limit?
I am using a text column type. I had always though that the max size for varchars was 255. Vincent DUPONT wrote: are you using a 'Text' or a 'varchar' column type? I guess the max size for varchars is 4000; text should be larger -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: php/mssql character limit?
VARCHAR limit is 255 :) mysql.com has great documentation. Jason Vincent DUPONT [EMAIL PROTECTED] wrote: are you using a 'Text' or a 'varchar' column type? I guess the max size for varchars is 4000; text should be larger vincent -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: lundi 8 mars 2004 17:30 To: [EMAIL PROTECTED] Subject: [PHP] Re: php/mssql character limit? I posted this message the other day, and no one has responded. I'm replying to it to refresh it in the list. I guess if no one responds or helps me out this time, then I'll just forget about it and let my client go unhappy. ;-) Seriously, if anyone can help me out, I would be much appreciative. Ben Ramsey wrote: Anyone know of any kind of character limit in php or mssql (yes, Microsoft SQL Server) for entering long text into a text column (of around 4,055 characters in length--that's where it's cutting off)? -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: php/mssql character limit?
Is it mY SQL or MS SQL we are talking about? -Original Message- From: Jason Davidson [mailto:[EMAIL PROTECTED] Sent: lundi 8 mars 2004 17:42 To: [EMAIL PROTECTED] Subject: RE: [PHP] Re: php/mssql character limit? VARCHAR limit is 255 :) mysql.com has great documentation. Jason Vincent DUPONT [EMAIL PROTECTED] wrote: are you using a 'Text' or a 'varchar' column type? I guess the max size for varchars is 4000; text should be larger vincent -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: lundi 8 mars 2004 17:30 To: [EMAIL PROTECTED] Subject: [PHP] Re: php/mssql character limit? I posted this message the other day, and no one has responded. I'm replying to it to refresh it in the list. I guess if no one responds or helps me out this time, then I'll just forget about it and let my client go unhappy. ;-) Seriously, if anyone can help me out, I would be much appreciative. Ben Ramsey wrote: Anyone know of any kind of character limit in php or mssql (yes, Microsoft SQL Server) for entering long text into a text column (of around 4,055 characters in length--that's where it's cutting off)? -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: php/mssql character limit?
Coarse, i see after i post that you are talking about MSSql.. and not mysql.. i may have posted a little to quickly.. sorry. Jason Jason Davidson [EMAIL PROTECTED] wrote: VARCHAR limit is 255 :) mysql.com has great documentation. Jason Vincent DUPONT [EMAIL PROTECTED] wrote: are you using a 'Text' or a 'varchar' column type? I guess the max size for varchars is 4000; text should be larger vincent -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: lundi 8 mars 2004 17:30 To: [EMAIL PROTECTED] Subject: [PHP] Re: php/mssql character limit? I posted this message the other day, and no one has responded. I'm replying to it to refresh it in the list. I guess if no one responds or helps me out this time, then I'll just forget about it and let my client go unhappy. ;-) Seriously, if anyone can help me out, I would be much appreciative. Ben Ramsey wrote: Anyone know of any kind of character limit in php or mssql (yes, Microsoft SQL Server) for entering long text into a text column (of around 4,055 characters in length--that's where it's cutting off)? -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: php/mssql character limit?
Hi Ben, The setting in the php.ini is; mssql.textlimit = 4096 Reset that value to what you want. I have mine set to 400. Valid range 0 - 2147483647 alex hogan -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: Monday, March 08, 2004 10:30 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: php/mssql character limit? I posted this message the other day, and no one has responded. I'm replying to it to refresh it in the list. I guess if no one responds or helps me out this time, then I'll just forget about it and let my client go unhappy. ;-) Seriously, if anyone can help me out, I would be much appreciative. Ben Ramsey wrote: Anyone know of any kind of character limit in php or mssql (yes, Microsoft SQL Server) for entering long text into a text column (of around 4,055 characters in length--that's where it's cutting off)? -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ** The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. **
Re: [PHP] Re: php/mssql character limit?
That's precisely what I was looking for, Alex! I must have overlooked it when skimming through php.ini. Thanks! Alex Hogan wrote: Hi Ben, The setting in the php.ini is; mssql.textlimit = 4096 Reset that value to what you want. I have mine set to 400. Valid range 0 - 2147483647 alex hogan -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php/mssql character limit?
Ben Ramsey wrote: Anyone know of any kind of character limit in php or mssql (yes, Microsoft SQL Server) for entering long text into a text column (of around 4,055 characters in length--that's where it's cutting off)? Have a look in php.ini - IIRC there are 2 options that affect this. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php/mssql character limit?
Anyone know of any kind of character limit in php or mssql (yes, Microsoft SQL Server) for entering long text into a text column (of around 4,055 characters in length--that's where it's cutting off)? -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL connection
Hi All, I have a question about connecting to a MSSQL back end. I keep getting the error that the php_mssql.dll wont load because it isn't present. From what I can see so far is that php needs to be compiled with that extension uncommented in order to get the dll. Is that correct? alex hogan ** The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. **
Re: [PHP] MSSQL connection
I assume you are working on a win32 platform, if so uncomment that relevent line in the php.ini file and copy the dll to the win folders. (all this is explained in great detail in teh installation guide) If you are working on linux this approach will not work with mssql. Alex Hogan wrote: Hi All, I have a question about connecting to a MSSQL back end. I keep getting the error that the php_mssql.dll wont load because it isn't present. From what I can see so far is that php needs to be compiled with that extension uncommented in order to get the dll. Is that correct? alex hogan ** The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. ** -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL connection
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If your Web server is running on a machine that is separate from your database server, then you'll also need to copy the file ntwdblib.dll from the database server to your C:\WINDOWS\system32 folder. PHP needs that DLL for the mssql functions to work correctly. Raditha Dissanayake wrote: | I assume you are working on a win32 platform, if so uncomment that | relevent line in the php.ini file and copy the dll to the win folders. | (all this is explained in great detail in teh installation guide) | | If you are working on linux this approach will not work with mssql. | | | Alex Hogan wrote: | | Hi All, | | | | I have a question about connecting to a MSSQL back end. I keep | getting the | error that the php_mssql.dll wont load because it isn't present. | | | | From what I can see so far is that php needs to be compiled with that | extension uncommented in order to get the dll. Is that correct? | | | | | | | | alex hogan | | | | | | ** The | contents of this e-mail and any files transmitted with it are | confidential and intended solely for the use of the individual or | entity to whom it is addressed. The views stated herein do not | necessarily represent the view of the company. If you are not the | intended recipient of this e-mail you may not copy, forward, disclose, | or otherwise use it or any part of it in any form whatsoever. If you | have received this e-mail in error please e-mail the sender. | ** | | | | | | -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAEAvYIcIs3CP5DxwRAu1RAKCqeaSzCbHHO8Aibw9L9UwbErnK5QCcDqcN zWleSmyn3J+gwxvzT59VSWw= =GCyj -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [PHP - MSSQL]: Problem with mssql_connect
Please help!... I have to use 'apache+php' connect to MSSQL Server 2000 in Windows Server 2003, but there are problem. Computer A: Windows Server 2003 Enterprise, MSSQL Server 2000 Enterprise, Computer B: Windows XP Professional, Apache, php ( Web Server ) Computer A -- network - Computer B I try to write php script such this.. mssql_connect('server','sa',''); but the result is: ***message: Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in ...*** Please help me find out the problem.. m(_ _)m and sorry for my english language, + + + + + + + + + + + + + + + + + + + [the thing that I did]... 1. I install client part from MSSQL Server CD Installer into Computer B already and I'm sure for ntwdblib.dll or php_mssql.dll is newest version that I can find.. 2. I set Authentication in MSSQL Server to be 'SQL Server and Windows' already + + + + [ but the problem still happen ] + + -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [PHP - MSSQL]: Problem with mssql_connect
Change MS SQL SERVER Authentication's type to SQL Server and Windows instead of windows only. Ongart Wongsanupa [EMAIL PROTECTED] 09/18/2003 04:25 PM To: [EMAIL PROTECTED] cc: Subject:[PHP] [PHP - MSSQL]: Problem with mssql_connect Please help!... I have to use 'apache+php' connect to MSSQL Server 2000 in Windows Server 2003, but there are problem. Computer A: Windows Server 2003 Enterprise, MSSQL Server 2000 Enterprise, Computer B: Windows XP Professional, Apache, php ( Web Server ) Computer A -- network - Computer B I try to write php script such this.. mssql_connect('server','sa',''); but the result is: ***message: Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in ...*** Please help me find out the problem.. m(_ _)m and sorry for my english language, + + + + + + + + + + + + + + + + + + + [the thing that I did]... 1. I install client part from MSSQL Server CD Installer into Computer B already and I'm sure for ntwdblib.dll or php_mssql.dll is newest version that I can find.. 2. I set Authentication in MSSQL Server to be 'SQL Server and Windows' already + + + + [ but the problem still happen ] + + -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [PHP - MSSQL]: Problem with mssql_connect
I did it already,. but that's not help thank for advice.. Larry Li [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] . Change MS SQL SERVER Authentication's type to SQL Server and Windows instead of windows only. Ongart Wongsanupa [EMAIL PROTECTED] 09/18/2003 04:25 PM To: [EMAIL PROTECTED] cc: Subject:[PHP] [PHP - MSSQL]: Problem with mssql_connect Please help!... I have to use 'apache+php' connect to MSSQL Server 2000 in Windows Server 2003, but there are problem. Computer A: Windows Server 2003 Enterprise, MSSQL Server 2000 Enterprise, Computer B: Windows XP Professional, Apache, php ( Web Server ) Computer A -- network - Computer B I try to write php script such this.. mssql_connect('server','sa',''); but the result is: ***message: Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in ...*** Please help me find out the problem.. m(_ _)m and sorry for my english language, + + + + + + + + + + + + + + + + + + + [the thing that I did]... 1. I install client part from MSSQL Server CD Installer into Computer B already and I'm sure for ntwdblib.dll or php_mssql.dll is newest version that I can find.. 2. I set Authentication in MSSQL Server to be 'SQL Server and Windows' already + + + + [ but the problem still happen ] + + -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP MSSQL Images
* Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]): ... The following is the tag inserted to my webpage: img src=showpic.php?picid=1 View the source of this image to see if any php errors are being displayed. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP MSSQL Images
Hey .. I am having a problem when i try to pull an image that has been stored in MS SQL Server from displaying properly. I know, its a waste of space to store the actual image in SQL, but this is the way it needs to be done to be compatible with some of the other systems. Anyway, if you have any input at all as to what could be wrong, please let me know. I will provide my system information and code below for your review. Thanks. Platform: Linux Redhat 9 PHP Version 4.3.1 FreeTDS 0.61 (used to connect to Microsoft SQL Server) SQL Server 2000 Here is my code (except for connection information, of course) showpic.php ? $eventid=$_GET[picid]; $dsource = SQL IP; $sqluser = Username; $sqlpass = Password; $catalog = Database; [EMAIL PROTECTED]($dsource,$sqluser,$sqlpass) or die(Could not connect to the database); @mssql_select_db($catalog) or die (invalid); $getpic = mssql_query(select Picture from GetPics where Id='$eventid') or die(Query is not achievable by SQL Server) or die(invalid); while($rs=mssql_fetch_array($getpic)) { header(Content-type: image/jpeg); $image=$rs[Picture]; print $image; } ? The following is the tag inserted to my webpage: img src=showpic.php?picid=1 Please let me know if you have any ideas, and if you dont, thanks for your help anyway. Chris [EMAIL PROTECTED]
[PHP] MSSQL connection
LS, I am trying to get a connection to a remote MSSQL server. This is what I found in the online manual : quote mssql_connect() establishes a connection to a MS SQL server. The servername argument has to be a valid servername that is defined in the 'interfaces' file. /quote This is the command given : quote $test = mssql_connect(SQL-001,whoever,whatever); /quote This is the output of the code snippet quote Fatal error: Call to undefined function: mssql_connect() in c:\program files\apache\htdocs\pestest\axtest.php on line 5 /quote The error message seems to be out of line with the manual . I was wondering whether this is related to the definition in the 'interfaces' file (whatever that may be). All help highly appreciated. Wim
Re: [PHP] MSSQL connection
You need to turn on the MSSQL extension in your php.ini, under Windows this file is probably in: c:\winnt\php.ini On Tue, 2003-06-17 at 11:01, Wim Paulussen wrote: LS, I am trying to get a connection to a remote MSSQL server. This is what I found in the online manual : quote mssql_connect() establishes a connection to a MS SQL server. The servername argument has to be a valid servername that is defined in the 'interfaces' file. /quote This is the command given : quote $test = mssql_connect(SQL-001,whoever,whatever); /quote This is the output of the code snippet quote Fatal error: Call to undefined function: mssql_connect() in c:\program files\apache\htdocs\pestest\axtest.php on line 5 /quote The error message seems to be out of line with the manual . I was wondering whether this is related to the definition in the 'interfaces' file (whatever that may be). All help highly appreciated. Wim -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MSSQL connection
That's it . Thank you very much ! -Oorspronkelijk bericht- Van: Adam Voigt [mailto:[EMAIL PROTECTED] Verzonden: Tuesday, June 17, 2003 5:10 PM Aan: Wim Paulussen CC: [EMAIL PROTECTED] Onderwerp: Re: [PHP] MSSQL connection You need to turn on the MSSQL extension in your php.ini, under Windows this file is probably in: c:\winnt\php.ini On Tue, 2003-06-17 at 11:01, Wim Paulussen wrote: LS, I am trying to get a connection to a remote MSSQL server. This is what I found in the online manual : quote mssql_connect() establishes a connection to a MS SQL server. The servername argument has to be a valid servername that is defined in the 'interfaces' file. /quote This is the command given : quote $test = mssql_connect(SQL-001,whoever,whatever); /quote This is the output of the code snippet quote Fatal error: Call to undefined function: mssql_connect() in c:\program files\apache\htdocs\pestest\axtest.php on line 5 /quote The error message seems to be out of line with the manual . I was wondering whether this is related to the definition in the 'interfaces' file (whatever that may be). All help highly appreciated. Wim -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MSSQL connection
At least : step 1. Does anyone know what is meant by the 'interfaces' file ? quote The servername argument has to be a valid servername that is defined in the 'interfaces' file. /quote -Oorspronkelijk bericht- Van: Wim Paulussen [mailto:[EMAIL PROTECTED] Verzonden: Tuesday, June 17, 2003 5:14 PM Aan: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Onderwerp: RE: [PHP] MSSQL connection That's it . Thank you very much ! -Oorspronkelijk bericht- Van: Adam Voigt [mailto:[EMAIL PROTECTED] Verzonden: Tuesday, June 17, 2003 5:10 PM Aan: Wim Paulussen CC: [EMAIL PROTECTED] Onderwerp: Re: [PHP] MSSQL connection You need to turn on the MSSQL extension in your php.ini, under Windows this file is probably in: c:\winnt\php.ini On Tue, 2003-06-17 at 11:01, Wim Paulussen wrote: LS, I am trying to get a connection to a remote MSSQL server. This is what I found in the online manual : quote mssql_connect() establishes a connection to a MS SQL server. The servername argument has to be a valid servername that is defined in the 'interfaces' file. /quote This is the command given : quote $test = mssql_connect(SQL-001,whoever,whatever); /quote This is the output of the code snippet quote Fatal error: Call to undefined function: mssql_connect() in c:\program files\apache\htdocs\pestest\axtest.php on line 5 /quote The error message seems to be out of line with the manual . I was wondering whether this is related to the definition in the 'interfaces' file (whatever that may be). All help highly appreciated. Wim -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mssql error after upgrading to 4.3.2
Hi, yesterday I upgraded to php 4.3.2 from 4.3.1 with the freebsd ports. There were any problems on the process, but many of the pages I had running with mssql, now doesn't work. These are the errors I get: Warning: mssql_num_rows(): supplied argument is not a valid Sybase result resource in xxx.php Warning: mssql_free_result(): supplied argument is not a valid Sybase result resource in xxx.php Javier. -- *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL - Previous/Next Paging Results
MSSQL seems to be a little bit messier that MySQL..e.g limit clause etc Anyone know of articles/examples that specifically deal with this issue? Any insight appreciated. Craig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MSSQL - Previous/Next Paging Results
Hi, -Original Message- MSSQL seems to be a little bit messier that MySQL..e.g limit clause etc Anyone know of articles/examples that specifically deal with this issue? Look into the Top() function for MSSQL. It goes something like: SELECT Top(10) * FROM table You should be able to find some info under the msdn.microsoft.com page. Or, MS has several hundred newsgroups, they should have one for MSSQL. -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL - Previous/Next Paging Results
-Original Message- MSSQL seems to be a little bit messier that MySQL..e.g limit clause etc Anyone know of articles/examples that specifically deal with this issue? Look into the Top() function for MSSQL. It goes something like: SELECT Top(10) * FROM table You should be able to find some info under the msdn.microsoft.com page. Or, MS has several hundred newsgroups, they should have one for MSSQL. Use TOP in conjuction with mssql_data_seek() to get where you need. Since you can't specify a starting point with TOP like you can with LIMIT, you seek() to the starting point. All other concepts still apply. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL using Sybase FreeTDS
Hey all, Im hoping someone can shed some light on this for me: Im running PHP 4.31 on RH Advanced Server 2.1 I am connecting, to M$SQL Server 2000 using FreeTDS -- with Sybase support, and Im stumped on 1 thing: CODE: ?php $ccode = $_POST['ccode']; $cname = $_POST['cname']; $cstreet = $_POST['cstreet']; include(includes/connect.php); $iqry_clients = mssql_query(INSERT INTO Clients (client_code,client_name,client_street) VALUES ('$ccode','$cname','$cstreet')); mssql_close($conn); ? The above code works fine, except when one of the fields e.g client_name - Has a quoted string or an apostrophe in it, it just spews the following error: Warning: Sybase error: Line 1: Incorrect syntax near 's'. (severity 15) in /var/www/html/clients/pages/add_client.php on line 17 Has anyone experienced this, and if so know of a possible solution?? I have used addslashes() etc but still no joy. Thanks in advance. Craig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL using Sybase FreeTDS
On Thu, 3 Apr 2003, Craig wrote: Hey all, Im hoping someone can shed some light on this for me: Im running PHP 4.31 on RH Advanced Server 2.1 I am connecting, to M$SQL Server 2000 using FreeTDS -- with Sybase support, and Im stumped on 1 thing: CODE: ?php $ccode = $_POST['ccode']; $cname = $_POST['cname']; $cstreet = $_POST['cstreet']; include(includes/connect.php); $iqry_clients = mssql_query(INSERT INTO Clients (client_code,client_name,client_street) VALUES ('$ccode','$cname','$cstreet')); mssql_close($conn); ? The above code works fine, except when one of the fields e.g client_name - Has a quoted string or an apostrophe in it, it just spews the following error: Warning: Sybase error: Line 1: Incorrect syntax near 's'. (severity 15) in /var/www/html/clients/pages/add_client.php on line 17 Has anyone experienced this, and if so know of a possible solution?? I have used addslashes() etc but still no joy. Thanks in advance. Craig I think you should pass the values through AddSlashes function: include(includes/connect.php); $ccode = AddSlashes($ccode); $cname = AddSlashes($cname); $cstreet = AddSlashes($cstreet); $iqry_clients = mssql_query(INSERT INTO Clients (client_code,client_name,client_street) VALUES ('$ccode','$cname','$cstreet')); Cheers, -- --Jyry :-(C:-/C8-OC8-/C:-( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL using Sybase FreeTDS
From: Craig [EMAIL PROTECTED] Im running PHP 4.31 on RH Advanced Server 2.1 I am connecting, to M$SQL Server 2000 using FreeTDS -- with Sybase support, and Im stumped on 1 thing: [snip] The above code works fine, except when one of the fields e.g client_name - Has a quoted string or an apostrophe in it, it just spews the following error: Warning: Sybase error: Line 1: Incorrect syntax near 's'. (severity 15) in /var/www/html/clients/pages/add_client.php on line 17 Has anyone experienced this, and if so know of a possible solution?? I have used addslashes() etc but still no joy. MSSQL doesn't use slashes for escaping. You probably need to use a single quote character instead of a slash. See user notes in the PHP manual, http://www.php.net/manual/en/function.addslashes.php, which will direct you to other info on changing the escape character used. -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL using Sybase FreeTDS
On Thu, 3 Apr 2003 12:17:50 +0100, you wrote: Has anyone experienced this, and if so know of a possible solution?? I have used addslashes() etc but still no joy. In addition to what the other respondents have said, you can set the INI setting magic_quotes_sybase to 1, and this will change addslashes() so that it escapes a single quote with a single quote pair. This is a global setting, though. If you access two different databases, say both MS-SQL and MySql, on the same page then I would suggest that you not use the built in addslashes(), but instead roll your own escaping function for each DB type. Or better yet, use a database abstraction tool like Pear DB which includes a quote() method that is specific to each DB backend. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL/PHP Problem
Hi, I have this problem retrieving data from a mssql table with PHP. I have this in my mssql table column: Globe and Mail data are retrieved and processed for CustomSearch. On the R30, the crontab entry: 0 4 * * 1-6 /usr1/applic/ntgm/ntgm_get.pl will run the Perl script at 4 a.m. everyday to retrieve the data from Globe and Mail. It will look for the file, retry if not found, until 6 a.m. Most common problem is caused by the data file not available after 6 a.m. for retrieval. The system will send an error message to the support team to alert the problem. To retry downloading manually, simply sign on to the R30 and run the script /usr1/applic/ntgm/ntgm_get.pl. The data file can be found in the done directory and two log files in the log directory. WHen I retrieve this data from php to display on my webpage I get this: Globe and Mail data are retrieved and processed for CustomSearch. On the R30, the crontab entry: 0 4 * * 1-6 /usr1/applic/ntgm/ntgm_get.pl will run the Perl script at 4 a.m. everyday to retrieve the data from Globe and Mail. It will look for the fi The code I have in my php to display this text is: $query = SELECT * FROM knowledgeBase WHERE Title = '$title'; $result = mssql_query($query); $line = mssql_fetch_row($result); echo $line[2]; $line[2] because this data is in the second column of the mssql table of the row '$title' P.S. I have set the limit of the mssql table to have 8000 character, so it should exceed the limit, but I just don't know why it takes only 6 lines of the total 11 lines of what I had in the mssql table. Please advise! THANKS! Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PERL/PHP, MSSQL, Unix AIX
Thanks, but what can FreeTDS do? So it can connect to my AIX server and retrieve that text file out? Kelvin -Original Message- From: Frank M. Kromann [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:35 AM To: Poon, Kelvin (Infomart) Cc: '[EMAIL PROTECTED]' Subject: Re: [PHP] PERL/PHP, MSSQL, Unix AIX Hi Kelvin, You can use both PERL and PHP (prefered :-)). You need to download, compile and install FreeTDS (http://freetds.org). If you are using PHP you need to recompile it using --with-mssql. This will enable the mssql extension. You can then create a php script to read the text file, parse it and create the data in a MSSQL server on a Win32 box (PHP is running on your AIX box). - Frank Hi, I got a little project and I need to come up with a solution on how to finish it and was hoping if you guys can give me any ideas. I have a PERL script on a Unix AIX machine that checks for incoming update of data. Specificly what it does is, when it runs, it will look at the corresponding directories in the AIX machine and record the time WHEN a data has come in and check if the time is delayed or on time, kind of like how the flight Arrival/departure information work in an airport. After it collects this information, it will store these information in a text file. I need to display this information in a form of a web page so that my internal staff can see this information. I usually store this kind of information in a MSSQL table and use PHP to general a page that collects its information from the database/MSSQL table. The way I want to do it, somehow store/update the data in the text file of the AIX machine to the MSSQL table so that my php page would be able to get the updated information for display. My problem is I haven't come up with a solution as to how I can pull this text file out fo the AIX machine and transfer the data to the MSSQL table. Anyone have an ideas? IS there anything in PHP I can use to do this? Any help is appreicated, thanks! Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PERL/PHP, MSSQL, Unix AIX
FreeTDS allows you to connecto your MSSQL server from PHP under unix/linux. On Tue, 2003-03-11 at 14:05, Poon, Kelvin (Infomart) wrote: Thanks, but what can FreeTDS do? So it can connect to my AIX server and retrieve that text file out? Kelvin -Original Message- From: Frank M. Kromann [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:35 AM To: Poon, Kelvin (Infomart) Cc: '[EMAIL PROTECTED]' Subject: Re: [PHP] PERL/PHP, MSSQL, Unix AIX Hi Kelvin, You can use both PERL and PHP (prefered :-)). You need to download, compile and install FreeTDS (http://freetds.org). If you are using PHP you need to recompile it using --with-mssql. This will enable the mssql extension. You can then create a php script to read the text file, parse it and create the data in a MSSQL server on a Win32 box (PHP is running on your AIX box). - Frank Hi, I got a little project and I need to come up with a solution on how to finish it and was hoping if you guys can give me any ideas. I have a PERL script on a Unix AIX machine that checks for incoming update of data. Specificly what it does is, when it runs, it will look at the corresponding directories in the AIX machine and record the time WHEN a data has come in and check if the time is delayed or on time, kind of like how the flight Arrival/departure information work in an airport. After it collects this information, it will store these information in a text file. I need to display this information in a form of a web page so that my internal staff can see this information. I usually store this kind of information in a MSSQL table and use PHP to general a page that collects its information from the database/MSSQL table. The way I want to do it, somehow store/update the data in the text file of the AIX machine to the MSSQL table so that my php page would be able to get the updated information for display. My problem is I haven't come up with a solution as to how I can pull this text file out fo the AIX machine and transfer the data to the MSSQL table. Anyone have an ideas? IS there anything in PHP I can use to do this? Any help is appreicated, thanks! Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc signature.asc Description: This is a digitally signed message part
Re: [PHP] PERL/PHP, MSSQL, Unix AIX
Hi Kelvin, You can use both PERL and PHP (prefered :-)). You need to download, compile and install FreeTDS (http://freetds.org). If you are using PHP you need to recompile it using --with-mssql. This will enable the mssql extension. You can then create a php script to read the text file, parse it and create the data in a MSSQL server on a Win32 box (PHP is running on your AIX box). - Frank Hi, I got a little project and I need to come up with a solution on how to finish it and was hoping if you guys can give me any ideas. I have a PERL script on a Unix AIX machine that checks for incoming update of data. Specificly what it does is, when it runs, it will look at the corresponding directories in the AIX machine and record the time WHEN a data has come in and check if the time is delayed or on time, kind of like how the flight Arrival/departure information work in an airport. After it collects this information, it will store these information in a text file. I need to display this information in a form of a web page so that my internal staff can see this information. I usually store this kind of information in a MSSQL table and use PHP to general a page that collects its information from the database/MSSQL table. The way I want to do it, somehow store/update the data in the text file of the AIX machine to the MSSQL table so that my php page would be able to get the updated information for display. My problem is I haven't come up with a solution as to how I can pull this text file out fo the AIX machine and transfer the data to the MSSQL table. Anyone have an ideas? IS there anything in PHP I can use to do this? Any help is appreicated, thanks! Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PERL/PHP, MSSQL, Unix AIX
Hi Kelvin, You can use both PERL and PHP (prefered :-)). You need to download, compile and install FreeTDS (http://freetds.org). If you are using PHP you need to recompile it using --with-mssql. This will enable the mssql extension. You can then create a php script to read the text file, parse it and create the data in a MSSQL server on a Win32 box (PHP is running on your AIX box). - Frank Hi, I got a little project and I need to come up with a solution on how to finish it and was hoping if you guys can give me any ideas. I have a PERL script on a Unix AIX machine that checks for incoming update of data. Specificly what it does is, when it runs, it will look at the corresponding directories in the AIX machine and record the time WHEN a data has come in and check if the time is delayed or on time, kind of like how the flight Arrival/departure information work in an airport. After it collects this information, it will store these information in a text file. I need to display this information in a form of a web page so that my internal staff can see this information. I usually store this kind of information in a MSSQL table and use PHP to general a page that collects its information from the database/MSSQL table. The way I want to do it, somehow store/update the data in the text file of the AIX machine to the MSSQL table so that my php page would be able to get the updated information for display. My problem is I haven't come up with a solution as to how I can pull this text file out fo the AIX machine and transfer the data to the MSSQL table. Anyone have an ideas? IS there anything in PHP I can use to do this? Any help is appreicated, thanks! Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PERL/PHP, MSSQL, Unix AIX
Hi, I got a little project and I need to come up with a solution on how to finish it and was hoping if you guys can give me any ideas. I have a PERL script on a Unix AIX machine that checks for incoming update of data. Specificly what it does is, when it runs, it will look at the corresponding directories in the AIX machine and record the time WHEN a data has come in and check if the time is delayed or on time, kind of like how the flight Arrival/departure information work in an airport. After it collects this information, it will store these information in a text file. I need to display this information in a form of a web page so that my internal staff can see this information. I usually store this kind of information in a MSSQL table and use PHP to general a page that collects its information from the database/MSSQL table. The way I want to do it, somehow store/update the data in the text file of the AIX machine to the MSSQL table so that my php page would be able to get the updated information for display. My problem is I haven't come up with a solution as to how I can pull this text file out fo the AIX machine and transfer the data to the MSSQL table. Anyone have an ideas? IS there anything in PHP I can use to do this? Any help is appreicated, thanks! Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL Stored procedure return values
Hi, I'm doing a small project at work with php, ms sql server on w2k IIS5. All the data access is done through stored procedures. This seems to be working fine, the record sets are returned and the stored procedures execute without error however I can't get any return values from them. For example I have the following php code: // setup stored procedure $sp = mssql_init(spGetReseller, $conObj); mssql_bind($sp, ResellerID, $loginID, SQLINT4, FALSE); mssql_bind($sp, ReturnCode, $retVal, SQLINT4, TRUE); $rs = mssql_execute($sp); So the ReturnCode variable is defined as OUTPUT in the SP and I am passing in $retVal by reference. This is my stored procedure. ALTER PROCEDURE spGetReseller ResellerID int , ReturnCode int OUTPUT AS SELECT Something FROM SomeTable WHERE SomeField = 1 -- set return code IF ROWCOUNT 0 SET ReturnCode = 0 ELSE SET ReturnCode = 1 This should set the returncode to be 1 if there are no rows returned. However no matter what, it will never get this returncode from the stored procedure. (ie $retVal will not be changed by the mssql_bind function) I ran the stored procedure and the returnCode variable is set correctly there so that isn't the problem. Does anyone know what could be the problem there? I guess I could return ReturnCode in the recordset but that would be kinda hokey. Thanks, Leo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mssql functions
Hi, i need the php mssql functions, but php is not configured --with-mssql on my server. What options do i have to enable this? I mean, if i need the mssql-functions, does the client (as stated in the php manual) have to be installed, or can i use s.th. dynamical and load it at runtime? S.o. mentioned to use a mssql.so with the php dl command, but regarding the client isn't installed on the server, would it work then? btw: with client i mean Sybase's OpenClient or FreeTDS. Regards, Duncan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MsSQL connection !!! HELP !
I can't connect to mssql! When I start PHP page with MsSQL connection, PHP craches and I receive this: PHP caused an invalid page fault in module NTWDBLIB.DLL at 0167:73330fde. Registers: EAX=0020 CS=0167 EIP=73330fde EFLGS=00010246 EBX=0010 SS=016f ESP=0063f600 EBP=0063f610 ECX=00797fe0 DS=016f ESI=0012 FS=4b5f EDX= ES=016f EDI=00797fe0 GS= Bytes at CS:EIP: c6 04 01 00 8b 45 f4 d1 e0 8b e5 5d c2 14 00 cc Stack dump: 760014d7 0010 0010 0063f67c 7333165e 014d7980 00797fe0 0010 00797fe0 0012 000b 7335a294 0030 What is the problem? lease help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL - Authentification ?????
Hi All! Is there a way to build up the connection to a MSSQL Database if the Authentification is set to Windows-Authentification and not SQL-Authentification? Greetings, Gabor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL - Authentification ?????
Hi All! Is there a way to build up the connection to a MSSQL Database if the Authentification is set to Windows-Authentification and not SQL-Authentification? Greetings, Gabor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL and NT
Hi all! I went after my problem with the NT authentification and I found out, that if you want to make a NT-based Authentification (f.ex for an ODBC-Connection) the I_USR will be seen as the actual user... I granted then rights to the I_USR in the DB, but this way, I cannot distinguish which user is actually working in the DB. IS there a way to use NT-Authentification in connection with php MSSQL ??? Please Help, Gabor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MSSQL and NT
Not sure if this helps, but if you turn on NT-Authentication in IIS, then you'll have a variable $_SERVER['LOGGED_ON'] or something similar that'll hold the username of the person that's logged on. Check a phpinfo() page in a NT-Authenticated directory to see which variables are available. ---John Holmes... -Original Message- From: Gabor Niederlaender [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 8:39 AM To: [EMAIL PROTECTED] Subject: [PHP] MSSQL and NT Hi all! I went after my problem with the NT authentification and I found out, that if you want to make a NT-based Authentification (f.ex for an ODBC-Connection) the I_USR will be seen as the actual user... I granted then rights to the I_USR in the DB, but this way, I cannot distinguish which user is actually working in the DB. IS there a way to use NT-Authentification in connection with php MSSQL ??? Please Help, Gabor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL/PHP Query Help
Hey guys... I'm currently using PHP, FreeTDS, and Sybase libraries to access a database on an MS SQL 2000 server. Things are going fine, except for my more complex queries. Here is an example: SELECT Servers.Name, Nics.MAC FROM Servers INNER JOIN Nics ON Servers.ServerId = Nics.Server WHERE (((Nics.MAC)=0002B34DA81F)) OR (((Nics.MAC)=0002B34DA76F)) OR (((Nics.MAC)=0002B34DA32D)) OR (((Nics.MAC)=0002B34DA31D)); This query isn't even as bad as it's going to get, but I get the error: Sybase error: Invalid column name '0002B34DA81F'. I get this for each Nics.MAC entry that I make. If I don't include the WHERE/OR statement, the query runs fine. The query runs correctly on the MS SQL server itself, but I can't get it to work here. I assume that PHP just passes the query to the SQL server directly, so there must be something that I'm missing. Do I need to escape more than just the quotes? If there is anything I need to know about PHP and MS SQL before I go on, I'd love to hear it. ;-) Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MSSQL/PHP Query Help
have you tried Nics.MAC in (xxx,xxx,xxx,xxx)? There's a lot less room for error in that, because it's so much tidier. -Natalie -Original Message- From: Michael [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 10:56 AM To: [EMAIL PROTECTED] Subject: [PHP] MSSQL/PHP Query Help Hey guys... I'm currently using PHP, FreeTDS, and Sybase libraries to access a database on an MS SQL 2000 server. Things are going fine, except for my more complex queries. Here is an example: SELECT Servers.Name, Nics.MAC FROM Servers INNER JOIN Nics ON Servers.ServerId = Nics.Server WHERE (((Nics.MAC)=0002B34DA81F)) OR (((Nics.MAC)=0002B34DA76F)) OR (((Nics.MAC)=0002B34DA32D)) OR (((Nics.MAC)=0002B34DA31D)); This query isn't even as bad as it's going to get, but I get the error: Sybase error: Invalid column name '0002B34DA81F'. I get this for each Nics.MAC entry that I make. If I don't include the WHERE/OR statement, the query runs fine. The query runs correctly on the MS SQL server itself, but I can't get it to work here. I assume that PHP just passes the query to the SQL server directly, so there must be something that I'm missing. Do I need to escape more than just the quotes? If there is anything I need to know about PHP and MS SQL before I go on, I'd love to hear it. ;-) Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php