I need to use XSLT 2.0 with PHP on Windows for a work, and after a few research, it seems that the best way to achieve it is to use the saxon-C of Saxonica.
I followed the official documentation until this point :
The PHP extension has not yet been built. It can be built using the PHP source. [...] To build the PHP extension yourself please see the Saxon-C-API Visual Studio 2008 project included in the installation (e.g. 'C:\Program Files\Saxonica\SaxonHEC1.1.0\Saxon-C-API').
I looked at the file and there are some .h and .cpp files and the config.w32 file, so I tried to build the extension according to this documentation :
http://blog.benoitblanchon.fr/build-php-extension-on-windows/
But I have some error during the process.
Is it the right way to perform it ? Or is there a better way to do it ?
Sorry if the answer is obvious, I'm not a PHP pro.
Thank you in advance for your answer.
Related
sorry if I seem like an absolute beginner at these things. I wanted to get the PHP extension for GEOS. I already have PHP (though XAMPP) and GEOS installed. Now, trying out the instructions on GitHub, I soon realize that these are instructions for Linux. I've been googling instructions for getting PHP extensions in Windows, but I've learned that it's not quite simple. Based on what I've found I would either need to
Use Visual Studio (which I would have to download first)
Find a dll (there is none)
Recompile PHP with the extension (not sure if I said it right)
So I have two questions: firstly, which of these options are most suitable for getting just one extension? And secondly, regarding the recompiling option, would I have compile things from a different source, since I got PHP from XAMPP and it doesn't seem to have the option to install the components separately.
EDIT: I believe that my question is not the same as this one because the user here actually found relevant DLLs, and did not have to compile anything or use Visual Studio.
I'm on Windows 10, and I really need to install this PHP extension in order to use advanced GeoPHP methods. I've already asked about this previously here. There is no available DLL for this extension, and the instructions for installation on GitHub are for Linux. What I've understood is that I need to recompile PHP with the extensions in the ext folder, so I'm planning on doing that using these instructions. However, I've previously installed PHP through XAMPP.
My question is, will these instructions work with this? If yes, where can I find the PHP source files? I'm not quite sure what they look like, and googling "PHP source files location" gives me stuff about actual PHP files, not the ones used for installation. I just want to make sure. Thanks.
No, you do not have to recompile PHP. The module you stated is not baked into PHP but dynamically included.
Just build the module and include it like
extension=geos.dll
The Github link you posted does have instructions...
See, i'm trying to use OpenCV in Php, but i cannot find a proper way to do it. Neither in stackoverflow.
Over the internet, i found two different ways to try:
Using this git. https://github.com/mgdm/OpenCV-for-PHP
Problem: This code uses the dl function to import extensions on real-time execution , which has been removed from the last php versions (5.3 to 5.6 i think)
Solutions i've tried:
Link the extension .so at the php.ini file.
Problem: The code dosen't has any opencv.so file
Downgrade my php 5.6 to 5.2
Problem: Incompatibility with other parts of the code.
Using OpenCV Pecl package. http://pecl.php.net/package/opencv
Problem: The web shows the package but it has "no releases available". Neither if i try to download it on Centos using "(sudo) pecl download opencv". It gives me the same message, "no releases available. Download failed".
The thing is that i've seen a face-detection algorithm done with openCV over php, so i guess it is possible to use this library on Php. Anyone knows how?
Thank you in advance.
OpenCV has only C++ and Python implementation ,and its strictly machine vision library,However if you write "web service" say Json to interact with the machine vision script ,you can then access it via php client request.
image--->'json'--->python facedetect---->image--->'json'---->php
I'm having trouble compiling the WSO PHP framework on Windows. The latest version is here on github https://github.com/wso2/wsf. I've been trying to follow the instructions located at /php/README.INSTALL_WIN32
The problem is that the folder structure in github does not match what that build.bat is expecting and the build fails.
I'm having to do this as part of a website running an old version of php is being upgraded to 5.3 and still needs WSF to run.
I can't find the binaries anywhere pre compiled - if someone knows where they are then that would save having to try compiling them. If not, any help in the compile process is appreciated.
Thanks
I ran into the same problem as you except when trying to compile under Linux, I found the solution to be first configure/compiling the C components from the source from here, copying the contents after make into a new folder 'wsf_c' inside the php fodler and then using the build script within the php folder of the sources from Github. I know you've likely found a way around this already but I hope this may help someone.
More specifically, I'm trying to make a PHP extension for WampServer, which I'm using to test PHP scripts on my PC. I know that a PHP extension requires a config.m4 file, and some C/C++ code to be created within PHP. How would I get these .c/.cpp and .m4 files into a .dll that's required to make a PHP extension?
Take a look at this : Getting Started with PHP Extension-Development
Generally you need C compiler (with or without IDE), I recommend MS Visual C++ Express.
Then follow this tutorial: http://blog.slickedit.com/2007/09/creating-a-php-5-extension-with-visual-c-2005/