Re: [PHP] ODBC
Hi Negin, tnx for advice, now however I have successfully downloaded and installed ODBC and the things needed to connect PHP-ODBC (yum on the same actually) however, the llinked library file that the odbcinit.ini file points to in order to link the libmimodbc.so library is not found, though the file is obviously at that location (apache error_log contains a complaint file not found ) so Im still not through completely /g - Original Message - From: Negin Nickparsa nickpa...@gmail.com To: georg georg.chamb...@telia.com Cc: David OBrien dgobr...@gmail.com; PHP General php-general@lists.php.net Sent: Saturday, May 18, 2013 7:56 PM Subject: Re: [PHP] ODBC do you have the driver in linux? https://www.microsoft.com/en-us/download/details.aspx?id=28160 On Tue, May 7, 2013 at 11:46 AM, georg georg.chamb...@telia.com wrote: but isnt there some yum command that will fix things for me (download if necessary, but I actually think the ODBC would be in the distribution of fedora ?) br georg - Original Message - From: David OBrien dgobr...@gmail.com To: georg georg.chamb...@telia.com Cc: PHP General php-general@lists.php.net Sent: Monday, May 06, 2013 11:06 PM Subject: Re: [PHP] ODBC On Mon, May 6, 2013 at 3:32 PM, georg georg.chamb...@telia.com wrote: Hi, Id like to get ODBC connection to SQL from PHP going. Ive done that on XP, but now Im switching to Linux (Fedora). My impression in that the connecting part is per the DB designers responsibility. Im using Mimer-SQL, but cant find any information on how to set up ODBC for that. Any advice welcome. BR georg http://developer.mimer.com/**howto/howto_57.htmhttp://developer.mimer.com/howto/howto_57.htm -- 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] ODBC
Hi, I'm not really clear on what you have and haven't done, but did you check permissions? HTH Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Hi Negin, tnx for advice, now however I have successfully downloaded and installed ODBC and the things needed to connect PHP-ODBC (yum on the same actually) however, the llinked library file that the odbcinit.ini file points to in order to link the libmimodbc.so library is not found, though the file is obviously at that location (apache error_log contains a complaint file not found ) so Im still not through completely /g - Original Message - From: Negin Nickparsa nickpa...@gmail.com To: georg georg.chamb...@telia.com Cc: David OBrien dgobr...@gmail.com; PHP General php-general@lists.php.net Sent: Saturday, May 18, 2013 7:56 PM Subject: Re: [PHP] ODBC do you have the driver in linux? https://www.microsoft.com/en-**us/download/details.aspx?id=**28160https://www.microsoft.com/en-us/download/details.aspx?id=28160 On Tue, May 7, 2013 at 11:46 AM, georg georg.chamb...@telia.com wrote: but isnt there some yum command that will fix things for me (download if necessary, but I actually think the ODBC would be in the distribution of fedora ?) br georg - Original Message - From: David OBrien dgobr...@gmail.com To: georg georg.chamb...@telia.com Cc: PHP General php-general@lists.php.net Sent: Monday, May 06, 2013 11:06 PM Subject: Re: [PHP] ODBC On Mon, May 6, 2013 at 3:32 PM, georg georg.chamb...@telia.com wrote: Hi, Id like to get ODBC connection to SQL from PHP going. Ive done that on XP, but now Im switching to Linux (Fedora). My impression in that the connecting part is per the DB designers responsibility. Im using Mimer-SQL, but cant find any information on how to set up ODBC for that. Any advice welcome. BR georg http://developer.mimer.com/howto/howto_57.htmhttp://developer.mimer.com/**howto/howto_57.htm http://**developer.mimer.com/howto/**howto_57.htmhttp://developer.mimer.com/howto/howto_57.htm -- 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] ODBC
Hi Serge, compliled some more info Apache error log as: --- [Tue May 14 17:45:11 2013] [error] [client 127.0.0.1] PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/lib/libmimodbc.so' : file not found, SQL state 01000 in SQLConnect in /var/www/html/my2.php on line 19, referer: http://127.0.0.1/ File that is deemed missing: --- [root@this ge]# ls -alF /lib/libmimodbc.so lrwxrwxrwx. 1 root root 39 Apr 29 22:21 /lib/libmimodbc.so - /opt/MimerSQL-10.0.6J/lib/libmimodbc.so* --- and since this seem to be a link rather than the file (for some reason, think I actually moved lib there--- [root@this ge]# ls -alF /opt total 12 drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ./ dr-xr-xr-x. 18 root root 4096 May 16 19:15 ../ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 MimerSQL-10.0.6J/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/ total 40 drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ./ drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ../ drwxr-xr-x. 2 root root 4096 Dec 21 2011 bin/ drwxr-xr-x. 8 root root 4096 Apr 29 22:20 DbVisualizer/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 doc/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 examples/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 include/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 lib/ drwxr-xr-x. 5 root root 4096 Dec 21 2011 man/ drwxr-xr-x. 2 root root 4096 Apr 29 22:21 misc/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib total 12516 drwxr-xr-x. 2 root root 4096 Dec 21 2011 ./ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ../ -rwxr-xr-x. 1 root root 515740 Dec 20 2011 compat.a* -rwxr-xr-x. 1 root root 1051162 Dec 20 2011 libmimcomm.so* -rwxr-xr-x. 1 root root 1346488 Dec 20 2011 libmimdbi.so* -rwxr-xr-x. 1 root root 5397415 Dec 20 2011 libmimdbs.so* -rwxr-xr-x. 1 root root 1922776 Dec 20 2011 libmimer.so* -rwxr-xr-x. 1 root root 6416 Dec 20 2011 libmimerS.so* -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 libmimodbc.so* -rwxr-xr-x. 1 root root 507386 Dec 20 2011 libqsqlmimer.so* -rwxr-xr-x. 1 root root 136312 Dec 20 2011 mimjdbc3.jar* -rwxr-xr-x. 1 root root 1252 Dec 20 2011 mimsqlxa.o* -rwxr-xr-x. 1 root root 212423 Dec 20 2011 psmdebug.jar* [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib/libmimodbc.so -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 /opt/MimerSQL-10.0.6J/lib/libmimodbc.so* [root@this ge]# so that seem to be in place ?? -- Tnx Georg - Original Message - From: Serge Fonville To: georg Cc: Negin Nickparsa ; PHP Mailinglist Sent: Sunday, May 19, 2013 12:45 PM Subject: Re: [PHP] ODBC Hi, I'm not really clear on what you have and haven't done, but did you check permissions? HTH Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Hi Negin, tnx for advice, now however I have successfully downloaded and installed ODBC and the things needed to connect PHP-ODBC (yum on the same actually) however, the llinked library file that the odbcinit.ini file points to in order to link the libmimodbc.so library is not found, though the file is obviously at that location (apache error_log contains a complaint file not found ) so Im still not through completely /g - Original Message - From: Negin Nickparsa nickpa...@gmail.com To: georg georg.chamb...@telia.com Cc: David OBrien dgobr...@gmail.com; PHP General php-general@lists.php.net Sent: Saturday, May 18, 2013 7:56 PM Subject: Re: [PHP] ODBC do you have the driver in linux? https://www.microsoft.com/en-us/download/details.aspx?id=28160 On Tue, May 7, 2013 at 11:46 AM, georg georg.chamb...@telia.com wrote: but isnt there some yum command that will fix things for me (download if necessary, but I actually think the ODBC would be in the distribution of fedora ?) br georg - Original Message - From: David OBrien dgobr...@gmail.com To: georg georg.chamb...@telia.com Cc: PHP General php-general@lists.php.net Sent: Monday, May 06, 2013 11:06 PM Subject: Re: [PHP] ODBC On Mon, May 6, 2013 at 3:32 PM, georg georg.chamb...@telia.com wrote: Hi, Id like to get ODBC connection to SQL from PHP going. Ive done that on XP, but now Im switching to Linux (Fedora). My impression in that the connecting part is per the DB designers responsibility. Im using Mimer-SQL, but cant find any information on how to set up ODBC for that. Any advice welcome. BR georg http://developer.mimer.com/**howto/howto_57.htmhttp://developer.mimer.com/howto/howto_57.htm -- 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] ODBC
Staring at it myself; should there be xr in the last position of the access definitions ? (how does Apache process come into the system access wise ?) tnx georg - Original Message - From: georg georg.chamb...@telia.com To: Serge Fonville serge.fonvi...@gmail.com Cc: php-general@lists.php.net Sent: Sunday, May 19, 2013 1:29 PM Subject: Re: [PHP] ODBC Hi Serge, compliled some more info Apache error log as: --- [Tue May 14 17:45:11 2013] [error] [client 127.0.0.1] PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/lib/libmimodbc.so' : file not found, SQL state 01000 in SQLConnect in /var/www/html/my2.php on line 19, referer: http://127.0.0.1/ File that is deemed missing: --- [root@this ge]# ls -alF /lib/libmimodbc.so lrwxrwxrwx. 1 root root 39 Apr 29 22:21 /lib/libmimodbc.so - /opt/MimerSQL-10.0.6J/lib/libmimodbc.so* --- and since this seem to be a link rather than the file (for some reason, think I actually moved lib there--- [root@this ge]# ls -alF /opt total 12 drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ./ dr-xr-xr-x. 18 root root 4096 May 16 19:15 ../ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 MimerSQL-10.0.6J/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/ total 40 drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ./ drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ../ drwxr-xr-x. 2 root root 4096 Dec 21 2011 bin/ drwxr-xr-x. 8 root root 4096 Apr 29 22:20 DbVisualizer/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 doc/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 examples/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 include/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 lib/ drwxr-xr-x. 5 root root 4096 Dec 21 2011 man/ drwxr-xr-x. 2 root root 4096 Apr 29 22:21 misc/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib total 12516 drwxr-xr-x. 2 root root 4096 Dec 21 2011 ./ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ../ -rwxr-xr-x. 1 root root 515740 Dec 20 2011 compat.a* -rwxr-xr-x. 1 root root 1051162 Dec 20 2011 libmimcomm.so* -rwxr-xr-x. 1 root root 1346488 Dec 20 2011 libmimdbi.so* -rwxr-xr-x. 1 root root 5397415 Dec 20 2011 libmimdbs.so* -rwxr-xr-x. 1 root root 1922776 Dec 20 2011 libmimer.so* -rwxr-xr-x. 1 root root 6416 Dec 20 2011 libmimerS.so* -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 libmimodbc.so* -rwxr-xr-x. 1 root root 507386 Dec 20 2011 libqsqlmimer.so* -rwxr-xr-x. 1 root root 136312 Dec 20 2011 mimjdbc3.jar* -rwxr-xr-x. 1 root root 1252 Dec 20 2011 mimsqlxa.o* -rwxr-xr-x. 1 root root 212423 Dec 20 2011 psmdebug.jar* [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib/libmimodbc.so -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 /opt/MimerSQL-10.0.6J/lib/libmimodbc.so* [root@this ge]# so that seem to be in place ?? -- Tnx Georg - Original Message - From: Serge Fonville To: georg Cc: Negin Nickparsa ; PHP Mailinglist Sent: Sunday, May 19, 2013 12:45 PM Subject: Re: [PHP] ODBC Hi, I'm not really clear on what you have and haven't done, but did you check permissions? HTH Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Hi Negin, tnx for advice, now however I have successfully downloaded and installed ODBC and the things needed to connect PHP-ODBC (yum on the same actually) however, the llinked library file that the odbcinit.ini file points to in order to link the libmimodbc.so library is not found, though the file is obviously at that location (apache error_log contains a complaint file not found ) so Im still not through completely /g - Original Message - From: Negin Nickparsa nickpa...@gmail.com To: georg georg.chamb...@telia.com Cc: David OBrien dgobr...@gmail.com; PHP General php-general@lists.php.net Sent: Saturday, May 18, 2013 7:56 PM Subject: Re: [PHP] ODBC do you have the driver in linux? https://www.microsoft.com/en-us/download/details.aspx?id=28160 On Tue, May 7, 2013 at 11:46 AM, georg georg.chamb...@telia.com wrote: but isnt there some yum command that will fix things for me (download if necessary, but I actually think the ODBC would be in the distribution of fedora ?) br georg - Original Message - From: David OBrien dgobr...@gmail.com To: georg georg.chamb...@telia.com Cc: PHP General php-general@lists.php.net Sent: Monday, May 06, 2013 11:06 PM Subject: Re: [PHP] ODBC On Mon, May 6, 2013 at 3:32 PM, georg georg.chamb...@telia.com wrote: Hi, Id like to get ODBC connection to SQL from PHP going. Ive done that on XP, but now Im switching to Linux (Fedora). My impression in that the connecting part is per the DB designers responsibility. Im using Mimer-SQL, but cant find any information on how to set up ODBC for that. Any advice welcome. BR georg http://developer.mimer.com/**howto/howto_57.htmhttp://developer.mimer.com
Re: [PHP] ODBC
could you su to the user apache runs as (possibly specifying the shell to use) and navigate to the directory? Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Hi Serge, compliled some more info Apache error log as: --- [Tue May 14 17:45:11 2013] [error] [client 127.0.0.1] PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/lib/libmimodbc.so' : file not found, SQL state 01000 in SQLConnect in /var/www/html/my2.php on line 19, referer: http://127.0.0.1/ File that is deemed missing: --- [root@this ge]# ls -alF /lib/libmimodbc.so lrwxrwxrwx. 1 root root 39 Apr 29 22:21 /lib/libmimodbc.so - /opt/MimerSQL-10.0.6J/lib/**libmimodbc.so* --- and since this seem to be a link rather than the file (for some reason, think I actually moved lib there--- [root@this ge]# ls -alF /opt total 12 drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ./ dr-xr-xr-x. 18 root root 4096 May 16 19:15 ../ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 MimerSQL-10.0.6J/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/ total 40 drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ./ drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ../ drwxr-xr-x. 2 root root 4096 Dec 21 2011 bin/ drwxr-xr-x. 8 root root 4096 Apr 29 22:20 DbVisualizer/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 doc/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 examples/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 include/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 lib/ drwxr-xr-x. 5 root root 4096 Dec 21 2011 man/ drwxr-xr-x. 2 root root 4096 Apr 29 22:21 misc/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib total 12516 drwxr-xr-x. 2 root root 4096 Dec 21 2011 ./ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ../ -rwxr-xr-x. 1 root root 515740 Dec 20 2011 compat.a* -rwxr-xr-x. 1 root root 1051162 Dec 20 2011 libmimcomm.so* -rwxr-xr-x. 1 root root 1346488 Dec 20 2011 libmimdbi.so* -rwxr-xr-x. 1 root root 5397415 Dec 20 2011 libmimdbs.so* -rwxr-xr-x. 1 root root 1922776 Dec 20 2011 libmimer.so* -rwxr-xr-x. 1 root root 6416 Dec 20 2011 libmimerS.so* -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 libmimodbc.so* -rwxr-xr-x. 1 root root 507386 Dec 20 2011 libqsqlmimer.so* -rwxr-xr-x. 1 root root 136312 Dec 20 2011 mimjdbc3.jar* -rwxr-xr-x. 1 root root 1252 Dec 20 2011 mimsqlxa.o* -rwxr-xr-x. 1 root root 212423 Dec 20 2011 psmdebug.jar* [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib/**libmimodbc.so -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 /opt/MimerSQL-10.0.6J/lib/** libmimodbc.so* [root@this ge]# so that seem to be in place ?? -- Tnx Georg - Original Message - From: Serge Fonville To: georg Cc: Negin Nickparsa ; PHP Mailinglist Sent: Sunday, May 19, 2013 12:45 PM Subject: Re: [PHP] ODBC Hi, I'm not really clear on what you have and haven't done, but did you check permissions? HTH Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/**SQLServer/feedback/details/** 417926/truncate-partition-of-**partitioned-tablehttps://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Hi Negin, tnx for advice, now however I have successfully downloaded and installed ODBC and the things needed to connect PHP-ODBC (yum on the same actually) however, the llinked library file that the odbcinit.ini file points to in order to link the libmimodbc.so library is not found, though the file is obviously at that location (apache error_log contains a complaint file not found ) so Im still not through completely /g - Original Message - From: Negin Nickparsa nickpa...@gmail.com To: georg georg.chamb...@telia.com Cc: David OBrien dgobr...@gmail.com; PHP General php-general@lists.php.net Sent: Saturday, May 18, 2013 7:56 PM Subject: Re: [PHP] ODBC do you have the driver in linux? https://www.microsoft.com/en-**us/download/details.aspx?id=**28160https://www.microsoft.com/en-us/download/details.aspx?id=28160 On Tue, May 7, 2013 at 11:46 AM, georg georg.chamb...@telia.com wrote: but isnt there some yum command that will fix things for me (download if necessary, but I actually think the ODBC would be in the distribution of fedora ?) br georg - Original Message - From: David OBrien dgobr...@gmail.com To: georg georg.chamb...@telia.com Cc: PHP General php-general@lists.php.net Sent: Monday, May 06, 2013 11:06 PM Subject: Re: [PHP] ODBC On Mon, May 6, 2013 at 3:32 PM, georg georg.chamb...@telia.com wrote: Hi, Id like to get ODBC connection to SQL from PHP going. Ive done that on XP
Re: [PHP] ODBC
x on directories is required to navigate to a directory. r is needed to read the file Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Staring at it myself; should there be xr in the last position of the access definitions ? (how does Apache process come into the system access wise ?) tnx georg - Original Message - From: georg georg.chamb...@telia.com To: Serge Fonville serge.fonvi...@gmail.com Cc: php-general@lists.php.net Sent: Sunday, May 19, 2013 1:29 PM Subject: Re: [PHP] ODBC Hi Serge, compliled some more info Apache error log as: --- [Tue May 14 17:45:11 2013] [error] [client 127.0.0.1] PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/lib/libmimodbc.so' : file not found, SQL state 01000 in SQLConnect in /var/www/html/my2.php on line 19, referer: http://127.0.0.1/ File that is deemed missing: --- [root@this ge]# ls -alF /lib/libmimodbc.so lrwxrwxrwx. 1 root root 39 Apr 29 22:21 /lib/libmimodbc.so - /opt/MimerSQL-10.0.6J/lib/**libmimodbc.so* --- and since this seem to be a link rather than the file (for some reason, think I actually moved lib there--- [root@this ge]# ls -alF /opt total 12 drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ./ dr-xr-xr-x. 18 root root 4096 May 16 19:15 ../ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 MimerSQL-10.0.6J/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/ total 40 drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ./ drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ../ drwxr-xr-x. 2 root root 4096 Dec 21 2011 bin/ drwxr-xr-x. 8 root root 4096 Apr 29 22:20 DbVisualizer/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 doc/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 examples/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 include/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 lib/ drwxr-xr-x. 5 root root 4096 Dec 21 2011 man/ drwxr-xr-x. 2 root root 4096 Apr 29 22:21 misc/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib total 12516 drwxr-xr-x. 2 root root 4096 Dec 21 2011 ./ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ../ -rwxr-xr-x. 1 root root 515740 Dec 20 2011 compat.a* -rwxr-xr-x. 1 root root 1051162 Dec 20 2011 libmimcomm.so* -rwxr-xr-x. 1 root root 1346488 Dec 20 2011 libmimdbi.so* -rwxr-xr-x. 1 root root 5397415 Dec 20 2011 libmimdbs.so* -rwxr-xr-x. 1 root root 1922776 Dec 20 2011 libmimer.so* -rwxr-xr-x. 1 root root 6416 Dec 20 2011 libmimerS.so* -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 libmimodbc.so* -rwxr-xr-x. 1 root root 507386 Dec 20 2011 libqsqlmimer.so* -rwxr-xr-x. 1 root root 136312 Dec 20 2011 mimjdbc3.jar* -rwxr-xr-x. 1 root root 1252 Dec 20 2011 mimsqlxa.o* -rwxr-xr-x. 1 root root 212423 Dec 20 2011 psmdebug.jar* [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib/**libmimodbc.so -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 /opt/MimerSQL-10.0.6J/lib/** libmimodbc.so* [root@this ge]# so that seem to be in place ?? -- Tnx Georg - Original Message - From: Serge Fonville To: georg Cc: Negin Nickparsa ; PHP Mailinglist Sent: Sunday, May 19, 2013 12:45 PM Subject: Re: [PHP] ODBC Hi, I'm not really clear on what you have and haven't done, but did you check permissions? HTH Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/**SQLServer/feedback/details/** 417926/truncate-partition-of-**partitioned-tablehttps://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Hi Negin, tnx for advice, now however I have successfully downloaded and installed ODBC and the things needed to connect PHP-ODBC (yum on the same actually) however, the llinked library file that the odbcinit.ini file points to in order to link the libmimodbc.so library is not found, though the file is obviously at that location (apache error_log contains a complaint file not found ) so Im still not through completely /g - Original Message - From: Negin Nickparsa nickpa...@gmail.com To: georg georg.chamb...@telia.com Cc: David OBrien dgobr...@gmail.com; PHP General php-general@lists.php.net Sent: Saturday, May 18, 2013 7:56 PM Subject: Re: [PHP] ODBC do you have the driver in linux? https://www.microsoft.com/en-**us/download/details.aspx?id=**28160https://www.microsoft.com/en-us/download/details.aspx?id=28160 On Tue, May 7, 2013 at 11:46 AM, georg georg.chamb...@telia.com wrote: but isnt there some yum command that will fix things for me (download if necessary, but I actually think the ODBC would be in the distribution of fedora ?) br georg - Original
Re: [PHP] ODBC
Also, is PHP installed as a module or otherwise? Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 Serge Fonville serge.fonvi...@gmail.com x on directories is required to navigate to a directory. r is needed to read the file Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Staring at it myself; should there be xr in the last position of the access definitions ? (how does Apache process come into the system access wise ?) tnx georg - Original Message - From: georg georg.chamb...@telia.com To: Serge Fonville serge.fonvi...@gmail.com Cc: php-general@lists.php.net Sent: Sunday, May 19, 2013 1:29 PM Subject: Re: [PHP] ODBC Hi Serge, compliled some more info Apache error log as: --- [Tue May 14 17:45:11 2013] [error] [client 127.0.0.1] PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/lib/libmimodbc.so' : file not found, SQL state 01000 in SQLConnect in /var/www/html/my2.php on line 19, referer: http://127.0.0.1/ File that is deemed missing: --- [root@this ge]# ls -alF /lib/libmimodbc.so lrwxrwxrwx. 1 root root 39 Apr 29 22:21 /lib/libmimodbc.so - /opt/MimerSQL-10.0.6J/lib/**libmimodbc.so* --- and since this seem to be a link rather than the file (for some reason, think I actually moved lib there--- [root@this ge]# ls -alF /opt total 12 drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ./ dr-xr-xr-x. 18 root root 4096 May 16 19:15 ../ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 MimerSQL-10.0.6J/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/ total 40 drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ./ drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ../ drwxr-xr-x. 2 root root 4096 Dec 21 2011 bin/ drwxr-xr-x. 8 root root 4096 Apr 29 22:20 DbVisualizer/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 doc/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 examples/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 include/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 lib/ drwxr-xr-x. 5 root root 4096 Dec 21 2011 man/ drwxr-xr-x. 2 root root 4096 Apr 29 22:21 misc/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib total 12516 drwxr-xr-x. 2 root root 4096 Dec 21 2011 ./ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ../ -rwxr-xr-x. 1 root root 515740 Dec 20 2011 compat.a* -rwxr-xr-x. 1 root root 1051162 Dec 20 2011 libmimcomm.so* -rwxr-xr-x. 1 root root 1346488 Dec 20 2011 libmimdbi.so* -rwxr-xr-x. 1 root root 5397415 Dec 20 2011 libmimdbs.so* -rwxr-xr-x. 1 root root 1922776 Dec 20 2011 libmimer.so* -rwxr-xr-x. 1 root root 6416 Dec 20 2011 libmimerS.so* -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 libmimodbc.so* -rwxr-xr-x. 1 root root 507386 Dec 20 2011 libqsqlmimer.so* -rwxr-xr-x. 1 root root 136312 Dec 20 2011 mimjdbc3.jar* -rwxr-xr-x. 1 root root 1252 Dec 20 2011 mimsqlxa.o* -rwxr-xr-x. 1 root root 212423 Dec 20 2011 psmdebug.jar* [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib/**libmimodbc.so -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 /opt/MimerSQL-10.0.6J/lib/** libmimodbc.so* [root@this ge]# so that seem to be in place ?? -- Tnx Georg - Original Message - From: Serge Fonville To: georg Cc: Negin Nickparsa ; PHP Mailinglist Sent: Sunday, May 19, 2013 12:45 PM Subject: Re: [PHP] ODBC Hi, I'm not really clear on what you have and haven't done, but did you check permissions? HTH Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/**SQLServer/feedback/details/** 417926/truncate-partition-of-**partitioned-tablehttps://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Hi Negin, tnx for advice, now however I have successfully downloaded and installed ODBC and the things needed to connect PHP-ODBC (yum on the same actually) however, the llinked library file that the odbcinit.ini file points to in order to link the libmimodbc.so library is not found, though the file is obviously at that location (apache error_log contains a complaint file not found ) so Im still not through completely /g - Original Message - From: Negin Nickparsa nickpa...@gmail.com To: georg georg.chamb...@telia.com Cc: David OBrien dgobr...@gmail.com; PHP General php-general@lists.php.net Sent: Saturday, May 18, 2013 7:56 PM Subject: Re: [PHP] ODBC do you have the driver in linux? https
Re: [PHP] ODBC
And... there is a chance apache doesn't follow the symlink. So you could also try copying the file to that directory instead of symlinking Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 Serge Fonville serge.fonvi...@gmail.com Also, is PHP installed as a module or otherwise? Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 Serge Fonville serge.fonvi...@gmail.com x on directories is required to navigate to a directory. r is needed to read the file Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Staring at it myself; should there be xr in the last position of the access definitions ? (how does Apache process come into the system access wise ?) tnx georg - Original Message - From: georg georg.chamb...@telia.com To: Serge Fonville serge.fonvi...@gmail.com Cc: php-general@lists.php.net Sent: Sunday, May 19, 2013 1:29 PM Subject: Re: [PHP] ODBC Hi Serge, compliled some more info Apache error log as: --- [Tue May 14 17:45:11 2013] [error] [client 127.0.0.1] PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/lib/libmimodbc.so' : file not found, SQL state 01000 in SQLConnect in /var/www/html/my2.php on line 19, referer: http://127.0.0.1/ File that is deemed missing: --- [root@this ge]# ls -alF /lib/libmimodbc.so lrwxrwxrwx. 1 root root 39 Apr 29 22:21 /lib/libmimodbc.so - /opt/MimerSQL-10.0.6J/lib/**libmimodbc.so* --- and since this seem to be a link rather than the file (for some reason, think I actually moved lib there--- [root@this ge]# ls -alF /opt total 12 drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ./ dr-xr-xr-x. 18 root root 4096 May 16 19:15 ../ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 MimerSQL-10.0.6J/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/ total 40 drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ./ drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ../ drwxr-xr-x. 2 root root 4096 Dec 21 2011 bin/ drwxr-xr-x. 8 root root 4096 Apr 29 22:20 DbVisualizer/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 doc/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 examples/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 include/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 lib/ drwxr-xr-x. 5 root root 4096 Dec 21 2011 man/ drwxr-xr-x. 2 root root 4096 Apr 29 22:21 misc/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib total 12516 drwxr-xr-x. 2 root root 4096 Dec 21 2011 ./ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ../ -rwxr-xr-x. 1 root root 515740 Dec 20 2011 compat.a* -rwxr-xr-x. 1 root root 1051162 Dec 20 2011 libmimcomm.so* -rwxr-xr-x. 1 root root 1346488 Dec 20 2011 libmimdbi.so* -rwxr-xr-x. 1 root root 5397415 Dec 20 2011 libmimdbs.so* -rwxr-xr-x. 1 root root 1922776 Dec 20 2011 libmimer.so* -rwxr-xr-x. 1 root root 6416 Dec 20 2011 libmimerS.so* -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 libmimodbc.so* -rwxr-xr-x. 1 root root 507386 Dec 20 2011 libqsqlmimer.so* -rwxr-xr-x. 1 root root 136312 Dec 20 2011 mimjdbc3.jar* -rwxr-xr-x. 1 root root 1252 Dec 20 2011 mimsqlxa.o* -rwxr-xr-x. 1 root root 212423 Dec 20 2011 psmdebug.jar* [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib/**libmimodbc.so -r-xr-xr-x. 1 root root 1693640 Dec 20 2011 /opt/MimerSQL-10.0.6J/lib/* *libmimodbc.so* [root@this ge]# so that seem to be in place ?? -- Tnx Georg - Original Message - From: Serge Fonville To: georg Cc: Negin Nickparsa ; PHP Mailinglist Sent: Sunday, May 19, 2013 12:45 PM Subject: Re: [PHP] ODBC Hi, I'm not really clear on what you have and haven't done, but did you check permissions? HTH Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/**SQLServer/feedback/details/** 417926/truncate-partition-of-**partitioned-tablehttps://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Hi Negin, tnx for advice, now however I have successfully downloaded and installed ODBC and the things needed to connect PHP-ODBC (yum on the same actually) however, the llinked library file that the odbcinit.ini file points to in order to link the libmimodbc.so library is not found
Re: [PHP] ODBC
Hmm, I just noticed GMAIL no longer replies to all, so here is all my correspondence that wasn't sent to the list. Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 Serge Fonville serge.fonvi...@gmail.com damn, other way around su --shell=/bin/bash - apache Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 Serge Fonville serge.fonvi...@gmail.com since your root you can su apache --shell /bin/bash from theron you can do the same tests Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com As I said, Im a bit new to Linux, and the user and access system seem to me a bit . I dont reallly know what user apache runs as, possibly this process status give something ? (seem to be 8 processes, but what the user be apache ? i have accessed php directly, when su root; #php -r 'odbc_connect()'; give only silece, which i interprete that php actually successfully opens the db ? [root@this ge]# ps aux|grep httpd root 1377 0.0 0.7 28900 7804 ? Ss 10:50 0:00 /usr/sbin/httpd -k start apache 1378 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1379 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1380 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1381 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1382 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1383 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1384 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1385 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start root 1387 0.0 0.0 4760 788 pts/0 S+ 10:51 0:00 grep --color=au does this mean that the user is apache ?, and then what would that user have as login password? tnx georg - Original Message - From: Serge Fonville serge.fonvi...@gmail.com To: georg georg.chamb...@telia.com Cc: PHP Mailinglist php-general@lists.php.net Sent: Sunday, May 19, 2013 1:42 PM Subject: Re: [PHP] ODBC could you su to the user apache runs as (possibly specifying the shell to use) and navigate to the directory? Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/**SQLServer/feedback/details/** 417926/truncate-partition-of-**partitioned-tablehttps://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Hi Serge, compliled some more info Apache error log as: --- [Tue May 14 17:45:11 2013] [error] [client 127.0.0.1] PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/lib/libmimodbc.so' : file not found, SQL state 01000 in SQLConnect in /var/www/html/my2.php on line 19, referer: http://127.0.0.1/ File that is deemed missing: --- [root@this ge]# ls -alF /lib/libmimodbc.so lrwxrwxrwx. 1 root root 39 Apr 29 22:21 /lib/libmimodbc.so - /opt/MimerSQL-10.0.6J/lib/libmimodbc.so* --- and since this seem to be a link rather than the file (for some reason, think I actually moved lib there--- [root@this ge]# ls -alF /opt total 12 drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ./ dr-xr-xr-x. 18 root root 4096 May 16 19:15 ../ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 MimerSQL-10.0.6J/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/ total 40 drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ./ drwxr-xr-x. 3 root root 4096 Apr 29 22:20 ../ drwxr-xr-x. 2 root root 4096 Dec 21 2011 bin/ drwxr-xr-x. 8 root root 4096 Apr 29 22:20 DbVisualizer/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 doc/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 examples/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 include/ drwxr-xr-x. 2 root root 4096 Dec 21 2011 lib/ drwxr-xr-x. 5 root root 4096 Dec 21 2011 man/ drwxr-xr-x. 2 root root 4096 Apr 29 22:21 misc/ [root@this ge]# ls -alF /opt/MimerSQL-10.0.6J/lib total 12516 drwxr-xr-x. 2 root root 4096 Dec 21 2011 ./ drwxr-xr-x. 10 root root 4096 Apr 29 22:20 ../ -rwxr-xr-x. 1 root root 515740 Dec 20 2011 compat.a* -rwxr-xr-x. 1 root root 1051162 Dec 20 2011 libmimcomm.so* -rwxr-xr-x. 1 root root 1346488 Dec 20 2011 libmimdbi.so* -rwxr-xr-x. 1 root root 5397415
Re: [PHP] ODBC
Hi ! just started and logged onto the machine (bitch) I have hitherto ignored an secturity alert message that popps up when restarting and logging on first time som SELinux Altert Browser which informs me that process: httpd has attempted this access: execute on this file libmimodbc.so what this security amounts to I dont know but the utility it gives me three options: 1. If you want to fix the lable /optso (what label, this i a file not a label...) default label (what label ?) should be lib_t 2. If you wnat to allow httpd to have access then there is possibility to click one of these choices to light up and make readable the suggested action: you need to change the label on /opt/.so (what darn label... again?) #semanage fcontext -a -t File_type '/optso' where File_type is one of : (then follows a huge dump of choices, among which is lib_t ) -- I did this supplying lib_t think, think, think a long time, silent return, so the action should be happy, NO DIFFERNCE, same error log Isnt security wondefful. It really sees to that noone can achive nothing. /georg - Original Message - From: Serge Fonville To: georg ; PHP Mailinglist Sent: Sunday, May 19, 2013 2:35 PM Subject: Re: [PHP] ODBC Hmm, I just noticed GMAIL no longer replies to all, so here is all my correspondence that wasn't sent to the list. Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 Serge Fonville serge.fonvi...@gmail.com damn, other way around su --shell=/bin/bash - apache Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 Serge Fonville serge.fonvi...@gmail.com since your root you can su apache --shell /bin/bash from theron you can do the same tests Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com As I said, Im a bit new to Linux, and the user and access system seem to me a bit . I dont reallly know what user apache runs as, possibly this process status give something ? (seem to be 8 processes, but what the user be apache ? i have accessed php directly, when su root; #php -r 'odbc_connect()'; give only silece, which i interprete that php actually successfully opens the db ? [root@this ge]# ps aux|grep httpd root 1377 0.0 0.7 28900 7804 ? Ss 10:50 0:00 /usr/sbin/httpd -k start apache 1378 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1379 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1380 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1381 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1382 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1383 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1384 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start apache 1385 0.0 0.4 29032 4164 ? S 10:50 0:00 /usr/sbin/httpd -k start root 1387 0.0 0.0 4760 788 pts/0 S+ 10:51 0:00 grep --color=au does this mean that the user is apache ?, and then what would that user have as login password? tnx georg - Original Message - From: Serge Fonville serge.fonvi...@gmail.com To: georg georg.chamb...@telia.com Cc: PHP Mailinglist php-general@lists.php.net Sent: Sunday, May 19, 2013 1:42 PM Subject: Re: [PHP] ODBC could you su to the user apache runs as (possibly specifying the shell to use) and navigate to the directory? Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 georg georg.chamb...@telia.com Hi Serge, compliled some more info Apache error log as: --- [Tue May 14 17:45:11 2013] [error] [client 127.0.0.1] PHP Warning: odbc_connect(): SQL error
Re: [PHP] ODBC
Actually who the heck has put SELinux in my machine ? anyone knows (is this a part of fedora ?) /g
Re: [PHP] ODBC
On Sun, May 19, 2013 at 9:06 AM, georg georg.chamb...@telia.com wrote: Actually who the heck has put SELinux in my machine ? anyone knows (is this a part of fedora ?) Never used Fedora, but it's part of Red Hat and Centos, so would guess it's also part of fedora. You can disable SELinux with this: echo 0 /selinux/enforce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC
On Sun, 2013-05-19 at 17:06 +0200, georg wrote: Actually who the heck has put SELinux in my machine ? anyone knows (is this a part of fedora ?) /g SELinux is part of Fedora install. You can disable it (not recommended) or just follow one of the options it gives you depending on what you actually want to achieve. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] ODBC
better would be to allow apache acces to the module i.e. http://www.webhostingtalk.com/showthread.php?t=711418 Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 Larry Martell la...@software-horizons.com On Sun, May 19, 2013 at 9:06 AM, georg georg.chamb...@telia.com wrote: Actually who the heck has put SELinux in my machine ? anyone knows (is this a part of fedora ?) Never used Fedora, but it's part of Red Hat and Centos, so would guess it's also part of fedora. You can disable SELinux with this: echo 0 /selinux/enforce
Re: [PHP] ODBC
Again to the list Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 Serge Fonville serge.fonvi...@gmail.com better would be to allow apache acces to the module i.e. http://www.webhostingtalk.com/showthread.php?t=711418 Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 Larry Martell la...@software-horizons.com On Sun, May 19, 2013 at 9:06 AM, georg georg.chamb...@telia.com wrote: Actually who the heck has put SELinux in my machine ? anyone knows (is this a part of fedora ?) Never used Fedora, but it's part of Red Hat and Centos, so would guess it's also part of fedora. You can disable SELinux with this: echo 0 /selinux/enforce
Re: [PHP] ODBC
Solved. Gosch big F F-word. It was this very fantastic hidden feature everyone (?) longs for: SELinux which is integral to Fedora Linux it seems Making my system secure, from badasses like myself. well, I found a verb; setenforce 0 -- made it, now I have the right to do what should be done possibly I one day will learn how to use it in a proper way to actually secure my server and then I might even be happy about it. realizing this has not been PHP at all, and thanks for all advice for now /georg - Original Message - From: Serge Fonville serge.fonvi...@gmail.com To: la...@software-horizons.com Cc: georg georg.chamb...@telia.com; PHP Mailinglist php-general@lists.php.net Sent: Sunday, May 19, 2013 5:25 PM Subject: Re: [PHP] ODBC better would be to allow apache acces to the module i.e. http://www.webhostingtalk.com/showthread.php?t=711418 Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2013/5/19 Larry Martell la...@software-horizons.com On Sun, May 19, 2013 at 9:06 AM, georg georg.chamb...@telia.com wrote: Actually who the heck has put SELinux in my machine ? anyone knows (is this a part of fedora ?) Never used Fedora, but it's part of Red Hat and Centos, so would guess it's also part of fedora. You can disable SELinux with this: echo 0 /selinux/enforce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC
do you have the driver in linux? https://www.microsoft.com/en-us/download/details.aspx?id=28160 On Tue, May 7, 2013 at 11:46 AM, georg georg.chamb...@telia.com wrote: but isnt there some yum command that will fix things for me (download if necessary, but I actually think the ODBC would be in the distribution of fedora ?) br georg - Original Message - From: David OBrien dgobr...@gmail.com To: georg georg.chamb...@telia.com Cc: PHP General php-general@lists.php.net Sent: Monday, May 06, 2013 11:06 PM Subject: Re: [PHP] ODBC On Mon, May 6, 2013 at 3:32 PM, georg georg.chamb...@telia.com wrote: Hi, Id like to get ODBC connection to SQL from PHP going. Ive done that on XP, but now Im switching to Linux (Fedora). My impression in that the connecting part is per the DB designers responsibility. Im using Mimer-SQL, but cant find any information on how to set up ODBC for that. Any advice welcome. BR georg http://developer.mimer.com/**howto/howto_57.htmhttp://developer.mimer.com/howto/howto_57.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC
but isnt there some yum command that will fix things for me (download if necessary, but I actually think the ODBC would be in the distribution of fedora ?) br georg - Original Message - From: David OBrien dgobr...@gmail.com To: georg georg.chamb...@telia.com Cc: PHP General php-general@lists.php.net Sent: Monday, May 06, 2013 11:06 PM Subject: Re: [PHP] ODBC On Mon, May 6, 2013 at 3:32 PM, georg georg.chamb...@telia.com wrote: Hi, Id like to get ODBC connection to SQL from PHP going. Ive done that on XP, but now Im switching to Linux (Fedora). My impression in that the connecting part is per the DB designers responsibility. Im using Mimer-SQL, but cant find any information on how to set up ODBC for that. Any advice welcome. BR georg http://developer.mimer.com/howto/howto_57.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC
On Mon, May 6, 2013 at 3:32 PM, georg georg.chamb...@telia.com wrote: Hi, Id like to get ODBC connection to SQL from PHP going. Ive done that on XP, but now Im switching to Linux (Fedora). My impression in that the connecting part is per the DB designers responsibility. Im using Mimer-SQL, but cant find any information on how to set up ODBC for that. Any advice welcome. BR georg http://developer.mimer.com/howto/howto_57.htm
Re: [PHP] ODBC Functions MS SQL Server 2005
On Thu, Sep 18, 2008 at 4:35 PM, Micah Gersten [EMAIL PROTECTED] wrote: If you need abstraction, check this out: http://us.php.net/pdo Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I looked at PDO, and liked it, but it seems really buggy in the version of php we're running. I had to stop using it. We're running 5.1.2. Well from my experience with PDO the does the job pretty well and although I use it for mysql I haven't noticed any obvious bug. Update is always needed and since I despise development is M$ windowz I don't know if there are bugs there. Well using PDO will do the magic for you if you plan to migrate to another database. Since you are writing in an object oriented way as far as I can tell then data objects is more suited to your style. -- Thodoris
Re: [PHP] ODBC Functions MS SQL Server 2005
On 9/18/08, Dan Joseph [EMAIL PROTECTED] wrote: Hi, Anyone else using the odbc_* functions to interact with MS SQL Server 2005? I'm having a problem getting odbc_num_rows() to return anything other than -1 when querying a stored procedure. I can get it to work using Top in a normal query (non-stored procedure). SELECT Top 100 * FROM Table if I do an odbc_num_rows( result ) on that, I get the number of rows. However... EXEC ProcedureName @Var = 'value' if I do an odbc_num_rows( result), I get -1. The same is true if I did a straight SELECT * FROM Table. I've tried putting Top in my query in the stored procedure. Right now I'm either doing an extra query for @@ROWCOUNT, or I'm doing two result sets, a counting query, and then the normal query. I am concerned about performance in doing the two queries, and with @@ROWCOUNT, I feel I'm just adding extra things to the code that may be unreliable? From what I've read, its something with the ODBC driver, and updating the ODBC driver isn't an option. Anyone else having this problem? Any suggestions? -- -Dan Joseph Dan, If you already have your results in an array, try using count($result); That should count the number of results returned to your result array. Or you could try uncommenting the mssql extension in your php.ini file and then try using: mssql_num_rows() ? Dan
Re: [PHP] ODBC Functions MS SQL Server 2005
On Thu, Sep 18, 2008 at 3:36 PM, Dan Shirah [EMAIL PROTECTED] wrote: If you already have your results in an array, try using count($result); That should count the number of results returned to your result array. Or you could try uncommenting the mssql extension in your php.ini file and then try using: mssql_num_rows() ? Dan I don't have them in an array usually, I just cycle thru each row. I've thought about using the mssql_* functions. My boss originally pushed me into odbc posing the question What if we move to a different database server type?. I do have a class for handling all the database functions. Maybe I'll just go that route. If he changed to Oracle or something, I could modify my class easy enough. I'm assuming mssql_num_rows() works fine when calling a stored procedure? -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
Re: [PHP] ODBC Functions MS SQL Server 2005
If you need abstraction, check this out: http://us.php.net/pdo Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Dan Joseph wrote: On Thu, Sep 18, 2008 at 3:36 PM, Dan Shirah [EMAIL PROTECTED] wrote: If you already have your results in an array, try using count($result); That should count the number of results returned to your result array. Or you could try uncommenting the mssql extension in your php.ini file and then try using: mssql_num_rows() ? Dan I don't have them in an array usually, I just cycle thru each row. I've thought about using the mssql_* functions. My boss originally pushed me into odbc posing the question What if we move to a different database server type?. I do have a class for handling all the database functions. Maybe I'll just go that route. If he changed to Oracle or something, I could modify my class easy enough. I'm assuming mssql_num_rows() works fine when calling a stored procedure? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC Functions MS SQL Server 2005
On Thu, Sep 18, 2008 at 4:35 PM, Micah Gersten [EMAIL PROTECTED] wrote: If you need abstraction, check this out: http://us.php.net/pdo Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I looked at PDO, and liked it, but it seems really buggy in the version of php we're running. I had to stop using it. We're running 5.1.2. -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
Re: [PHP] ODBC Functions MS SQL Server 2005
You can't upgrade PHP? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Dan Joseph wrote: On Thu, Sep 18, 2008 at 4:35 PM, Micah Gersten [EMAIL PROTECTED] wrote: If you need abstraction, check this out: http://us.php.net/pdo Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I looked at PDO, and liked it, but it seems really buggy in the version of php we're running. I had to stop using it. We're running 5.1.2. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC Functions MS SQL Server 2005
On Thu, Sep 18, 2008 at 5:35 PM, Micah Gersten [EMAIL PROTECTED] wrote: You can't upgrade PHP? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Dan Joseph wrote: On Thu, Sep 18, 2008 at 4:35 PM, Micah Gersten [EMAIL PROTECTED] wrote: If you need abstraction, check this out: http://us.php.net/pdo Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I looked at PDO, and liked it, but it seems really buggy in the version of php we're running. I had to stop using it. We're running 5.1.2. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php No, unfortunately not. My boss is opposed to it (or atleast was a while back). He wasn't sure how some of his stuff would react to the upgarde. -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
Re: [PHP] odbc msaccess php5 [Giving Up]
Peter Jackson wrote: well thats it Ive come to the conclusion that its a driver/lib issue. From what I can see mdbtools lib only reads and only does basic select. (eg Select * from table where col =thistext But not tex* % or date. Also looks like the project has died (think the last release was 2004 or so.) Thought I would give odbtp ago but cant get that to make. aargghh I give up. Bastien Koert wrote: On Sat, Jul 5, 2008 at 11:04 AM, Bastien Koert [EMAIL PROTECTED] wrote: On Sat, Jul 5, 2008 at 6:51 AM, Peter Jackson [EMAIL PROTECTED] wrote: $conn=odbc_connect(Database,,); works $a = abcd; (this value exists in db) $stat = Select * FROM . 'Table Name'; $qry = odbc_exec($conn,$stat); $res = odbc_result_all($qry) or die(Error: ); The above works as I expect it to.(Returns 70 rows) If I now want to add a where clause $stat = SELECT * FROM . 'Table Name' . Where . 'Column Name = . $a; (This works) Now the place I fall into the abyss. if I change WHERE clause in $stat to WHERE . 'Column Name' LIKE abc* (or other variations like abc% abc% abc* 'abc%' 'abc*') All I end up with is a blank page or Warning odbc_result_all No tuples available at this result index. Also I'm having trouble working out how to use a date in the WHERE clause. I've tried #yy-mm-dd# yy-mm-dd* dd/mm/yy etc etc (oh and yy/mm/dd 00:00:00 etc I realize this is probably more odbc/sql related but after a lot of goggling and reading I havent found the answer (about 5 days so far) As the data seems to be text based, you need to quote it WHERE . 'Column Name' LIKE 'abc%' -- Bastien Cat, the other other white meat sorry, missed the access dates... try mm/dd/ as the format Unfortunately thats the first thing I thought of. I've tried every variation of quote I could think of. Can anyone tell me how to log what the odbc connection is actually sending/receiving? (as opposed to just echoing the sql statement I 'think' its sending. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] odbc msaccess php5
On Sat, Jul 5, 2008 at 6:51 AM, Peter Jackson [EMAIL PROTECTED] wrote: Hi list, I am trying to get info out of a MS Access 2000 db. So far I have managed to do some of it but current part has me stumped. Set up Machine 1 - Debian 4, Apache, PHP5 unixodbc, mdbtools Machine 2 - WindowsXP, MS-Access Database is in a windows share that is smfs mounted on the linux box. $conn=odbc_connect(Database,,); works $a = abcd; (this value exists in db) $stat = Select * FROM . 'Table Name'; $qry = odbc_exec($conn,$stat); $res = odbc_result_all($qry) or die(Error: ); The above works as I expect it to.(Returns 70 rows) If I now want to add a where clause $stat = SELECT * FROM . 'Table Name' . Where . 'Column Name = . $a; (This works) Now the place I fall into the abyss. if I change WHERE clause in $stat to WHERE . 'Column Name' LIKE abc* (or other variations like abc% abc% abc* 'abc%' 'abc*') All I end up with is a blank page or Warning odbc_result_all No tuples available at this result index. Also I'm having trouble working out how to use a date in the WHERE clause. I've tried #yy-mm-dd# yy-mm-dd* dd/mm/yy etc etc (oh and yy/mm/dd 00:00:00 etc I realize this is probably more odbc/sql related but after a lot of goggling and reading I havent found the answer (about 5 days so far) And before everyone shouts use mySQL postgresql etc that isnt an option at this point in time. I dont need to update the records I just need to be able to read them with php. Oh and whilst I'm here is it possible to read an ms-query via odbc? (eg select * from myquery). Just thinking that may fix one of my problems (Caps and spaces in table/column names aaarrgghh) Peter Jackson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php As the data seems to be text based, you need to quote it WHERE . 'Column Name' LIKE 'abc%' -- Bastien Cat, the other other white meat
Re: [PHP] odbc msaccess php5
On Sat, Jul 5, 2008 at 11:04 AM, Bastien Koert [EMAIL PROTECTED] wrote: On Sat, Jul 5, 2008 at 6:51 AM, Peter Jackson [EMAIL PROTECTED] wrote: Hi list, I am trying to get info out of a MS Access 2000 db. So far I have managed to do some of it but current part has me stumped. Set up Machine 1 - Debian 4, Apache, PHP5 unixodbc, mdbtools Machine 2 - WindowsXP, MS-Access Database is in a windows share that is smfs mounted on the linux box. $conn=odbc_connect(Database,,); works $a = abcd; (this value exists in db) $stat = Select * FROM . 'Table Name'; $qry = odbc_exec($conn,$stat); $res = odbc_result_all($qry) or die(Error: ); The above works as I expect it to.(Returns 70 rows) If I now want to add a where clause $stat = SELECT * FROM . 'Table Name' . Where . 'Column Name = . $a; (This works) Now the place I fall into the abyss. if I change WHERE clause in $stat to WHERE . 'Column Name' LIKE abc* (or other variations like abc% abc% abc* 'abc%' 'abc*') All I end up with is a blank page or Warning odbc_result_all No tuples available at this result index. Also I'm having trouble working out how to use a date in the WHERE clause. I've tried #yy-mm-dd# yy-mm-dd* dd/mm/yy etc etc (oh and yy/mm/dd 00:00:00 etc I realize this is probably more odbc/sql related but after a lot of goggling and reading I havent found the answer (about 5 days so far) And before everyone shouts use mySQL postgresql etc that isnt an option at this point in time. I dont need to update the records I just need to be able to read them with php. Oh and whilst I'm here is it possible to read an ms-query via odbc? (eg select * from myquery). Just thinking that may fix one of my problems (Caps and spaces in table/column names aaarrgghh) Peter Jackson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php As the data seems to be text based, you need to quote it WHERE . 'Column Name' LIKE 'abc%' -- Bastien Cat, the other other white meat sorry, missed the access dates... try mm/dd/ as the format -- Bastien Cat, the other other white meat
Re: [PHP] odbc msaccess php5
Bastien Koert wrote: On Sat, Jul 5, 2008 at 11:04 AM, Bastien Koert [EMAIL PROTECTED] wrote: On Sat, Jul 5, 2008 at 6:51 AM, Peter Jackson [EMAIL PROTECTED] wrote: $conn=odbc_connect(Database,,); works $a = abcd; (this value exists in db) $stat = Select * FROM . 'Table Name'; $qry = odbc_exec($conn,$stat); $res = odbc_result_all($qry) or die(Error: ); The above works as I expect it to.(Returns 70 rows) If I now want to add a where clause $stat = SELECT * FROM . 'Table Name' . Where . 'Column Name = . $a; (This works) Now the place I fall into the abyss. if I change WHERE clause in $stat to WHERE . 'Column Name' LIKE abc* (or other variations like abc% abc% abc* 'abc%' 'abc*') All I end up with is a blank page or Warning odbc_result_all No tuples available at this result index. Also I'm having trouble working out how to use a date in the WHERE clause. I've tried #yy-mm-dd# yy-mm-dd* dd/mm/yy etc etc (oh and yy/mm/dd 00:00:00 etc I realize this is probably more odbc/sql related but after a lot of goggling and reading I havent found the answer (about 5 days so far) As the data seems to be text based, you need to quote it WHERE . 'Column Name' LIKE 'abc%' -- Bastien Cat, the other other white meat sorry, missed the access dates... try mm/dd/ as the format Unfortunately thats the first thing I thought of. I've tried every variation of quote I could think of. Can anyone tell me how to log what the odbc connection is actually sending/receiving? (as opposed to just echoing the sql statement I 'think' its sending. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC and long text fields
Larry Garfield wrote: On Sunday 07 January 2007 8:26 pm, Jochem Maas wrote: ... with regard to wanting results returned in a 'named' fashion, does the new setup still not allow use of odbc_fetch_array() instead of odbc_fetch_row()? not that I see any logic in that solving the issue, again it might be worth trying to see if it does. Honestly I've not tried. (I also don't have the wrapper code in front of me at the moment. g) That could be a nice thing to simplify for performance, but I suspect that if the problem is with odbc_fetch_row() then odbc_fetch_array() will have the same bug. quite likely - but you never know until you give it a shot - weirder things have happened :-) I don't know much about MSSQL, or whether 'text' is an actual field type, but maybe this function offers a wayout?: http://php.net/manual/en/function.odbc-binmode.php No, that looks like it's for binary data. Text is a MS SQL field for huge-ass text fields, essentially similar to the MySQL field of the same name (at least at an API level). We also tried playing with odbc_longreadlen() and setting MS SQL's TEXTSIZE and TEXTLENGTH parameters to no avail. ah I see; double drat! are the php versions on the 2 systems you mention exactly the same? (you mention 5.1 and 5.1.6) this could be a clue to the problem. It's either both 5.1.6 or 5.1.6 live and 5.1.4 devel. (I don't recall what our exact version is atm.) We're in the process of upgrading our server soon, and I'm not sure what it will have. Probably 5.2, just to keep life interesting. :-) I would get the systems running exactly the same version just to rule out that as a possible source of the problem. lastly I don't suppose that it possible for you to switch to using the MSSQL specific php extension? [http://php.net/mssql] it might offer a better/faster connection to the MSSQL server as well as making the issue go away. I don't believe the client allows direct MSSQL connections. Besides, the MSSQL functions still require an ODBC driver underneath, I didn't know that. so if the problem is with the ODBC driver then that won't change anything. if what you say is true then it it would be a great way of determining if the it is the ODBC driver that's the problem, and if using MSSQL extension make the problem dissapear then you have a solution (given that it has to use an ODBC driver underneath, you will still be conforming to the client's requirements by not connecting directly). sorry I couldn't be of more help/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC and long text fields
no real answer, but ... Larry Garfield wrote: Hi all. I've a question regarding PHP's ODBC support. Here's the situation: We've a PHP app that uses ODBC to talk to a MS SQL server. Its original home was on a server that used the OpenLink ODBC driver, which was a POS, so we build an abstraction wrapper around the subset of PHP's ODBC functions that we were able to use to make it usable. The internal code for a query is built on odbc_exec, odbc_fetch_row, and odbc_result. The main interesting part is that the original driver didn't allow for named results, so instead we have a small string parser that reads the incoming SQL query, extracts the field names, and then uses that to map the numeric result indexes to their field name. Kinda clunky, but worked well and used only a minimal ODBC footprint. That worked fine on their old system. However, the client then moved from a Windows IIS server to Apache and PHP 5.1.6 on a Linux box, but still talking to an MS SQL server on a Windows box. We migrated our test environment to the same; Linux/Apache/PHP 5.1 talking to MS SQL on a Windows box over the network. Our system uses the unix_ODBC and freetds stack for ODBC connectivity, and that works fine. On the client's system, it works fine except for a few odd cases. Specifically, on a few queries that pull data from large text fields the query may hang. It seems to reliably hang on certain records only, and only after those records have been edited. It seems that when updating a record, there is a small chance of something happening to that record and it then not working thereafter. A PHP test script run from the command line freezes, while the same query run directly on the SQL server returns almost instantly. ... Now I'll be honest and say I don't quite follow what they're talking about. I do not claim to be an ODBC guru, but SQLGetData is a lower-level operation, SQL level or C level I don't know, but not something that happens in PHP code as far as I am aware. Are they saying there's a bug in PHP's odbc_fetch_row()? Or is it a bug in their driver if it can't handle whatever it is odbc_fetch_row() does internally? Or should we be using odbc_result() instead of odbc_fetch_row() if we're dealing with a text field rather than a varchar or int? the way I read it odbc_result() is just an alternative way of doing what you do with odbc_fetch_row() - I can't see any reason why doing it with odbc_result() would suddenly make it work - nonetheless it might be worth trying it just to rule it out. with regard to wanting results returned in a 'named' fashion, does the new setup still not allow use of odbc_fetch_array() instead of odbc_fetch_row()? not that I see any logic in that solving the issue, again it might be worth trying to see if it does. I don't know much about MSSQL, or whether 'text' is an actual field type, but maybe this function offers a wayout?: http://php.net/manual/en/function.odbc-binmode.php are the php versions on the 2 systems you mention exactly the same? (you mention 5.1 and 5.1.6) this could be a clue to the problem. lastly I don't suppose that it possible for you to switch to using the MSSQL specific php extension? [http://php.net/mssql] it might offer a better/faster connection to the MSSQL server as well as making the issue go away. I am confused, and would appreciate assistance in becoming less confused. :-) Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC and long text fields
On Sunday 07 January 2007 8:26 pm, Jochem Maas wrote: Now I'll be honest and say I don't quite follow what they're talking about. I do not claim to be an ODBC guru, but SQLGetData is a lower-level operation, SQL level or C level I don't know, but not something that happens in PHP code as far as I am aware. Are they saying there's a bug in PHP's odbc_fetch_row()? Or is it a bug in their driver if it can't handle whatever it is odbc_fetch_row() does internally? Or should we be using odbc_result() instead of odbc_fetch_row() if we're dealing with a text field rather than a varchar or int? the way I read it odbc_result() is just an alternative way of doing what you do with odbc_fetch_row() - I can't see any reason why doing it with odbc_result() would suddenly make it work - nonetheless it might be worth trying it just to rule it out. with regard to wanting results returned in a 'named' fashion, does the new setup still not allow use of odbc_fetch_array() instead of odbc_fetch_row()? not that I see any logic in that solving the issue, again it might be worth trying to see if it does. Honestly I've not tried. (I also don't have the wrapper code in front of me at the moment. g) That could be a nice thing to simplify for performance, but I suspect that if the problem is with odbc_fetch_row() then odbc_fetch_array() will have the same bug. I don't know much about MSSQL, or whether 'text' is an actual field type, but maybe this function offers a wayout?: http://php.net/manual/en/function.odbc-binmode.php No, that looks like it's for binary data. Text is a MS SQL field for huge-ass text fields, essentially similar to the MySQL field of the same name (at least at an API level). We also tried playing with odbc_longreadlen() and setting MS SQL's TEXTSIZE and TEXTLENGTH parameters to no avail. are the php versions on the 2 systems you mention exactly the same? (you mention 5.1 and 5.1.6) this could be a clue to the problem. It's either both 5.1.6 or 5.1.6 live and 5.1.4 devel. (I don't recall what our exact version is atm.) We're in the process of upgrading our server soon, and I'm not sure what it will have. Probably 5.2, just to keep life interesting. :-) lastly I don't suppose that it possible for you to switch to using the MSSQL specific php extension? [http://php.net/mssql] it might offer a better/faster connection to the MSSQL server as well as making the issue go away. I don't believe the client allows direct MSSQL connections. Besides, the MSSQL functions still require an ODBC driver underneath, so if the problem is with the ODBC driver then that won't change anything. -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC question
Jeremy Schreckhise wrote: I have an Openlink Single Tier Driver on an XP pro machine with windows installed on drive f: because I have a dual boot with Red Hat. Database is Progress 8.3c on a SCO Unixware 7.1.4 Dell Server. I can connect to all progress databases and pull data utilizing a System DSN via Openlink, however when I try to connect via PHP I get the following error: Warning: odbc_connect(): SQL error: [OpenLink][ODBC]Unable to allocate server handle, SQL state S1000 in SQLConnect Any suggestions? I know the code is fine, because it works on another box with a similar set up, but with windows installed on drive c: Thanks in advance, Jeremy Schreckhise I did a search on that error + OpenLink and came up with this: http://support.openlinksw.com/support/print_opie_article.vsp?OP_ID=299 I did this once a long time ago (PHP/ODBC/Progress), but I don't see that error in my notes. The only thing I can offer is that I had trouble making sure the proper Progress environment variables ($DLC and the like) were set and accessible to PHP/Apache. If that doesn't help, try the OpenLink people. I had to place a support request with them before, and they were pretty helpful. kgt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC and DB2 functions (PDO_ODBC)
Check this article, it will help you using PDO and DB2: http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0505furlong/index.html However, you can access a DB2 server using the unified ODBC extension which actually i configured on a production enviroment. http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0502scott/index.html On 9/28/05, Dan McCullough [EMAIL PROTECTED] wrote: Anyone have any experience with DB2 over ODBC or JDBC from PHP on Linux? Looking for some idea of what I will need to be able to connect to a DB2 server on our network. -- Saludos Oscar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ODBC Errors and Undefined functions
[snip] Okie dokie. I have an odbc data and I can use odbc_result_all() to return data in an HTML table format. If I switch to odbc_fetch_array() or odbc_fetch_object() I get a call to an undefined function even though TFM says that these are available in 4.3.7 running phpinfo() shows that ODBC is enabled properly. I have googled for it, with no meaningful return except that at one time there may have been a bug. Signed *Scratching My Head in Texas* [/snip] I should have asked a question [*slaps own wrist*], huh? Has anyone encountered this before and is there a solution? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC Errors and Undefined functions
Jay Blanchard wrote: [snip] Okie dokie. I have an odbc data and I can use odbc_result_all() to return data in an HTML table format. If I switch to odbc_fetch_array() or odbc_fetch_object() I get a call to an undefined function even though TFM says that these are available in 4.3.7 running phpinfo() shows that ODBC is enabled properly. I have googled for it, with no meaningful return except that at one time there may have been a bug. Signed *Scratching My Head in Texas* [/snip] I should have asked a question [*slaps own wrist*], huh? Has anyone encountered this before and is there a solution? I haven't encountered this problem before. However, most of the time when I run into a problem like this it's because there is a missing library that is required *in addition to* the library for the extension. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins signature.asc Description: OpenPGP digital signature
Re: [PHP] ODBC Errors and Undefined functions
Oh and Jay... since no one else has found the answer it would be nice if you could post your solution here when / if you find it. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins signature.asc Description: OpenPGP digital signature
Re: [PHP] ODBC Errors and Undefined functions
Oh and Jay... since no one else has found the answer it would be nice if you could post your solution here when / if you find it. Accoding to the source, these two functions require something to exist: #ifdef PHP_ODBC_HAVE_FETCH_HASH PHP_FUNCTION(odbc_fetch_array); PHP_FUNCTION(odbc_fetch_object); #endif Elsewhere in the source is this: #if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) || defined(HAVE_UNIXODBC) # define PHP_ODBC_HAVE_FETCH_HASH 1 #endif So you need to meet one of the above requirements to have those two functions available. According to the changelog, many of these checks were added in early 2003 (4.3.2) not that this has to do with you but when documented these should be taken into account. I'll add this documentation later this week :) Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] odbc fetch array issues
[snip] $sql = SELECT * FROM users WHERE username='$username' AND password='$password'; $result = odbc_exec($dbConnection, $sql); while ($rows = odbc_fetch_array($result)) { //This doesn't work with odbc_fetch_object either print $rows-COLUMNNAME; } [/snip] For odbc_fetch_array you would have to use print $rows['COLUMNNAME']; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC with SQL Server
Hi, Functions mssql_* and odbc_* don't allow write/read unicode fields. But ODBTP Extension allows it. The url is: http://odbtp.sourceforge.net/. Greetings, Juan Torres. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC with SQL Server
On Fri, 13 Feb 2004 12:30:42 +0100, you wrote: I have a connectoin ODBC with a SQL Server database. A table has a field of type 'nvarchar'. This field contains japanese characters. How can I read these japanese characteres? When I read (with: select name from data) only read '?' character. I've come across this recently when talking to MySQL from a Windows application. ODBC didn't like transferring 8-bit data - BLOB and TEXT fields end up as strings of ?. On Windows, you have to open a seperate stream object (ADO = 2.5) to recover the binary data. How that translates to the ODBC library used by MySQL I have no idea... odbc_binmode() may help, possibly. Have you considered just using the mssql_* library? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] odbc functions - not binary safe?
Hello CC, On 26 Jan 2004 at 12:47, C C wrote: Hi, I'm trying to insert binary data into a MS SQL Server database. Text files are added fine, but binary files with null bytes are not. The field I'm adding the binary data to is image type. I get an error about unclosed quotation marks at the null byte, but I've replaced ' with ''. I tried escaping the null byte with a backslach, but it just changes it to the string \0 when I download it. Anyone have any ideas about this? I don't have any experience with MS SQL, but imagine that escaping the input properly is crucial. Have you tried using mysql_escape_string? Contrary to what the name of the function suggests, it can be used to escape strings (even strings of binary data) for insertion in databases other than MySQL. The prototype of the function is: STRING mysql_escape_string ( STRING unescaped_string ) My suggestion is that you try running your input through mysql_escape_string *only* and see if it does the trick. If you do that, please let me (us) know the results; I'm curious. Cheers, Erik
Re: [PHP] odbc functions - not binary safe?
[EMAIL PROTECTED] wrote: Hello CC, On 26 Jan 2004 at 12:47, C C wrote: Hi, I'm trying to insert binary data into a MS SQL Server database. Text files are added fine, but binary files with null bytes are not. The field I'm adding the binary data to is image type. I get an error about unclosed quotation marks at the null byte, but I've replaced ' with ''. I tried escaping the null byte with a backslach, but it just changes it to the string \0 when I download it. Anyone have any ideas about this? I don't have any experience with MS SQL, but imagine that escaping the input properly is crucial. Have you tried using mysql_escape_string? Contrary to what the name of the function suggests, it can be used to escape strings (even strings of binary data) for insertion in databases other than MySQL. The prototype of the function is: STRING mysql_escape_string ( STRING unescaped_string ) My suggestion is that you try running your input through mysql_escape_string *only* and see if it does the trick. If you do that, please let me (us) know the results; I'm curious. Cheers, Erik I don't think a php function for MySQL is going to help him with binary data that he's inserting into MSSQL. OP, what bridge are you using? -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] odbc functions - not binary safe?
Check out the message below, which a user added to the online version of the PHP manual. Could this have anything to do with your problem? ** FROM http://br2.php.net/manual/en/function.mysql-escape-string.php ** sp4m_only at hotmail dot com 02-Apr-2003 10:07 I found out another very curious thing about both AddSlashes() and mysql_escape_string(). It seems that for mysql, the string '##' has some special meaning. Someone told me it might be the beginning of a comment line in the SQL statement. In any case, there is only ONE #-char inserted into the database, instead of two. The two escape functions DO NOT escape this two-char-sequence. So if you want to insert an image in the database and be SURE the image is not f#ck#d up, then do the escaping yourself: $filedata = str_replace('##', '\#\#', mysql_escape_string($filedata)); $query = insert into IMAGES (IMAGE) values ($filedata); $result = mysql_query($query); I hope this will save you guys the ours that I spent by searching for the bug in my own code... On 26 Jan 2004 at 13:29, C C wrote: (...) My suggestion is that you try running your input through mysql_escape_string *only* and see if it does the trick. If you do that, please let me (us) know the results; I'm curious. No, mysql_escape_string didn't work either. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ODBC for MS Access
[snip] I use Linux box + PHP installed on it and want to connect/access MS Access database installed on Windows box. Below are my Questions: 1 What software/driver do I need in Linux box as well as in Windows box? Where to find such a software/driver? 2. Do I need compile PHP to be able to connect to MS Access. 3. Is there manual available for PHP--Access function? [/snip] Start here http://us4.php.net/odbc and search for MyODBC on Google. Have a pleasant and educational day. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ODBC
Have you RTFM at http://us3.php.net/manual/en/ref.odbc.php HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ODBC text file connection problem
[snip] I've got one for ya. I've been trying to conenct to a csv text file = (comma delimited, \r\n row separators, and text qualifiers) using the = odbc_connect command and then run simple select statements through it. = It doesn't work and I'm at a loss for why. [/snip] Why not use fopen()? A CSV file is a plain text file and therefore cannot be treated as a database. The CSV file has no data engine with which to connect to. HTH! Jay * * Texas PHP Developers Conf Spring 2003* * T Bar M Resort Conference Center* * New Braunfels, Texas * * Contact [EMAIL PROTECTED] * * * * Want to present a paper or workshop? Contact now! * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ODBC text file connection problem
I actually do use fopen to connect to the file and create a table based on the column names I gather from the first line. However, actaully parsing through the file and trying to dynamically create insert statements for each row seems like it would be a regular expression nightmare. I really can't guarantee the format of the csv in any way that is easy to work with... for instance, the first data line might look like this: 2,Ethan Nelson,My favorite quote is To hell with them.,just a test\r\n As you can see, If I'm going to preserve the double quotes in the third column, I would have to come up with a script that would deal with escaped characters. I was hoping that I could just establish an ODBC connection to the text file, which it appears that I can, and then select stuff from it. Microsoft's documentation that I could find states that their text driver doesn't support create/drop table, insert, or update commands (obviously), but it doesn't mention SELECT as being off limits... -Ethan -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 11:48 AM To: Ethan Nelson; [EMAIL PROTECTED] Subject: RE: [PHP] ODBC text file connection problem [snip] I've got one for ya. I've been trying to conenct to a csv text file = (comma delimited, \r\n row separators, and text qualifiers) using the = odbc_connect command and then run simple select statements through it. = It doesn't work and I'm at a loss for why. [/snip] Why not use fopen()? A CSV file is a plain text file and therefore cannot be treated as a database. The CSV file has no data engine with which to connect to. HTH! Jay * * Texas PHP Developers Conf Spring 2003* * T Bar M Resort Conference Center* * New Braunfels, Texas * * Contact [EMAIL PROTECTED] * * * * Want to present a paper or workshop? Contact now! * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ODBC text file connection problem
[snip] As you can see, If I'm going to preserve the double quotes in the third column, I would have to come up with a script that would deal with escaped characters. I was hoping that I could just establish an ODBC connection to the text file, which it appears that I can, and then select stuff from it. Microsoft's documentation that I could find states that their text driver doesn't support create/drop table, insert, or update commands (obviously), but it doesn't mention SELECT as being off limits... [/snip] The quotes should not be a problem as you could use addslashes() to escape them. On your connection you say that it does not return an error; $odbc =3D odbc_connect(***input,,); // This appears to work as no = errors are reported But you're not testing for errors $odbc =3D odbc_connect(***input,,) OR die(There is an error connecting to the CSV file.); Make sure that you trap every potential error. Jay * * Texas PHP Developers Conf Spring 2003* * T Bar M Resort Conference Center* * New Braunfels, Texas * * Contact [EMAIL PROTECTED] * * * * Want to present a paper or workshop? Contact now! * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ODBC text file connection problem
I know that the connection works because the following command ODBC_tables into which I feed my connection accurately searches the connection and returns an array with some table information. [snip] // ODBC commands to explore connection: $result = odbc_tables($odbc); odbc_fetch_into($result,$row); print_r($row); // I get the following output to the screen: Array ( [0] = ***:\***\***\*** [1] = [2] = inputfile.txt [3] = TABLE [4] = ) [/snip] inputfile.txt in row 2 is the file I want to select from. Just for kicks, I added the OR DIE and got nothing. I'm pretty sure that I have created a valid ODBC system resource and that my ODBC_connect command succesfully creates a bridge to my materials. Its just that I can't execute commands beyond the odbc_tables without getting this big nasty error: [snip] $result = odbc_exec($odbc,SELECT * FROM inputfile.txt); [/snip] Warning: SQL error: [Microsoft][ODBC Text Driver] The Microsoft Jet database engine \ cannot open the file '(unknown)'. It is already opened exclusively by another user, \ or you need permission to view its data., SQL state S1000 in SQLExecDirect in \ ***:\***\***\***\basecsv2.html on line 53 -Ethan -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 12:03 PM To: Ethan Nelson; [EMAIL PROTECTED] Subject: RE: [PHP] ODBC text file connection problem [snip] As you can see, If I'm going to preserve the double quotes in the third column, I would have to come up with a script that would deal with escaped characters. I was hoping that I could just establish an ODBC connection to the text file, which it appears that I can, and then select stuff from it. Microsoft's documentation that I could find states that their text driver doesn't support create/drop table, insert, or update commands (obviously), but it doesn't mention SELECT as being off limits... [/snip] The quotes should not be a problem as you could use addslashes() to escape them. On your connection you say that it does not return an error; $odbc =3D odbc_connect(***input,,); // This appears to work as no = errors are reported But you're not testing for errors $odbc =3D odbc_connect(***input,,) OR die(There is an error connecting to the CSV file.); Make sure that you trap every potential error. Jay * * Texas PHP Developers Conf Spring 2003* * T Bar M Resort Conference Center* * New Braunfels, Texas * * Contact [EMAIL PROTECTED] * * * * Want to present a paper or workshop? Contact now! * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ODBC text file connection problem
[snip] // ODBC commands to explore connection: $result = odbc_tables($odbc); odbc_fetch_into($result,$row); print_r($row); [/snip] Have you tried a WHILE loop to print out each row? I am not sure of the exact syntax but something like; ?php while(odbc_fetch_into($result, $fields)){ print($fields[0]); print($fields[1]); // and so on ... print(br\n); //at end of row } ? Jay * * Texas PHP Developers Conf Spring 2003* * T Bar M Resort Conference Center* * New Braunfels, Texas * * Contact [EMAIL PROTECTED] * * * * Want to present a paper or workshop? Contact now! * * -- 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] ODBC text file connection problem
So this code: $odbc = odbc_connect(cvalcoinput,,) OR die(There is an error connecting to the CSV file.); $result = odbc_tables($odbc); while(odbc_fetch_into($result, $fields)){ for ($i = 0; $i sizeof($fields); $i++) { echo $fields[$i] . br; } } Derives the following results: D:\INETPUB\CVALCO\INCLUDE\INPUT inputfile.txt TABLE Which makes sense. Those are the contents of the array returned by odbc_tables. Now try to use odbc_exec and I run into my problems. This article on the microsoft KB seems to suggest under text driver limitations that I should be able to run select statements using the odbc_exec command. http://support.microsoft.com/default.aspx?scid=kb;en-us;Q178717 Anyone know of any really good ODBC resources? -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 12:29 PM To: Ethan Nelson; [EMAIL PROTECTED] Subject: RE: [PHP] ODBC text file connection problem [snip] // ODBC commands to explore connection: $result = odbc_tables($odbc); odbc_fetch_into($result,$row); print_r($row); [/snip] Have you tried a WHILE loop to print out each row? I am not sure of the exact syntax but something like; ?php while(odbc_fetch_into($result, $fields)){ print($fields[0]); print($fields[1]); // and so on ... print(br\n); //at end of row } ? Jay * * Texas PHP Developers Conf Spring 2003* * T Bar M Resort Conference Center* * New Braunfels, Texas * * Contact [EMAIL PROTECTED] * * * * Want to present a paper or workshop? Contact now! * * -- 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] ODBC text file connection problem
[snip] $odbc = odbc_connect(cvalcoinput,,) OR die(There is an error connecting to the CSV file.); $result = odbc_tables($odbc); while(odbc_fetch_into($result, $fields)){ for ($i = 0; $i sizeof($fields); $i++) { echo $fields[$i] . br; } } Derives the following results: D:\INETPUB\CVALCO\INCLUDE\INPUT inputfile.txt TABLE [/snip] I think that you need to have $fields in your fetch_into statement. Unfortunately I do not know of any good ODBC reference materials when it comes to ODBC. I am sure that you Googled for it and had a look at the manual, so I don't know where to point you now. Jay * * Texas PHP Developers Conf Spring 2003* * T Bar M Resort Conference Center* * New Braunfels, Texas * * Contact [EMAIL PROTECTED] * * * * Want to present a paper or workshop? Contact now! * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC
Have a look at http://php.weblogs.com/adodb_csv Bob Lockie [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Can PHP be used on an Apache server (linux) to connect to a (remote) MS Access server (NT) through ODBC? Yes. If so, does anyone have examples of how this is done? Nope, never done it. It'll use the same PHP database commands probably. Read www.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC
Can PHP be used on an Apache server (linux) to connect to a (remote) MS Access server (NT) through ODBC? Yes. If so, does anyone have examples of how this is done? Nope, never done it. It'll use the same PHP database commands probably. Read www.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ODBC Failures
How does it fail? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Virtuoso Universal Server -Original Message- From: David Busby [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 4:29 PM To: php-general Subject: [PHP] ODBC Failures List, My ODBC connection is failing it seems...I can run this code just fine...odbc_connect and odbc_pconnect seem to work...the odbc_prepare even works just fine...but as soon as I execute (with odbc_execute, odbc_exec, or odbc_do it fails...any ideas? ?php $db = odbc_pconnect(Desire,sa, ); echo Database Connection:.$db.br; $sql = odbc_prepare($db, execute spGetItems); echo Prepared SQL id:.$sql.br; // This line will fail $rs = odbc_execute($sql); ? -- 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] odbc
On Tue, Jun 25, 2002 at 04:05:10PM +0700, sonjaya wrote: i just newbie how to use odbc in php i have ready craete odbc in window like this Step 1: http://www.php.net/manual/en/function.odbc-connect.php Step 2: http://www.php.net/manual/en/function.odbc-exec.php Step 3: http://www.php.net/manual/en/function.odbc-fetch-array.php --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ODBC number of rows?
Brian, This returns -1 for most drivers in a Select, but should return appropriate info in an Update, Alter, Insert, etc. If you need the feature when returning rows of data, you may simply create a loop and increment a counter variable as you iterate over the result se5t. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Virtuoso Universal Server -Original Message- From: Brian McGarvie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 7:07 AM To: PHP General Subject: [PHP] ODBC number of rows? odbc_num_rows($result); the above return -1 always, what other way can you check if any rows have been returned? === Brian M McGarvie, Web Appications Co-ordinator/Consultant === [ www.mcgarvie.net | www.lennox-mckinlay.co.uk] === -- 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] ODBC Connection
Fernando, check http://www.php.net/odbc From Windows you can just create a System DSN and then use it in an odbc_connect() function. From some *nix flavor, you will need to build PHP --with-iodbc as per the howto at www.iodbc.org, and then install OpenLink's Multi-Tier ODBC driver with the server-side components on the Windows box. Let me know if you need additional assistance configuring ODBC from *nix. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Ing. Fernando Proll Segura [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 1:54 PM To: [EMAIL PROTECTED] Subject: [PHP] ODBC Connection Hi guys: I'm trying to make a connection from PHP to a MS Access. How can I do this?, I know that there are a function for this, but what about the parameters. Thanks in advanced, Fernando -- PHP General 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] odbc with access on win2k
Paul, Use a System DSN. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Paul Roberts [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 1:48 PM To: [EMAIL PROTECTED] Subject: [PHP] odbc with access on win2k I just installed win2k to dual boot with 98 while I change over os's, I have a script that connects to an access 97 DB via odbc_connect, it works fine under win 98 but gives an error that it can't connect on win2000.(error follows) any ideas what I'm doing wrong, I have set up user and file dsn on the odbc applet. Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in c:\my documents\\links\hs~links.php on line 48 thanks in advance. Paul Roberts [EMAIL PROTECTED] -- PHP General 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 General 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] ODBC version of PHPMyAdmin?
Jaxon [EMAIL PROTECTED] wrote: Has anyone seen an ODBC version of PHPMyAdmin, or something similar; I want to use it with more than just MySQL (e.g. Postgres and SQLServer) Not ODBC, but phpMyAdmin has a PostgreSQL cousin, phpPgAdmin. You used to be able to find it at www.greatbridge.org, but Great Bridge has closed its operation so you'll probably have to look elsewhere. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ -- PHP General 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] ODBC for UniVerse Database
So I'm _not_ the only one still running UV :-))) Do you have the UV PDF's handy? There's a section on setting up the ODBC. If you don't have it, I'll mail you a copy. UV's ODBC works reasonably well, except that it takes a seat every time you instantiate a connect. Perhaps a better way of going about it is to use Vantage Point's MVServer. Larry Wilcox, the author of the MVServer, is working on a Linux version currently. Dunno when he'll have it ready. In the meantime, if I can help out, let me know. There are a few little setups involved, such as making sure that the (x)inetd service EXEC is allowed to run. You might want to lock that down pretty tightly (ie, using the only_from directive in the xinetd.d setup file) since it possibly could present a pretty large hole in security. I'd be glad to assist. Regard, Bill -Original Message- From: Justin Farnsworth [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 2:54 PM To: Php-General@Lists. Php. Net Subject: [PHP] ODBC for UniVerse Database Anybody on this list: 1. Have experience with ODBC for Universe 2. Know where there is a driver available You may reply privately if you think it is not of interest to this group _jef -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 -- PHP General 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] ODBC for UniVerse Database
WHUPS! Guess I should have asked if you were running UV on *nix or NT... it makes a difference. It's dead-easy on NT; merely tedious to set up on *nix... B -Original Message- From: Bill Farrell Sent: Monday, July 30, 2001 3:19 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] ODBC for UniVerse Database So I'm _not_ the only one still running UV :-))) Do you have the UV PDF's handy? There's a section on setting up the ODBC. If you don't have it, I'll mail you a copy. UV's ODBC works reasonably well, except that it takes a seat every time you instantiate a connect. Perhaps a better way of going about it is to use Vantage Point's MVServer. Larry Wilcox, the author of the MVServer, is working on a Linux version currently. Dunno when he'll have it ready. In the meantime, if I can help out, let me know. There are a few little setups involved, such as making sure that the (x)inetd service EXEC is allowed to run. You might want to lock that down pretty tightly (ie, using the only_from directive in the xinetd.d setup file) since it possibly could present a pretty large hole in security. I'd be glad to assist. Regard, Bill -Original Message- From: Justin Farnsworth [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 2:54 PM To: Php-General@Lists. Php. Net Subject: [PHP] ODBC for UniVerse Database Anybody on this list: 1. Have experience with ODBC for Universe 2. Know where there is a driver available You may reply privately if you think it is not of interest to this group _jef -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 -- PHP General 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] ODBC Function equivalent to MySql_Fetch_Array
Bob, Why doesn't odbc_fetch_into give you what you want? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Bob Horton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 1:23 AM To: [EMAIL PROTECTED] Subject: [PHP] ODBC Function equivalent to MySql_Fetch_Array Hi, I'm trying to write a function (see below) that will provide equivalent functionality between ODBC and MySQL for mysql_fetch_array based upon a preset variable. I've written something that works but A) I'm afraid it might be quite slow; and B) I'm hoping that there is an existing function to do it that I just didn't see! If there isn't an existing function ... how do I go about requesting it for a future release? One of the key things I was looking for was the field names in the associative array (Note: I already had ... and commented out ... the odbc_fetch_into function ... nice but not quite what I was wanting) Thanks. - function db_fetch_array($result) { global $db_type, $db_connection; if ($db_type == 1) : return mysql_fetch_array($result); else: $i = 0; $fCount = odbc_num_fields($result); $result_array = array(); if (odbc_fetch_row($result)) : while ($i $fCount) $i++; $fName = odbc_field_name($result, $i); $result_array[$fName] = odbc_result($result, $i); } // odbc_fetch_into ($conn, $result_array); return $result_array; else: return false; endif; endif; -- PHP General 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 General 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] ODBC Function equivalent to MySql_Fetch_Array
odbc_fetch_into gives me an array but it doesn't give the column names. While many might consider that a small point I find that it helps substantially in making my code self documenting. $row[2] is much less readable than $row[Name] -Original Message- Bob, Why doesn't odbc_fetch_into give you what you want? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- Hi, I'm trying to write a function (see below) that will provide equivalent functionality between ODBC and MySQL for mysql_fetch_array based upon a preset variable. I've written something that works but A) I'm afraid it might be quite slow; and B) I'm hoping that there is an existing function to do it that I just didn't see! If there isn't an existing function ... how do I go about requesting it for a future release? One of the key things I was looking for was the field names in the associative array (Note: I already had ... and commented out ... the odbc_fetch_into function ... nice but not quite what I was wanting) Thanks. - function db_fetch_array($result) { global $db_type, $db_connection; if ($db_type == 1) : return mysql_fetch_array($result); else: $i = 0; $fCount = odbc_num_fields($result); $result_array = array(); if (odbc_fetch_row($result)) : while ($i $fCount) $i++; $fName = odbc_field_name($result, $i); $result_array[$fName] = odbc_result($result, $i); } // odbc_fetch_into ($result, $result_array); return $result_array; else: return false; endif; endif; -- PHP General 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 General 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] ODBC Function equivalent to MySql_Fetch_Array
Bob, Perhaps use odbc_field_name or even odbc_specialcolumns with odbc_fetch_into? I do agree that mysql_fetch_array is quite useful. Dan - what do you think? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Bob Horton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:39 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] ODBC Function equivalent to MySql_Fetch_Array odbc_fetch_into gives me an array but it doesn't give the column names. While many might consider that a small point I find that it helps substantially in making my code self documenting. $row[2] is much less readable than $row[Name] -Original Message- Bob, Why doesn't odbc_fetch_into give you what you want? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- Hi, I'm trying to write a function (see below) that will provide equivalent functionality between ODBC and MySQL for mysql_fetch_array based upon a preset variable. I've written something that works but A) I'm afraid it might be quite slow; and B) I'm hoping that there is an existing function to do it that I just didn't see! If there isn't an existing function ... how do I go about requesting it for a future release? One of the key things I was looking for was the field names in the associative array (Note: I already had ... and commented out ... the odbc_fetch_into function ... nice but not quite what I was wanting) Thanks. - function db_fetch_array($result) { global $db_type, $db_connection; if ($db_type == 1) : return mysql_fetch_array($result); else: $i = 0; $fCount = odbc_num_fields($result); $result_array = array(); if (odbc_fetch_row($result)) : while ($i $fCount) $i++; $fName = odbc_field_name($result, $i); $result_array[$fName] = odbc_result($result, $i); } // odbc_fetch_into ($result, $result_array); return $result_array; else: return false; endif; endif; -- PHP General 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 General 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 General 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] ODBC Function equivalent to MySql_Fetch_Array
Bob, Perhaps use odbc_field_name or even odbc_specialcolumns with odbc_fetch_into? I do agree that mysql_fetch_array is quite useful. Dan - what do you think? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Bob Horton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:39 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] ODBC Function equivalent to MySql_Fetch_Array odbc_fetch_into gives me an array but it doesn't give the column names. While many might consider that a small point I find that it helps substantially in making my code self documenting. $row[2] is much less readable than $row[Name] -Original Message- Bob, Why doesn't odbc_fetch_into give you what you want? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- Hi, I'm trying to write a function (see below) that will provide equivalent functionality between ODBC and MySQL for mysql_fetch_array based upon a preset variable. I've written something that works but A) I'm afraid it might be quite slow; and B) I'm hoping that there is an existing function to do it that I just didn't see! If there isn't an existing function ... how do I go about requesting it for a future release? One of the key things I was looking for was the field names in the associative array (Note: I already had ... and commented out ... the odbc_fetch_into function ... nice but not quite what I was wanting) Thanks. - function db_fetch_array($result) { global $db_type, $db_connection; if ($db_type == 1) : return mysql_fetch_array($result); else: $i = 0; $fCount = odbc_num_fields($result); $result_array = array(); if (odbc_fetch_row($result)) : while ($i $fCount) $i++; $fName = odbc_field_name($result, $i); $result_array[$fName] = odbc_result($result, $i); } // odbc_fetch_into ($result, $result_array); return $result_array; else: return false; endif; endif; -- PHP General 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 General 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 General 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] ODBC Function equivalent to MySql_Fetch_Array
Well, if you noticed the function I wrote and included as part of my original post ... it already uses odbc_field_name but I'm not sure how I would use it in connection with odbc_fetch_into. My 2 key questions were: 1) Is there some function that I missed that does the equivalent of mysql_fetch_array? and 2) Is there any way to get the function I wrote to be more efficient? Bob, Perhaps use odbc_field_name or even odbc_specialcolumns with odbc_fetch_into? I do agree that mysql_fetch_array is quite useful. Dan - what do you think? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Bob Horton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:39 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] ODBC Function equivalent to MySql_Fetch_Array odbc_fetch_into gives me an array but it doesn't give the column names. While many might consider that a small point I find that it helps substantially in making my code self documenting. $row[2] is much less readable than $row[Name] -Original Message- Bob, Why doesn't odbc_fetch_into give you what you want? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- Hi, I'm trying to write a function (see below) that will provide equivalent functionality between ODBC and MySQL for mysql_fetch_array based upon a preset variable. I've written something that works but A) I'm afraid it might be quite slow; and B) I'm hoping that there is an existing function to do it that I just didn't see! If there isn't an existing function ... how do I go about requesting it for a future release? One of the key things I was looking for was the field names in the associative array (Note: I already had ... and commented out ... the odbc_fetch_into function ... nice but not quite what I was wanting) Thanks. - function db_fetch_array($result) { global $db_type, $db_connection; if ($db_type == 1) : return mysql_fetch_array($result); else: $i = 0; $fCount = odbc_num_fields($result); $result_array = array(); if (odbc_fetch_row($result)) : while ($i $fCount) $i++; $fName = odbc_field_name($result, $i); $result_array[$fName] = odbc_result($result, $i); } // odbc_fetch_into ($result, $result_array); return $result_array; else: return false; endif; endif; -- PHP General 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 General 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 General 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] ODBC connect
Andy, What information are you trying to get? If nr and name are fields that you want values for, then odbc_fetch_row() or odbc_fetch_into() should work fine. If you are looking for column information, check out odbc_field_name() and odbc_field_num() http://www.php.net/manual/en/ref.odbc.php Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Andreas Pucko [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 9:02 PM To: Php (E-mail) Subject: [PHP] ODBC connect Hi there, I would like to get information out of a database via ODBC. I switched from MySQL. The old syntax does not work which was like: while ($row = odbc_fetch_row($result)) { printf (option value = \%s\%s/option, $row-nr,$row-name); } so, how do I get the nr and name out of the row?? Any suggestions? Cheers Andy -- PHP General 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 General 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] ODBC Oracle
Joe, I love you!! (In a 'Happy I now have something working' sort of way of course) :) It hasn't finished (it's still running now), but it is sure going *alot* further than it had before. -ken -Original Message- From: Joe Brown [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 5:33 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] ODBC Oracle There is a timeout, that should halt a script if it runs too long. If you can, check php.ini set max_execution_time to something greater than 30 seconds, see if that helps. ""Brooks, Ken"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I thought maybe the php script was running to fast for the network connection. So i put in a sleep(1) It still only ran for about the same amount of time (less records pulled of course). Could it be losing the connection instead because of lack of activity? Would a persistent connection make any difference? -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP] ODBC Oracle Are there any limitations on how many records I can pull from an Oracle Database over ODBC? I have it pulling one record just fine, but when I tell it to pull all records, which should be about 75,000, it only gets about 600 or so. Does the php script time out (i'm running it thru a web browser). What could it be?... thanks, ken -- PHP General 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 General 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 General 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 General 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] ODBC Oracle
I thought maybe the php script was running to fast for the network connection. So i put in a sleep(1) It still only ran for about the same amount of time (less records pulled of course). Could it be losing the connection instead because of lack of activity? Would a persistent connection make any difference? -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP] ODBC Oracle Are there any limitations on how many records I can pull from an Oracle Database over ODBC? I have it pulling one record just fine, but when I tell it to pull all records, which should be about 75,000, it only gets about 600 or so. Does the php script time out (i'm running it thru a web browser). What could it be?... thanks, ken -- PHP General 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 General 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] ODBC Oracle
Okay, I'm baffled. I told it to Connect to the database. I then started a loop of (odbc_fetch_row) I get about 6000 records returned (that i'm just plopping into an array for speed). That's all, much more than when i process each one, but I would think it is more than possible to grab more than 6000 records from a database. right? thanks, ken -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 4:21 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] ODBC Oracle I thought maybe the php script was running to fast for the network connection. So i put in a sleep(1) It still only ran for about the same amount of time (less records pulled of course). Could it be losing the connection instead because of lack of activity? Would a persistent connection make any difference? -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP] ODBC Oracle Are there any limitations on how many records I can pull from an Oracle Database over ODBC? I have it pulling one record just fine, but when I tell it to pull all records, which should be about 75,000, it only gets about 600 or so. Does the php script time out (i'm running it thru a web browser). What could it be?... thanks, ken -- PHP General 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 General 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 General 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] ODBC Oracle
There is a timeout, that should halt a script if it runs too long. If you can, check php.ini set max_execution_time to something greater than 30 seconds, see if that helps. ""Brooks, Ken"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I thought maybe the php script was running to fast for the network connection. So i put in a sleep(1) It still only ran for about the same amount of time (less records pulled of course). Could it be losing the connection instead because of lack of activity? Would a persistent connection make any difference? -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP] ODBC Oracle Are there any limitations on how many records I can pull from an Oracle Database over ODBC? I have it pulling one record just fine, but when I tell it to pull all records, which should be about 75,000, it only gets about 600 or so. Does the php script time out (i'm running it thru a web browser). What could it be?... thanks, ken -- PHP General 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 General 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 General 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] ODBC to mysql?
there is an article on devshed.com thats details this -- PHP General 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]