Search the Community
Showing results for tags 'compile'.
-
Compiling a new PHP extension seems to be complicated as hell.. for using pspell php extension I have to recompile the php code with the command flag --with-pspell. There's two ways of linking/having an extension works. The first one is to linking the extention's dll with the php.ini file and the second way of having an extension works is to recompile the php code with appropriate flags. I've choosed the all ways of having extension works, I get the extension's dll and put it into the php ext folder(which I got this from the phpinfo information - a directory the extensions load from) then uncheck the php extension list within the php.ini file. That doest works. So I've tried old school. Downloaded a php source code(stepping over some article) buildconf --force configure --with-pspell then BAAM an error: There is no information out there that could help me.
-
when performing a make on php I get the following. ive recompiled IMAP with EXTRAFLAGS=-fPIC but still get the following error /usr/bin/ld: /usr/local/imap-2007f/c-client/libc-client.a(osdep.o): relocation R_X86_64_32 against `server_input_wait' can not be used when making a shared object; recompile with -fPIC /usr/local/imap-2007f/c-client/libc-client.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [libphp5.la] Error 1 below is the code I used to configure PHP ./configure --with-apxs2=/usr/sbin/apxs --with-mysql --enable-mbstring --with-ldap --with-pdo-mysql --with-zlib --with-openssl --prefix=/usr/local/php5 --with-imap=/usr/local/imap-2007f --enable-pic --with-imap-ssl=/usr/local/imap-2007f --with-libdir=lib64 any help would be great. I've spent the past 5 hours searching the interwebs and used the following guide to help me http://forum.directadmin.com/showthread.php?t=41879
-
My Knowledge base is; I can get around in php, I have never worked with C, C++, C# or any compilers. I Upgraded from XAMPP 1.7.3, which used php 5.3, to 1.8.1 which includes: Apache 2.4.3 MySQL 5.5.27 PHP 5.4.7 It is being installed on Windows 7 Pro, Windows XP Pro and Windows Server 2008 r2. But I am trying to get it to working on Windows 7 currently. I upgraded because I needed a newer version of Apache and MySQL for security reasons. I do not have the option to downgrade. I use the php_printer.dll for the ability to print raw data to the printer: printer_set_option($handle, PRINTER_MODE, "RAW"); My Code worked fine in PHP 5.3 but broke in PHP 5.4. After receiving the error: " Fatal error: Call to undefined function printer_open() in ~". I checked the php_error_log and received the following information. PHP Warning: PHP Startup: printer: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These options need to match I've looked for hours trying to find a pre-compiled php_printer.dll for PHP 5.4.7 to no avail. I have concluded that I will have to compile it from source files in the PECL. pecl.php.net/package/printer Having never had to do this before I did what any internet user should do. I googled it and found some information here: https://wiki.php.net/internals/windows/stepbystepbuild It took me all day but the PHP build worked. But then tried to create the php_printer.dll following the dbase example. First I tried : svn co http://svn.php.net/repository/pecl/printer/trunk pecl/printer But it said: 'svn' is not recognized as an internal or external command, operable program or batch file. So I just downloaded the files myself from: svn.php.net/repository/pecl/printer/trunk/ and put them in: C:\php-sdk\php54dev\vc9\x86\php5.4-201303311430\ext\printer The files: config.w32 CREDITS.txt php_printer.h printer.c printer.dsp printer.php Tried it both With printer.php and with out. I made sure to download the libraries both from: windows.php.net/downloads/php-sdk/deps/vc9/x86/ Also just the deps file: deps-5.4-vc9-x86.7z I tried the deps file alone and then added the other, however; every time I received the following when I tried to nmake: c:\php-sdk\php54dev\vc9\x86\php5.4-201303311430>nmake Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. printer.c ext\printer\printer.c(266) : error C2065: 'pval' : undeclared identifier ext\printer\printer.c(266) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(266) : error C2100: illegal indirection ext\printer\printer.c(266) : warning C4552: '*' : operator has no effect; expect ed operator with side-effect ext\printer\printer.c(267) : error C2275: 'printer' : illegal use of this type a s an expression c:\php-sdk\php54dev\vc9\x86\php5.4-201303311430\ext\printer\php_printer. h(78) : see declaration of 'printer' ext\printer\printer.c(267) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(269) : error C2143: syntax error : missing ';' before 'typ e' ext\printer\printer.c(271) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(271) : warning C4047: '=' : 'int' differs in levels of ind irection from 'printer *' ext\printer\printer.c(272) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(272) : error C2223: left of '->dmModifiedFields' must poin t to struct/union ext\printer\printer.c(274) : error C2065: 'argc' : undeclared identifier ext\printer\printer.c(274) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2224: left of '.type' must have struct/union type ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : warning C4047: 'function' : 'zval *' differs in lev els of indirection from 'int' ext\printer\printer.c(275) : warning C4024: 'zval_isref_p' : different types for formal and actual parameter 1 ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : warning C4047: 'function' : 'zval *' differs in lev els of indirection from 'int' ext\printer\printer.c(275) : warning C4024: 'zval_refcount_p' : different types for formal and actual parameter 1 ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : warning C4047: 'function' : 'zval *' differs in lev els of indirection from 'int' ext\printer\printer.c(275) : warning C4024: 'zval_delref_p' : different types fo r formal and actual parameter 1 ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2223: left of '->value' must point to struct /union ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2224: left of '.type' must have struct/union type ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : warning C4047: '=' : 'int' differs in levels of ind irection from 'zval *' ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2223: left of '->type' must point to struct/ union ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : warning C4047: 'function' : 'zval *' differs in lev els of indirection from 'int' ext\printer\printer.c(275) : warning C4024: '_convert_to_string' : different typ es for formal and actual parameter 1 ext\printer\printer.c(276) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(276) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(276) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(276) : error C2100: illegal indirection ext\printer\printer.c(276) : error C2100: illegal indirection ext\printer\printer.c(276) : error C2224: left of '.value' must have struct/unio n type ext\printer\printer.c(278) : error C2065: 'argc' : undeclared identifier ext\printer\printer.c(279) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(279) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(285) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(285) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(285) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(285) : error C2223: left of '->handle' must point to struc t/union ext\printer\printer.c(285) : error C2198: 'OpenPrinterA' : too few arguments for call ext\printer\printer.c(286) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(286) : error C2223: left of '->pi2' must point to struct/u nion ext\printer\printer.c(287) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(287) : error C2223: left of '->pi2' must point to struct/u nion ext\printer\printer.c(287) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(287) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(287) : error C2198: 'DocumentPropertiesA' : too few argume nts for call ext\printer\printer.c(288) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(288) : error C2223: left of '->handle' must point to struc t/union ext\printer\printer.c(288) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(288) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(288) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(288) : error C2223: left of '->pi2' must point to struct/u nion ext\printer\printer.c(288) : warning C4047: 'function' : 'LPSTR' differs in leve ls of indirection from 'int' ext\printer\printer.c(288) : warning C4024: 'DocumentPropertiesA' : different ty pes for formal and actual parameter 3 ext\printer\printer.c(288) : error C2198: 'DocumentPropertiesA' : too few argume nts for call ext\printer\printer.c(289) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(289) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(290) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(290) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(291) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(291) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(292) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(292) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(293) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(293) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(293) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(293) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(294) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(294) : error C2223: left of '->dc' must point to struct/un ion ext\printer\printer.c(294) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(294) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(294) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(294) : error C2223: left of '->pi2' must point to struct/u nion ext\printer\printer.c(294) : error C2198: 'CreateDCA' : too few arguments for ca ll ext\printer\printer.c(295) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(295) : warning C4022: 'zend_register_resource' : pointer m ismatch for actual parameter 2 ext\printer\printer.c(299) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(299) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(310) : error C2065: 'pval' : undeclared identifier ext\printer\printer.c(310) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(310) : error C2100: illegal indirection ext\printer\printer.c(310) : warning C4552: '*' : operator has no effect; expect ed operator with side-effect ext\printer\printer.c(311) : error C2275: 'printer' : illegal use of this type a s an expression c:\php-sdk\php54dev\vc9\x86\php5.4-201303311430\ext\printer\php_printer. h(78) : see declaration of 'printer' ext\printer\printer.c(311) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(313) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(317) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(317) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(317) : warning C4047: 'function' : 'zval **' differs in le vels of indirection from 'int' ext\printer\printer.c(317) : warning C4024: 'zend_fetch_resource' : different ty pes for formal and actual parameter 1 ext\printer\printer.c(317) : warning C4047: '=' : 'int' differs in levels of ind irection from 'printer *' ext\printer\printer.c(317) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(319) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(319) : error C2100: illegal indirection ext\printer\printer.c(319) : error C2100: illegal indirection ext\printer\printer.c(319) : error C2224: left of '.value' must have struct/unio n type ext\printer\printer.c(319) : warning C4047: 'function' : 'int' differs in levels of indirection from 'void ***' ext\printer\printer.c(319) : warning C4024: '_zend_list_delete' : different type s for formal and actual parameter 1 ext\printer\printer.c(319) : error C2198: '_zend_list_delete' : too few argument s for call ext\printer\printer.c(328) : error C2065: 'pval' : undeclared identifier ext\printer\printer.c(328) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(328) : fatal error C1003: error count exceeds 100; stoppin g compilation NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\ VC\Bin\cl.exe"' : return code '0x2' Stop. If some one is set up to compile this DLL for 5.4.7 I would greatly appreciate it.