xdiff_file_diff() installation

Problems with the Windows version of XAMPP, questions, comments, and anything related.

xdiff_file_diff() installation

Postby gabier » 11. December 2015 18:22

Hello,

I would like to install the xdiff_file_diff() command in the PHP of my xampp 3.2.1 running on a Windows 7 PC 64bits. I found a "php_xdiff.dll" file, I put it in the php/ext directory, I inserted the "extension=php_diff.dll" in the php.ini file. But the small test script keeps issuing the same error message:
Code: Select all
Fatal error: Call to undefined function xdiff_file_diff() in ......\Xdif_test.php on line 6

I have read that this command has some dependencies, especially with the libxdiff library. But I have not found any tutorial on how to install these dependencies in XAMPP.
Anybody has something on this subject, or at least on the way to install php extensions in xampp ? I have searched the forum on similar subjects, but I could not find any thread specific enough.

:) gabier
gabier
 
Posts: 10
Joined: 29. March 2013 18:22
Operating System: Windows 7

Re: xdiff_file_diff() installation

Postby Nobbie » 11. December 2015 19:56

gabier wrote:But I have not found any tutorial on how to install these dependencies in XAMPP.


You cannot extend Xampp PHP by foreign modules. This is impossible.

Either ask Bitnami in order to integrate the module, or dont use Xampp.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: xdiff_file_diff() installation

Postby gabier » 11. December 2015 20:03

Nobbie wrote:You cannot extend Xampp PHP by foreign modules. This is impossible.
Either ask Bitnami in order to integrate the module, or dont use Xampp.


:( Too bad !!! Thanks, I save time not searching anymore ...
gabier
 
Posts: 10
Joined: 29. March 2013 18:22
Operating System: Windows 7

Re: xdiff_file_diff() installation

Postby Nobbie » 11. December 2015 20:23

gabier wrote: :( Too bad !!! Thanks, I save time not searching anymore ...


Yes and no. Bad for you - but dont forget, Xampp is designed for beginners and people, which like to develop and test their own scripts and files, without the need of having a webserver online. Xampp is a distribution for a webserver on localhost, which comes with with a certain (very big) package and easily runs out of the box. The price you pay for this easy installation: very hard (or impossible) to extend. Most people are happy with the package. Only if you need to extend the package, it is better to install Apache/PHP/MySQL/Perl separately and manually, this gives you full flexibility. But requires certain knowlegde, which is not required by Xampp.

There is no "out of the box" package (or distribution) plus "easy to extend". This (unfortunately) is impossible (for many reasons).
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: xdiff_file_diff() installation

Postby gabier » 12. December 2015 15:32

Nobbie wrote:There is no "out of the box" package (or distribution) plus "easy to extend". This (unfortunately) is impossible (for many reasons).


I have thought about it, and I am not sure the reason of my problems is the Xampp design.
Generally speaking, I understand that it can be impossible to integrate a foreign module, but in my case is it really foreign ? There is a Windows dll for this command, this means that it can work in a Windows php context.
Moreover am I wrong if I think that the XAMPP's php uses these windows dll that we can find in the php/ext directory for many php extensions ? The names of these dlls give evidence that many of them are there in order to implement php extensons to the core langage Thus it could work also for the xdif extensions. Maybe there is a reason why it can't work, but I doubt this is a fundamental XAMPP design reason, unless the xdif extension has a special feature that I overlooked.

:) gabier
gabier
 
Posts: 10
Joined: 29. March 2013 18:22
Operating System: Windows 7

[SOLVED]: xdiff_file_diff() installation

Postby gabier » 14. December 2015 09:29

Hello,
For people who would like to compare files in php and would also,like to test it wih xampp, I have found a php class written in php at
http://code.stephenmorley.org/php/diff-implementation/
I have tested it for 2 text files and it seams to work.

No need for the xdiff_file_diff extension

:) gabier
gabier
 
Posts: 10
Joined: 29. March 2013 18:22
Operating System: Windows 7

Re: xdiff_file_diff() installation

Postby Boboli » 29. August 2022 18:45

I know this is a very old topic. But I also just searched and found a solution and would share it here briefly.

1. You can download here the DLL for your php version from https://windows.php.net/downloads/pecl/ ... iff/2.1.0/
TS = Thread-Safe / NTS = Non-Thread-Safe
Check your phpinfo() or command-line:
> php -i|find "Thread Safety"

2. Copy DLL from ZIP to xampp\php\ext

3. Open xampp\php\php.ini
go to section "Dynamic Extensions" and append
extension=php_xdiff.dll

Thats all, Download, Copy, Add and restart your xampp. Working :)
Boboli
 
Posts: 14
Joined: 05. August 2018 15:01
XAMPP version: 7.4.24
Operating System: Windows 11


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 99 guests