mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
add build guide for CUBRID PHP Library
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@303154 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
12baf14d9f
commit
1cc9b2977d
1 changed files with 302 additions and 266 deletions
|
@ -1,43 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<section xml:id="cubrid.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.install;
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<section xml:id="cubrid.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.install;
|
||||
|
||||
<section xml:id="cubrid.installation.linux">
|
||||
<title>Installation on Linux Systems</title>
|
||||
|
||||
<para>
|
||||
In this section, we will introduce two ways of building PHP Library for CUBRID on Linux:
|
||||
</para>
|
||||
<simplelist>
|
||||
<member>Build CUBRID PHP Library ogether with original PHP source code;</member>
|
||||
<member>Build CUBRID PHP Library individually.</member>
|
||||
</simplelist>
|
||||
<title>Installation on Linux Systems</title>
|
||||
|
||||
<para>
|
||||
<emphasis role="bold">Build CUBRID PHP Library with PHP source code:</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
In this section, we will introduce two ways of building PHP Library for CUBRID on Linux:
|
||||
</para>
|
||||
|
||||
<title>Configuring the Environment</title>
|
||||
<para>
|
||||
* CUBRID 2008 R3.0:
|
||||
Install CUBRID 2008 R3.0, and make sure the Environment Variable %CUBRID% is defined in your system;
|
||||
</para>
|
||||
<para>
|
||||
* PHP 5.3/5.2 source code:
|
||||
Download PHP source code (PHP 5.2 or 5.3) from PHP.net. When we write this build guide, the latest stable version of PHP 5.3 is 5.3.3, and PHP 5.2 is 5.2.14.
|
||||
</para>
|
||||
<para>
|
||||
* Apache2:
|
||||
We can use apache2 to test PHP;
|
||||
</para>
|
||||
<simplelist>
|
||||
<member>Build CUBRID PHP Library ogether with original PHP source code;</member>
|
||||
<member>Build CUBRID PHP Library individually.</member>
|
||||
</simplelist>
|
||||
|
||||
<title>Compile PHP Library with PHP source code</title>
|
||||
|
||||
<para>
|
||||
1. Extract PHP source code, and create directory cubrid under dir ext:
|
||||
</para>
|
||||
<para>
|
||||
<emphasis role="bold">Build CUBRID PHP Library with PHP source code:</emphasis>
|
||||
</para>
|
||||
|
||||
<title>Configuring the Environment</title>
|
||||
|
||||
<para>
|
||||
* CUBRID 2008 R3.0:
|
||||
Install CUBRID 2008 R3.0, and make sure the Environment Variable <literal>%CUBRID%</literal>is defined in your system;
|
||||
</para>
|
||||
|
||||
<para>
|
||||
* PHP 5.3/5.2 source code:
|
||||
Download PHP source code (PHP 5.2 or 5.3) from PHP.net. When we write this build guide,
|
||||
the latest stable version of PHP 5.3 is 5.3.3, and PHP 5.2 is 5.2.14.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
* Apache2:
|
||||
We can use apache2 to test PHP;
|
||||
</para>
|
||||
|
||||
<title>Compile PHP Library with PHP source code</title>
|
||||
|
||||
<para>
|
||||
1. Extract PHP source code, and create directory cubrid under dir <literal>ext</literal>:
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
$> tar zxvf php-<version>.tar.gz (or tar jxvf php-<version>tar.bz2)
|
||||
|
@ -45,58 +51,58 @@ $> cd php-<version>/ext
|
|||
ext> mkdir cubrid
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
2. Put the following files under directory src in PHP Library into directory cubrid:
|
||||
</para>
|
||||
<para>
|
||||
2. Put the following files under directory <literal>src</literal> in PHP Library into directory <literal>cubrid</literal>:
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
src> php_cubrid.c php_cubrid.h php_cubrid_version.h config.m4
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
3. Go to the root directory of PHP source code and update the configuration file:
|
||||
</para>
|
||||
<para>
|
||||
3. Go to the root directory of PHP source code and update the configuration file:
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
php-root> ./buildconf --force
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
4. Configure the project. Before you run configure, we strongly recommend that you run "/configure -h" to check the configure options.
|
||||
An example may be like this (we assume that apache2 has been installed in /usr/local):
|
||||
</para>
|
||||
<para>
|
||||
4. Configure the project. Before you run configure, we strongly recommend that you run "/configure -h" to check the configure options.
|
||||
An example may be like this (we assume that apache2 has been installed in /usr/local):
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
php-root> ./configure --prefix=/usr/local/php -with-cubrid=shared --enable-maintainer-zts \
|
||||
--with-apxs2=/usr/local/apache2/bin/apxs
|
||||
</programlisting>
|
||||
|
||||
<simplelist>
|
||||
<member>--with-cubrid=shared: Include CUBRID support</member>
|
||||
<member>--enable-maintainer-zts: Enable thread safety - for code maintainers only!!</member>
|
||||
<member>--with-apxs2=FILE Build shared Apache 2.0 Handler module. FILE is the optional pathname to the Apache apxs tool apxs</member>
|
||||
</simplelist>
|
||||
<simplelist>
|
||||
<member>--with-cubrid=shared: Include CUBRID support</member>
|
||||
<member>--enable-maintainer-zts: Enable thread safety - for code maintainers only!!</member>
|
||||
<member>--with-apxs2=FILE Build shared Apache 2.0 Handler module. FILE is the optional pathname to the Apache apxs tool apxs</member>
|
||||
</simplelist>
|
||||
|
||||
<para>
|
||||
5. Build and install the package. If it was successfully compiled, the cubrid.so file will be created in the /modules directory:
|
||||
</para>
|
||||
<para>
|
||||
5. Build and install the package. If it was successfully compiled, the <literal>cubrid.so</literal> file will be created in the <literal>./modules</literal> directory:
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
php-root> make; make install
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
6. Copy php.ini-xxx (In PHP 5.2.x, they are php.ini-dist and php.ini-recommended; In PHP 5.3.x, they are php.ini-development and php.ini-production;
|
||||
choose what you need) file to directory /usr/local/php/lib, and rename it to php.ini.
|
||||
</para>
|
||||
<para>
|
||||
6. Copy php.ini-xxx (In PHP 5.2.x, they are <literal>php.ini-dist</literal> and <literal>php.ini-recommended</literal>; In PHP 5.3.x, they are <literal>php.ini-development</literal> and <literal>php.ini-production</literal>;
|
||||
choose what you need) file to directory /usr/local/php/lib, and rename it to php.ini.
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
php-root> cp php.ini-production /usr/local/php/lib/php.ini
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
7. In php.ini file set the extension_dir variable and add CUBRID PHP Library to extension variable. For example:
|
||||
</para>
|
||||
<para>
|
||||
7. In php.ini file set the <literal>extension_dir</literal> variable and add CUBRID PHP Library to extension variable. For example:
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
extension_dir = "/usr/local/php/lib/php/extension/no-debug-zts-xxx"
|
||||
|
@ -107,67 +113,69 @@ extension = cubrid.so
|
|||
<emphasis role="bold">Build CUBRID PHP Library individually:</emphasis>
|
||||
</para>
|
||||
|
||||
<title>Configuring the Environment</title>
|
||||
<para>
|
||||
* CUBRID 2008 R3.0:
|
||||
Install CUBRID 2008 R3.0, and make sure the Environment Variable %CUBRID% is defined in your system;
|
||||
</para>
|
||||
<para>
|
||||
* PHP 5.3/5.2 source code:
|
||||
Download PHP source code (PHP 5.2 or 5.3) from PHP.net. When we write this build guide, the latest stable version of PHP 5.3 is 5.3.3, and PHP 5.2 is 5.2.14.
|
||||
</para>
|
||||
<para>
|
||||
* Apache2:
|
||||
We can use apache2 to test PHP;
|
||||
</para>
|
||||
<title>Configuring the Environment</title>
|
||||
<para>
|
||||
* CUBRID 2008 R3.0:
|
||||
Install CUBRID 2008 R3.0, and make sure the Environment Variable <literal>%CUBRID%</literal> is defined in your system;
|
||||
</para>
|
||||
|
||||
<title>Compile PHP Library for CUBRID individually</title>
|
||||
<para>
|
||||
* PHP 5.3/5.2 source code:
|
||||
Download PHP source code (PHP 5.2 or 5.3) from PHP.net. When we write this build guide, the latest stable version of PHP 5.3 is 5.3.3, and PHP 5.2 is 5.2.14.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
* Apache2:
|
||||
We can use apache2 to test PHP;
|
||||
</para>
|
||||
|
||||
<title>Compile PHP Library for CUBRID individually</title>
|
||||
|
||||
<para>
|
||||
1. Download PHP Library, extract it and enter directory src:
|
||||
</para>
|
||||
<para>
|
||||
1. Download PHP Library, extract it and enter directory <literal>src</literal>:
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
$> tar zxvf php-<version>.tar.gz (or tar jxvf php-<version>tar.bz2)
|
||||
$> cd cubrid-php-<version>/src
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
2. Run phpize:
|
||||
</para>
|
||||
<para>
|
||||
2. Run phpize:
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
src> /usr/bin/phpize
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
3. Configure the project. Before you run configure, you'd better run "./configure -h" to see the configure options. For example:
|
||||
</para>
|
||||
<para>
|
||||
3. Configure the project. Before you run configure, you'd better run "./configure -h" to see the configure options. For example:
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
src> ./configure --with-cubrid --with-php-config=/usr/local/bin/php-config
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
4. Build. If it was successfully compiled, the cubrid.so file will be created in the ./modules directory:
|
||||
</para>
|
||||
<para>
|
||||
4. Build. If it was successfully compiled, the <literal>cubrid.so</literal> file will be created in the <literal>./modules</literal> directory:
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
src> make
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
5. Copy cubrid.so to the extensions directory in lib/php directory which is located inside PHP root directory (/usr/local/php):
|
||||
</para>
|
||||
<para>
|
||||
5. Copy <literal>cubrid.so</literal> to the extensions directory in <literal>lib/php</literal> directory which is located inside PHP root directory (/usr/local/php):
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
src> mkdir /usr/local/php/lib/php/extensions
|
||||
src> cp modules/cubrid.so /usr/local/php/lib/php/extensions
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
6. In php.ini file set the extension_dir variable and add CUBRID PHP Library to extension variable. For example:
|
||||
</para>
|
||||
<para>
|
||||
6. In php.ini file set the <literal>extension_dir</literal> variable and add CUBRID PHP Library to extension variable. For example:
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
extension_dir = "/usr/local/php/lib/php/extension/no-debug-zts-xxx"
|
||||
|
@ -176,227 +184,255 @@ extension = cubrid.so
|
|||
|
||||
<title>Test CUBRID PHP Library Installation</title>
|
||||
|
||||
<para>
|
||||
1. Create a test.php file with the following contents:
|
||||
</para>
|
||||
<para>
|
||||
1. Create a test.php file with the following contents:
|
||||
</para>
|
||||
|
||||
<programlisting role="shell">
|
||||
&lgt;?php phpinfo(); ?>
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
2. Use web browser to visit http://localhost/test.php, and if you see the following contents, the installation is successful.
|
||||
<para>
|
||||
2. Use web browser to visit http://localhost/test.php, and if you see the following contents, the installation is successful.
|
||||
|
||||
<table>
|
||||
<title></title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row> <entry>CUBRID</entry> <entry>Value</entry> </row>
|
||||
</thead>
|
||||
<table>
|
||||
|
||||
<tbody>
|
||||
<row> <entry>Version</entry> <entry>8.3.0.xxxxxx</entry> </row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
<title></title>
|
||||
<tgroup cols="2">
|
||||
|
||||
<thead>
|
||||
<row> <entry>CUBRID</entry> <entry>Value</entry> </row>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<row> <entry>Version</entry> <entry>8.3.0.xxxxxx</entry> </row>
|
||||
</tbody>
|
||||
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section xml:id="cubrid.installation.windows">
|
||||
<title>Installation on Windows Systems</title>
|
||||
<para>
|
||||
In this section we will introduce two ways of building PHP Library for CUBRID:
|
||||
</para>
|
||||
|
||||
<simplelist>
|
||||
<member>Build CUBRID PHP Library with VC9 for PHP 5.3;</member>
|
||||
<member>Build CUBRID PHP Library with VC6 for PHP 5.3/5.2.</member>
|
||||
</simplelist>
|
||||
<title>Installation on Windows Systems</title>
|
||||
|
||||
<para>
|
||||
Which version do I choose? (from windows.php.net)
|
||||
<para>
|
||||
In this section we will introduce two ways of building PHP Library for CUBRID:
|
||||
</para>
|
||||
|
||||
If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP;
|
||||
If you are using PHP with IIS you should use the VC9 versions of PHP;
|
||||
<simplelist>
|
||||
<member>Build CUBRID PHP Library with VC9 for PHP 5.3;</member>
|
||||
<member>Build CUBRID PHP Library with VC6 for PHP 5.3/5.2.</member>
|
||||
</simplelist>
|
||||
|
||||
VC6 Versions are compiled with the legacy Visual Studio 6 compiler;
|
||||
VC9 Versions are compiled with the Visual Studio 2008 compiler and have improvements in performance and stability.
|
||||
The VC9 versions require you to have the Microsoft 2008 C++ Runtime (x86) or the Microsoft 2008 C++ Runtime (x64) installed.
|
||||
<para>
|
||||
Which version do I choose? (from windows.php.net)
|
||||
|
||||
Do NOT use VC9 version with apache.org binaries
|
||||
</para>
|
||||
If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP;
|
||||
If you are using PHP with IIS you should use the VC9 versions of PHP;
|
||||
|
||||
<para>
|
||||
<emphasis role="bold">Compile CUBRID PHP Library with VC9 for PHP 5.3</emphasis>
|
||||
</para>
|
||||
VC6 Versions are compiled with the legacy Visual Studio 6 compiler;
|
||||
VC9 Versions are compiled with the Visual Studio 2008 compiler and have improvements in performance and stability.
|
||||
The VC9 versions require you to have the Microsoft 2008 C++ Runtime (x86) or the Microsoft 2008 C++ Runtime (x64) installed.
|
||||
|
||||
<para>
|
||||
Download CUBRID PHP Library, extract it and enter directory win, you will find VS2008 project files php_cubrid.sln and php_cubrid.vcproj.
|
||||
Before you open the project, you should do some preparations.
|
||||
</para>
|
||||
Do NOT use VC9 version with apache.org binaries
|
||||
</para>
|
||||
|
||||
<title>Configuring the Environment</title>
|
||||
<para>
|
||||
* CUBRID 2008 R3.0:
|
||||
Install CUBRID 2008 R3.0, and make sure the Environment Variable %CUBRID% is defined in your system;
|
||||
</para>
|
||||
<para>
|
||||
* Visual Studio 2008:
|
||||
You can alternately use the free Visual C++ Express Edition or the VC++ 9 compiler in the Windows SDK v6.1 if you're a makefile master;
|
||||
</para>
|
||||
<para>
|
||||
* PHP 5.3 binaries:
|
||||
You can install VC9 x86 Non Thread Safe or VC9 x86 Thread Safe, and check if the value of system environment variable %PHPRC% is rightly set;
|
||||
<para>
|
||||
<emphasis role="bold">Compile CUBRID PHP Library with VC9 for PHP 5.3</emphasis>
|
||||
</para>
|
||||
|
||||
<note>
|
||||
In the VC9 project Properties, under the Linker tree node, select the General node, you can see $(PHPRC) in Additional Library Directories.
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
* PHP 5.3 source code:
|
||||
Remember to get the source that matches your binary version. After you extract the PHP 5.3 source code, add system environment variable %PHP5_SRC%,
|
||||
and set its value to the path of PHP 5.3 source code.
|
||||
<para>
|
||||
Download CUBRID PHP Library, extract it and enter directory <literal>win</literal>, you will find VS2008 project files <literal>php_cubrid.sln</literal> and <literal>php_cubrid.vcproj</literal>.
|
||||
Before you open the project, you should do some preparations.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
In the VC9 project Properties, select the General node from C/C++ tree node. You can see $(PHP5_SRC) in Additional Include Directories.
|
||||
</note>
|
||||
<title>Configuring the Environment</title>
|
||||
|
||||
<note>
|
||||
Note: You do not need to build PHP 5.3 from source, but you do need to configure it. If you don't,
|
||||
VC9 will tell you that it can't find header file config.w32.h. You can read the wiki page below to get how to configure it.
|
||||
<para>
|
||||
* CUBRID 2008 R3.0:
|
||||
Install CUBRID 2008 R3.0, and make sure the Environment Variable <literal>%CUBRID%</literal> is defined in your system;
|
||||
</para>
|
||||
|
||||
http://wiki.php.net/internals/windows/stepbystepbuild
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
* Visual Studio 2008:
|
||||
You can alternately use the free Visual C++ Express Edition or the VC++ 9 compiler in the Windows SDK v6.1 if you're a makefile master;
|
||||
</para>
|
||||
|
||||
<title>Build VC9 Library for PHP 5.3</title>
|
||||
<para>
|
||||
* PHP 5.3 binaries:
|
||||
You can install VC9 x86 Non Thread Safe or VC9 x86 Thread Safe, and check if the value of system environment variable <literal>%PHPRC%</literal> is rightly set;
|
||||
|
||||
<para>
|
||||
1. Open VC9 project under directory win, in the Solution Explorer on the left, right click on the php_cubrid project name and select Properties;
|
||||
</para>
|
||||
<note>
|
||||
In the VC9 project Properties, under the Linker tree node, select the General node, you can see <literal>$(PHPRC)</literal> in <literal>Additional Library Directories</literal>.
|
||||
</note>
|
||||
|
||||
<para>
|
||||
2. On the top right corner of the php_cubrid Property Page press Configuration Manager button. In the new window, select the configure
|
||||
you want for Active solution configuration for Configuration in the Project contexts. Then close the Configuration Manager;
|
||||
</para>
|
||||
|
||||
<para>
|
||||
* PHP 5.3 source code:
|
||||
Remember to get the source that matches your binary version. After you extract the PHP 5.3 source code, add system environment variable <literal>%PHP5_SRC%</literal>,
|
||||
and set its value to the path of PHP 5.3 source code.
|
||||
|
||||
<note>
|
||||
In the VC9 project Properties, select the General node from C/C++ tree node. You can see <literal>$(PHP5_SRC)</literal> in <literal>Additional Include Directories</literal>.
|
||||
</note>
|
||||
|
||||
<note>
|
||||
Note: You do not need to build PHP 5.3 from source, but you do need to configure it. If you don't,
|
||||
VC9 will tell you that it can't find header file <literal>config.w32.h</literal>. You can read the wiki page below to get how to configure it.
|
||||
|
||||
http://wiki.php.net/internals/windows/stepbystepbuild
|
||||
</note>
|
||||
|
||||
</para>
|
||||
|
||||
<title>Build VC9 Library for PHP 5.3</title>
|
||||
|
||||
<para>
|
||||
1. Open VC9 project under directory <literal>win</literal>, in the Solution Explorer on the left, right click on the php_cubrid project name and select Properties;
|
||||
</para>
|
||||
|
||||
<para>
|
||||
2. On the top right corner of the php_cubrid Property Page press <literal>Configuration Manager</literal> button. In the new window, select the configure
|
||||
you want for Active solution configuration for Configuration in the Project contexts. Then close the Configuration Manager;
|
||||
|
||||
<note>
|
||||
There are four configurations (Release_TS, Release_NTS, Debug_TS and Debug_NTS).
|
||||
</note>
|
||||
</para>
|
||||
<note>
|
||||
There are four configurations (Release_TS, Release_NTS, Debug_TS and Debug_NTS).
|
||||
</note>
|
||||
|
||||
<para>
|
||||
3. Once you complete the properties modification, press the OK button. Then press F7 to compile;
|
||||
</para>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
4. As we have built php_cubrid.dll we have to make PHP recognize it as an extension:
|
||||
<para>
|
||||
3. Once you complete the properties modification, press the OK button. Then press F7 to compile;
|
||||
</para>
|
||||
|
||||
a) Inside PHP installation folder create the new folder called cubrid, and copy php_cubrid.dll to cubrid folder.
|
||||
You can also put php_cubrid.dll in %PHPRC%\ext if this directory exists.
|
||||
<para>
|
||||
4. As we have built <literal>php_cubrid.dll</literal> we have to make PHP recognize it as an extension:
|
||||
</para>
|
||||
|
||||
b) In php.ini file set the extension_dir variable and add CUBRID PHP Library to extension variable.
|
||||
</para>
|
||||
<para>
|
||||
a) Inside PHP installation folder create the new folder called cubrid, and copy php_cubrid.dll to cubrid folder.
|
||||
You can also put php_cubrid.dll in <literal>%PHPRC%\ext</literal> if this directory exists.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<emphasis role="bold">Compile CUBRID PHP Library with VC6 for PHP 5.3/5.2</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
b) In php.ini file set the <literal>extension_dir</literal> variable and add CUBRID PHP Library to extension variable.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Download CUBRID PHP Library, extract it and enter directory src, you will find VC6 project file php_cubrid.dsp.
|
||||
Before you open the project, you should do some preparations.
|
||||
</para>
|
||||
<para>
|
||||
<emphasis role="bold">Compile CUBRID PHP Library with VC6 for PHP 5.3/5.2</emphasis>
|
||||
</para>
|
||||
|
||||
<title>Configuring the Environment</title>
|
||||
<para>
|
||||
* CUBRID 2008 R3.0:
|
||||
Install CUBRID 2008 R3.0, and make sure the Environment Variable %CUBRID% is defined in your system;
|
||||
</para>
|
||||
<para>
|
||||
* Visual C++ 6.0 SP6:
|
||||
You should install the VC++ 6.0 SP6;
|
||||
</para>
|
||||
<para>
|
||||
* Windows Server Feb. 2003 SDK:
|
||||
All official releases or snaps are built using VC6 with SP6 and this SDK, and you’d better compile you extension using this SDK.
|
||||
<para>
|
||||
Download CUBRID PHP Library, extract it and enter directory <literal>src</literal>, you will find VC6 project file <literal>php_cubrid.dsp</literal>.
|
||||
Before you open the project, you should do some preparations.
|
||||
</para>
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
If you don't install this SDK (It seems that you can no longer download it from Microsoft Download Center for free),
|
||||
</para>
|
||||
you can also use VC6's default settings. But you may see errors when you compile the extension and have to fix them manually.
|
||||
<warning>
|
||||
</para>
|
||||
<para>
|
||||
* PHP 5.3/5.2 binaries:
|
||||
You can install VC6 x86 Non Thread Safe or VC6 x86 Thread Safe, and check if the value of system environment variable %PHPRC% is rightly set;
|
||||
<title>Configuring the Environment</title>
|
||||
|
||||
<note>
|
||||
In the VC6 project, you can find $(PHPRC) in Settings->Link->Input->Additional library path
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
* PHP 5.3/5.2 source code:
|
||||
Remember to get the source that matches your binary version. After you extract the PHP 5.3 source code, add system environment variable %PHP5_SRC%,
|
||||
and set its value to the path of PHP 5.3 source code.
|
||||
<para>
|
||||
* CUBRID 2008 R3.0:
|
||||
Install CUBRID 2008 R3.0, and make sure the Environment Variable <literal>%CUBRID%</literal> is defined in your system;
|
||||
</para>
|
||||
|
||||
<note>
|
||||
In the VC6 project, you can find $(PHP5_SRC) in Settings->C/C++->Preprocessor->Additional include directories
|
||||
</note>
|
||||
<para>
|
||||
* Visual C++ 6.0 SP6:
|
||||
You should install the VC++ 6.0 SP6;
|
||||
</para>
|
||||
|
||||
<note>
|
||||
If you build CUBRID PHP Library with PHP 5.3 source code, you need to configure PHP 5.3 on Windows. If you don't, VC will tell you that
|
||||
it can't find header file config.w32.h. You can read the wiki page below to get how to configure it.
|
||||
<para>
|
||||
* Windows Server Feb. 2003 SDK:
|
||||
All official releases or snaps are built using VC6 with SP6 and this SDK, and you’d better compile you extension using this SDK.
|
||||
|
||||
http://wiki.php.net/internals/windows/stepbystepbuild
|
||||
</note>
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
If you don't install this SDK (It seems that you can no longer download it from Microsoft Download Center for free),
|
||||
you can also use VC6's default settings. But you may see errors when you compile the extension and have to fix them manually.
|
||||
</para>
|
||||
</warning>
|
||||
|
||||
<title>Build VC6 Library for PHP 5.3/5.2</title>
|
||||
<para>
|
||||
* PHP 5.3/5.2 binaries:
|
||||
You can install VC6 x86 Non Thread Safe or VC6 x86 Thread Safe, and check if the value of system environment variable <literal>%PHPRC%</literal> is rightly set;
|
||||
|
||||
<para>
|
||||
1. Open VC6 project under directory src, in Build menu, select Set Active Configuration. Choose what you want, then close the Set Active Project Configuration;
|
||||
<note>
|
||||
In the VC6 project, you can find <literal>$(PHPRC)</literal> in Settings->Link->Input->Additional library path
|
||||
</note>
|
||||
|
||||
<note>
|
||||
There are four configurations (Win32 Release_TS, Win32 Release, Win32 Debug_TS and Win32 Debug).
|
||||
</note>
|
||||
</para>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
2. Once you complete the properties modification, press the OK button. Then press F7 to compile;
|
||||
</para>
|
||||
<para>
|
||||
* PHP 5.3/5.2 source code:
|
||||
Remember to get the source that matches your binary version. After you extract the PHP 5.3 source code, add system environment variable <literal>%PHP5_SRC%</literal>,
|
||||
and set its value to the path of PHP 5.3 source code.
|
||||
|
||||
<para>
|
||||
3. As we have built php_cubrid.dll we have to make PHP recognize it as an extension:
|
||||
<note>
|
||||
In the VC6 project, you can find <literal>$(PHP5_SRC)</literal> in Settings->C/C++->Preprocessor->Additional include directories
|
||||
</note>
|
||||
|
||||
a) Inside PHP installation folder create the new folder called cubrid, and copy php_cubrid.dll to cubrid folder.
|
||||
You can also put php_cubrid.dll in %PHPRC%\ext if this directory exists.
|
||||
<note>
|
||||
If you build CUBRID PHP Library with PHP 5.3 source code, you need to configure PHP 5.3 on Windows. If you don't, VC will tell you that
|
||||
it can't find header file config.w32.h. You can read the wiki page below to get how to configure it.
|
||||
|
||||
b) In php.ini file set the extension_dir variable and add CUBRID PHP Library to extension variable.
|
||||
</para>
|
||||
http://wiki.php.net/internals/windows/stepbystepbuild
|
||||
</note>
|
||||
|
||||
</para>
|
||||
|
||||
<title>Build VC6 Library for PHP 5.3/5.2</title>
|
||||
|
||||
<para>
|
||||
1. Open VC6 project under directory <literal>src</literal>, in Build menu, select <literal>Set Active Configuration</literal>. Choose what you want, then close the Set Active Project Configuration;
|
||||
|
||||
<note>
|
||||
There are four configurations (Win32 Release_TS, Win32 Release, Win32 Debug_TS and Win32 Debug).
|
||||
</note>
|
||||
|
||||
</para>
|
||||
|
||||
<para>
|
||||
2. Once you complete the properties modification, press the OK button. Then press F7 to compile;
|
||||
</para>
|
||||
|
||||
<para>
|
||||
3. As we have built <literal>php_cubrid.dll</literal> we have to make PHP recognize it as an extension:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
a) Inside PHP installation folder create the new folder called cubrid, and copy php_cubrid.dll to cubrid folder.
|
||||
You can also put php_cubrid.dll in <literal>%PHPRC%\ext</literal> if this directory exists.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
b) In php.ini file set the <literal>extension_dir</literal> variable and add CUBRID PHP Library to extension variable.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
</section>
|
||||
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
|
Loading…
Reference in a new issue