Jump to content


Photo

dl() function / w32api


  • Please log in to reply
4 replies to this topic

#1 richard

richard

    Newbie

  • Member
  • Pip
  • 3 posts
  • Main OS: Windows XP

Posted 08 August 2009 - 02:51 PM

when i load the page i get an error saying:

Warning: dl() [function.dl]: Not supported in multithreaded Web servers - use
extension=php_w32api.dll in your php.ini in Z:\www\win32_test.php on line 2

Fatal error: Call to undefined function w32api_register_function() in Z:\www\win32_test.php on line 3


i already made sure the line "extension=w32api.dll" is uncommented and the dl() function
is enabled in the php.ini file and the actual w32api.dll IS in my extensions folder. here's my code:

function mBox()
{
	dl("php_w32api.dll");
	w32api_register_function("User32.dll","MessageBoxA","long");
	MessageBoxA(NULL, $str, "blahblahblah", MB_OK);
}


#2 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 08 August 2009 - 04:42 PM

In all honesty I think this is a dead duck! :)

With the introduction of PHP 5 series php_w32api.dll was dropped.
It looks as if its no longer maintained.

There was hint of an alternative ffi (Foreign Function Interface) I think that met the same fate.

If you are just wanting to have a play with php_w32api.dll it may work on Uniform Server 3.1 which was the last version to contain PHP 4 series.

All the best
Ric :D

#3 richard

richard

    Newbie

  • Member
  • Pip
  • 3 posts
  • Main OS: Windows XP

Posted 09 August 2009 - 06:20 PM

In all honesty I think this is a dead duck! :)

With the introduction of PHP 5 series php_w32api.dll was dropped.
It looks as if its no longer maintained.

There was hint of an alternative ffi (Foreign Function Interface) I think that met the same fate.

If you are just wanting to have a play with php_w32api.dll it may work on Uniform Server 3.1 which was the last version to contain PHP 4 series.

All the best
Ric :D


is there any other way to access the win32 API using PHP?

#4 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 09 August 2009 - 07:01 PM

If itís locally then this is worth a read:
http://sourceforge.n...I:_Introduction

All the best
Ric :)

#5 richard

richard

    Newbie

  • Member
  • Pip
  • 3 posts
  • Main OS: Windows XP

Posted 09 August 2009 - 11:39 PM

thanks for your help, i decided just to write a COM class to access the win32 api functions and then using that in my php file :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users