Connection and use of PHP and Sybase database

zhaozj2021-02-08  302

Q: Connection and use of PHP and Sybase database

answer:

I am very happy to see that everyone is using Sybase, when using the PHP_SYBCT.DLL module, many netizens encounter problems.

Now explained the questions from netizens as follows:

1. Pay attention to your PHP version, I only use the PHP official source code (http://php.net) to compile PHP. And, in PHP4, I found

Each version is slightly distinguished (mainly related to Zend), so the module of PHP4 strictly distinguishes the PHP version, and the module of PHP4RC1 is not

It may be used in PHP4.0.0. Some netizens use SWWWING.COM's PHP compiling version, I can't guarantee that you can use this

Module.

2. Configure your PHP correctly, ensure that your machine has only one php.ini in the path that can be traversed, and configures correct, suggestions

Practice: Copy php_sybct.dll to PHP4, such as C: / PHP4, modify php.ini (generally located in a Windows directory or

Winnt directory) EXTENSION_DIR = C: / PHP4 increases EXTENSION = php_sybct.dll Note = No time on both sides

; Run php_info ();, check the PHP output information, if you find Sybase_CT information, proof the module is successfully loaded. Otherwise,

Your PHP version does not match this module. In fact, the easiest way is to see if there is any 'X-Powered By ...' information, if there is,

The module is definitely not matched with the PHP version!

3. Install and configure the Sybase Client side, the PHP connection Sybase database is not evacuation, it needs Sybase Client

Support for DLL. Add a data service to the web database using Sqledit (of course, this is not necessary, you can use the existing

Data Services) SybWeb, after filling in the configuration parameters, the storage exits. Use the Sybaseping tool to ensure SybWeb service

PING Tong Sybase Server.

4. Write the PHP code, connect the database, use Sybase_PConnect ("SybWeb", "SA", "SAPASS"); // sapass is SA

The connection password of the household. Sybase will prompt information such as "Changed Database to Master ...", if you want to shield these letters

Interest, you can add '@' before adding '@', sybase_select_db ("Your Database Name") function should add '@'.

5. Other questions:

* About illegal operation

One may be related to this unit, such as the Sybase Client installation is incorrect, or there is a problem with the Win9x system. You can port to WinNT

Try;

Its two may be related to the Sybase Client version, I use this module compiled by Sybasect Version 11.0.2, and later there is a network

Friends provided Version 11.9.2, I will be used in version after PHP4.0.1 (inclusive). Just like MSSQL has 65 and 70

Sybase will also have a version distinguished. I sent a lot of foreign netizens. They used it very normal. I think it is because

It is not as fashionable for foreigners, and everything is using the latest.

* Connection to Sybase under Linux or Unix

I didn't use Sybase under the two systems, so I can't test, but some netizens at home and abroad use this module successfully established.

Sybase for Lunix connection. I think all TCP / IP is not surprising. However, it should be noted that the SybWeb service at this time should

Based on TCP / IP (NLWNSCK) instead of named pipes (NLMSNMP).

* About Sybase SQL Any Where

Some netizens use this module to connect Sybase SQL Any Where, which is a miniaturized desktop-based database for Sybase.

The system may not be able to use this module.

I use WIN98 APACHE 1.3.12 Sybase System 11 (Client) PHP4.0.0 for development;

The database is WinNT4 Sybase System11;

Web Server is apache1.3.12 (running in WinNT) php4.0.0, temporarily with the database Server; use it is normal.

转载请注明原文地址:https://www.9cbs.com/read-1350.html

New Post(0)