Re: Compiling Win32 extensions (VC++)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jeff,

The default build of PHP on Win32 is thread safe but it's only required if
you are using PHP with a multithreaded server. I Use PHP5 in a non threaded
configuration (CGI and CLI) on win32. You can download binaries at
http://kromann.info/php.php, or compile them.

There is two ways to fix the compile problem:

1) Add TSRM_FETCH(); calls to the functions where the tsrm_ls function is
needed. This should be added as the first statement after variable
declarations.

2) Change the functions to include the magick TSRM_CC/TSRM_DC parameters.
This will cause the tsrm_ls symbol to be passed when the function is
called. This method might be time consuming depending on the number of
functions and function calls in the code.

- Frank

> 
> Hello,
> 
> I am trying to compile Doru Petrescu's Upload Progress Meter extension
on Win32.  (See http://pdoru.from.ro/upload-progress-meter.)  This is a
great extension, it works very well... on linux, for which it was
designed.
> 
> I am using MS Visual Studio (Visual C++ 6.0) as my build environment,
set up as described in the tutorial at
http://www.devnewz.com/2002/0909.html.  When trying to compile, I get the
message:  "error C2065: 'tsrm_ls' : undeclared identifier."  This is
somewhere in PHP's TSRM (Thread Safe Resource Manager) code.  As I
understand it, all Windows PHP extensions must be "thread safe."  If I
remove the "ZTS=1" from the preprocessor directives, the module will
compile nicely into a .dll file... but PHP won't load with it enabled.  I
imagine this is because I removed the thread safe stuff in order to make
it compile.  
> 
> Anyone have any ideas on how to get the darn thing to compile in such a
manner that will make PHP accept it and load the module?
> 
> Help greatly appreciated,
> 
> Jeff
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux