In Windows, compile and install the dll file AMFEXTforPHP5.3AMFEXT which does not provide PHP5.3, and you have to compile it yourself. The following is a compilation Note: 1. download necessary software. 1 ). PHP5.3forWin32 binary and source code ). VC6 or later IDE3 ). cygwin.4 ). two necessary packages: http: compile and install AMFEXT for PHP5.3 in Windows
The dll file of PHP5.3 is not officially provided by AMFEXT, so you have to compile it yourself. The following is a compilation note:
1. download necessary software.
1). PHP5.3 for Win32 binary and source code each
2). VC6 or above IDE
3). Cygwin.
4). two necessary packages
Http://www.php.net/extra/bindlib_w32.zip
Http://www.php.net/extra/win32build.zip
5). download the amfext 0.9.2-dev version.
2. extract the software to the appropriate directory.
1) decompress the php binary code to the e: \ php5.3.6 Directory (in fact, we are only interested in the php5ts. lib file under the dev subdirectory)
2) decompress the php source code to the e: \ php5.3.6-sources Directory.
3) decompress amfext 0.9.2 to the e: \ php5.3.6-sources \ ext \ amfext directory.
4) decompress bindlib_w32.zipand win32build.zip to the same directory (for example, c: \ win32build)
Set path = % path %; c: \ win32build \ bin
3. Compile the amfext VC project
1) open the amfext. dsp project file
2). set the project
Project-> Settings (Win32 Release)-> Link: e: \ php5.3.6 \ dev \ php5ts. lib
Build-> Set Active Project Configuration select amftext-Win32 Release.
3) compile amfext
Because amfext for php5.3 has a bug, you need to modify amf. c before compiling.
//On line 1188, replace: int deallocResult = (*struc)->refcount; //with int deallocResult = Z_REFCOUNT_PP(struc); //On line 2674, replace: newval->refcount--; //with Z_DELREF_P(newval);
Now press F7 to compile the project. the prompt is displayed.
Cannot open include file :'.. /main/config. w32.h ', the system prompts that the file cannot be found. go to the main directory of the php source code and check whether the file exists. you need to generate the file yourself:
Step 1. run buildconf. bat in the PHP source code root directory.
Step 2. execute configure in the PHP source code root directory. bat (or execute cscript/nologo configure. js -- with-php-build = ".. /win32build "-- without-libxml -- disable-odbc)
If the preceding set path = % path %; D: \ win32build \ bin is not displayed, the following prompt is displayed:
Checking for bison.exe...
ERROR: bison is required
Recompile the project and report an error. A lot of php_stream_transport.h errors
Shape
..\..\main\streams/php_stream_transport.h(85) : error C2143: syntax error : missing ')' before '*'..\..\main\streams/php_stream_transport.h(85) : error C2081: 'socklen_t' : name in formal parameter list illegal
This is because the macro syntax error cannot be found. Open this file and add
typedef int socklen_t;
To the file header.
Re-compile the project. you can see php_amf.dll in the ext subdirectory of the php source code.
On the first floor, wanluoliang thank you very much for your tutorial .............. Live711 can you download the compiled dll and use it directly?