× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I am not sure if Easycom errors go in php.log. They have their own file called ZENDSVR/LOGFILE that becomes more verbose or less verbose as you adjust their log level.


On 11/16/12 11:00 AM, Larry Kleinman wrote:
are you saying that as I have it right now that a SQL error would NOT show up in the php.log file?

Larry Kleinman
Kleinman Associates, Inc.
212-949-6469




From: Alan Seiden <alan@xxxxxxxxxxxxxx>
To: Larry Kleinman <larry@xxxxxxxxxxxxxxxxx>
Cc: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Date: 11/16/2012 10:44 AM
Subject: Re: [WEB400] looking for zend job log
------------------------------------------------------------------------



Ah, you didn't mention that you were running SQL through the i5 toolkit. So the db2_* error functions are irrelevant for you--you're not using ibm_db2.

Now your idea to increase Easycom logging makes sense!

If you do:
error_log('My error goes here');

the error will be logged in the normal php.log file.

Alan


On 11/16/12 10:11 AM, Larry Kleinman wrote:
Nope, not using commitment control.

Yes, I think you are correct about that JOBD being for Easycom. There is a job called I5_COMD in the ZENDSVR subsystem whose job log just has a bunch of lines like:

Job 587938/WEB@#USER/PHPJOB submitted to job queue I5_COMJOBQ in library ZENDSVR.
It's not clear to me whether this happens for each program called from the PHP script, whether it happens once per script, or whether it also happens on an SQL statement. I do know that when I changed the job description to produce a job log and to log CL commands, I see the CL statements from the programs called by PHP and when I deliberately put some invalid statement into my SQL that the job log tells me so.

Here is the SQL in question. How would I write the error to a log file?

$searchstring =
"INSERT into ARF60 (CCAUTH, CCTXID, CCAMT, CCCARD, CCFNAM, CCLNAM, CCTIME, CCTYPE)
VALUES( '$Approval',
'$CCTXID',
$CCAMT,
'$CCCARD',
'$CCFNAM',
'$CCLNAM',
'$CCTIME',
'$CCTYPE')";

$sql_result = i5_query ($searchstring);

if($sql_result) {

}
else {
echo "Error code: " . i5_errno() . "";
echo "Error message: " . i5_errormsg() . "";
var_dump(i5_error());
}
}


Larry Kleinman
Kleinman Associates, Inc.
212-949-6469




From: Alan Seiden _<alan@xxxxxxxxxxxxxx>_ <mailto:alan@xxxxxxxxxxxxxx>
To: Larry Kleinman _<larry@xxxxxxxxxxxxxxxxx>_ <mailto:larry@xxxxxxxxxxxxxxxxx>
Cc: Web Enabling the AS400 / iSeries _<web400@xxxxxxxxxxxx>_ <mailto:web400@xxxxxxxxxxxx>
Date: 11/16/2012 09:54 AM
Subject: Re: [WEB400] looking for zend job log
------------------------------------------------------------------------



Larry,

EACJOBD is for Easycom ("i5 toolkit") processes, I believe.

Regarding the db2 error functions, you could send their output to a log file rather than to the page. Then you'd have a record of what went wrong instead of relying on users to tell you.

One more question: are you using commitment control in PHP? If so, an automatic rollback on error could explain why records don't appear (though doesn't explain multiple records).

Alan

On 11/16/12 8:30 AM, Larry Kleinman wrote:
Thanks, Alan. I already have code similar to slide 54, which would show an error in the browser. I can't rule out that there is some message appearing which the users are not telling us about, but I don't think that is the case. I don't see anything in the error log around the time that the problem has happened. I just changed the EACJOBD job description to produce a job log when the job ends, and I am hoping to find something there when this happens again. If you have any other suggestions about how to trace this, I would certainly appreciate it.

Larry Kleinman
Kleinman Associates, Inc.
212-949-6469




From: Alan Seiden _<alan@xxxxxxxxxxxxxx>_ <mailto:alan@xxxxxxxxxxxxxx>
To: Web Enabling the AS400 / iSeries _<web400@xxxxxxxxxxxx>_ <mailto:web400@xxxxxxxxxxxx>
Cc: Larry Kleinman _<larry@xxxxxxxxxxxxxxxxx>_ <mailto:larry@xxxxxxxxxxxxxxxxx>
Date: 11/15/2012 05:30 PM
Subject: Re: [WEB400] looking for zend job log
------------------------------------------------------------------------



Larry, if you're doing DB2 inserts, check out slide# 54 here:_
__http://www.slideshare.net/aseiden/db2-and-php-best-practices-on-ibm-i_

It shows how to check for errors and to find the exact error text for
SQL queries to ibm_db2.

If you just want PHP errors, find the PHP log at
/usr/local/zendsvr/var/log/php.log

Alan


On 11/15/12 3:38 PM, Larry Kleinman wrote:
> Does anyone know how to change the logging level of a job submitted from a
> PHP script using Zend Server that runs some SQL? I have a script that
> does an SQL insert and 99% of the time it works fine. Occasionally, the
> record that should have been added is not there, and occasionally I get
> several of the same record instead of just one.
>
> Larry Kleinman
> Kleinman Associates, Inc.
> 212-949-6469






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.