Demo Applications / Internal Server Error

General discussion on Zend Server for IBM System i
andwaw
Posts: 4
Joined: Tue Jan 10, 2012 3:10 pm

Demo Applications / Internal Server Error

Post by andwaw » Tue Jan 10, 2012 3:26 pm

Hi,

I just installed Zend Server CE on an IBM iSeries. The first time I started the administration panel, I encountered several errors.
I wanted to try out some of the Demo applications. I started "Zend 5250 Emulator" and the login panel showed up. After signing in it responded:

Internal Server Error

Der Server hat einen internen Fehler oder ein Konfigurationsproblem festgestellt und konnte die Anforderung nicht ausführen.

Wenden Sie sich bitte an den zuständigen Server-Administrator [keine Adresse angegeben], und informieren Sie diesen über den Zeitpunkt des Fehlers und über alle von Ihnen ausgeführten Aktionen, die möglicherweise zum Auftreten des Fehlers geführt haben könnten.

Weitere Informationen über diesen Fehler sind möglicherweise im Serverfehlerprotokoll enthalten.

in english:
Internal Server Error
The server encountered an error or a configuration problem and could not execute the request.
Please contact your relevant Server-Administrater[no adress declared], and inform him about the time, when the error ocurred and the actions you did, which might cause the error.... Further information about the error could be in the servererrorprotocol.

Errorlog:
db2_prepare() [<a href='function.db2-prepare'>function.db2-prepare</a>]: Statement Prepare Failed in /usr/local/ZendSvr/share/ToolkitApi/Db2supp.php on line 77
[10-Jan-2012 13:01:51] PHP Warning: db2_exec() [<a href='function.db2-exec'>function.db2-exec</a>]: Statement Execute Failed in /www/zendsvr/htdocs/Zend_Navigator_Demo/UserProfilesPage.php on line 41
[10-Jan-2012 13:01:51] PHP Warning: Invalid argument supplied for foreach() in /www/zendsvr/htdocs/Zend_Navigator_Demo/TableForUserProfiles.php on line 44
[10-Jan-2012 13:01:51] PHP Warning: db2_prepare() [<a href='function.db2-prepare'>function.db2-prepare</a>]: Statement Prepare Failed in /usr/local/ZendSvr/share/ToolkitApi/Db2supp.php on line 77
[10-Jan-2012 13:01:53] PHP Warning: db2_prepare() [<a href='function.db2-prepare'>function.db2-prepare</a>]: Statement Prepare Failed in /usr/local/ZendSvr/share/ToolkitApi/Db2supp.php on line 77
[10-Jan-2012 13:01:57] PHP Warning: db2_prepare() [<a href='function.db2-prepare'>function.db2-prepare</a>]: Statement Prepare Failed in /usr/local/ZendSvr/share/ToolkitApi/Db2supp.php on line 77
[10-Jan-2012 13:01:57] PHP Warning: db2_exec() [<a href='function.db2-exec'>function.db2-exec</a>]: Statement Execute Failed in /www/zendsvr/htdocs/Zend_Navigator_Demo/CommonSQLfunctions.php on line 14
[10-Jan-2012 13:01:57] PHP Fatal error: Uncaught exception 'Exception' with message 'USERFILE der Art *FILE in ZENDSVR nicht gefunden. SQLCODE=-204' in /www/zendsvr/htdocs/Zend_Navigator_Demo/CommonSQLfunctions.php:58
Stack trace:
#0 /www/zendsvr/htdocs/Zend_Navigator_Demo/FilterForSpool.php(35): SQLQuery(Object(ToolkitService), 'SELECT UPUPRF F...')
#1 /www/zendsvr/htdocs/Zend_Navigator_Demo/FilterForSpool.php(24): FilterForSpool->ReadFile('WAWER')
#2 /www/zendsvr/htdocs/Zend_Navigator_Demo/spooledFiles.php(18): FilterForSpool->getUserFilters('WAWER')
#3 {main}
thrown in /www/zendsvr/htdocs/Zend_Navigator_Demo/CommonSQLfunctions.php on line 58
[10-Jan-2012 14:01:33] PHP Warning: db2_prepare() [<a href='function.db2-prepare'>function.db2-prepare</a>]: Statement Prepare Failed in /usr/local/zendsvr/share/ToolkitAPI/Db2supp.php on line 77
[10-Jan-2012 14:01:33] PHP Fatal error: Call to undefined method ToolkitService::getLastDBError() in /usr/local/zendsvr/5250/API/Zend/5250/I5Wrapper.php on line 223
[10-Jan-2012 14:01:52] PHP Warning: db2_prepare() [<a href='function.db2-prepare'>function.db2-prepare</a>]: Statement Prepare Failed in /usr/local/zendsvr/share/ToolkitAPI/Db2supp.php on line 77
[10-Jan-2012 14:01:52] PHP Fatal error: Call to undefined method ToolkitService::getLastDBError() in /usr/local/zendsvr/5250/API/Zend/5250/I5Wrapper.php on line 223
[10-Jan-2012 14:12:19] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /www/zendsvr/htdocs/Samples/MYSQL_access/mysql_access_example.php on line 9
[10-Jan-2012 14:14:53] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /www/zendsvr/htdocs/Samples/MYSQL_access/mysql_access_example.php on line 9

Does anyone has an idea?

best regards
Andreas

erich_hieden
Posts: 393
Joined: Tue Jul 07, 2009 9:01 am

Re: Demo Applications / Internal Server Error

Post by erich_hieden » Wed Jan 11, 2012 8:19 am

It's a problem with the new XML toolkit, as it seems. You can turn on the debug mode in /usr/local/zendsvr/share/ToolkitAPI/toolkit.ini

You have two logfiles then:
/usr/local/zendsvr/share/ToolkitAPI/toolkit.log
/tmp/xml_toolkit_debug.log

Please take a look at them and tell us what's going on.
Maybe Alan will see this too, he's part of the development team.

andwaw
Posts: 4
Joined: Tue Jan 10, 2012 3:10 pm

Re: Demo Applications / Internal Server Error

Post by andwaw » Wed Jan 11, 2012 2:28 pm

Hi,
I changed the /usr/local/zendsvr/share/ToolkitAPI/toolkit.ini file.
Now it looks like that:

Code: Select all

;toolkit.ini

[hosts]
; map ip/host names to database names (WRKDBRDIRE)

; two keys are set by default
localhost = "*LOCAL"
127.0.0.1 = "*LOCAL"

; examples of other mappings
;1.2.3.4 = DB1
;myhost = MAINDB
;example.com = LPARDB

[log]
; warnings and errors will be written to the logfile
; TODO: debug mode for informational messages
logfile = "/usr/local/zendsvr/share/ToolkitApi/toolkit.log"


[system]
; set library where XTOOLKIT lives, most likely XMLSERVICE (testing) or ZENDSVR (production)
XMLServiceLib = "ZENDSRV"

; debug turns PHP toolkit's debug mode on or off (true/false). If true, debug xml will be placed in /tmp
debug = true

; stateless by default for i5_connect
stateless = true

; encoding
encoding = "ISO-8859-1"


[demo]
demo_library=CWDEMO
But the files:

/usr/local/zendsvr/share/ToolkitAPI/toolkit.log
/tmp/xml_toolkit_debug.log

can not be found.

best regards Andreas

andwaw
Posts: 4
Joined: Tue Jan 10, 2012 3:10 pm

Re: Demo Applications / Internal Server Error

Post by andwaw » Wed Jan 11, 2012 2:44 pm

I dont know if it has anything to do with it, but when I tried to create a SVN project in ZS I got the following error, when I tried to connect to the server.
"java.io.IOException: Couldn't read the XML representation. White spaces are required between publicId and systemId."

best regards Andreas.

aseiden
Posts: 875
Joined: Thu Apr 09, 2009 5:45 pm

Re: Demo Applications / Internal Server Error

Post by aseiden » Fri Jan 13, 2012 9:42 pm

Regarding the 5250 Bridge, the readme file for the Compatibility Wrapper states:

• Zend Server 5.1.1 (only available from IBM at this time) includes an updated version of 5250 Bridge that works with the new toolkit, so the CW is not required for the 5250 Bridge.

I haven't verified this, though.

graebert
Posts: 16
Joined: Fri Jan 20, 2012 6:30 pm

Re: Demo Applications / Internal Server Error

Post by graebert » Fri Jan 20, 2012 6:46 pm

We have a similar problem when running the zend demo scripts for the new XML toolkit (Zend Server CE 5.6 for IBM i). They are just not working. For example, when running Call_RPG_example.php, "Execution failed" will be displayed. We turned on php error_reporting and got this message: Warning: db2_prepare() [function.db2-prepare]: Statement Prepare Failed in /usr/local/zendsvr/share/ToolkitApi/Db2supp.php on line 77

We tried to activate the debug option in the toolkit.ini file, but get no log files.

Running the Zend 5250 Demo produces the Internal Server Error.

Are there any solutions to this problem yet?

zend_i5
Posts: 158
Joined: Mon Mar 23, 2009 5:22 pm

Re: Demo Applications / Internal Server Error

Post by zend_i5 » Sat Jan 21, 2012 8:05 pm

Change XMLSERVICE to ZENDSVR in /usr/local/zendsvr/share/ToolkitAPI/ToolkitServiceSet.php script:

from
define('XMLSERVICELIB', 'XMLSERVICE'); //library with IBM support objects
to
define('XMLSERVICELIB', 'ZENDSVR]'); //library with IBM support objects

graebert
Posts: 16
Joined: Fri Jan 20, 2012 6:30 pm

Re: Demo Applications / Internal Server Error

Post by graebert » Mon Jan 23, 2012 12:25 pm

Thank you very much, that made the difference.
The toolkit demo scripts and our own scripts are now working. The file ToolkitServiceSet.php already had a line define('XMLSERVICELIB', 'ZENDSVR]');, but embraced in comment tags /* ... */.

Unfortunately the 5250 Bridge Demo still shows the Internal Server Error after signing in to the 5250 signon screen, but we don't need this anyhow.

Best regards,
Christian

anri3534
Posts: 1
Joined: Sat Jan 28, 2012 11:02 pm

Re: Demo Applications / Internal Server Error

Post by anri3534 » Sat Jan 28, 2012 11:05 pm

I just loaded the latest version of zend on my 520 at v5r4, and I'm have the exact same problem. My ToolkitServiceSet.php is shown below. I've restarted apache, the zend subsystem, and php. Any other suggestions?

define('XMLSERVICELIB', 'ZENDSVR'); //library with IBM support objects
define('DFTLIB', 'QGPL'); //library for creation of templorary objects (was QGPL)
define('ZSTOOLKITLIB', 'ZENDSVR'); //library with Service program
define('ZSTOOLKITPGM', 'ZSXMLSRV'); // or XMLSERVICE?
define('DBPROTOCOL', 'ibm_db2');
define('XMLINTERNALKEY', '/tmp/Toolkit')

/*define('XMLSERVICELIB', 'ZENDSVR'); //library with IBM support objects
define('DFTLIB', 'QGPL'); //library for creation of templorary objects
define('ZSTOOLKITLIB', 'ZENDSVR'); //library with Service program
define('ZSTOOLKITPGM', 'ZSXMLSRV');
define('DBPROTOCOL', 'ibm_db2');
define('XMLINTERNALKEY', '/tmp/Toolkit')
*///define ('DISCONNECT', false)

Thanks,
Tony

zend_i5
Posts: 158
Joined: Mon Mar 23, 2009 5:22 pm

Re: Demo Applications / Internal Server Error

Post by zend_i5 » Mon Feb 06, 2012 9:39 am

Check if your server includes the following PTF: SI39610 for 5722SS1, This PTF required for the XMLSERVICE Toolkit

Post Reply