Changes between Version 4 and Version 5 of ZooKernel/Embed/PHP
- Timestamp:
- May 6, 2011, 7:52:41 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ZooKernel/Embed/PHP
v4 v5 93 93 }}} 94 94 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.95 As you could seen above, there are lot of configure options used. 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 separated installation of php to not interfere with your possibly already installed PHP version. 96 96 97 Once you configure script end with success, you're now ready to compile and install the phpembed library, using the following commands :97 Once you configure script ends with success, you're now ready to compile and install the PHP embed library, using the following commands : 98 98 99 99 {{{ … … 104 104 }}} 105 105 106 == Simple PHP scripts loader==106 == Verify PHP Embed Install == 107 107 108 Here is the simplest code snipest ever shared. It was provided here as a sample to load and run php script from a C program : 108 === Sample C Script === 109 110 The following C script loads and runs a PHP script. Save the file as ''test_phpembed.c'' 109 111 110 112 {{{ … … 144 146 }}} 145 147 146 == Compile the code snipest ==148 === Compile the code snippet === 147 149 148 Now that you get the file test_phpembed.c,you must compile it using the following commands :150 Now that have the file ''test_phpembed.c'' you must compile it using the following commands : 149 151 150 152 {{{ … … 154 156 }}} 155 157 156 You should succeed runing the command above, if not please open a ticket to inform us that there are mistakes in those instructions :) 158 The above commands should produce the ''test_phpembeded.o'' file and the ''test_phpembeded'' program with no errors. 157 159 158 == Run the code snipest==160 === Run the code snippet === 159 161 160 The last step to get your PHP embeded in your C program is to write a small php piece a .... code :)162 The last step to get your PHP embeded in your C program is to write a small PHP code by: 161 163 162 164 … … 168 170 }}} 169 171 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:172 No we can run the ''test_phpembeded'' program to see if it's able to load and run the PHP script called info.php: 171 173 172 174 {{{ … … 175 177 }}} 176 178 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 dosomething like that also).179 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 interfere with your already installed php library). Nevertheless, when ZooKernel will be compiled you only have to 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 does something like that also). 178 180