LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 03-14-2013, 09:24 AM   #1
sk9990_1
LQ Newbie
 
Registered: Mar 2013
Posts: 1

Rep: Reputation: Disabled
64 bit odbc driver problem beetween RHEL and AS400 iseries - huge memory php/pdo


Hello,

I currently have some problems to set up an intranet with an odbc link beetween an AS400 (iseries V6R1) and a RHEL6.2 I use the iseriesAccess7.1 odbc driver 64bits, unixODBC2.3.1 and php5.4 with unixODBC support.

My link seems to be good because I can connect to my DataBase using the isql command (which is part of unixODBC) and execute some SQL queries but it's impossible to read records in the database using a php script.
When I try to launch a little script on my intranet I get the following error :

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 493921239296 bytes) in /home/www/imypdo/imypdo.php on line 122

that's more than 450 Gb !! and nothing in /var/log/messages and in /etc/httpd/logs/error_log

A simple sql query (with only 1 row in the select) will return some strange characters (see below) and as soon as I select 1 or 2 more rows the memory size error occurs.

[0] => Array ( [ADHMAR] => AAAAAAA a@YŒ4–X 0!Œ4lŒ4lŒ4! )

I'm almost sure it's a 64bit driver related problem because I already have another RHEL linked with this iseries but with the 32 bit driver and it works perfectly.
What is weird is that isql command is working and ther is nothing in the log files...

if it really is a 64 bit driver problem, how can I prove it to IBM ?

any help will be appreciated

thanks

Last edited by sk9990_1; 03-15-2013 at 03:04 AM.
 
Old 01-27-2014, 04:03 AM   #2
ThorMan
LQ Newbie
 
Registered: Jan 2014
Posts: 1

Rep: Reputation: Disabled
Work Around

In the 64bit version the odbc crashs when one of the return fields are NULL. So the work around is to replace all the null fields when retriving the query.

example :

select ifnull(tluser,'') as USER from database.table
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] propel - php 5.2: Unable to open PDO connection [wrapped: could not find driver] eantoranz Programming 2 02-06-2013 09:25 AM
PHP PDO Issue godzila Linux - Software 1 04-02-2010 08:36 AM
Problem configuring pdo/php braclayrab Linux - Software 0 08-28-2008 04:55 PM
ODBC Driver problem fansari71@yahoo.com Linux - Enterprise 1 06-11-2007 03:38 AM
Setting up ODBC on RedHat to talk to DB2 on AS400 cclack Linux - General 0 01-24-2006 08:19 AM


All times are GMT -5. The time now is 11:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration