четверг, 27 сентября 2012 г.

http://www.php.ru/manual/internals2.buildsys.skeleton.html
http://docstore.mik.ua/orelly/webprog/php/ch14_03.htm
http://www.tuxradar.com/practicalphp/4/10/0

PHP Extensions WINDOWS

Requirements

  1. Visual Studio 2008 sp1 Express
  2. PHP Sources
  3. PHP Binaries
Install VS2008
Extract PHP Binaries (Example c:\php-bin)
Extract PHP Sources (Example c:\php-src)
download config.w32.h to "c:\php-src\main"
Add to system path variable path to "c:\php-bin\bin"
Open cmd and type "php -v"



Open "Visual Studio 2008 Command Prompt" & navigate to "c:\php-src\ext"
run "php --extname=module" where module is the name of your new module

cd module && explorer

open module.dsp in vs2k8 express


in file module.c add line #define PHP_COMPILER_ID "%V%"  where %V% - is version of your php build it may be VC6 or VC9 or diffrent

Now navigate to C/C++ -> General -> Additional Include Directories. Now select the arrow to the right It's a dropdown box -> Edit Items. Now a screen titled Additional Include Directories will come up. To the far top right, there is a buttons panel, to the button to the left The file button, Click it, now add in the following directories, one by one Click the file icon for every directory given

1C:\php-src\
2C:\php-src\main
3C:\php-src\TSRM
4C:\php-src\win32
5C:\php-src\Zend




When creating an extension, be sure to remember to complete this step. This will reference our extension to the current Php version and functions that have already been built. This is to allow of extension to communicate with Php. Not following this step will mass errors.

Navigate to Properties -> Linker -> General -> Additional Library Directories and add the following to it. Please reference Fig 9 to do so.

C:\php-bin\dev\



Now you may compile your first extension))
Now we need to edit php.ini. To do so, we need to go to  php.ini and click it. This should bring it up in notepad.exe for default. Scroll down just over half way to the Dynamic Extensions section, of hit Ctrl F and enter extension= and add the following line to the end of the list.

1extension=php_module.dll

четверг, 20 сентября 2012 г.

announcer
Диктор