简体   繁体   English

从PHP Wordpress中的Web服务器连接DB2数据库

[英]Connecting a DB2 database from a Webserver in PHP Wordpress

We have got a website that has been written in PHP (Wordpress) It is running on a VPS that has got the DB2 module installed. 我们有一个用PHP(Wordpress)编写的网站,该网站正在安装了DB2模块的VPS上运行。 But we are unable to get the website connecting with the DB2 database that is on the I5 (AS400) server to be able to preform SQL statements. 但是,我们无法使网站与I5(AS400)服务器上的DB2数据库连接,从而能够执行SQL语句。 Currently the website we have got that is connected is in .asp and the person who did all that is no longer here. 目前,我们所连接的网站位于.asp中,而执行所有操作的人员不再在此处。

I came across this article Connect PHP to AS400 with ODBC or DB2 Which is a bit of a help. 我碰到了这篇文章,使用ODBC或DB2将PHP连接到AS400,很有帮助 But does anyone have some instuctions or step by step information about setting this up on the I5 (AS400) server and the website on the webserver. 但是,是否有人在I5(AS400)服务器和Web服务器上的网站上设置了一些说明或逐步的信息。 I have come across a IBM product call DB2 connect is this what I need. 我遇到了一个IBM产品,称为DB2 connect,这就是我所需要的。

Thanks 谢谢

There are 3 versions of DB2: DB2 for Linux, Unix, Windows; DB2共有3个版本:DB2 for Linux,Unix,Windows; DB2 for Z (mainframe); DB2 for Z(大型机); DB2 for IBM i. 适用于IBM i的DB2。 The machine you are calling i5 or AS/400 is running the IBM i operating system. 您正在呼叫i5或AS / 400的机器正在运行IBM i操作系统。 The typical DB2 ODBC driver is probably for DB2 LUW. 典型的DB2 ODBC驱动程序可能适用于DB2 LUW。 You want toe ODBC drivers for IBM i. 您想使用IBM i的ODBC驱动程序。 These come with the product called IBM i Access for Windows . 这些随称为Windows的IBM i Access产品一起提供。 In earlier years, it was called Client Access for Windows. 在早期,它被称为Windows客户端访问。

The installer is on a DVD. 安装程序在DVD上。 The installation image is also on the IBM i server. 安装映像也位于IBM i服务器上。

  • Map a network drive to QIBM\\ProdData\\Access\\Windows on your IBM i. 将网络驱动器映射到IBM i上的QIBM \\ ProdData \\ Access \\ Windows。
  • Double-click cwblaunch.exe 双击cwblaunch.exe
  • Use the wizard to complete the install. 使用向导完成安装。

You can select to install only the ODBC driver by choosing 'Custom' install. 您可以通过选择“自定义”安装来选择仅安装ODBC驱动程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM