Author |
|
TRD
Joined: 07 Aug 2012 Posts: 7 Location: The Netherlands
|
Posted: Tue 07 Aug '12 12:55 Post subject: Php_win32service.dll for win32 on WAMP won't work |
|
|
Great work around here guys! However, I am in need of the win32 version of win32service.dll and I can't find it anywhere...
Can someone compile it or can I find it somewhere else on this forum?
Last edited by TRD on Thu 09 Aug '12 10:04; edited 1 time in total |
|
Back to top |
|
admin Site Admin
Joined: 15 Oct 2005 Posts: 692
|
Posted: Tue 07 Aug '12 13:16 Post subject: |
|
|
On the the Downloads/Additional page there is php_win32service-0.1.0-php-5.4-win32.zip
Note: Download removed, AL not supporting anymore PHP extensions.
Last edited by admin on Fri 10 Aug '12 13:27; edited 2 times in total |
|
Back to top |
|
TRD
Joined: 07 Aug 2012 Posts: 7 Location: The Netherlands
|
Posted: Tue 07 Aug '12 16:21 Post subject: |
|
|
Thanks for pointing that one out, but it isn't working for me. I got the 5.4.3 PHP version and it gives me errors after restarting the server (after adding line in php.ini). The warning is:
PHP Startup: unable to load dynamic library 'c:/wamp/bin/php/php5.4.3/ext/php_win32service.dll" - The specified module could not be found.
I am also using apache 2.2.22, maybe that could be a problem. Hope someone can help me with this...
Edit: When I add the "extension=php_win32service.dll" line to php.ini I get an error ("The Win32Service is only available when using the CLI SAPI" and "Unable to start win32service module") and apache won't start. I can however see via CLI that the win32service is installed in that way. When I use the ";extension=php_win32service.dll" line I can start WAMP with ease, but I can't reach it via SLI. What is the problem?
FYI: I don't have apache 2.4.2, mod_fcgid-2.3.7 or VS ++ installed. My php version is TS (thread safe) and VC9. |
|
Back to top |
|
TRD
Joined: 07 Aug 2012 Posts: 7 Location: The Netherlands
|
Posted: Fri 10 Aug '12 12:47 Post subject: |
|
|
*bump* |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Fri 10 Aug '12 13:21 Post subject: |
|
|
Bumping does not help, mostly the result is that the post is ignored.
"The Win32Service is only available when using the CLI SAPI"
That says all.
Steffen |
|
Back to top |
|
TRD
Joined: 07 Aug 2012 Posts: 7 Location: The Netherlands
|
Posted: Mon 13 Aug '12 11:44 Post subject: |
|
|
I read that part about Win32service only being available when using CLI SAPi, but I don't understand how I can use Win32Service than? How do I run Apache AND enable Win32Service? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 13 Aug '12 12:15 Post subject: |
|
|
What Steffen wanted to tell you is that this module runs only on the command line! No chance running this with apache as module! IN fact you can't.
If I would have to do that via apache I'd do it the following. Use the default php.ini for apache as module. Copy that php.ini and rename the copy to php-cli.ini. In that new file enable the Win32Service extension.
In your php script which you want to run from apache use exec() to run the script which shall use Win32Service extension and specify the php-cli.ini
e.g.
Code: |
exec("C:/fullpathto/php.exe -c C:/fullpathto/php-cli.ini Win32Service.php");
|
|
|
Back to top |
|
TRD
Joined: 07 Aug 2012 Posts: 7 Location: The Netherlands
|
Posted: Mon 13 Aug '12 16:35 Post subject: |
|
|
Thanks for the answer James Blond. According to your code, win32service.php would be something like the code from zx9: http://www.apachelounge.com/viewtopic.php?t=4702 ?
What alternative do I have? I run my scripts via command line, but I need phpmyadmin to view somethings...so I would need Apache, right?
Besides, how should I run your code (.php)? Via command line or just in the browser?
Thanks in advance. I must say their is little information regarding Win32Service when your kind of a beginner when it comes to PHP/Apache etc. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 13 Aug '12 19:57 Post subject: |
|
|
TRD wrote: | What alternative do I have? |
That is the alternative! The exec is a script that is running in apache! That scripts call another script which uses the needed command line
TRD wrote: | but I need phpmyadmin to view somethings...so I would need Apache, right?
|
Yes
TRD wrote: |
Besides, how should I run your code (.php)? Via command line or just in the browser?
|
Same answer as above. Yes run it in the browser and that script will run the command line script for you. See it as a subprocess.
TRD wrote: |
Thanks in advance. I must say their is little information regarding Win32Service when your kind of a beginner when it comes to PHP/Apache etc. |
No problem, we all started somewhen |
|
Back to top |
|
TRD
Joined: 07 Aug 2012 Posts: 7 Location: The Netherlands
|
Posted: Wed 15 Aug '12 11:37 Post subject: |
|
|
Tried running the script got the following error:
Warning
PHP Startup: win32service: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
When clicking ok I got a blank page. Seems like win32service isn't that easy |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Wed 15 Aug '12 15:03 Post subject: |
|
|
API=20090626 is php 5.3
API=20100525 is php 5.4 |
|
Back to top |
|
TRD
Joined: 07 Aug 2012 Posts: 7 Location: The Netherlands
|
Posted: Wed 15 Aug '12 17:50 Post subject: |
|
|
Seems I need to downgrade my php version (5.4.3)? Or someone compile it to 5.4.x (*ahum* Steffen
) |
|
Back to top |
|