Alternative function to printer-list [duplicate] - php

I'm getting Call to undefined function printer_list() cuz my php_printer.dll isn't working and in the error log I'm getting PHP Startup: Unable to load dynamic library.
c:/wamp64/bin/php/php5.6.31/ext/php_printer.dll
I searched the entire web for php_printer.dll that works with php 5.6.31 and I didn't find it, I'm working with wampserver 3.1 on windows 7 can anyone help?

Looking at the one issue on that git repo I see that gimjudge has complied these DLL's for 32 PHP only. Their reasoning being that until PHP7 the 64bit PHP versions were actually only experimental. PHP only became truly 64 bit as of PHP7.0
So to use this dll you would have to install the 32bit version of WAMPServer. Then you will probably have no problems activating this DLL.
You can download the 32bit version of WAMPServer 3 from here Its the backup repo and much easier to see what you are doing and which version you are downloading than the normal SourceForge repo.
Make sure you have backed up all you site(s) and databases before installing the 32bit WAMPServer.
However it is possible to install the 32bit AND 64bit WAMPServer on the same PC as the default folder names are different (C:\wamp or C:\wamp64) the Apache and MySQL service names are also different (wampapache or wampapache64) and (wampmysqld or wampmysqld64)
Although its not a good idea to start both at the same time as this will use a lot of memory for no good reason.

Related

Wampserver gibin not a valid Win32 application with php 5.4

I replaced my 2.1 version of WampServer with the 3.1.4 64 bit version. Everything worked after the installation. But I need to have php 5.4 and that doesn't come with this version of WS. So I downloaded that version, made the changes to the various files as mentioned here and other places. But when I switch to 5.4 it doesn't start.
I ran the "Check State of Services" tool and it said this
State of services:
The service 'wampapache64' is NOT started EXIT error code:1066 Help
message for error code 1066 is: The service has returned a
service-specific error code.
The service 'wampmysqld64' is started
The service 'wampmariadb64' is started
The service 'dnscache' is started
WampServer (Apache, PHP and MySQL) will not function properly if any
service 'wampapache64' 'wampmysqld64' 'wampmariadb64' 'dnscache' is
not started.
And the "Check http.conf" tool said
httpd.exe: Syntax error on line 195 of
C:/wamp64/bin/apache/apache2.4.35/conf/ht tpd.conf: Cannot load
c:/wamp64/bin/php/php-5.4.9/php5apache2_4.dll into server: %1 is not
a valid Win32 application.
And line 195 of that file is
LoadModule php5_module
"${INSTALL_DIR}/bin/php/php-5.4.9/php5apache2_4.dll"
Is it failing because the dll file is for the wrong version or do to something else? I've tried to locate a php5apache2_4.dll file for 32 bit but I couldn't find one.
I've spent most of the weekend on this and if I can't get it going I will need to go back to my previous version since I work on more sites using 5.4 than later versions. I hope I don't have to do that.
If you are using WAMPServer 3 or greater then there are a multitude of versions of PHP that can be downloaded as ADDONS. In other words installed into WAMPServer with a simple download and click to install.
I suggest you remove the manually installed version of PHP and use the provided downloads.
They are available from SourceForgce, but they are a LOT EASIER to find on the WAMPServer backup repo
It looks like you may need to use the 32bit WAMPServer 3.1.4 as there does not appear to be a 64bit PHP5.4 available in the ADDON list.
You may also find that you need to download an older version of Apache to get PHP5.4 to run as Apache and PHP have to be installed to versions that are compatibly compiled.
But with WAMPServer 3 there are 16 versions of Apache and 50 or so versions of PHP.
EDIT: In answer to your comment
If you uninstall the 64bit WAMPServer (after backing up site code and any databases) and install the 32bit WAMPServer V3.1.4.
The version of Apache i.e. V2.4.35 that comes with WAMPServer3.1.4 will run PHP5.4.45. So once you have WAMPServer 3.1.4 installed and working (check it works before continuing) you can download and install the ADDON for PHP5.4.45
Then using the wampmanager menu, switch to PHP5.4.45.
The version of MySQL is not directly link to Apache/PHP so the version that comes with WAMPServer V3.1.4 will work just fine.
It would also be a good idea to apply the WAMPServer 3.1.5 upgrade to WAMPServer 3.1.4 so you are totoally upto date with WAMPServer

Call to undefined function printer_list()

I'm getting Call to undefined function printer_list() cuz my php_printer.dll isn't working and in the error log I'm getting PHP Startup: Unable to load dynamic library.
c:/wamp64/bin/php/php5.6.31/ext/php_printer.dll
I searched the entire web for php_printer.dll that works with php 5.6.31 and I didn't find it, I'm working with wampserver 3.1 on windows 7 can anyone help?
Looking at the one issue on that git repo I see that gimjudge has complied these DLL's for 32 PHP only. Their reasoning being that until PHP7 the 64bit PHP versions were actually only experimental. PHP only became truly 64 bit as of PHP7.0
So to use this dll you would have to install the 32bit version of WAMPServer. Then you will probably have no problems activating this DLL.
You can download the 32bit version of WAMPServer 3 from here Its the backup repo and much easier to see what you are doing and which version you are downloading than the normal SourceForge repo.
Make sure you have backed up all you site(s) and databases before installing the 32bit WAMPServer.
However it is possible to install the 32bit AND 64bit WAMPServer on the same PC as the default folder names are different (C:\wamp or C:\wamp64) the Apache and MySQL service names are also different (wampapache or wampapache64) and (wampmysqld or wampmysqld64)
Although its not a good idea to start both at the same time as this will use a lot of memory for no good reason.

Phalcon PHP Xampp installation - Apache can't find DLL

I am using Windows 7 64bit, Xampp 1.8.3(with PHP 5.5). I'am following Phalcon installation guide, i downloaded x86 version of Phalcon like in this guide. Next i put php_phalcon.dll file in D:/xampp/php/ext. Then, i add to php.ini file:
extension=php_phalcon.dll
Great, so i lunch Xampp and start Appache. And then:
firest error http://ubplanet.pl/uploads/images/UBPlanet-1392741295-U15373.png
After click OK, I instantly get second error:
second error http://ubplanet.pl/uploads/images/UBPlanet-1392741373-U15373.png
Well, i tried everything: reinstalling xampp; install it on C drive; So i try to install phalcon on WAMP, but i also got error like this! So I decide to reinstall whole Windows, with disk formatting. And on the brand new Windows, i also have the same errors. It looks like PHP can't load libraries, but why?
if you are using Xampp x64 it does not mean your php is x64
first your need to check your setup from phpinfo you need to check 3 things
php version
Compiler
Architecture
in case, you have Architecture x84 and Compiler VC11 you need to download the dll that met your setup from phalcon site
about the version the latest version supported in the current time of writing this answer on phalcon site is 5.5.0
if your php version is higher like 5.5.5 you need to search for custom build for Phalcon
you can check this one on github https://github.com/andont/phalcon-win
this one had worked with me personally.
if all of this does not work and you could not find any dll mach you setup ( and I believe you can find one) in this case you have to build your own by compiling the source code on Microsoft visual studio that met your setup compiler and architecture and I hope you don't end up with the last solution :)
I've had so much trouble with PHP and windows, it might behoove you to simply download virtualbox, and spin up an ubuntu virtual machine. You'll have the benefits of running the project in an environment that is likely very similar, if not almost identical to the environment that you'd be running if it were ever on a production server. This doesn't expressly answer your question, I know, but it's just good advice.

Why won't php_oauth.dll module work on Windows 7?

I am struggeling for days to install OAuth module of PHP to apache, but it simply doesn't want to work. I have tried many combinations, but I just can't get it to work:
XAMPP
XAMPP doesn't include oauth by default. Therefore, I have downloaded the module from PEAR websote, placed it in the ext folder, placed it into php.ini. However, when I try to start apache it says that oauth and PHP are compiled with different APIs!?. I tried with older versions too, but with the same result
Manual Installation of Apache & PHP
I also tried to install both Apache and PHP separately. They install successfully, however apache gives an error when I am trying to start it saying that the php5apach2_2.dll cannot be loaded into server. Some way I managed to fix that and start pache. However, without any error and with php.ini and httpd.conf configured the OAuth module doesn't load and it doesn't appear in phpinfo().
Microsoft IIS
Ultimately I installed IIS and got it to work up until the last problem in the previous trial: won't show up in phpinfo() nor work in PHP scripts.
I got it to work in minutes on Ubuntu Linux on a VM, but it is really a pain to work on a VM as a web developer.
My OS is Windows 7 x64.
The files I used to install:
php_oauth-1.2.3-5.5-ts-vc9-x 86.zip
php_oauth-1.2.2-5.4-ts-vc9-x86.zip
php_oauth-1.2.2-5.3-ts-vc9-x86.zip
php_oauth-1.1.1-dev-5.3-vc9-x86.zip
php-5.3.21.tar.gz
php-5.4.11-nts-Win32-VC9-x86.zip
php-5.3.21-src.zip
php-5.5.0alpha1.tar.bz2
Apache2.2.zip
and many others...
Does anyone have a clue why is this happening ?
Thanks!
I think the problem that you're running into is that your OAuth DLL's are 32bit (x86) whereas your OS is x64. I'm dealing with a similar problem, looking for the OAuth DLL that is both x64 and for PHP 5.4.
I did however find a x64 DLL that works for PHP 5.3. It's available here: http://www.mediafire.com/php-win64-extensions. Just make sure to get the file named php_oauth-1.2.2-5.3-VC9-x64.zip as the other OAuth DLL is not thread safe (nts).
If you are fine using PHP 5.3 then that DLL should work for you.

php_memcache.dll for 64 bit wampserver with either php 5.3.13 or 5.4.3

Okay, so far ive been googeling and trying to find a solution for over 6 hours. normally i dont post questions because i feel the answer should be findable, but here goes nothing.
I need to work with PHP code that has implemented the memcache class. I use wampserver 2.2 as 64 bit install, with apache 2.2.2, php 5.4.3 (installed 5.3.13 too, to see if i could fix it in that version) and mysql 5.5.24
i have run the memcache service with both the memcached-win64-1.4.4-14.zip link and the memcached-1.2.6-win32-bin.zip link
I am now at a point where the feedback from wampserver i get is the following when (re)starting the apache module -> mem_cache_module, using the answers from a similar thread on stackoverflow.com/questions/3894065/php-memcache-dll-vc6-x64), in combination with php 5.3.13 64 bit:
PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
This is a lot further than i got with the other options, most (or all) results i can come up with seem to redirect to either a 32 bit dll (which i cant use since my wampserver is 64 bit) or with the wrong php version or api version (compilation date?) .. i do not think i am able to compile my own library to solve this.
I have added *extension=php_memcache.dll* to both php.ini files for both php versions and the dll files have been placed into the correct php/php5.x.x/ext/ folders of the wamp server
my assumption so far is that i need the php_memcache.dll compilated for 64 bit (x64) for php 5.3.13 on the 25th of may, 2010. That or i need to install a php version matching the binairy compiled on the 26th of june, 2009.
Do any of you have a soltion to my specific dillemma? Any help will be greatly appriciated.
I tried all dlls and none worked but suddenly the one given in comment by falcontoast http://www.mediafire.com/?8d3vd26z3fg6bf1 did work.
Will be glad if it works for someone :).
One must check architecture of the phpversion from phpinfo() and must use corresponding dll file. Also the version for memcached service should be of same type.
Try following steps that might work for you. Yes it did work for me when I almost gave up.
1 - Close all memcached services if any already running.
2 - get this service memcached-win64-1.4.4-14(find it) and install it and then start.(the ways to install are already given out there).
3 - get the dll file in comment by falcontoast and put that in extension(ext) folder.
4 - do the changes in php.ini file.
5 - restart the wamp server(probably exit it and then again start it).
If everything is done properly, then the program given here https://commaster.net/content/installing-memcached-windows should work fine.
Basically you need Memcache OR Memcached Library that match your PHP Executable. When I say match I'm not speaking of date but of code. The old PHP won't support new Memcache and vice-versa.
You can try to compile a special one just for your version of PHP (I tried once with other libraries it's not fun). Or you can find a version of PHP that would work with a version of Memcache but this new PHP will also need to work with your version of Apache...
After years of playing with that I just gave up and just used a unix system.
PS: Now that I think about it PHP already come with a correct version of Memcache... So your error may be just that you're using "new Memcached();" instead of "new Memcache();"
Thank you zzarbi!! Freaking finally, I have tried all possible dll's out there and the one you provided finally worked, all others gave Invalid Win32 application.
My setup is Wamp 64 bit with Apache : 2.4.4 MySQL : 5.6.12 PHP : 5.4.12 on Windows 8 64bit

Resources