Changes between Version 1 and Version 2 of ZooKernel/Embed/PHP
- Timestamp:
- Apr 22, 2010, 11:21:44 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ZooKernel/Embed/PHP
v1 v2 1 1 = ZooKernel/Embed/PHP description page = 2 2 3 You get lot of allready existing php code and need to use this code with the less modifications possible ? Then this page was made for you :)3 You get lot of existing php code and need to use it as ZOO Service with the less modifications possible ? Then this pageis made for you :) 4 4 5 On this page you will find everything you have to know to be ableto implement your services directly in PHP.5 On this page, you will find advices to implement your services directly in PHP. 6 6 7 7 == Configure and Install PHP Embed library == 8 8 9 First thing you have to getis a fresh and independant php library installed on your system.9 First thing you need is a fresh and independant php library installed on your system. 10 10 11 Here is a sample configure call to ensure t o be able to use the PHP support on your platform :11 Here is a sample configure call to ensure the PHP support on your platform : 12 12 13 13 {{{ … … 95 95 As you could seen above, there are lot of configure options used. Lots options are not required. Nevertheless, two configure options are required to get a full PHP support in your ZooKernel : '''--enable-embed''' and ''''--enable-maintainer-zts'''. You should also note that the php library will be installed in the {{{/usr/lib/php5.2.10}}} directory, as we need a well sperated installation of php to not interfere with your possibly allready installed PHP version. 96 96 97 Once you rconfigure script end with success, you're now ready to compile and install the php embed library, using the following commands :97 Once you configure script end with success, you're now ready to compile and install the php embed library, using the following commands : 98 98 99 99 {{{ … … 146 146 == Compile the code snipest == 147 147 148 Now that you get the file test_phpembed.c, you have to compile it before trying to run. You could use the following commands to achieve that compilation process :148 Now that you get the file test_phpembed.c, you must compile it using the following commands : 149 149 150 150 {{{ … … 154 154 }}} 155 155 156 You should succeed runing the command above, else open a ticket please to inform us that there is issue followingthose instructions :)156 You should succeed runing the command above, if not please open a ticket to inform us that there are mistakes in those instructions :) 157 157 158 158 == Run the code snipest == 159 159 160 The last step to get your PHP embeded in yo ruC program is to write a small php piece a .... code :)160 The last step to get your PHP embeded in your C program is to write a small php piece a .... code :) 161 161 162 162 … … 168 168 }}} 169 169 170 Here we are, we now run the test_phpembed program to see if it was able to load and run the php script called info.php :170 Here we are, we now run the test_phpembed program to see if it's able to load and run the php script called info.php : 171 171 172 172 {{{ … … 175 175 }}} 176 176 177 Note that we have to set the LD_LIBRARY_PATH at runtime as we didn't install the php embed library in a sta dard fashion(not in the standard search path - /usr/lib or /usr/local/lib- to ensure that we don't interfer with your allready installed php library). Neevertheless, when ZooKernel will be compiled you only have ot run it once, so you could use a small batch file including this LD_LIBRARY_PATH and other required parameters when you launch your ZooKernel instance (note that firefox do something like that also).177 Note that we have to set the LD_LIBRARY_PATH at runtime as we didn't install the php embed library in a standard way (not in the standard search path - /usr/lib or /usr/local/lib- to ensure that we don't interfer with your allready installed php library). Neevertheless, when ZooKernel will be compiled you only have ot run it once, so you could use a small batch file including this LD_LIBRARY_PATH and other required parameters when you launch your ZooKernel instance (note that firefox do something like that also). 178 178