将PHP连接到IBM i(AS / 400) [英] Connect PHP to IBM i (AS/400)

查看:162
本文介绍了将PHP连接到IBM i(AS / 400)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个即将到来的项目,我将需要将我们的网站( PHP5 / Apache 1.3 / OpenBSD 4.1 )连接到在iSeries上运行的后端系统与OS400 V5R3,使我可以访问存储在那里的一些表。我已经做了一些检查,但是遇到了一些障碍。



从我所看到的DB2的DB2扩展和DB2软件只能在Linux下运行。我已经尝试使用IBM的所有软件编译扩展,甚至没有运气尝试预编译的ibm_db2扩展。 IBM只支持Linux,所以我启动了内核中的Linux仿真,但似乎没有任何帮助。



如果有人遇到了所有的东西, OpenBSD可能会很好,但我认为我可能要做的是安装运行CentOS的第二台服务器,安装了DB2(很可能通过ZendCore for IBM,因为它似乎为我做了这一切)和驱动程序,以便我可以设置一个小事务服务器,我可以发布反对并获取我需要的DB2数据的JSON表示。



第二个选项是否似乎过度,任何更好的想法?

解决方案

您是否使用 unixODBC ?如果我记得正确,它支持IBM DB2并在OpenBSD上编译。有关PHP方面的更多信息,请查看 http://www.php.net/odbc



如果您无法使其正常工作,可以在Linux服务器上设置Web服务的选项可以是您可以做的。


I've got an upcoming project wherein I will need to connect our website (PHP5/Apache 1.3/OpenBSD 4.1) to our back-end system running on a iSeries with OS400 V5R3 so that I can access some tables stored there. I've done some checking around but am running into some roadblocks.

From what I've seen the DB2 extensions and DB2 software from IBM only run under Linux. I've tried compiling the extensions with all the software from IBM and even tried their precompiled ibm_db2 extension with no luck. IBM only supports Linux so I turned on the Linux emulation in the kernel but that didn't seem to help anything.

If anyone has run across getting everything to run natively under OpenBSD that would be great, but what I think I may have to do is setting up a second server running CentOS with DB2 installed (most likely via ZendCore for IBM since it seems to do all this for me) and the driver so that I can set up a small transaction server that I can post against and get a JSON representation of the DB2 data that I need.

Does the second option seem overkill or does anyone else have any better ideas?

解决方案

Have you looked at connecting to the server using unixODBC? If I remember correctly it has support for IBM DB2 and compiles on OpenBSD. Check out http://www.php.net/odbc for more information regarding the PHP side.

If you can't get that to work, the option to setup a web service on a Linux server may be all you can do.

这篇关于将PHP连接到IBM i(AS / 400)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆