I'm one of the IT crew for a chain of sporting goods retail stores. And I am also lucky enough to get to code php from time to time for miscellaneous applications for our business. I have nearly no experience compiling anything. I was able to rebuild the php_printer.dll for 5.4.7 with all your help here: viewtopic.php?f=16&t=53348 . So, this is my attempt to reperform this task for 5.5.11
Xampp: 1.8.3
PHP 5.5.11
OSes:
Windows Server 2012 R2 64bit
Windows 7 Pro 64bit
The guide I Heavily used in this process:
https://wiki.php.net/internals/windows/stepbystepbuild
I downloaded the Express Version of Microsoft Visual Studio Express 2012 for Windows Desktop. Also Installed it on my Windows Server 2012 Machine.
Link (2014-06-24): http://www.microsoft.com/en-us/download ... x?id=34673
Then I downloaded one of the PhP snapshots (I did nothing with this yet)
Link (2014-06-24): http://snaps.php.net/index.php?branch=5.5
I wasn't sure which, Not experienced so I went with "php5.5-201406241830.tar.gz"
I downloaded php-sdk-binary-tools-20110915.zip from http://windows.php.net/downloads/php-sdk/
I unpacked this file into the c:\php-sdk folder I had just created.
I then Went to the start screen and typed
- Code: Select all
VS2012 x86 Native Tools Command Prompt
When the application popped up I opened it. And Proceeded with the following instructions:
- Code: Select all
cd c:\php-sdk\
bin\phpsdk_setvars.bat
bin\phpsdk_buildtree.bat phpdev
I opened the php-sdk\phpdev folder expecting to see vc11 but only see vc6, vc8 and vc9. So, already feeling like this is going to fail. I just create a vc11 folder in hopes that something awesome will happen. Then I coppied the content of vc9 to the vc11 folder as they just seemed like skelleton place older folders.
I unpacked the php5.5-201406241830.tar.gz I downloaded earlier with 7zip and loaded it into C:\php-sdk\phpdev\vc11\x86
So it looked like : C:\php-sdk\phpdev\vc11\x86\php5.5-201406241830\
I am suspecting that I should just unload the content of php5.5-201406241830 into the x86 folder. But trying not to assume anything just yet.
I then download the following from http://windows.php.net/downloads/php-sdk/:
deps-5.5-vc11-x64.7z
deps-5.5-vc11-x86.7z
Trying the x86 version first, again feeling like I'm flying blind. I unloaded it into deps folder this time not doing x86\deps\deps\~ but x86\deps\~.
I remembered from last time I tried doing this that I had to grab the printer files
http://svn.php.net/repository/pecl/printer/trunk/
And from last time I know I needed to change something in the printer.c file
"Open 'printer.c' and replace all instances of 'pval' with 'zval' and it should compile."
I put those files into C:\php-sdk\phpdev\vc11\x86\php5.5-201406241830\ext\printer
I then proceeded with the following code commands in the "VS2012 x86 Native Tools Command Prompt"
- Code: Select all
cd c:\php-sdk\phpdev\vcXX\x86\php5.5-201406241830
buildconf
configure --enable-printer=shared
It returned with Unknown option enable-cli. So, I removed that and tried again.
- Code: Select all
c:\php-sdk\phpdev\vc11\x86\php5.5-201406241830>configure --disable-all --enable-
printer=shared
Saving configure options to config.nice.bat
Checking for cl.exe ... <in default path>
Detected compiler MSVC11 (Visual C++ 2012)
Detected 32-bit compiler
Checking for link.exe ... C:\Program Files (x86)\Microsoft Visual Studio 11.0\V
C\BIN
Checking for nmake.exe ... <in default path>
Checking for lib.exe ... <in default path>
Checking for bison.exe ... <not found>
ERROR: bison is required
I did a quick google search and found:
http://bobobobo.wordpress.com/2008/05/2 ... mpile-php/
and downloaded bison and flex
http://downloads.sourceforge.net/gnuwin ... .1-bin.zip
http://gnuwin32.sourceforge.net/downlin ... in-zip.php
No idea where to put them I looked for where nmake.exe was located on my c:\ and found it in C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin
So I unloaded both my downloaded zips into that folder respectively and hoping beyond hope that everything plays nice.
And BAM:
- Code: Select all
c:\php-sdk\phpdev\vc11\x86\php5.5-201406241830>configure --enable-printer=shared
Saving configure options to config.nice.bat
Checking for cl.exe ... <in default path>
Detected compiler MSVC11 (Visual C++ 2012)
Detected 32-bit compiler
Checking for link.exe ... C:\Program Files (x86)\Microsoft Visual Studio 11.0\V
C\BIN
Checking for nmake.exe ... <in default path>
Checking for lib.exe ... <in default path>
Checking for bison.exe ... <in default path>
Checking for re2c.exe ... <not found>
Parsers will not be regenerated
Checking for zip.exe ... <not found>
Checking for lemon.exe ... <not found>
Checking for mc.exe ... C:\Program Files (x86)\Windows Kits\8.0\bin\x86
Checking for mt.exe ... C:\Program Files (x86)\Windows Kits\8.0\bin\x86
Build dir: Release_TS
PHP Core: php5ts.dll and php5ts.lib
Checking for wspiapi.h ... <in default path>
Enabling IPv6 support
Enabling SAPI sapi\cgi
Enabling SAPI sapi\cli
Enabling extension ext\bcmath
Enabling extension ext\calendar
Checking for library oleaut32.lib ... <in LIB path> OleAut32.Lib
Enabling extension ext\com_dotnet
Checking for mscoree.h ... <in default path>
Enabling extension ext\ctype
Enabling extension ext\date
Enabling extension ext\ereg
Enabling extension ext\filter
Enabling extension ext\ftp
Checking for library libjpeg_a.lib;libjpeg.lib ... ..\deps\lib\libjpeg_a.lib
Checking for library freetype_a.lib;freetype.lib ... ..\deps\lib\freetype_a.lib
Checking for library libpng_a.lib;libpng.lib ... ..\deps\lib\libpng_a.lib
Checking for gd.h ... ext\gd\libgd
Checking for png.h ... C:\php-sdk\phpdev\vc11\x86\deps\include\libpng15
Checking for library libiconv_a.lib;libiconv.lib ... ..\deps\lib\libiconv_a.lib
Checking for iconv.h ... C:\php-sdk\phpdev\vc11\x86\deps\include
Checking for library libXpm_a.lib ... ..\deps\lib\libxpm_a.lib
Checking for xpm.h ... C:\php-sdk\phpdev\vc11\x86\deps\include\X11
Checking for library T1_StaticMD.lib ... <not found>
WARNING: t1lib not enabled; libraries and headers not found
Checking for library vpxmt.lib ... ..\deps\lib\vpxmt.lib
Checking for vp8.h ... C:\php-sdk\phpdev\vc11\x86\deps\include\vpx
Checking for library User32.lib ... <in LIB path> User32.Lib
Checking for library Gdi32.lib ... <in LIB path> Gdi32.Lib
Enabling extension ext\gd [shared]
Enabling extension ext\hash
Checking for library libiconv_a.lib ... ..\deps\lib\libiconv_a.lib
Checking for iconv.h ... C:\php-sdk\phpdev\vc11\x86\deps\include
Enabling extension ext\iconv
Enabling extension ext\json
Checking for library ws2_32.lib ... <in LIB path> WS2_32.Lib
Enabling extension ext\mysqlnd
Checking for library odbc32.lib ... <in LIB path> odbc32.lib
Checking for library odbccp32.lib ... <in LIB path> odbccp32.lib
Checking for sql.h ... <in default path>
Checking for sqlext.h ... <in default path>
Enabling extension ext\odbc
Enabling extension ext\opcache [shared]
Enabling extension ext\pcre
Checking for library winspool.lib ... <in LIB path> WinSpool.Lib
Checking for library gdi32.lib ... <in LIB path> Gdi32.Lib
Enabling extension ext\printer [shared]
Enabling extension ext\reflection
Enabling extension ext\session
Enabling extension ext\spl
Checking for timelib_config.h ... ext/date/lib
Enabling extension ext\standard
Enabling extension ext\tokenizer
Checking for zlib.h ... C:\php-sdk\phpdev\vc11\x86\deps\include
Enabling extension ext\zip
Checking for library zlib_a.lib;zlib.lib ... ..\deps\lib\zlib_a.lib
Checking for zlib.h ... C:\php-sdk\phpdev\vc11\x86\deps\include
Enabling extension ext\zlib
Checking for library libxml2_a_dll.lib;libxml2_a.lib ... ..\deps\lib\libxml2_a_d
ll.lib
Checking for library libiconv_a.lib;iconv_a.lib;libiconv.lib;iconv.lib ... ..\de
ps\lib\libiconv_a.lib
Checking for libxml/parser.h ... C:\php-sdk\phpdev\vc11\x86\deps\include
Enabling extension ext\libxml
Enabling extension ext\dom
Enabling extension ext\phar
Native OpenSSL support in Phar disabled
Enabling extension ext\simplexml
Enabling extension ext\wddx
Checking for timelib_config.h ... ext/date/lib
Enabling extension ext\xml
Enabling extension ext\xmlreader
Checking for libxml/xmlwriter.h ... C:\php-sdk\phpdev\vc11\x86\deps\include
Enabling extension ext\xmlwriter
Creating build dirs...
Generating files...
Generating Makefile
Generating main/internal_functions.c
Generating main/config.w32.h
Generating phpize
Done.
Enabled extensions:
-----------------------
| Extension | Mode |
-----------------------
| bcmath | static |
| calendar | static |
| com_dotnet | static |
| ctype | static |
| date | static |
| dom | static |
| ereg | static |
| filter | static |
| ftp | static |
| gd | shared |
| hash | static |
| iconv | static |
| json | static |
| libxml | static |
| mysqlnd | static |
| odbc | static |
| opcache | shared |
| pcre | static |
| phar | static |
| printer | shared |
| reflection | static |
| session | static |
| simplexml | static |
| spl | static |
| standard | static |
| tokenizer | static |
| wddx | static |
| xml | static |
| xmlreader | static |
| xmlwriter | static |
| zip | static |
| zlib | static |
-----------------------
Enabled SAPI:
-------------
| Sapi Name |
-------------
| cgi |
| cli |
-------------
--------------------------------------------
| | |
--------------------------------------------
| Build type | Release |
| Thread Safety | Yes |
| Compiler | MSVC11 (Visual C++ 2012) |
| Architecture | x86 |
--------------------------------------------
Type 'nmake' to build PHP
c:\php-sdk\phpdev\vc11\x86\php5.5-201406241830>
So, I checked out the "C:\php-sdk\phpdev\vc11\x86\php5.5-201406241830\Release_TS\ext" directory and found the printer folder. However it was empty.
I realized I forgot to nmake
- Code: Select all
nmake
Watching it go through all the .c files trying to watch for printer or php_printer. I gave up and just let it run.
While letting it run I forgot I had problems last time with the php version. I checked the old notes and found that I really do neet to be nitpicky about the version of php I use.
http://www.oldapps.com/php_programming_ ... _php=14569
I then grapped PHP 5.5.11 to match the php version in the Xampp I am using. I will be putting it in the C:\php-sdk\phpdev\vc11\x86\ folder and re-run the rest of the steps.
I do see that there is a php_printer.dll in the Release_TS folder. So, I know it is mostly working now.
Going back to do all the above steps with the correct php build version. I will let you know how it turns out. I hope this will succeed and be helpful for others. I will reply to this post if I have an issue and add a link to the finished php_printer.dll for 5.5.11 if I get it working. Done working on this project for today. Not enough time to finish and test. Will reply to this post with my results tomorrow.
Thank you!