Re: [PHP-DB] Sybase and PHP
I got a similar setup up and running a few months ago. Sadly I am having connection problems, else I would give you the configure string I used. When netowrk does come around, I will see what I can do. Steven [EMAIL PROTECTED] wrote: We have been using sybase with PHP4 and now are looking to move to PHP5. I ran into an installation problem with PHP5 and starting looking at the bug reports and can't tell for sure whether sybase is being supported any longer. I was working with PHP5 source rpm on Fedora 6 when I ran into a problem with recompiling it (rpmbuild -ba). I really couldn't make much of the error. php-5.1.6-3 Building from rpm source I get the following errors. with standard Fedora6 src I added the following line to the --with-sybase-ct=/opt/sybase/OCS-15_0 \ Building from rpm source I get the following errors. - screen error -- checking for string.h... (cached) yes checking for char... yes checking size of char... configure: error: cannot compute sizeof (char), 77 See `config.log' for more details. error: Bad exit status from /var/tmp/rpm-tmp.17076 (%build) -- partial output from config logs config.log before this it indicated that it was in confdefs.h --- #define SIZEOF_LONG 4 #define SIZEOF_LONG 4 #define SIZEOF_LONG 4 #define SIZEOF_LONG 4 #define SIZEOF_LONG_LONG 8 #define SIZEOF_LONG_LONG 8 #define SIZEOF_LONG_LONG_INT 8 #define SIZEOF_PTRDIFF_T 4 #define SIZEOF_SHORT 2 #define SIZEOF_SHORT 2 #define SIZEOF_SIZE_T 4 #define SIZEOF_SSIZE_T 4 #define STDC_HEADERS 1 #define STDC_HEADERS 1 #define TIME_WITH_SYS_TIME 1 #define UCD_SNMP_HACK 1 #define UNDEF_THREADS_HACK #define USE_GD_IMGSTRTTF 1 #define USE_GD_IMGSTRTTF 1 #define YYTEXT_POINTER 1 #define _GNU_SOURCE 1 configure: exit 1 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase and PHP
We have been using sybase with PHP4 and now are looking to move to PHP5. I ran into an installation problem with PHP5 and starting looking at the bug reports and can't tell for sure whether sybase is being supported any longer. I was working with PHP5 source rpm on Fedora 6 when I ran into a problem with recompiling it (rpmbuild -ba). I really couldn't make much of the error. php-5.1.6-3 Building from rpm source I get the following errors. with standard Fedora6 src I added the following line to the --with-sybase-ct=/opt/sybase/OCS-15_0 \ Building from rpm source I get the following errors. - screen error -- checking for string.h... (cached) yes checking for char... yes checking size of char... configure: error: cannot compute sizeof (char), 77 See `config.log' for more details. error: Bad exit status from /var/tmp/rpm-tmp.17076 (%build) -- partial output from config logs config.log before this it indicated that it was in confdefs.h --- #define SIZEOF_LONG 4 #define SIZEOF_LONG 4 #define SIZEOF_LONG 4 #define SIZEOF_LONG 4 #define SIZEOF_LONG_LONG 8 #define SIZEOF_LONG_LONG 8 #define SIZEOF_LONG_LONG_INT 8 #define SIZEOF_PTRDIFF_T 4 #define SIZEOF_SHORT 2 #define SIZEOF_SHORT 2 #define SIZEOF_SIZE_T 4 #define SIZEOF_SSIZE_T 4 #define STDC_HEADERS 1 #define STDC_HEADERS 1 #define TIME_WITH_SYS_TIME 1 #define UCD_SNMP_HACK 1 #define UNDEF_THREADS_HACK #define USE_GD_IMGSTRTTF 1 #define USE_GD_IMGSTRTTF 1 #define YYTEXT_POINTER 1 #define _GNU_SOURCE 1 configure: exit 1 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase-CT and Sybase SDK 12.5.0
Does anyone has any detailed installation tips? I am on Solaris 10, using the /usr/sfw/bin/gcc (3.4.3) I am getting link errors against the php-cli disabling the php-cli, the link errors come against the apache binaries, all of the sybase stuff is undefined Help!
Re: [PHP-DB] Sybase CALL statement problems
Anthony Robins wrote: I have checked my logfiles, and everything seems to be running smoothly and error free. The truncation occurs wether I use the odbc_result_all function or something like: WHILE( odbc_fetch_row( $CallTest ) ): FOR( $ii = 1; $ii <= odbc_num_fields( $CallTest ); ++$ii ): PRINT (odbc_field_name( $CallTest, $ii ) ." = ". odbc_result( $CallTest, odbc_field_name( $CallTest, $ii ) ) . ""); ENDFOR; PRINT (""); ENDWHILE; So it is not a problem with odbc_result_all. I have compared the source of the resulting page with the output buffering generated file and it is definitely truncating, no <-- or or anything similar... In one case, the browser page source was 12,196 characters in length compared to 37,127 characters in the output buffer file. As you said, there are some 'hackish' things that I have tried such as tacking on several thousand characters of whitespace to the end of the output, which still truncates, but ends up truncating in the middle of the whitespace... I refuse to resort to something like this. [snip] (silly question) a flush() does nothing? You could also try turning on output buffering, and then just ob_flush()'ing when done (and turn it back off). http://www.php.net/manual/en/function.flush.php mentions some caveats (specifically - some that may apply to you - w32 servers, and mod_gzip). The fact that adding whitespace 'helps' really screams it's a buffering problem IMO. http://www.php.net/odbc_longreadlen mentions truncation, but it's talking about TEXT/BLOB and the likes, since you *can* get the full results, I doubt this is meaningful. Cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase CALL statement problems
I have checked my logfiles, and everything seems to be running smoothly and error free. The truncation occurs wether I use the odbc_result_all function or something like: WHILE( odbc_fetch_row( $CallTest ) ): FOR( $ii = 1; $ii <= odbc_num_fields( $CallTest ); ++$ii ): PRINT (odbc_field_name( $CallTest, $ii ) ." = ". odbc_result( $CallTest, odbc_field_name( $CallTest, $ii ) ) . ""); ENDFOR; PRINT (""); ENDWHILE; So it is not a problem with odbc_result_all. I have compared the source of the resulting page with the output buffering generated file and it is definitely truncating, no <-- or or anything similar... In one case, the browser page source was 12,196 characters in length compared to 37,127 characters in the output buffer file. As you said, there are some 'hackish' things that I have tried such as tacking on several thousand characters of whitespace to the end of the output, which still truncates, but ends up truncating in the middle of the whitespace... I refuse to resort to something like this. The parameters for mladselmeans? nothing too fancy, just passing it a bunch of minimum and maximum values for various lookups and calculations that the CALLed statement does... Anthony Robins Original Message From: [EMAIL PROTECTED] To: php-db@lists.php.net Subject: Re: [PHP-DB] Sybase CALL statement problems Date: Tue, 29 Mar 2005 09:33:53 -0600 >Anthony Robins wrote: >> When retrieving ODBC results from Sybase SQL Anywhere 6 and 9 from >a >> CALLed procedure, the output to the browser is being arbitrarily >> truncated. >> >> > $DataSourceUserID = "user"; >> $DataSourcePassword = "pass"; >> $DataSourceName = "source"; >> >> $ODBCConnect = >> >odbc_connect($DataSourceName,$DataSourceUserID,$DataSourcePassword); >> $CallSQL = "CALL mladselmeans( '', 0, , 0, , 0, >, >> 'mladsite', 1 )"; >> $CallTest = odbc_exec( $ODBCConnect, $CallSQL ); >> odbc_result_all($CallTest); >> ?> >> >> The resulting output does contain proper data, but as I said, it >> simply gets chopped off at a seemingly random point (I have had it >> chop anywhere from 1500-25000 characters off). The amount of >> truncation seems to vary depending on the results of the CALL, and >> when the results are the same, the truncation is the same. Perhaps >> the strangest thing is that I know for a fact that all of the data >is >> being returned by Sybase... If I use output buffering and send the >> contents of the buffer to a file before the end of the script, all >of >> the data makes it into the file, but still not to the browser. >> Trying to free the odbc resource or close the connection results in >> no output at all. > >A number of possibilities come to mind - some hackish unfortunately. >You say with output buffering the contents make it into the file, >but >not the web browser. Have you checked your logfiles to see if there >is >anything - perhaps the script is terminating early, etc. Print >something after the table as well, see if that doesn't help. It >certainly sounds like something is being buffered. There are reports > >that this function doesn't return the total number of rows correctly, > >but nothing more on that as to whether that indicates a problem or >not. > >http://www.php.net/manual/en/function.odbc-result-all.php > >Also - you may want to view the source, or open that output buffering > >generated file in a web browser - and see if the same problem >persists. > It could just be bad data inside the database that's causing for >e.g. >- Martin Norland, Sys Admin / Database / Web Developer, International > >Outreach x3257 >The opinion(s) contained within this email do not necessarily >represent >those of St. Jude Children's Research Hospital. > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase CALL statement problems
Anthony Robins wrote: When retrieving ODBC results from Sybase SQL Anywhere 6 and 9 from a CALLed procedure, the output to the browser is being arbitrarily truncated. $DataSourcePassword = "pass"; $DataSourceName = "source"; $ODBCConnect = odbc_connect($DataSourceName,$DataSourceUserID,$DataSourcePassword); $CallSQL = "CALL mladselmeans( '', 0, , 0, , 0, , 'mladsite', 1 )"; $CallTest = odbc_exec( $ODBCConnect, $CallSQL ); odbc_result_all($CallTest); ?> The resulting output does contain proper data, but as I said, it simply gets chopped off at a seemingly random point (I have had it chop anywhere from 1500-25000 characters off). The amount of truncation seems to vary depending on the results of the CALL, and when the results are the same, the truncation is the same. Perhaps the strangest thing is that I know for a fact that all of the data is being returned by Sybase... If I use output buffering and send the contents of the buffer to a file before the end of the script, all of the data makes it into the file, but still not to the browser. Trying to free the odbc resource or close the connection results in no output at all. A number of possibilities come to mind - some hackish unfortunately. You say with output buffering the contents make it into the file, but not the web browser. Have you checked your logfiles to see if there is anything - perhaps the script is terminating early, etc. Print something after the table as well, see if that doesn't help. It certainly sounds like something is being buffered. There are reports that this function doesn't return the total number of rows correctly, but nothing more on that as to whether that indicates a problem or not. http://www.php.net/manual/en/function.odbc-result-all.php Also - you may want to view the source, or open that output buffering generated file in a web browser - and see if the same problem persists. It could just be bad data inside the database that's causing for e.g.
[PHP-DB] Sybase CALL statement problems
When retrieving ODBC results from Sybase SQL Anywhere 6 and 9 from a CALLed procedure, the output to the browser is being arbitrarily truncated. The resulting output does contain proper data, but as I said, it simply gets chopped off at a seemingly random point (I have had it chop anywhere from 1500-25000 characters off). The amount of truncation seems to vary depending on the results of the CALL, and when the results are the same, the truncation is the same. Perhaps the strangest thing is that I know for a fact that all of the data is being returned by Sybase... If I use output buffering and send the contents of the buffer to a file before the end of the script, all of the data makes it into the file, but still not to the browser. Trying to free the odbc resource or close the connection results in no output at all. ANY thoughts on this matter would be appreciated. Anthony Robins Using PHP 4.3.4 on Windows 2000 Server. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase Peristent Connections Gotchas
Bob, I agree there are inherit limitations and better ways to pool db connections. Any decent middleware package would probably handle these problems very easily. I just thought that some people may have found simplier ways to realize the benefits of pconnect and reduce some of the side effects. It may be in my situation, it just isn't worth the troubles. I just thought I'd ask... Thanks, Brian Robert Twitty wrote: Hi Brian Why don't you just avoid using sybace_pconnect() with transactions? I use ODBTP to connect to SQL Server and Sybase databases, and this is not an issue. The reason is because ODBTP involves the use of a mediating service that pools all connections, and automatically rollbacks transactions upon client disconnection. The odbtp extension does not support persistent connections, since they are pooled by the ODBTP server. And, if an odbtp script aborts, the odbtp client connection will be terminated, which will cause the odbtp server to rollback the transaction. However, the underlyning database connection will still be pooled by the server for use by another client. Persistent connections may not be the best way to implement database connection reusage. Not only are they subject to undesirable open transactions, they will never timeout, and a single web client can cause a database connection to remain open for each web server child process. Connection pooling may be a better alternative, however, it requires a middle-man server to manage the pool. Unfortuantely, ODBTP requires the server to be placed on a Win32 host that can access the database with its local ODBC facilities. For some developers, this is not always feasible. If it's feasible for you, then your problem will be solved by using the odbtp extension. Otherwise, you can't use persistent connections. -- bob On Wed, 15 Sep 2004, Brian Foddy wrote: On transactions, no this is my biggest concern. Say a php script performs a "begin tran" then aborts early due to an error (user error for instance), but the script error handling fails to rollback the transaction before it exits. Just 1 poorly coded script. Now the begin tran is still open, the next page served by that apache process inherits an open transaction. Even if it is coded and perform perfectly with its own begin / commit trans (remember you can nest trans), the transaction is ultimately never commited; but there is almost no indication to the script. This keeps going and going making this uncomitted trans bigger and bigger, locking more and more records. Finally one of 2 things will happen. 1. The locks get so big that users may get blocked or the max locks exceed the sybase config. 2. The apache process may actually exit if its defined for a max usage or is trimmed by the web server due to max running daemons. In case 1, application support would probably restart the web server to release the locks. In case 2 apache itself does it. Either way, the transaction and all the subsequent nested ones will be rolled back, as if they never occurred. It could be a big database headache. The best way I can forsee to prevent this is to always perform a "rollback tran" after a call to sybase_pconnect to make sure there isn't an unclosed trans. As for the other points you make, I was expecting to perform a sybase_pconnect each execution anyway so that is automatic. I'm not sure how I can reset the handle in Sybase? If its possible I'd like to know how. The more I think about this, it seems that this whole thing is more work than its worth. But if someone sees some effective ways to handle some of these issues I'd like to hear them. Brian Jeff Moss wrote: The biggest problem I've had with persistent connections is the problems that arise when the connection goes down. You have to monitor the connection status anyways (and reconnect on a failure), so it was usually easier to just connect every time. I don't know if this is specific to sybase. You also avoid headache dealing with multiple connections per process. Over a local ethernet this was usually such a short delay that it didn't matter. Typically I don't care much for speed, you avoid a lot of headache avoiding the persistent connections, but the tradeoff is speed of course. It seems to make a lot more sense to me to just reset the handle to drop all temp tables and that. As for the transactions, I think as long as you "do" the transaction all at once there would be no problem right? If it was a problem in the middle of a socket write, chances are the socket closed also, right? -Jeff Brian Foddy wrote: I've been using PHP4/5 and Sybase for several years, using standard sybase_connect. Today I tried playing around with pconnect to get aquainted. I expected one simple condition of a "use database" from one web page affecting another, and easilly handled that with a connection wrapper that re-uses the proper database with each reconnection. A couple other more troublesome issues also quickly came up. 1. Any #t
Re: [PHP-DB] Sybase Peristent Connections Gotchas
Hi Brian Why don't you just avoid using sybace_pconnect() with transactions? I use ODBTP to connect to SQL Server and Sybase databases, and this is not an issue. The reason is because ODBTP involves the use of a mediating service that pools all connections, and automatically rollbacks transactions upon client disconnection. The odbtp extension does not support persistent connections, since they are pooled by the ODBTP server. And, if an odbtp script aborts, the odbtp client connection will be terminated, which will cause the odbtp server to rollback the transaction. However, the underlyning database connection will still be pooled by the server for use by another client. Persistent connections may not be the best way to implement database connection reusage. Not only are they subject to undesirable open transactions, they will never timeout, and a single web client can cause a database connection to remain open for each web server child process. Connection pooling may be a better alternative, however, it requires a middle-man server to manage the pool. Unfortuantely, ODBTP requires the server to be placed on a Win32 host that can access the database with its local ODBC facilities. For some developers, this is not always feasible. If it's feasible for you, then your problem will be solved by using the odbtp extension. Otherwise, you can't use persistent connections. -- bob On Wed, 15 Sep 2004, Brian Foddy wrote: > On transactions, no this is my biggest concern. Say a php script > performs a > "begin tran" then aborts early due to an error (user error for > instance), but > the script error handling fails to rollback the transaction before it exits. > Just 1 poorly coded script. > > Now the begin tran is still open, the next page served by that apache > process inherits an open transaction. Even if it is coded and perform > perfectly with its own begin / commit trans (remember you can nest trans), > the transaction is ultimately never commited; but there is almost no > indication to the script. This keeps going and going making this > uncomitted trans bigger and bigger, locking more and more records. > Finally one of 2 things will happen. > 1. The locks get so big that users may get blocked or the max locks exceed > the sybase config. > 2. The apache process may actually exit if its defined for a max usage or > is trimmed by the web server due to max running daemons. > > In case 1, application support would probably restart the web server to > release > the locks. In case 2 apache itself does it. > Either way, the transaction and all the subsequent nested ones will be > rolled back, as if they never occurred. It could be a big database > headache. > > The best way I can forsee to prevent this is to always perform a > "rollback tran" after a call to sybase_pconnect to make sure there isn't > an unclosed trans. > > As for the other points you make, I was expecting to perform a > sybase_pconnect each execution anyway so that is automatic. > I'm not sure how I can reset the handle in Sybase? If its possible I'd like > to know how. > > The more I think about this, it seems that this whole thing is more work > than its worth. But if someone sees some effective ways to handle some > of these issues I'd like to hear them. > > Brian > > Jeff Moss wrote: > > > The biggest problem I've had with persistent connections is the > > problems that arise when the connection goes down. You have to monitor > > the connection status anyways (and reconnect on a failure), so it was > > usually easier to just connect every time. I don't know if this is > > specific to sybase. You also avoid headache dealing with multiple > > connections per process. Over a local ethernet this was usually such a > > short delay that it didn't matter. Typically I don't care much for > > speed, you avoid a lot of headache avoiding the persistent > > connections, but the tradeoff is speed of course. > > > > It seems to make a lot more sense to me to just reset the handle to > > drop all temp tables and that. > > > > As for the transactions, I think as long as you "do" the transaction > > all at once there would be no problem right? If it was a problem in > > the middle of a socket write, chances are the socket closed also, right? > > > > -Jeff > > > > Brian Foddy wrote: > > > >> I've been using PHP4/5 and Sybase for several years, using standard > >> sybase_connect. Today I tried playing around with pconnect to get > >> aquainted. > >> > >> I expected one simple condition of a "use database" from one web page > >> affecting another, and easilly handled that with a connection wrapper > >> that > >> re-uses the proper database with each reconnection. > >> > >> A couple other more troublesome issues also quickly came up. > >> 1. Any #temp database tables are not destroyed between calls. I can > >> probably > >> work around this with some minor coding changes to manually drop temp > >> tables. > >> > >> 2. Any call to environmental "s
Re: [PHP-DB] Sybase Peristent Connections Gotchas
On transactions, no this is my biggest concern. Say a php script performs a "begin tran" then aborts early due to an error (user error for instance), but the script error handling fails to rollback the transaction before it exits. Just 1 poorly coded script. Now the begin tran is still open, the next page served by that apache process inherits an open transaction. Even if it is coded and perform perfectly with its own begin / commit trans (remember you can nest trans), the transaction is ultimately never commited; but there is almost no indication to the script. This keeps going and going making this uncomitted trans bigger and bigger, locking more and more records. Finally one of 2 things will happen. 1. The locks get so big that users may get blocked or the max locks exceed the sybase config. 2. The apache process may actually exit if its defined for a max usage or is trimmed by the web server due to max running daemons. In case 1, application support would probably restart the web server to release the locks. In case 2 apache itself does it. Either way, the transaction and all the subsequent nested ones will be rolled back, as if they never occurred. It could be a big database headache. The best way I can forsee to prevent this is to always perform a "rollback tran" after a call to sybase_pconnect to make sure there isn't an unclosed trans. As for the other points you make, I was expecting to perform a sybase_pconnect each execution anyway so that is automatic. I'm not sure how I can reset the handle in Sybase? If its possible I'd like to know how. The more I think about this, it seems that this whole thing is more work than its worth. But if someone sees some effective ways to handle some of these issues I'd like to hear them. Brian Jeff Moss wrote: The biggest problem I've had with persistent connections is the problems that arise when the connection goes down. You have to monitor the connection status anyways (and reconnect on a failure), so it was usually easier to just connect every time. I don't know if this is specific to sybase. You also avoid headache dealing with multiple connections per process. Over a local ethernet this was usually such a short delay that it didn't matter. Typically I don't care much for speed, you avoid a lot of headache avoiding the persistent connections, but the tradeoff is speed of course. It seems to make a lot more sense to me to just reset the handle to drop all temp tables and that. As for the transactions, I think as long as you "do" the transaction all at once there would be no problem right? If it was a problem in the middle of a socket write, chances are the socket closed also, right? -Jeff Brian Foddy wrote: I've been using PHP4/5 and Sybase for several years, using standard sybase_connect. Today I tried playing around with pconnect to get aquainted. I expected one simple condition of a "use database" from one web page affecting another, and easilly handled that with a connection wrapper that re-uses the proper database with each reconnection. A couple other more troublesome issues also quickly came up. 1. Any #temp database tables are not destroyed between calls. I can probably work around this with some minor coding changes to manually drop temp tables. 2. Any call to environmental "set" commands like "set isolation" remain in effect after the web page is complete. Again with some work I could probably recode some pages to not change these values, or reset them when complete. 3. The potentially most bothersome would be a page failing to call commit tran/rollback tran, especially during some error condition. Its easy to think any uncommited tran is rolled back when the page exists. But persistent connections won't do this. This could be a disaster by leaving open a transaction causing all subsequent calls to never be commited... I might be able to create some wrapper that always resets the transaction state before starting?? I'm curious how others have attempted to solve these problems, and others I haven't thought of yet. Clearly many can be avoided by having clean code, but just 1 exception... Brian -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase Peristent Connections Gotchas
The biggest problem I've had with persistent connections is the problems that arise when the connection goes down. You have to monitor the connection status anyways (and reconnect on a failure), so it was usually easier to just connect every time. I don't know if this is specific to sybase. You also avoid headache dealing with multiple connections per process. Over a local ethernet this was usually such a short delay that it didn't matter. Typically I don't care much for speed, you avoid a lot of headache avoiding the persistent connections, but the tradeoff is speed of course. It seems to make a lot more sense to me to just reset the handle to drop all temp tables and that. As for the transactions, I think as long as you "do" the transaction all at once there would be no problem right? If it was a problem in the middle of a socket write, chances are the socket closed also, right? -Jeff Brian Foddy wrote: I've been using PHP4/5 and Sybase for several years, using standard sybase_connect. Today I tried playing around with pconnect to get aquainted. I expected one simple condition of a "use database" from one web page affecting another, and easilly handled that with a connection wrapper that re-uses the proper database with each reconnection. A couple other more troublesome issues also quickly came up. 1. Any #temp database tables are not destroyed between calls. I can probably work around this with some minor coding changes to manually drop temp tables. 2. Any call to environmental "set" commands like "set isolation" remain in effect after the web page is complete. Again with some work I could probably recode some pages to not change these values, or reset them when complete. 3. The potentially most bothersome would be a page failing to call commit tran/rollback tran, especially during some error condition. Its easy to think any uncommited tran is rolled back when the page exists. But persistent connections won't do this. This could be a disaster by leaving open a transaction causing all subsequent calls to never be commited... I might be able to create some wrapper that always resets the transaction state before starting?? I'm curious how others have attempted to solve these problems, and others I haven't thought of yet. Clearly many can be avoided by having clean code, but just 1 exception... Brian -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase Peristent Connections Gotchas
I've been using PHP4/5 and Sybase for several years, using standard sybase_connect. Today I tried playing around with pconnect to get aquainted. I expected one simple condition of a "use database" from one web page affecting another, and easilly handled that with a connection wrapper that re-uses the proper database with each reconnection. A couple other more troublesome issues also quickly came up. 1. Any #temp database tables are not destroyed between calls. I can probably work around this with some minor coding changes to manually drop temp tables. 2. Any call to environmental "set" commands like "set isolation" remain in effect after the web page is complete. Again with some work I could probably recode some pages to not change these values, or reset them when complete. 3. The potentially most bothersome would be a page failing to call commit tran/rollback tran, especially during some error condition. Its easy to think any uncommited tran is rolled back when the page exists. But persistent connections won't do this. This could be a disaster by leaving open a transaction causing all subsequent calls to never be commited... I might be able to create some wrapper that always resets the transaction state before starting?? I'm curious how others have attempted to solve these problems, and others I haven't thought of yet. Clearly many can be avoided by having clean code, but just 1 exception... Brian -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] sybase and php
Ever since we have been using PHP to access data in our Sybase database, database permissions have been spontaneously disappearing from the tables that are being looked at! It happens on the time frame of a couple months between times. To fix it, I have to go into Sybase and grant select permission on the affected table. Has anybody else ever had this problem? Did you solve it? Thanks! Julia
[PHP-DB] sybase support in PHP5
Is Sybase support in PHP5 working? I get: /bin/sh /usr/portage/tmp/php-5.0.0b3/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/sybase/ -I/usr/portage/tmp/php-5.0.0b3/ext/sybase/ -DPHP_ATOM_INC -I/usr/portage/tmp/php-5.0.0b3/include -I/usr/portage/tmp/php-5.0.0b3/main -I/usr/portage/tmp/php-5.0.0b3 -I/usr/portage/tmp/php-5.0.0b3/Zend -I/usr/include/libxml2 -I/usr/include/mysql -I/opt/sybase-11.9.2/include -I/usr/portage/tmp/php-5.0.0b3/TSRM -g -O2 -prefer-pic -c /usr/portage/tmp/php-5.0.0b3/ext/sybase/php_sybase_db.c -o ext/sybase/php_sybase_db.lo /usr/portage/tmp/php-5.0.0b3/ext/sybase/php_sybase_db.c: In function `zif_sybase_fetch_object': /usr/portage/tmp/php-5.0.0b3/ext/sybase/php_sybase_db.c:1110: invalid lvalue in assignment /usr/portage/tmp/php-5.0.0b3/ext/sybase/php_sybase_db.c:: invalid lvalue in assignment make: *** [ext/sybase/php_sybase_db.lo] Error 1
[PHP-DB] sybase and php
Hi, a need a problem. When I try to connect a my DB Sybase from PHP, I have this error.: Warning: sybase_connect(): Sybase: Server message: Changed database context to 'INTERNACIONAL_CDR'. (severity 10, procedure N/A) in E:\WWWRoot\internacionalonline\adodb\adodb-sybase.inc.php on line 86 What happened here? .. I have Win2000 Server ... I hope you can help me. Thanks, Pedro
[PHP-DB] Sybase
Hi all, As many, I'm forced to start my message too with the problem statement that I can't connect to my sybase database. I have to be more honest even in saying that I don't even know the difference in --enable-sybase and --enable-sybase-ct (I have tried both). I'm by no means an SQL nitwit.. I just never had to work with sybase before. I don't have any clue when it comes to sybase.. never worked with any, but I have to now. I have a login and can connect using isql and the database definition 'CST_SYB' which comes straight out of the sybase interfaces file. However I can't seem to get any php connections working. I can flood you with sybase_connect() examples, but they come straight from the manual. What am I missing ? Oh btw, I compiled my php using the orignal sybase openclient package in $SYBASE, but I also see people referring to 'freedts'? I assume this is a substitute in case no original sybase libs are available, right? Anyway, any pointers would be more then welcome. /Stephan -- Stephan van Beerschoten [SVB21-RIPE] [EMAIL PROTECTED] PGP fingerprint: 4557 9761 B212 FB4C 778D 3529 C42A 2D27 "To err is human, to forgive is Not Company Policy" -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase Query- Problems with Pound Sign
Jeremy Peterson wrote: I am having a problem with a query that has a pound sign in it. The results are quite puzzling, it seems like the page doesn't load if the query is present. I have tested this on other tables without the pound sign and they work beautifully, seems like the pound sign is the troublemaker to me. [snip] $sql = "select * from item where bib# = 300"; The # character is generally used to start comments, so everything after it is ignored in your query. I'm surprised you could even name a column like that... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] sybase time outs
Hi Guys. Is it possible to specify a sybase timeout with the current stable version of php? I am using --with-sybase (dblib) compiled against sybase OCS. Thanks Mills -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase Query- Problems with Pound Sign
I am having a problem with a query that has a pound sign in it. The results are quite puzzling, it seems like the page doesn't load if the query is present. I have tested this on other tables without the pound sign and they work beautifully, seems like the pound sign is the troublemaker to me. Printing $sql returns the proper sql statement, so what is the sybase_query function doing to the variable? My code is at the bottom of this page. Thanks, Jeremy $syb_connect = syb_connect($syb_server, $syb_user, $syb_pw); $sql = "select * from item where bib# = 300"; print "sql=$sql"; $result = sybase_query($sql); //print "someting"; while($row = Sybase_Fetch_Assoc($result)){ extract($row); print "$tag $text"; } ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase Query- Problems with Pound Sign
Try: $sql = "select * from item where \"bib#\" = 300"; - Original Message - From: "Jeremy Peterson" <[EMAIL PROTECTED]> To: "PHP DB" <[EMAIL PROTECTED]> Sent: Wednesday, August 06, 2003 4:34 AM Subject: [PHP-DB] Sybase Query- Problems with Pound Sign > I am having a problem with a query that has a pound sign in it. The > results are quite puzzling, it seems like the page doesn't load if the > query is present. I have tested this on other tables without the pound > sign and they work beautifully, seems like the pound sign is the > troublemaker to me. > > Printing $sql returns the proper sql statement, so what is the sybase_query > function doing to the variable? > > My code is at the bottom of this page. > > Thanks, > > Jeremy > > > > include "$DOCUMENT_ROOT/include/sybase.inc"; > > $syb_connect = syb_connect($syb_server, $syb_user, $syb_pw); > > $sql = "select * from item where bib# = 300"; > print "sql=$sql"; > $result = sybase_query($sql); > > //print "someting"; > while($row = Sybase_Fetch_Assoc($result)){ > extract($row); > print "$tag $text"; > > } > > > ?> > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase Query- Problems with Pound Sign
Yep, I wish I could name the fields, but alas it is not my database application. For some reason it works... :) When I use isql it works as expected, thus the problem. At 10:41 PM 8/5/2003 -0400, John W. Holmes wrote: Jeremy Peterson wrote: I am having a problem with a query that has a pound sign in it. The results are quite puzzling, it seems like the page doesn't load if the query is present. I have tested this on other tables without the pound sign and they work beautifully, seems like the pound sign is the troublemaker to me. [snip] $sql = "select * from item where bib# = 300"; The # character is generally used to start comments, so everything after it is ignored in your query. I'm surprised you could even name a column like that... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals www.phparch.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase / HPUX (Urgent HELP -- PLEASE.)
Folks, I am trying to connect to a sybase server (12.5) using PEAR DB object. When connecting to the database from Linux, everything goes as expected. However, when running on HPUX (Apache 1.3.27/PHP 4.3.1 DSO), I get the following error: php_code: $this->$db = @DB::connect("sybase://$DB_USR:[EMAIL PROTECTED]/"); if(DB::iserror($this->$db)) { var_dump($this->$db); die('Error connecting to databse: '.$this->$db->getMessa ge()); } } == Prin out === object(db_error)(7) { ["error_message_prefix"]=> string(0) "" ["mode"]=> int(1) ["level"]=> int(1024) ["code"]=> int(-24) ["message"]=> string(24) "DB Error: connect failed" ["userinfo"]=> string(31) "sybase://arc:[EMAIL PROTECTED]/" ["callback"]=> NULL } Error connecting to databse: DB Error: connect failed The interfaces file that I am using is EXACTLY the same as the one on the linux machine and it on the sybases standart place on HP. I could not find anything on apache/php/sybase logs. PLEASE HELP... Thanks in advance.. __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Sybase timouts
Figured it out. it requires a default logon id on the connection tab on the odbc connection. Who knows why... <>< Ryan -Original Message- From: Ryan Jameson (USA) Sent: Thursday, February 20, 2003 12:50 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Sybase timouts SQL error: [INTERSOLV][ODBC SQL Server driver][SQL Server]ct_connect(): user api layer: internal Client Library error: Read from the server has timed out., SQL state S1T00 in SQLConnect in Anyone had this problem? I cannot find anywhere that will allow me to change the timeout. <>< Ryan Ryan Jameson Software Development Services Manager International Bible Society W (719) 867-2692 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase timouts
SQL error: [INTERSOLV][ODBC SQL Server driver][SQL Server]ct_connect(): user api layer: internal Client Library error: Read from the server has timed out., SQL state S1T00 in SQLConnect in Anyone had this problem? I cannot find anywhere that will allow me to change the timeout. <>< Ryan Ryan Jameson Software Development Services Manager International Bible Society W (719) 867-2692 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] sybase jaguar CTS -- PHP
hi, I would like to ask if PHP is capable of accessing a jaguar component server, My web server and jaguar cts is in separate box. jaguar cts can serve CORBA, is PHP capable of using CORBA objects? any suggestions are highly appreciated. <-- buics -- "We are what we repeatedly do. Excellence, then, is not an act, but a habit." -Aristotle(BC 384-322 Greek Philosopher) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] sybase issue
We have installed PHP 4.2.2 in a Solaris 2.6, with Netscape Enterprise Server 3.5.1 and Sybase SQL Server/11.0.3.3. We compiled PHP with following options, and it was successful completed with no errors. ./configure --with-nsapi=/opt/netscape/suitespot --enable-track-vars --enable-libgcc --with-sybase=/opt/sybase We're trying to execute a PHP page, but we getting the following errors messages. Somebody knows what is happening? Thanks Ronald Warning: Sybase: A link to the server could not be established in /opt/netscape/suitespot/docs/teste.php on line 4 Warning: 0 is not a Sybase link index in /opt/netscape/suitespot/docs/teste.php on line 5 Warning: 0 is not a Sybase result index in /opt/netscape/suitespot/docs/teste.php on line 6 Warning: 0 is not a Sybase link index in /opt/netscape/suitespot/docs/teste.php on line 7 _ MSN Photos é a maneira mais fácil e prática de editar e compartilhar sua fotos: http://photos.msn.com.br -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase ASE (linux) - Intermittent connection errors
My Linux box is setup with Sybase ASE 11.9.2-3 (same for the common files) and the openclient is 11.1.1-3. The server I'm connecting to is running 11.9.2.5. phpinfo shows sybase_ct support. PHP version is 4.1.2. I'm getting intermittent connection failures on various queries. Maybe 1 out of 6 times there will be a failure. Here's the error message: - ct_send(): network packet layer: internal net library error: Net-Lib protocol driver call to write data failed - Any idea what this means and what steps I can take to fix it? I'd hate to release an application that will have a 1 in 5 chance of failing any query. The machine connecting to the Sybase server is behind a firewall but I've opened port 2500. Maybe another port needs to be opened? Any suggestions would be appreciated. Jim
[PHP-DB] Sybase ASE (linux) - Intermittent connection errors
My Linux box is setup with Sybase ASE 11.9.2-3 (same for the common files) and the openclient is 11.1.1-3. The server I'm connecting to is running 11.9.2.5. phpinfo shows sybase_ct support. PHP version is 4.1.2. I'm getting intermittent connection failures on various queries. Maybe 1 out of 6 times there will be a failure. Here's the error message: - ct_send(): network packet layer: internal net library error: Net-Lib protocol driver call to write data failed - Any idea what this means and what steps I can take to fix it? I'd hate to release an application that will have a 1 in 5 chance of failing any query. The machine connecting to the Sybase server is behind a firewall but I've opened port 2500. Maybe another port needs to be opened? Any suggestions would be appreciated. Jim
[PHP-DB] Sybase problem.
Hello, I have problem with Sybase. When I try to get data from binary column using sybase_query, the output consist of 4, most significant digits only, wheras the rest is omitted. My PHP script looks like follows: "; sybase_select_db ( "my_db", $conn); $res = sybase_query ("select TestColumn from TestTable", $conn); echo sybase_num_rows($res); echo ""; $r=sybase_result($res,0,0); echo "$r" ; ?> --- Value $r after execution of query is 0001 whereas it should be something like 00012354. I've tried meny variations of that simple script without success. I'll be gratefull for help. Gural. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Sybase -> MSSQL Server 2000
Tom, I suggest you use ODBC or Free-TDS. For info on linking your PHP build against an ODBC Driver Manager (necessary to use ODBC) see the PHP-ODBC HOWTO at http://www.iodbc.org. Best regards, Andrew Hill Director Technology Evangelism OpenLink Software http://www.openlinksw.com XML & E-Business Infrastructure Technology Provider > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 2:13 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Sybase -> MSSQL Server 2000 > > > PHP.NET indicates that to connect to MSSQL Server, from Linux use Sybase. > I've installed Sybase, PHP and Apache and everything works well > on my Linux > server when I connect to the Sybase test database. > > When I try to connect to my MS SQL server, I get this... > > sybase$ isql -S mssql-server -U username -P password > DB-LIBRARY error: > Unexpected EOF from SQL Server. > > Anyone have any suggestions? > > --Tom Brownridge > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase -> MSSQL Server 2000
PHP.NET indicates that to connect to MSSQL Server, from Linux use Sybase. I've installed Sybase, PHP and Apache and everything works well on my Linux server when I connect to the Sybase test database. When I try to connect to my MS SQL server, I get this... sybase$ isql -S mssql-server -U username -P password DB-LIBRARY error: Unexpected EOF from SQL Server. Anyone have any suggestions? --Tom Brownridge -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase: Unable to allocate connection record
On RH 7.2, Apache 1.3.22, PHP 4.1 and ASE 11.9.2 I get : "Warning: Sybase: Unable to allocate connection record" Env $SYBASE is set ok as it is seen by PHP. After restarting apache (compiled with php and php is with-sybase-ct) it works well for about 3 hours than I start receiving this annoying message and the longer it works the more messages I receive. What is the problem ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215
SQL Anywhere docs says : Collation label Type Description 1251CYR ANSI Code Page 1251, Windows Cyrillic same DB and scripts works fine on windows i think it is a ODBC problem on Linux "Andrey Hristov" <[EMAIL PROTECTED]> wrote in message 00c801c1d651$47e06d70$0b01a8c0@ANDreY">news:00c801c1d651$47e06d70$0b01a8c0@ANDreY... > This seems a unicode problem to me. > Here we have similar problem when PHP connects to Access 2000 and receives ???s. No problems with Access 97. Are you sure that the > data is 1 byte not unicode format? > > Andrey > - Original Message - > From: "Igor Georgiev" <[EMAIL PROTECTED]> > To: "Andrey Hristov" <[EMAIL PROTECTED]> > Sent: Thursday, March 28, 2002 2:20 PM > Subject: Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215 > > > > I recive this > > PHP - > > in DB - îÏÒÍÁÔÉ×ÎÁ ÕÒÅÄÂÁ > > - Original Message - > > From: "Andrey Hristov" <[EMAIL PROTECTED]> > > To: "Igor Georgiev" <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]> > > Sent: Thursday, March 28, 2002 12:09 PM > > Subject: Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem > > with cp1215 > > > > > > > Do you receive "???"s ? > > > > > > Regards, > > > Andrey > > > > > > > > > - Original Message - > > > From: "Igor Georgiev" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Wednesday, March 27, 2002 7:11 PM > > > Subject: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem > > with cp1215 > > > > > > > > > PHP 4.1.2 > > > Apache 1.3.23 > > > Slackware 7.1 > > > Sybase: Adaptive Server Anywhere 8 > > > iODBC - libiodbc-3.0.5 > > > > > > database created with 1251CYR collation > > > work fine with cyrillic strings trough windows app (ODBC) > > > but with PHP on linux trough iODBC & Adaptive Server Anywhere ODBC driver > > 8.0.x not > > > > > > ODBC.INI- > > > [ODBC Data Sources] > > > aaa=Adaptive Server Anywhere ODBC driver 8.0.x > > > > > > [aaa] > > > Driver=/usr/local/sybase/SYBSsa8/lib/dbodbc8.so > > > ServerName=alpha > > > CommLinks=tcpip > > > CS=cp1251 > > > > > > > > > tried also > > > CS=1251CYR > > > CS="Charset=cp1251;CollationLabel=1251CYR" > > > Charset=cp1251 > > > CollationLabel=1251CYR > > > > > > Any help be welcome 10x > > > > > > > > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215
SQL Anywhere docs says : Collation label Type Description 1251CYR ANSI Code Page 1251, Windows Cyrillic - Original Message - From: "Andrey Hristov" <[EMAIL PROTECTED]> To: "Igor Georgiev" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, March 28, 2002 1:07 PM Subject: Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215 > This seems a unicode problem to me. > Here we have similar problem when PHP connects to Access 2000 and receives ???s. No problems with Access 97. Are you sure that the > data is 1 byte not unicode format? > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215
This seems a unicode problem to me. Here we have similar problem when PHP connects to Access 2000 and receives ???s. No problems with Access 97. Are you sure that the data is 1 byte not unicode format? Andrey - Original Message - From: "Igor Georgiev" <[EMAIL PROTECTED]> To: "Andrey Hristov" <[EMAIL PROTECTED]> Sent: Thursday, March 28, 2002 2:20 PM Subject: Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215 > I recive this > PHP - > in DB - Нормативна уредба > - Original Message - > From: "Andrey Hristov" <[EMAIL PROTECTED]> > To: "Igor Georgiev" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday, March 28, 2002 12:09 PM > Subject: Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem > with cp1215 > > > > Do you receive "???"s ? > > > > Regards, > > Andrey > > > > > > ----- Original Message - > > From: "Igor Georgiev" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, March 27, 2002 7:11 PM > > Subject: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem > with cp1215 > > > > > > PHP 4.1.2 > > Apache 1.3.23 > > Slackware 7.1 > > Sybase: Adaptive Server Anywhere 8 > > iODBC - libiodbc-3.0.5 > > > > database created with 1251CYR collation > > work fine with cyrillic strings trough windows app (ODBC) > > but with PHP on linux trough iODBC & Adaptive Server Anywhere ODBC driver > 8.0.x not > > > > ODBC.INI- > > [ODBC Data Sources] > > aaa=Adaptive Server Anywhere ODBC driver 8.0.x > > > > [aaa] > > Driver=/usr/local/sybase/SYBSsa8/lib/dbodbc8.so > > ServerName=alpha > > CommLinks=tcpip > > CS=cp1251 > > > > > > tried also > > CS=1251CYR > > CS="Charset=cp1251;CollationLabel=1251CYR" > > Charset=cp1251 > > CollationLabel=1251CYR > > > > Any help be welcome 10x > > > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215
Do you receive "???"s ? Regards, Andrey - Original Message - From: "Igor Georgiev" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 27, 2002 7:11 PM Subject: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215 PHP 4.1.2 Apache 1.3.23 Slackware 7.1 Sybase: Adaptive Server Anywhere 8 iODBC - libiodbc-3.0.5 database created with 1251CYR collation work fine with cyrillic strings trough windows app (ODBC) but with PHP on linux trough iODBC & Adaptive Server Anywhere ODBC driver 8.0.x not ODBC.INI- [ODBC Data Sources] aaa=Adaptive Server Anywhere ODBC driver 8.0.x [aaa] Driver=/usr/local/sybase/SYBSsa8/lib/dbodbc8.so ServerName=alpha CommLinks=tcpip CS=cp1251 tried also CS=1251CYR CS="Charset=cp1251;CollationLabel=1251CYR" Charset=cp1251 CollationLabel=1251CYR Any help be welcome 10x -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215
PHP 4.1.2 Apache 1.3.23 Slackware 7.1 Sybase: Adaptive Server Anywhere 8 iODBC - libiodbc-3.0.5 database created with 1251CYR collation work fine with cyrillic strings trough windows app (ODBC) but with PHP on linux trough iODBC & Adaptive Server Anywhere ODBC driver 8.0.x not ODBC.INI- [ODBC Data Sources] aaa=Adaptive Server Anywhere ODBC driver 8.0.x [aaa] Driver=/usr/local/sybase/SYBSsa8/lib/dbodbc8.so ServerName=alpha CommLinks=tcpip CS=cp1251 tried also CS=1251CYR CS="Charset=cp1251;CollationLabel=1251CYR" Charset=cp1251 CollationLabel=1251CYR Any help be welcome 10x
[PHP-DB] Sybase multiple result sets
Hi, I am porting an application which currently makes use of the ODBC PEAR DB object to use the SyBase DB object instead. However, there does not seem to be a way to retrieve multiple result sets using the SyBase object. The transfer to SyBase, and indeed the stored procedure which generates these multiple result sets, is beyond my control, although I would need to inform the DBAs if a rewrite of the SP is required. So, in a nutshell, can I get multiple result sets from a SyBase query, and if so, how? Cheers, -- Craig Andrews -- Web Developer Insight (UK) Ltd [EMAIL PROTECTED] +44(0)114 2927950 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] sybase or SQL Server
You need to enable the MSSQL modules in php.ini or when you compile PHP. -- William Fong - [EMAIL PROTECTED] Phone: 626.968.6424 x210 | Fax: 626.968.6877 Wireless #: 805.490.7732| Wireless E-mail: [EMAIL PROTECTED] - Original Message - From: "ip" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 05, 2002 4:43 AM Subject: [PHP-DB] sybase or SQL Server > whatever the way I compile php,apache I have always the same error message : > Call to undefined function: sybase_connect (or mssql_connect) > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] sybase with php4.1 and apache 13.20 problem
So if I understand you correct you can call Sybase from php on commandline but not via apache? You should compile --with-sybase-ct but that is probably not causing your problem. Sounds strange, never had that problem, if it worked on cli it worked in Apache. What errormessage are you getting from Apache when trying to connect to Sybase? Regards Richard Hillström -Original Message- From: Denis GALINSH [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 03, 2002 4:23 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] sybase with php4.1 and apache 13.20 problem Hello, I've got problem with working php 4.1.0 under apache 13.20 with Sybase SQL. I installed Sybase ASE 11.0.3 with Open Client Lib and developt part and compiled php 4.1. with sybase support ( FreeBSD 4.4) as a apache module and usual executable file. # ./configure --with-sybase=/usr/home/sybase --with-apxs php works with sybase greatfully if I execute ordinary php file with sybase_connect(..) & etc. But then I execute test php page - I've got error - just the same if I lose sybase interfaces file or use wrong line in php.ini. But really - it's OK. I've got in my php.ini sybase.interface="/usr/home/sybase" and php works - then executs not from apache. apache is located in /usr/local. shows sybase support in php module( libphp4.so). So, I've got serious problem!! If someone can help me, please, write me without any hesitate. Denis GALINSH [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] sybase with php4.1 and apache 13.20 problem
Hello, I've got problem with working php 4.1.0 under apache 13.20 with Sybase SQL. I installed Sybase ASE 11.0.3 with Open Client Lib and developt part and compiled php 4.1. with sybase support ( FreeBSD 4.4) as a apache module and usual executable file. # ./configure --with-sybase=/usr/home/sybase --with-apxs php works with sybase greatfully if I execute ordinary php file with sybase_connect(..) & etc. But then I execute test php page - I've got error - just the same if I lose sybase interfaces file or use wrong line in php.ini. But really - it's OK. I've got in my php.ini sybase.interface="/usr/home/sybase" and php works - then executs not from apache. apache is located in /usr/local. shows sybase support in php module( libphp4.so). So, I've got serious problem!! If someone can help me, please, write me without any hesitate. Denis GALINSH [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] sybase extensions
Hello, I am very new to PHP and am having problems finding out information regarding loading up the Sybase extensions for IIS on Win2K. Any help would be greatly appreciated. Art Chevalier Sybase Replication Administrator Space and Naval Warfare Center, Chesapeake 1-757-523-8303 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase Stored Procedures
hello, I would like to use sybase stored procedures and need to know, in what way they are supportet in PHP. In the manual, one can read that stored procedures are not yet fully supported. Does anybody have any newer information on what Sybase features can be used with PHP4? Thank you very much for your help. Yours Thomas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] sybase-ct lib, Sybase ASE 12.5, Linux
Did someone succeed installing Php with sybase-ct extension, on a Linux system containing ASE 12.5? When compiling, it doesn't find the include, because with the new version of ASE the are in $SYBASE/OSE/include, rather than $SYBASE/include. I moved the include file where compiler could find it, and at linking it didn't find the libraries (see error message at the bottom). There is no file named "sybtcl*" in my system, what should I do? Thanks in advance Carlo Borreo /bin/sh /tmp/php-4.0.6/libtool --silent --mode=link gcc -I. -I/tmp/php-4.0.6/ -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6 -I/tmp/php -4.0.6/Zend -I/tmp/php-4.0.6/ext/mysql/libmysql -I/opt/sybase-12.5//include -I/tmp/php-4.0.6/ext/xml/expat/xmltok -I/tmp/php-4.0.6/ext/xml/expat/xmlpars e -I/tmp/php-4.0.6/TSRM -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -o libphp4.la -rpath /tmp/php-4.0.6/libs -avoid-version -L/opt/sybase-12.5//lib -R /opt/sybase-12.5//lib stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/posix/libposix.la ext/session/libsession.la ext/standard/libstandard.la ext/sybase_ct/libsybase_ct.la ext/xml/libxml.la TSRM/libtsrm.la -ldl -lsybtcl -lintl -lcomn -lct -lcs -lcrypt -lresolv -lm - ldl -lnsl -lresolv /usr/bin/ld: cannot find -lsybtcl -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: Antw: Re: [PHP-DB] sybase remote procedure ergebnis in variable
Missed that... Try these: $VARIABLE = odbc_exec(...) or try what $@VARIABLE contains... Met vriendelijke groet, Michiel Lange ActuEra B.V. "Stefan Siebenkittel" cc: Fax to: 19-09-2001 13:55 Subject: Antw: Re: [PHP-DB] sybase remote procedure ergebnis in variable Hi, I posted my question separately in english too: Hi, I run a remote procedure via ODBC on a sybse server. The procedure returns an integer in a variable "@VARIABLE". I have to use the integer as a variable "$VARIABLE" in PHP. Does anybody know how to get the content of " @VARIABLE" into "$VARIABLE"? This is the code I use: odbc_exec ($conn,"declare @VARIABLE int exec PROZEDURNAME 'TABELLENNAME_SPALTENNAME', @VARIABLE output"); content of @VARIABLE must be written into $VARIABLE Thanks in advance 7k >>> <[EMAIL PROTECTED]> 09/19 1:30 >>> anyone who can translate this? Met vriendelijke groet, Michiel Lange ActuEra B.V. 7k cc: Fax to: 19-09-2001 12:50 Subject: [PHP-DB] sybase remote procedure ergebnis in variable Hallo, ich nutze per ODBC eine remote procedure auf einem Sybase Server. Die Prozedur liefert mir unter anderem eine Variable zurück, die ich in PHP weiternutzen muß. Kann mir jemand einen Hinweis geben, wie ich die Variable der ODBC Abfrage in eine PHP Variable übertragen kann? Hier das Beispiel: odbc_exec ($conn,"declare @VARIABLE int exec PROZEDURNAME 'TABELLENNAME_SPALTENNAME', @VARIABLE output"); @VARIABLE soll übertragen werden in $VARIABLE Danke im voraus 7k -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase Stored Procedure, return content
hello ! I have a problem, My SP does not return anything neither to Sybase Interactive SQL nor to PHP. When i use to try it from Sybase Central it adds me to may Query "Select [var] from DUMMY" after execuring procedure. What should I do to recive the contents directly from Stred Proced. ? Thank you.
Re: [PHP-DB] sybase remote procedure ergebnis in variable
anyone who can translate this? Met vriendelijke groet, Michiel Lange ActuEra B.V. 7k cc: Fax to: 19-09-2001 12:50 Subject: [PHP-DB] sybase remote procedure ergebnis in variable Hallo, ich nutze per ODBC eine remote procedure auf einem Sybase Server. Die Prozedur liefert mir unter anderem eine Variable zurück, die ich in PHP weiternutzen muß. Kann mir jemand einen Hinweis geben, wie ich die Variable der ODBC Abfrage in eine PHP Variable übertragen kann? Hier das Beispiel: odbc_exec ($conn,"declare @VARIABLE int exec PROZEDURNAME 'TABELLENNAME_SPALTENNAME', @VARIABLE output"); @VARIABLE soll übertragen werden in $VARIABLE Danke im voraus 7k -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] sybase remote pocedure into variable
Hi, I run a remote procedure via ODBC on a sybse server. The procedure returns an integer in a variable "@VARIABLE". I have to use the integer as a variable "$VARIABLE" in PHP. Does anybody know how to get the content of "@VARIABLE" into "$VARIABLE"? This is the code I use: odbc_exec ($conn,"declare @VARIABLE int exec PROZEDURNAME 'TABELLENNAME_SPALTENNAME', @VARIABLE output"); content of @VARIABLE must be written into $VARIABLE Thanks in advance 7k -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] sybase remote procedure ergebnis in variable
Hallo, ich nutze per ODBC eine remote procedure auf einem Sybase Server. Die Prozedur liefert mir unter anderem eine Variable zurück, die ich in PHP weiternutzen muß. Kann mir jemand einen Hinweis geben, wie ich die Variable der ODBC Abfrage in eine PHP Variable übertragen kann? Hier das Beispiel: odbc_exec ($conn,"declare @VARIABLE int exec PROZEDURNAME 'TABELLENNAME_SPALTENNAME', @VARIABLE output"); @VARIABLE soll übertragen werden in $VARIABLE Danke im voraus 7k -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Sybase CT with/without Sybase ASE
You don't need the Sybase dataserver but you still need the Sybase shared libraries that PHP is linked against. So restore all the .so's in $SYBASE/lib, and apache should start. Offhand, I'm not sure if 12.5 came with a different version of the open client libraries than 11.9.2 did, but if it did you may need to keep the 11.9.2 libs around. Dean At 12:49 PM 14/09/01 +0200, Carlo Borreo wrote: >Dear All, >In the past I had installed an Apache server with PHP 4.0.6 and Sybase CT >extension on Mandrake Linux 8, all ok. >On the Mandrake machine, I had installed Sybase ASE 11.9.2, that was only >used for test; most of the time the php code used sybase ct lib to refer to >another database server (Sybase ASE 12.5 on Solaris), and all worked. >But now I tried to update the test Sybase ASE database server on Mandrake >from 11.9.2 from 12.5. I was not successful, but I could live without test >database, so I didn't worry. But at next reboot, Apache was failing to start >with this message: > >Syntax error on line 205 of /usr/local/apache/conf/httpd.conf: >Cannot load /usr/local/apache/libexec/libphp4.so into server: libinsck.so: >cannot load shared object file: No such file or directory >/etc/init.d/httpd start: httpd could not be started > >The file libphp4.so is in place, but file libinschk.so is not on the >machine. >I thought that PHP and sybase ct didn't need a database server to be >installed on the machine; was I wrong? >I also tried uninstalling completely 12.5, but still Apache doesn't start. >As I said, I can live without that database server, but I need Apache, Php, >and Sybase ct, please help. > >Thanks in advance >Carlo Borreo > > > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase CT with/without Sybase ASE
Dear All, In the past I had installed an Apache server with PHP 4.0.6 and Sybase CT extension on Mandrake Linux 8, all ok. On the Mandrake machine, I had installed Sybase ASE 11.9.2, that was only used for test; most of the time the php code used sybase ct lib to refer to another database server (Sybase ASE 12.5 on Solaris), and all worked. But now I tried to update the test Sybase ASE database server on Mandrake from 11.9.2 from 12.5. I was not successful, but I could live without test database, so I didn't worry. But at next reboot, Apache was failing to start with this message: Syntax error on line 205 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: libinsck.so: cannot load shared object file: No such file or directory /etc/init.d/httpd start: httpd could not be started The file libphp4.so is in place, but file libinschk.so is not on the machine. I thought that PHP and sybase ct didn't need a database server to be installed on the machine; was I wrong? I also tried uninstalling completely 12.5, but still Apache doesn't start. As I said, I can live without that database server, but I need Apache, Php, and Sybase ct, please help. Thanks in advance Carlo Borreo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase ASA 6.0 on Windows connection
Hi, I try to connect to Sybase ASA 6.0 on Windows machine via TDS4.2 (freetds-0.51). But I have'nt success ..could you help me please ? My connection string is: $cn=sybase_connect("labbiszeninv", "dba","sql") or die ("Sybase must die"); here is freetds interface file: labbiszeninv query tcp tds4.2 10.1.1.249 2638 master tcp tds4.2 10.1.1.249 2638 Thank you. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase ASA 6.0 on Windows connection
Hi, I try to connect to Sybase ASA 6.0 on Windows machine via TDS4.2 (freetds-0.51). But I have'nt success ..could you help me please ? My connection string is: $cn=sybase_connect("labbiszeninv", "dba","sql") or die ("Sybase must die"); here is freetds interface file: labbiszeninv query tcp tds4.2 10.1.1.249 2638 master tcp tds4.2 10.1.1.249 2638 Thank you. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase ASA 6.0 on Windows connection
Hi, I try to connect to Sybase ASA 6.0 on Windows machine via TDS4.2 (freetds-0.51). But I have'nt success ..could you help me please ? My connection string is: $cn=sybase_connect("labbiszeninv", "dba","sql") or die ("Sybase must die"); here is freetds interface file: labbiszeninv query tcp tds4.2 10.1.1.249 2638 master tcp tds4.2 10.1.1.249 2638 Thank you. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase-ct Bug 7609 New Connections?
Hi http://www.php.net/bugs.php?id=7609 This bug report (7609) concerned new connections being made when calling sybase_connect(). The last reponse was [2001-02-11 15:09:51][EMAIL PROTECTED] I guess this should not happen, anyone with sybase should verify this.. I'm using PHP 4.0.5 on Apache 1.3.20 Redhat 7 and get the same results as that posted in the bug report. That is on every 4th connection the resource id is incremented. Has any progress been made so far, or is this not a problem? Thanks David -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase Mailing List?
Sorry to ask this here, but I don´t know where to ask else ... Does someone know a good mailinglist about specific sybase questions? I have some questions about BCP ... MfG Marcel Walter Dresdner Kleinwort Wasserstein Foreign Exchange & Money Market Address:Jürgen-Ponto-Platz 1, 60301 Frankfurt/Main * mailto:[EMAIL PROTECTED] * (0 69)-263-12730 If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] sybase function for MS-SQL Server
Hi, > Query Analyzer" perfectly. > e.g. > SP1: (works) > CREATE PROCEDURE SP1 AS > insert into mytable values(...) > select * from mytable Only one result set. > > SP2: (doesn't work) > CREATE PROCEDURE SP2 AS > select * from mytable > select * from mytable Two result sets > > SP3: (doesn't work) > CREATE PROCEDURE SP3 AS > insert into mytable values(...) > insert into mytable values(...) Two results. The sybase extension is not written to handle multiple results in a single query. I have writteh the code for this in the MSSQL extension, but so far this extension is only available on Windows. - Frank -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] sybase function for MS-SQL Server
I am almost crazy now after playing with these codes over 10 hours. I don't expect to call sybase_query() one by one for executing sql batch. It just doesn't work for me like what I said yesterday. Now I try to make a stored procedure for these sql batch. So I can call sybase_query() only once. But sometimes it works and sometimes not, it depends on what is in the stored procedure. And I am sure that every stored procedure I put into sybase_query() can be run on "SQL Server Query Analyzer" perfectly. e.g. SP1: (works) CREATE PROCEDURE SP1 AS insert into mytable values(...) select * from mytable SP2: (doesn't work) CREATE PROCEDURE SP2 AS select * from mytable select * from mytable SP3: (doesn't work) CREATE PROCEDURE SP3 AS insert into mytable values(...) insert into mytable values(...) It looks that the sybase_query() is not stable. I am not the person doing freetds setup on this Unix machine. Do you think this is a freetds related problem? --- olinux o <[EMAIL PROTECTED]> wrote: > test > > --- jong jong <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am working on Unix(Solaris 2.8) with Apache 1.3 > > and > > php4. I need to connect MS-SQL Server without > ODBC. > > Someone told me that sybase functions can work > with > > MS-SQL Server. So I called sybase_xxx() > > instead of mssql_xxx(). I was surprised that most > of > > them really work! But the problem is that > > sybase_query() seems only work for "select ..." > > statement. When I tried to pass > > "insert...","update..." or "delete...", this > > function > > returned "false", but the database was actually > > updated. And the following sybase_query() would > > always > > return "false" even it is for "select...". > > > > Here is an example: > > $conn=sybase_connect("MS-SQL > > Server","login","password"); //successful > > sybase_select_db("db",$conn); //return true > > $result=@sybase_query("select ...",$conn); > //Great! > > That's what I want. > > sybase_free_result($result); //no problem so far > > $result=@sybase_query("insert ...",$conn); > //return > > false, but I did insert a new record into SQL > > Server. > > sybase_free_result($result); //successful > > $result=@sybase_query("select...",$conn); //return > > false, can't work with "select..." any more. > > ... > > > > Anybody had same experience before? I will > > appriecate > > any information from you. > > > > Wen > > > > > > __ > > Do You Yahoo!? > > Get personalized email addresses from Yahoo! Mail > > http://personal.mail.yahoo.com/ > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > > > __ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail > http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] sybase function for MS-SQL Server
Hi, I am working on Unix(Solaris 2.8) with Apache 1.3 and php4. I need to connect MS-SQL Server without ODBC. I know there is an option that using freetds but I haven't tried it yet. Someone told me that sybase functions can work with MS-SQL Server directly. So I called sybase_xxx() instead of mssql_xxx(). I was surprised that most of them really work! But the problem is that sybase_query() seems only work for "select ..." statement. When I tried to pass "insert...","update..." or "delete...", this function returned "false", but the database was actually updated. And the following sybase_query() would always return "false" even it is for "select...". Here is an example: $conn=mssql_connect("MS-SQL Server","login","password"); //successful sybase_select_db("db",$conn); //return true $result=@sybase_query("select ...",$conn); //Great! That's what I want. sybase_free_result($result); //no problem so far $result=@sybase_query("insert ...",$conn); //return false, but I did insert a new record into SQL Server. sybase_free_result($result); //successful $result=@sybase_query("select...",$conn); //return false, can't work with "select..." any more. ... Anybody had same experience before? I will appriecate any information from you. Wen __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase extensions for MSSQL??
Greetings, Would Sybase extensions for php work for MSSQL7? They say mssql_xxx is an alias for sybase_xxx. (I desperately need to get smth. working) Karl. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase datetime
Hello, If I do a sybase_query("select getdate()",$Conn) this will return the current date in the format "Nov 3 1998 8:06PM" (so I don't have seconds). I think this leads to the usage of CS_SHORT_DATE in ext/sybase_ct/php_sybase_ct.c (Line 275). Does somebody know, if there is a solution for getting another datetime-format beyond doing something like sybase_query("select convert(varchar,getdate(),108)". Wouldn't it be better to return the "datetime-results" of queries as a timestamp? Thanks for anwers, Bjoern -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase SQL Anywere - may it work on Win98 with PHP4
Hello. Im trying to tune PHP4 and Sybase SQL Anywere under win98. Is this possible? What difference beside Sybase-CT and Sybase in file php.ini? In sql.ini I wrote: [MUSIC] master=NLWNSCK, 192.168.1.44 ,1498 query=NLWNSCK, 192.168.1.44 ,1498 192.168.1.44 this is IP adress in LAN also I try 127.0.0.1 but nothing work. http server - Apachie for win32 And one more question: then I just installed Sybase (directory: Sybase SqlAny50) and trying to connect - this is not working. In appache log I found an error saying that libct.dll not found on path c:\syb10 (!!!). this directory just did'n exist. Than I just make the copy of this dir into SQL10. After that I just cant connect to sybase. That is it. Can Anybody add some light on me trouble? Thanx before Poison. P.S.Sorry for my English. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Sybase character set warning
http://www.php.net/manual/de/function.sybase-connect.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Sybase character set warning
Hi i found this: Undocumented parameter "charset" ... The complete prototype of sybase_connect is : int sybase_connect([string host [, string user [, string password [, string charset). If , after a "sybase_connect", you receive a message like : " Sybase message: Cannot find the requested character set in Syscharsets: name = 'ÎU'. (severity 11) ", call sybase_connect like this : sybase_connect($host,$user,$password,'iso_1'); (if your charset is not 'iso_1', the next error message will tell you the good one !) and it will work fine ... "Dennis Luo" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > To all the experts, > > I have a small problem with PHP4 connecting to Sybase. > > Everytime when I connect to a sybase database, the following warning > comes up: > > Warning: Sybase message: Cannot find the requested character > set in Syscharsets: name = 'Ü®X'. (severity 11) > > Looks like there is a char set problem. > > Can you please help. > > Cheers, > Dennis > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase character set warning
To all the experts, I have a small problem with PHP4 connecting to Sybase. Everytime when I connect to a sybase database, the following warning comes up: Warning: Sybase message: Cannot find the requested character set in Syscharsets: name = 'ܮX'. (severity 11) Looks like there is a char set problem. Can you please help. Cheers, Dennis -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase-ct in Linux and MS SQL 2000
I just installed a Sybase_CT module in php 4.0 on a linux machine. I'm trying to move a web site from a buggy and crashy NT box but I'm having trouble with the mssql_result call. This is what I get. Warning: 2 is not a valid Sybase result resource in /var/www/html/crap.php on line 54 Line 54 reads: $ssn = mssql_result($result,$a,0); I also get this error on all the mssql_result on the for loop. I made it work changing it with mssql_fetch_* calls but I want to move a big site to the Linux box and it would be a momumetal task rewriting the whole code. Can you please help? Thanks Sergio PS The same problem occurs with MS SQL 7.0 and MS SQL 2000 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase-ct in Linux and MS SQL 2000
I just installed a Sybase_CT module in php 4.0 on a linux machine. I'm trying to move a web site from a buggy and crashy NT box but I'm having trouble with the mssql_result call. This is what I get. Warning: 2 is not a valid Sybase result resource in /var/www/html/crap.php on line 54 Line 54 reads: $ssn = mssql_result($result,$a,0); I also get this error on all the mssql_result on the for loop. I made it work changing it with mssql_fetch_* calls but I want to move a big site to the Linux box and it would be a momumetal task rewriting the whole code. Can you please help? Thanks Sergio PS The same problem occurs with MS SQL 7.0 and MS SQL 2000 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]