I would like to compile the php pecl extension ev http://pecl.php.net/package/ev for PHP 5.5+ into a dll-file on Win 8.1 64-Bit.
I have already downloaded the ev source-code and already installed Visual Studio Express(!) 2012. What do i have to do next? How can i compile the source-code?
There is no file->new->project from existing code in Visual Studio Express(!).
I have also already tried to install the pecl exptension with the pecl command. But this doesn´t work:
C:\xampp\php>pecl install ev No releases available for package
"pecl.php.net/ev" install failed
Check install.md file there are all informations what you need.
To be honest you can't install it doing with pecl command because there is information:
Currently GNU/Linux platforms supported only.
There is also manual installation guide but probably you would need to do it with MinGW/MySYS if any. I suppose you would need to edit sources.
mingw-w64 project has replaced mingw and mingw-build.
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.1/threads-posix/sjlj/
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.1/threads-posix/sjlj/
you can of course pick a different version number by going up to a parent dir in the file tree. for example, if you look in the personal builds, you would find the most up-to-date:
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/dongsheng-daily/4.9/
gcc uses not .lib files but instead .a files for libs, and php includes a .lib for devs, so immediately I know it's for VC++ (and it was compiled with that and it says so for the windows target download).
after you have correctly configured MSYS (not an easy job),
./configure;make;make install
./configure gives me the error:
configure: error: xml2-config not found. Please check your libxml2 installation.
libxml2 requires python, which certain windows antivirus packages remove from mingw-w64.
Related
I need to use PHP pthreads on Mac OS High Sierra, but Homebrew is no longer supporting downloads of PHP --with-thread-safety.
How do I get and install a thread safe version of PHP for Mac OS, Php v7.1.16 without homebrew?
If it is going to have to be some sort of manual install - does anyone have step by step directions for the mac or know where I can get instructions?
I have been looking on the internet for instructions for 5 hours now. I'm tired and can't believe that no one has any posted info on this.
I was able to get PHP 7.2.5 installed on Mac OS HighSierra with ZTS/Thread safety by using phpbrew.
Install Steps I took:
Downloaded phpbrew from http://phpbrew.github.io/phpbrew/ and installed with their directions. Please note at the end of the installation, they give you further instructions for setting up your ~/.bashrc to load phpbrew, look for them at the terminal.
Once you have phpbrew running you are ready to install php with zts by using the command below (of course you can install all of the extensions that you like by checking the installation for extension instruction)
phpbrew install php-7.2.5 +openssl='/usr/local/opt/openssl/' -- --enable-maintainer-zts --with-curl=/usr/local/
It is important to have openssl and curl already installed before installing php and you must point to their location on your computer at the install line as I have done above. You can add all the extensions you need, but you must have the openssl and curl because I had a ton of problems with installation without them. But you could try omitting.
For those of you who are using PHP ZTS so that you can go on to install pthreads --ONLY PHP 7.2 and above works with Krakjoes pthread-master which you can download and follow the installation at https://github.com/krakjoe/pthreads
Background:
1. How can i install gearman php extension on Windows OS?
2. Installing gearman PHP extension on Windows using cygwin and pecl
Following the answer in 1. question, I've made my cygwin work, downloaded and compiled gearman, and got the first gearman worker example to work:
Problem:
To run the same example from PHP script, I still need PHP extension. Somewhere I've seen that I might get to install PECL extension using PEAR, so:
I've downloaded go-pear.phar into C:\...\php5.6.16
ran php go-pear.phar
installed PEAR in system mode -> success
Now I can do: C:\...\php5.6.16>pecl install gearman which gives:
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl
channel-update pecl.php.net" to update
downloading gearman-1.1.2.tgz ...
Starting to download gearman-1.1.2.tgz (30,961 bytes)
.........done: 30,961 bytes
3 source files, building
ERROR: The DSP gearman.dsp does not exist.
Which would indeed be a sorcery if it worked, as that extension should be probably built/compiled accordingly to PHP itself. What is the least painful way to make this work? Is there a way how to do this without installing Visual Studio? I've also seen Net_Gearman PEAR package that might perhaps be wrapped / tweaked to be used just as the PECL one?
I'm currently using WAMP3.1.1 with PHP5.6.16 it comes with + VC15 x64 Thread Safe PHP7.2.2, need Gearman to work with at least one of those two. Any help appreciated
I've followed these 2 guides:
https://www.sitepoint.com/compiling-php-from-source-on-windows/
https://wiki.php.net/internals/windows/stepbystepbuild
1. I've downloaded:
Visual Studio 2012
.NET Framework 4.7.1 (which at the end just flashed a message that it's already installed)
Windows SDK _X_EN_DVD.iso
php-sdk-binary-tools-20110915.zip
deps-5.6-vc11-x64.7z (dependencies)
php-src-php-5.6.16.zip (GitHub release)
2. Compiled PHP
(note this is all from Native Tools Command Prompt, I didn't even actually start VS at all)
used just configure --disable-all --enable-cli --enable-pdo
3. Tried to compile PECL Gearman
found out it can't really be done on Windows
4. Found Gearman wrapper for Windows:
mhlavac/gearman on GitHub
I am trying to install phpdbg on OS X. The docs say to cd to /usr/src ... I don't have that directory. What normally goes in /usr/src/php-src/sapi? The php source? If so, where can I find the equivalent directory on OS X? I can't find a php-src directory using finder.
From the docs:
Installation To install phpdbg, you must compile the source against
your PHP installation sources, and enable the SAPI with the configure
command.
cd /usr/src/php-src/sapi
git clone https://github.com/krakjoe/phpdbg
...
In the docs, the directory /usr/src/php-src is used as a sample location to indicate the source directory the copy of PHP compiled on your system. Instead, use the directory containing the source for your local PHP install.
If you installed PHP through a package manager instead of compiling it yourself, find the corresponding source package in the package manager, install the source package, and use the directory it installed to instead of /usr/src/php-src.
You will also need to use the same compiler and toolchain used by the upstream package manager.
If you use homebrew, it's easy.
With PHP 5.6, I think it's included by default. I haven't upgraded from PHP 5.5, yet.
I already had php55 installed (substitute install for reinstall if this is a new install).
brew reinstall php55 --with-phpdbg
(This is reported to work for PHP 5.4 too. I haven't tried it.)
I was able to successfully install the mcrypt extension on Mountain Lion but I'm having a difficult time installing the extension on Mavericks.
For reference, I'm following this guide: http://www.coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-9-mavericks-development-server/
The only inconsistency I've noticed is that by running php -v from the command line, I'm showing PHP version 5.3.15 - whereas the web server appears to be running 5.4.17. I downloaded 5.4.17 to compile mcrypt.
Basically, everything runs according to plan until the very end. Rather than installing the shared extensions into the new directory, /usr/lib/php/extensions/no-debug-non-zts-20100525, I get a message that says:
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
EDIT:
The issue appears to be that the web server's PHP was compiled with module API: 20100525 and the system is still using 5.3.15 (which is API: 20090626), hence the error.
I'm assuming you can't (easily) update the system version of PHP. What do I need to do to get the module and PHP APIs to match?
Thanks in advance for any help.
For reference of others finding this thread..
Here is an automated Mcrypt installer for 10.8 and 10.9.
http://topicdesk.com/downloads/mcrypt/mcrypt-download
Less than a minute to install this way.
I noticed that php 5.4.17 is located in /usr/bin and 5.3.15 is in /usr/local/bin,
so I:
created symlinks in /usr/local/bin to phpize and php in /usr/bin.
After I verified that phpize -v and php were pointing to the correct version, it was simply a matter of recompiling the mcrypt extension. After doing so, the extensions were installed in the correct directory:
Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20100525/
I think in retrospect all I needed to do was add /usr/bin to my path variable so that it checks /usr/bin before /usr/local/bin.
I've been trying to install some PECL extensions on my laptop, but I've ran into a few problems. Whenever I run pecl install whatever from the command line I get a message saying ".\php.exe appears to have a suffix .exe, but config variable php". It seems like PECL is using PEAR to perform installations. I checked and php_suffix is located in the files PEAR_Config.php and PEAR_Builder.php, but I'm not sure what to do with it in there.
Any ideas on how to fix this or workarounds? Unfortunately the pecl4win seems to be down, and http://downloads.php.net/pierre/ the site I usually go to for the .dll's has outdated versions for the version of PHP I'm using (5.3.1).
Unfortunately I don't know the specifics, but at least I can point you in the right direction To use pecl on windows, you need to setup Visual Studio c/c++ or MingW32 c/c++ and then configure pecl to use either compiler for building the requested extensions.
Unlike pear packages, pecl packages are PHP c extensions that needed to be compiled against your local PHP install.
Update
https://wiki.php.net/internals/windows/stepbystepbuild A mostly friendly wiki page on setting up a windows box for building PHP from source. Looks like you need to build the interpreter and support libraries before you can get pecl working.