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

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

问题描述

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



从我看到的DB2扩展和IBM的DB2软件只在Linux下运行。我试过编译扩展与所有的软件从IBM,甚至尝试了他们预编译的ibm_db2扩展没有运气。 IBM只支持Linux,所以我打开了内核中的Linux仿真,但似乎没有帮助任何东西。



如果任何人都遇到了让一切运行在本机下OpenBSD将是伟大的,但我想我可能要做的是设置第二个服务器运行CentOS与DB2安装(很可能通过ZendCore为IBM,因为它似乎为我做这一切)和驱动程序,以便我可以设置一个小的事务服务器,我可以发布和获得我需要的DB2数据的JSON表示。



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

解决方案

您看过使用 unixODBC ?如果我记得正确,它支持IBM DB2并在OpenBSD上编译。有关PHP端的详细信息,请查看 http://www.php.net/odbc 。 / p>

如果你无法使用它,在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天全站免登陆