MadFly Posted February 1, 2012 Share Posted February 1, 2012 hi I have been playing around with this function. After I installed the extension, and restarted my wamp apache services, everything worked fine on a windows 7 pro 32bit laptop. But when I tried exactly the same code, also after loading function dll file on the 64bit pc, restarted services, I receive the following error: Fatal error: Call to undefined function win32_query_service_status() I have been searching google, and php.net for how to get this function working on a 64bit windows, but to no avail. Was hoping someone here might be able to point me in the right direction, to get this function working on a 64bit windows operating system. The code I have looks like this: $service = "wampapache";$test = win32_query_service_status($service); if($test['CurrentState'] == 1) { $service_status = "<font color=FF0000>Stopped</font>";} if($test['CurrentState'] == 4) { $service_status = "<font color=green>Running</font>";}echo $service;echo " ";echo $service_status; Link to comment Share on other sites More sharing options...
justsomeguy Posted February 1, 2012 Share Posted February 1, 2012 Did you install the PECL package which defines those functions? Link to comment Share on other sites More sharing options...
MadFly Posted February 1, 2012 Author Share Posted February 1, 2012 No I didn't, tried reading up on it now. I have no idea how to install the PECL package. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 1, 2012 Share Posted February 1, 2012 There's a description about the installation process here: http://www.php.net/manual/en/install.pecl.php That package is called win32service. Link to comment Share on other sites More sharing options...
MadFly Posted February 1, 2012 Author Share Posted February 1, 2012 Right, read through most of the description of the installation process, and I got lost not far from the beginning.It seems like it is needed to install "a development" environment, with zend and some other stuff, which I know less about. At this moment I feel more lost than I was before starting this post Link to comment Share on other sites More sharing options...
justsomeguy Posted February 1, 2012 Share Posted February 1, 2012 Zend isn't required, I don't see it mentioned in that documentation. PECL works similar to Pear, do you have Pear installed on the server? Link to comment Share on other sites More sharing options...
MadFly Posted February 1, 2012 Author Share Posted February 1, 2012 Nope, didn't know how. Still don't know exactly. Didn't know the .bat files are in the tgz archive i downloaded. Don't know how to get it installed, and I don't understand the description in that link very clearly :-( Link to comment Share on other sites More sharing options...
justsomeguy Posted February 1, 2012 Share Posted February 1, 2012 This is the instruction manual for Pear, the installation files come with PHP: http://pear.php.net/manual/en/installation.php Pear should also install what you need to install the PECL modules. Link to comment Share on other sites More sharing options...
MadFly Posted February 2, 2012 Author Share Posted February 2, 2012 Cool, I think I made some progress. Did everything as suggested http://www.geeksengine.com/article/install-pear-on-windows.html, but i still cannot see the highlighted code. I'm lost.Thinking about rather installing ubuntu with LAMP, and monitor it's services with php, without all these PEARL and PECL stuff. But I don't know. This windows PEARL and PECL seems to be too much for me. Link to comment Share on other sites More sharing options...
birbal Posted February 2, 2012 Share Posted February 2, 2012 that specific extension wont work in ubuntu or ny other unix family. it is for windows only. Link to comment Share on other sites More sharing options...
MadFly Posted February 2, 2012 Author Share Posted February 2, 2012 Yes, I know that specific extension won't work in ubuntu or any other linux, but I think that ubuntu has some other, "more easily optainable" ways of monitoring a certain service. Link to comment Share on other sites More sharing options...
MadFly Posted February 2, 2012 Author Share Posted February 2, 2012 I just solved this problem be getting a 64bit dll from the following websitehttp://www.mediafire.com/php-win64-extensionsJust placed dll in ext directory under php, restarted wamp, and its working now. Just thought if anyone ever wants to monitor windows services with php and wamp, this is the solution. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.