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
[PHP] ODBC
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
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] ODBC obscuring the SQL result ?
Hi (again), Im doing a $res = odbc_prepare... with a select statement and $succ = odbc_execute($res) im missing how to get the return information on whether I got any hit or not in the table now !! the REF MAN is clearly sloppy; in writing moment i see that $succ is a boolean (which is undefined about what is meant by success, retreiving ZERO rows is a success ? guess so) HOWEVER the sloppy thing comes with the REF MAN not explicitly saying that $res is not only the connecting from prepare but also output from the execution activity !! is that so ?
Re: [PHP] PHP + ODBC
On Dec 15, 2009, at 9:50 AM, Richard Quadling wrote: 2009/12/15 Philip Thompson philthath...@gmail.com: On Dec 14, 2009, at 8:47 PM, James McLean wrote: On Tue, Dec 15, 2009 at 10:03 AM, Philip Thompson philthath...@gmail.com wrote: My head hurts from hitting it on my desk all day, so I thought I'd turn to a fresher set of eyes. The issue I'm having is getting PHP to connect ODBC. I can get it to work using isql from the command line. Can you verify my settings: [snipped] I've tried the above DSNs and many other versions of it ad nauseum. The specific error I'm getting is... [unixODBC][Driver Manager]Data source name not found, and no default driver specified. I really have searched high and low for a solution, but to no avail. Any thoughts? Why not just use the built in MySQL libraries or PDO? Oh, that would be my preference. However, the database that I really need to connect to is an MSSQL one and the allowed connection type is ODBC. I was just testing first with a MySQL connection to get it working (I don't have the MSSQL credentials yet). Turned out I was VERY close with my solution, which a coworker figured out this morning. The [ODBC Data Sources] entry for MySQL needed to specified correctly in /etc/odbc.ini. [ODBC Data Sources] MySQL = MySQL [MySQL] Description... Driver... I could have sworn I tried that, but who knows Thank you! ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You can use a DNS-string too ... odbc_pconnect(Driver={SQL Server Native Client 10.0};Server={$s_Server};Database={$s_DB};MARS_Connection=Yes;, $s_User, $s_Pswd, SQL_CUR_USE_DRIVER); I'm actually using a combination of the DSN*-string and the odbc.ini settings. Thank you! ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP + ODBC
On Tue, Dec 15, 2009 at 10:13 AM, Philip Thompson philthath...@gmail.com wrote: On Dec 14, 2009, at 8:47 PM, James McLean wrote: Why not just use the built in MySQL libraries or PDO? Oh, that would be my preference. However, the database that I really need to connect to is an MSSQL one and the allowed connection type is ODBC. Is there any chance that you have to work with fields that will return more than 4k of text? If so, you may have problems with ODBC. I can't remember if I ever used odbc_connect() and its related functions with SQL Server (I mostly use it to read Excel spreadsheets), but I know we couldn't use PDO (with either the PDO_MSSQL or PDO_ODBC drivers) because of a limit on TEXTSIZE that we couldn't get around. On our older stuff, we're still using the mssql library, but on our newer stuff we're using the SQL Server Driver for PHP. It connects via ODBC, but it is the best library I've found for working with SQL Server in PHP. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP + ODBC
On Dec 16, 2009, at 9:22 AM, Andrew Ballard wrote: On Tue, Dec 15, 2009 at 10:13 AM, Philip Thompson philthath...@gmail.com wrote: On Dec 14, 2009, at 8:47 PM, James McLean wrote: Why not just use the built in MySQL libraries or PDO? Oh, that would be my preference. However, the database that I really need to connect to is an MSSQL one and the allowed connection type is ODBC. Is there any chance that you have to work with fields that will return more than 4k of text? If so, you may have problems with ODBC. I can't remember if I ever used odbc_connect() and its related functions with SQL Server (I mostly use it to read Excel spreadsheets), but I know we couldn't use PDO (with either the PDO_MSSQL or PDO_ODBC drivers) because of a limit on TEXTSIZE that we couldn't get around. On our older stuff, we're still using the mssql library, but on our newer stuff we're using the SQL Server Driver for PHP. It connects via ODBC, but it is the best library I've found for working with SQL Server in PHP. Andrew So, instead of using odbc_* functions, just use the mssql_* functions? ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP + ODBC
On Dec 14, 2009, at 8:47 PM, James McLean wrote: On Tue, Dec 15, 2009 at 10:03 AM, Philip Thompson philthath...@gmail.com wrote: My head hurts from hitting it on my desk all day, so I thought I'd turn to a fresher set of eyes. The issue I'm having is getting PHP to connect ODBC. I can get it to work using isql from the command line. Can you verify my settings: [snipped] I've tried the above DSNs and many other versions of it ad nauseum. The specific error I'm getting is... [unixODBC][Driver Manager]Data source name not found, and no default driver specified. I really have searched high and low for a solution, but to no avail. Any thoughts? Why not just use the built in MySQL libraries or PDO? Oh, that would be my preference. However, the database that I really need to connect to is an MSSQL one and the allowed connection type is ODBC. I was just testing first with a MySQL connection to get it working (I don't have the MSSQL credentials yet). Turned out I was VERY close with my solution, which a coworker figured out this morning. The [ODBC Data Sources] entry for MySQL needed to specified correctly in /etc/odbc.ini. [ODBC Data Sources] MySQL = MySQL [MySQL] Description... Driver... I could have sworn I tried that, but who knows Thank you! ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP + ODBC
2009/12/15 Philip Thompson philthath...@gmail.com: On Dec 14, 2009, at 8:47 PM, James McLean wrote: On Tue, Dec 15, 2009 at 10:03 AM, Philip Thompson philthath...@gmail.com wrote: My head hurts from hitting it on my desk all day, so I thought I'd turn to a fresher set of eyes. The issue I'm having is getting PHP to connect ODBC. I can get it to work using isql from the command line. Can you verify my settings: [snipped] I've tried the above DSNs and many other versions of it ad nauseum. The specific error I'm getting is... [unixODBC][Driver Manager]Data source name not found, and no default driver specified. I really have searched high and low for a solution, but to no avail. Any thoughts? Why not just use the built in MySQL libraries or PDO? Oh, that would be my preference. However, the database that I really need to connect to is an MSSQL one and the allowed connection type is ODBC. I was just testing first with a MySQL connection to get it working (I don't have the MSSQL credentials yet). Turned out I was VERY close with my solution, which a coworker figured out this morning. The [ODBC Data Sources] entry for MySQL needed to specified correctly in /etc/odbc.ini. [ODBC Data Sources] MySQL = MySQL [MySQL] Description... Driver... I could have sworn I tried that, but who knows Thank you! ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You can use a DNS-string too ... odbc_pconnect(Driver={SQL Server Native Client 10.0};Server={$s_Server};Database={$s_DB};MARS_Connection=Yes;, $s_User, $s_Pswd, SQL_CUR_USE_DRIVER); -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP + ODBC
Hello all. My head hurts from hitting it on my desk all day, so I thought I'd turn to a fresher set of eyes. The issue I'm having is getting PHP to connect ODBC. I can get it to work using isql from the command line. Can you verify my settings: /etc/odbc.ini: [MySQL] Description = MySQL 3.51 ODBC driver Driver = MySQL Host= s-irv-web02 Server = s-irv-web02 UID = user Password= pass Database= clients Port= 3306 /etc/odbcinst.ini: [MySQL] Description = ODBC 3.51 for MySQL Driver = /usr/lib/libmyodbc3.so Setup = /usr/lib/libodbcmyS.so FileUsage = 1 UsageCount = 2 Again, isql allows me to connect with the same settings as above: isql MySQL user pass I've tried several settings in PHP to attempt to connect to it. All have been fruitless: ?php $user = 'user'; $pass = 'pass'; $dsn = Driver={MySQL};Server=s-irv-web02;Host=s-irv-web02;; $dsn = Driver={MySQL 3.51 ODBC driver};Server=s-irv-web02;Host=s-irv-web02;; $dsn = Driver={MySQL};Server=s-irv-web02;Host=s-irv-web02;User=$user;Password=$pass; odbc_connect ($dsn, $user, $pass); ? I've tried the above DSNs and many other versions of it ad nauseum. The specific error I'm getting is... [unixODBC][Driver Manager]Data source name not found, and no default driver specified. I really have searched high and low for a solution, but to no avail. Any thoughts? Thanks in advance, ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP + ODBC
On Tue, Dec 15, 2009 at 10:03 AM, Philip Thompson philthath...@gmail.com wrote: My head hurts from hitting it on my desk all day, so I thought I'd turn to a fresher set of eyes. The issue I'm having is getting PHP to connect ODBC. I can get it to work using isql from the command line. Can you verify my settings: [snipped] I've tried the above DSNs and many other versions of it ad nauseum. The specific error I'm getting is... [unixODBC][Driver Manager]Data source name not found, and no default driver specified. I really have searched high and low for a solution, but to no avail. Any thoughts? Why not just use the built in MySQL libraries or PDO? -- 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. 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
[PHP] ODBC Functions MS SQL Server 2005
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 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
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
[PHP] odbc msaccess php5
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
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
[PHP] ODBC and long text fields
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. The client has been in contact with their ODBC driver vendor (they're using a commercial driver), and the vendor's response is that we're not using ODBC correctly. Specifically, they say: - I followed the ODBC calls in your odbc trace file and I got error Invalid Descriptor Index on SQLGetData as well. I know we normally don't handle the retrieval of large dataset like Text using SQLGetData as your application is doing. I'm in the research of whether the way your application does is valid or not. - They then followed up with: - We have done some research on this issue. We realized that your application is binding all the columns for the resultset and then use SQLGetData. This is not the correct way to do. You can either use bind column for result set and then print out the data in the bound buffer, or use SQLGetData to get the unbound resultset. - They then include some sample code that is all in C. 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? I am confused, and would appreciate assistance in becoming less confused. :-) Thanks. -- 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 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
[PHP] odbc remote
how do I do a remote connection for odbc? Everything that I see is on the local machine. Can you do an odbc to a remote database? Benjamin Adams / Lord of the Root / Ambrosia Software, Inc. -- http:// www.AmbrosiaSW.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ODBC question
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 -- 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
[PHP] ODBC and DB2 functions (PDO_ODBC)
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. -- 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
[PHP] ODBC Errors and Undefined functions
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* -- 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
[PHP] odbc question
$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; } It's returning an array, not an object (I can't speak as to how the odbc_fetch_object function behaves - it seems poorly documented, but it looks like you get back something more fancy than a simple object with named variables). In short, use odbc_fetch_array and refer to the items as $rows[COLUMNNAME] (or use single quotes). - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] odbc fetch array issues
Hey people, Anyone know much about odbc_fetch_array() or odbc_fetch_object() functions in php. My while loop keeps breaking while using this function. I'm trying to grab a row from the result returned by the database query and for testing purposes, just printing out each item in the row as follows: $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; } I get nothing at all which I find pretty strange so I wanted to know if there were any bugs with this function, maye while working on IIS or just problems with the functions themselves. Thx again Adil. -- 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
[PHP] ODBC, PHP and Pervasive
G'day! I am trying to access data in a Pervasive database which is of quite an old version, not sure which, but using the Pervasive Software ODBC-32 driver, version 2.04.02.10, which comes with the application I am trying to share data with, Pastel Partner 5. I am running PHP 4.3 on Windows 2000 Professional with all the latest patches - Windows, that is. I have created two DSN's, one for Pervasive, and one for MS Access. I can connect to MS Access from my PHP script, add, manipulate and delete data, etc, and I ncan connect to Pervasive from Access using the DSN I created form that purpose, and add, delete, update data and so on. However, when I attempt to connect to Pervasive from my PHP script using the same DSN, no joy. All I get is Warning: SQL error: [Pervasive Software][ODBC Interface][Pervasive Software SQL Engine]General error., SQL state S1000 in SQLConnect in c:\inetpub\wwwroot\nettsis\includes\import\pastelodbc.php on line 9. I have set logging on in the ODBC thingie, but it is meaningless to me: php 714-5d8 ENTER SQLAllocEnv HENV * 00B06EF8 php 714-5d8 EXIT SQLAllocEnv with return code 0 (SQL_SUCCESS) HENV * 0x00B06EF8 ( 0x009414f0) php 714-5d8 ENTER SQLAllocConnect HENV009414F0 HDBC * 00B06EFC php 714-5d8 EXIT SQLAllocConnect with return code 0 (SQL_SUCCESS) HENV009414F0 HDBC * 0x00B06EFC ( 0x00941598) php 714-5d8 ENTER SQLConnectW HDBC00941598 WCHAR * 0x009416A0 [ -3] GruffTrading\ 0 SWORD -3 WCHAR * 0x1F7C4AA0 [ -3] **\ 0 SWORD -3 WCHAR * 0x1F7C4AA0 [ -3] **\ 0 SWORD -3 php 714-5d8 EXIT SQLConnectW with return code -1 (SQL_ERROR) HDBC00941598 WCHAR * 0x009416A0 [ -3] GruffTrading\ 0 SWORD -3 WCHAR * 0x1F7C4AA0 [ -3] **\ 0 SWORD -3 WCHAR * 0x1F7C4AA0 [ -3] **\ 0 SWORD -3 DIAG [S1000] [Pervasive Software][ODBC Interface][Pervasive Software SQL Engine]General error. (802) php 714-5d8 ENTER SQLErrorW HENV009414F0 HDBC00941598 HSTMT WCHAR * 0x0012F328 (NYI) SDWORD *0x0012F370 WCHAR * 0x0012EF28 SWORD 511 SWORD * 0x0012F36E php 714-5d8 EXIT SQLErrorW with return code 0 (SQL_SUCCESS) HENV009414F0 HDBC00941598 HSTMT WCHAR * 0x0012F328 (NYI) SDWORD *0x0012F370 (802) WCHAR * 0x0012EF28 [ 81] [Pervasive Software][ODBC Interface][Per SWORD 511 SWORD * 0x0012F36E (81) php 714-5d8 ENTER SQLFreeConnect HDBC00941598 php 714-5d8 EXIT SQLFreeConnect with return code 0 (SQL_SUCCESS) HDBC00941598 The relevant part of my PHP Code is as follows: $dsn = GruffTrading; // Datasource $dsu = ; // User $dsp = ; // Password if(!$odbclink = odbc_connect($dsn,$dsu,$dsp)) die(Unable to connect to Data Source $dsnbr.odbc_error().: .odbc_errormsg()); odbc_pconnect behaves the same. Any ideas, anyone? Cheers, William. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, ODBC and Pervasive SQL
I am trying to connect from PHP to Pervasive SQL using ODBC, and I am experiencing difficulty. My PHP looks like this: $dsn = GruffTrading; // Datasource $dsu = ; // User $dsp = ; // Password if(!$odbc = odbc_connect($dsn,$dsu,$dsp)) die(Unable to connect to Data Source $dsnbr.odbc_error().: .odbc_errormsg()); I can connect to the database using the same DSN from MS Access, and I can connect to an Access database using the same PHP code, but obviously a different DSN. The error is S1000: [Pervasive Software][ODBC Interface][Pervasive Software SQL Engine]General error. I am using the Pervasive Software ODBC-32 driver, version 2.04.02.10, and am running on Windows 2000 Professional, latest patches and stuff all loaded, and PHP 4.3.0 I would appreciate any pointers in the right direction. Cheers, William.
[PHP] PHP ODBC and Pervasive.SQL
Hi, I am executing a SELECT query from PHP (4.3.4) through ODBC on a Pervasive 2000SP4 (all on Windows). odbc_result_all, odbc_fetch_into, and all other php odbc function stop returning records before the end of the effective resultset. Here is what is happening : * In Pervasive: SELECT * FROM table returns n records (correct). * In Access, throught ODBC, the same query returns the same n records (correct). * In PHP, odbc_exec of the same query returns mn records. Specifically, I have identifed one field (call it fieldx) that seems to be at the source of the problem : it seems stored over 4 bytes in Pervasive and represents a decimal number. If I rewrite the query in PHP to read SELECT fielda, fieldb,fieldc FROM table, it returns n records (correct) (just to clarify SELECT fielda, fieldb,fieldc,fieldx FROM table returns mn records). How many is m? It depends on the sort order. I have identified with record's fieldx is causing the problem. The records returned by odbc_* are up to that problem record. If the sort order makes that problem record to be the last one, then m = n-1. If the sort order makes that record be the first, then m = 0. Here is even more details for those who are still reading: fieldx is written to Pervasive from an application for which I do not have the source code. If I read the content of fieldx of the problem records, erase it and manually re-enter it (in Pervasive Control Center), the issue is solved and the PHP odbc query returns n records. I'm not an expert on odbc and pervasive. Intuitively, it seems that the field is somehow missformated. However, both Pervasive and Access are able to interpret it correctly. Does anybody have a suggestion on how I could either: - Get Pervasive to reformat all field correctly. - Get the odbc library in PHP to at least give me an error, or better, interpret the field as Access does. Thanks, Pascal -- 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
[PHP] ODBC with SQL Server
Hello, 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. Thaks very much. Juan Torres. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ODBC connection..
Heya, I was wondering if its possible to create a odbc connection with php, using a User DSN.. (not a system DSN)? Everytime I try to connect with this code.. $connect = odbc_connect(userdsnhere, user, password) or die(odbc_errormsg());; I get... [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Like it doesn't exist.. Im trying to connect to a datasource that has been setup over the network as a user dsn to retrieve data, anyone have any ideas? I can retrieve the data via an excel odbc query, but this doesn't seem to work as expected.. can anyone help? Andy
[PHP] odbc functions - not binary safe?
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? __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ -- 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
[PHP] ODBC in PHP4.3.4 crashes when used with Mysql 4
Hi, I have Mysql-4.0-14, MyODBC 3.51.06 and unixODBC 2.2.0. They are working perfectly together (isql works correctly) but php-4.3.x always crashes when I try odbc_connect() on the same DSN I use with isql (env vars are correctly set). Is this a known bug? This is a bt of a simplified example that leads to crash: [EMAIL PROTECTED] php-4.3.4]# gdb sapi/cli/php GNU gdb Red Hat Linux (5.1.90CVS-5) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-redhat-linux... (gdb) run Starting program: /root/apache/php-4.3.4/sapi/cli/php [New Thread 1024 (LWP 15719)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (LWP 15719)] 0x080839ee in strxmov (dst=0x8513ab9 , src=0x204d Address 0x204d out of bounds) at /root/apache/php-4.3.4/ext/mysql/libmysql/strxmov.c:26 26 while ((*dst++ = *src++)) ; (gdb) bt #0 0x080839ee in strxmov (dst=0x8513ab9 , src=0x204d Address 0x204d out of bounds) at /root/apache/php-4.3.4/ext/mysql/libmysql/strxmov.c:26 #1 0x401fe68a in set_connect_defaults () from /usr/local/lib/libmyodbc3.so #2 0x401fed73 in SQLConnect () from /usr/local/lib/libmyodbc3.so #3 0x400b338a in SQLConnect () from /usr/lib/libodbc.so.1 #4 0x0808b37f in odbc_sqlconnect (conn=0xbfffa1d0, db=0x8520bd4 mysql, uid=0x8520afc root, pwd=0x85130ac root, cur_opt=2, persistent=0) at /root/apache/php-4.3.4/ext/odbc/php_odbc.c:2118 #5 0x0808bd1e in odbc_do_connect (ht=3, return_value=0x851326c, this_ptr=0x0, return_value_used=1, persistent=0) at /root/apache/php-4.3.4/ext/odbc/php_odbc.c:2316 #6 0x0808b019 in zif_odbc_connect (ht=3, return_value=0x851326c, this_ptr=0x0, return_value_used=1) at /root/apache/php-4.3.4/ext/odbc/php_odbc.c:2045 #7 0x0819201f in execute (op_array=0x8233d00) at /root/apache/php-4.3.4/Zend/zend_execute.c:1616 #8 0x08192252 in execute (op_array=0x8222818) at /root/apache/php-4.3.4/Zend/zend_execute.c:1660 #9 0x08175206 in call_user_function_ex (function_table=0x81df0a8, object_pp=0x0, function_name=0x84393f4, retval_ptr_ptr=0xbfffb58c, param_count=2, params=0x8520a24, no_separation=1, symbol_table=0x0) at /root/apache/php-4.3.4/Zend/zend_execute_API.c:567 #10 0x08174998 in call_user_function (function_table=0x81df0a8, object_pp=0x0, function_name=0x84393f4, retval_ptr=0x85209e4, param_count=2, params=0xbfffb618) at /root/apache/php-4.3.4/Zend/zend_execute_API.c:409 #11 0x080ad227 in ps_call_handler (func=0x84393f4, argc=2, argv=0xbfffb618) at /root/apache/php-4.3.4/ext/session/mod_user.c:60 #12 0x080ad3d5 in ps_open_user (mod_data=0x81dabb0, save_path=0x81e46a8 /tmp, session_name=0x81e4760 nemoSession) at /root/apache/php-4.3.4/ext/session/mod_user.c:98 #13 0x080a8eec in php_session_initialize () at /root/apache/php-4.3.4/ext/session/session.c:598 #14 0x080aa366 in php_session_start () at /root/apache/php-4.3.4/ext/session/session.c:1047 #15 0x080abeb4 in zif_session_start (ht=0, return_value=0x852078c, this_ptr=0x0, return_value_used=0) at /root/apache/php-4.3.4/ext/session/session.c:1486 #16 0x0819201f in execute (op_array=0x821e8ec) at /root/apache/php-4.3.4/Zend/zend_execute.c:1616 #17 0x0817fd00 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/apache/php-4.3.4/Zend/zend.c:884 #18 0x08147956 in php_execute_script (primary_file=0xbfffe6e0) at /root/apache/php-4.3.4/main/main.c:1729 #19 0x081987ae in main (argc=1, argv=0xbfffe784) at /root/apache/php-4.3.4/sapi/cli/php_cli.c:819 #20 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6 Thanks, Nico -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ODBC for MS Access
Dear All, 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? Hope to see your reply very soon. Thanks, M. Fikri __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- 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
[PHP] ODBC in PHP: setting SQL_ATTR_TRACE
I've been reading about ways to help secure an application against database hacking, and I've read more than once now that it's wise to turn off tracing within the ODBC drivers when issuing sensitive commands, by setting SQL_ATTR_TRACE to SQL_ATTR_OFF. But I can't figure out how to do that with the odbc_* functions. The closest I could come was odbc_setoption(), but the manual cautions against using this function in a production environment. Is there a way to pull this off in PHP? -- Jeff S. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ODBC
Hello, I need to connect from my Linux server to DSN (MS Access) on WindowsXP via ODBC. Would you helo me? Thanks Toma Kubis -- 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
[PHP] ODBC Problem
Hi. I have a problem, Been writing a site in php that uses ODBC systemlink to a Access DB The server is apache The problem is that the final server is win2000 IIS and the thing doesent work. It seems that the odbc connect doesent output any info. It works fine on apache cant figure out what the difference is. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP ODBC
Is there ODBC for PHP4 for LINUX to connect MS-SQL? p.s. other than openlink software rgds ./pl
[PHP] PHP ODBC Problem
Hi, I've installed PHP 4.3.0 on a Win2k (SP3) IIS 5 server, as we were moving the site to another server (old server was also win2k, php 4.3.0), and ODBC calls no longer function correctly when served from the webserver, however they work perfectly when called from the command line. So http://site/odbc_test.php hanged, while 'php odbc_test.php' in cmd.exe worked perfectly. The ODBC drivers and settings are the same as what was on the previous server. Tracked down the problem to the ODBC_Connect line. If I specified an invalid DSN, e.g. odbc_connect(wrong, ,) or die (); the script would terminate with the correct error message. However, if I specified a valid DSN then PHP would simply hang. No error message. Nothing in the Event Viewier. At first I was using the ISAPI version of PHP for IIS, but then after I saw ODBC work using PHP from the command line, I changed IIS over to use php.exe, but with no success. Any ideas? Oh, and I did end up setting the security permissions for the ODBC database directory to give System Everyone IUSER_ full access. Mike C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] odbc..
Hello all, I know I can connect to another db through an odbc connection in php. Can I use php to create the connection initially? I will be uploading an access db from the users and then moving the data over into my mysql db. Since this will all be done automatically, I will need php to upload the file,create the odbc connection, connect, pump over the data, then delete the connection. Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] odbc
Ok, I am lost now, I am just trying to read the documentation on odbc...here is what I have so far. This seems to work...or at least not give any errors. How do I know get to the result set in the select statement to move this data somewhere else? I just want to get the entire result set so I can load it into another db. Thanks, Eddie ? $connect=odbc_connect('mytest','sa', ''); $stmt=odbc_prepare($connect, select * from tablename); $parms=array(sa,); $eddie=odbc_execute($stmt, $parms); //$rc = odbc_fetch_into($eddie, $my_array); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ODBC connectivity
I have developed a PHP application that accesses a Microsoft Access database through ODBC. The application works well using PHP version 4.1. I have recently installed the newest version of PHP (4.2.3) on another machine running NT4, and IIS 4. Again, I am using an ODBC connection, and have given this connection the same name, login, and password as is present in my PHP files. While the PHP module is running fine, I cannot retrieve records from the database, probably indicating a problem with my connectivity to the ODBC. Again, I have made the same settings in the new ODBC entry as is present on the development machine. Could there be a version problem with the PHP module? Any other suggestions would be greatly appreciated. Thanks, Bill -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ODBC text file connection problem
Good morning... 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. Here's the meat (I replace = anything potentially sensitive with ***): ODBC connection: Microsoft text driver version 4.00.6200.00 Win2K IIS = 5.0. ODBC schema: I have specified, for the particular file I am trying to = connect to, column name headers and ANSI format. That's it... // ODBC PHP connect string:=20 $odbc =3D odbc_connect(***input,,); // This appears to work as no = errors are reported // ODBC commands to explore connection: $result =3D odbc_tables($odbc); odbc_fetch_into($result,$row); print_r($row); // I get the following output to the screen: Array ( [0] =3D ***:\***\***\*** [1] =3D [2] =3D inputfile.txt [3] = =3D TABLE [4] =3D )=20 // Further commands to select data from text file: $result =3D odbc_exec($odbc,SELECT * FROM inputfile.txt); // ERROR to screen: 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 PHP 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=20 Any ideas? -Ethan, Modulus, LLC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ODBC text file connect problem
Good morning... 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. Here's the meat (I replace anything potentially sensitive with ***): ODBC connection: Microsoft text driver version 4.00.6200.00 Win2K IIS 5.0. ODBC schema: I have specified, for the particular file I am trying to connect to, column name headers and ANSI format. That's it... // ODBC PHP connect string: $odbc = odbc_connect(***input,,); // This appears to work as no errors are reported // 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] = ) // Further commands to select data from text file: $result = odbc_exec($odbc,SELECT * FROM inputfile.txt); // ERROR to screen: 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 PHP 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 Any ideas? -Ethan, Modulus, LLC -- 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
[PHP] odbc sql php
This question is more on odbc sql than on php, since I'm sure everthing is working on php side I have a php form who fills on ODBC database ( Visual Foxpro) , everthing is working except with one detail, I have a text area field on my form and when the user fill this area with to many characters the sql query isn't accepted, I found that the problem is due to the length of the data. The field is a memo field who means they can accept any length, This works ok UPDATE catalogo SET MATERIAL = 'A12' WHERE KEYUNICA = 3941 But this crash UPDATE catalogo SET MATERIAL = 'A123456789B123456789C123456789D123456789E123456789F123456789G123456789H1234 56789I123456789J123456789K123456789L123456789M123456789N123456789O123456789P 123456789q123456789r123456789s123456789t123456789u123456789v123456789x123456 789y123456789z123456789a123456789b123456789' WHERE KEYUNICA = 3941 The question is How is the write way to write a query when I need to updated a field of type memo with information from a Textarea or even any big array of letters ? Any tip ? -- 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
[PHP] ODBC under linux + PHP + Apache problem.
I write a few days ago to the list with a problem trying to find my ODBC DSN under linux debian. Well, i solve the problem, now i can find my dsn from PHP code, but its seems like it crash when i do a odbc_connect(...) I know that unixodbc works becouse i test it with isql. I have no warnings trying to find DSN, but now nothing happens. I suppose that it finds dsn but there is another error somewhere. But there is no logs, there is no output in the browser... i dont know what to do, i have no information to try to resolve the error. somebody can help me? this is the reply from the browser; The following error was encountered: Zero Sized Reply Squid did not receive any data for this request. this is my code: html^M titleREGISTRO DE LLAMADAS/title^M body ^M ?php putenv(ODBCINSTINI=/etc/odbcinst.ini); putenv(ODBCINI=/etc/odbc.ini); if(!extension_loaded('odbc')) { if(!dl(odbc.so)){ exit; } } echo dl odbc loaded okbr; $cx=odbc_pconnect(cdr2,mylogin,mypasswd,); echo connected; ? /body /html thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ODBC
Can PHP be used on an Apache server (linux) to connect to a (remote) MS Access server (NT) through ODBC? If so, does anyone have examples of how this is done? And if not, what other choices do I have? -- W | I haven't lost my mind; it's backed up on tape somewhere. + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- 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
[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] ODBC driver 4 MS access
does anyone know of any ODBC driver for access that allows me to use odbc_num_rows. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] odbc
i just newbie how to use odbc in php i have ready craete odbc in window like this odbc name= data user = tes password= i want read some data in password.db and put ini un the screen strukture database password.db like this password name level allos some exsample to use to get in the screen , i so sory because i newbie , thank's
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