Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find license with LibXL 3.8.0.0 #208

Closed
bf0x0r opened this issue Jul 19, 2017 · 21 comments
Closed

Unable to find license with LibXL 3.8.0.0 #208

bf0x0r opened this issue Jul 19, 2017 · 21 comments

Comments

@bf0x0r
Copy link

bf0x0r commented Jul 19, 2017

Running into issues with PHP Excel finding the LibXL license in PHP 7. Versions running are Oracle RHEL 7.3, PHP 7.1.7, LibXL 3.8.0.0 and the php7 branch of PHP Excel.
I am using the example in the README and getting the the trial message, even with a valid license. Below are the steps used to compile and the test results. I saw Issue #163 had troubles with the license as well. Pulled down the repo as of d3a245c and still had issues.

It appears I am able to peg the repo version to d3a245c and get it to work with LibXL 3.6.5.0, but we need to update to LibXL 3.8.0.0. Any thoughts?

cd /usr/local/
wget http://www.libxl.com/download/libxl-lin-3.8.0.tar.gz
tar xzfv libxl-lin-3.8.0.tar.gz
rm -rf libxl-lin-3.8.0.tar.gz
git clone -b php7 https://github.com/iliaal/php_excel.git php_excel
cd php_excel
phpize
./configure --with-excel=shared --with-libxl-incdir=/usr/local/libxl-3.8.0.0/include_c --with-libxl-libdir=/usr/local/libxl-3.8.0.0/lib64
make
make test

=====================================================================
PHP : /usr/bin/php
PHP_SAPI : cli
PHP_VERSION : 7.1.7
ZEND_VERSION: 3.1.0
PHP_OS : Linux - Linux example.com 4.1.12-94.3.6.el7uek.x86_64 #2 SMP Tue May 30 19:25:15 PDT 2017 x86_64
INI actual : /usr/local/php_excel/tmp-php.ini
More .INIs :

PHP : /usr/bin/phpdbg
PHP_SAPI : phpdbg
PHP_VERSION : 7.1.7
ZEND_VERSION: 3.1.0
PHP_OS : Linux - Linux example.com 4.1.12-94.3.6.el7uek.x86_64 #2 SMP Tue May 30 19:25:15 PDT 2017 x86_64
INI actual : /usr/local/php_excel/tmp-php.ini
More .INIs :

CWD : /usr/local/php_excel
Extra dirs :
VALGRIND : Not used

TIME START 2017-07-18 16:25:08

FAIL LibXL licensed version vs trial version test [tests/000.phpt]

@Jan-E
Copy link
Collaborator

Jan-E commented Jul 19, 2017

Is not this caused by the fact that you do not have an .ini-file with a
excel.license_name=
excel.license_key=

@bf0x0r
Copy link
Author

bf0x0r commented Jul 19, 2017

Those are in a license.ini that is loaded in PHP. I can call them such as:

$useXlsxFormat = true;
$license_name = ini_get('excel.license_name');
$license_key = ini_get('excel.license_key');
$xlBook = new \ExcelBook($license_name, $license_key, $useXlsxFormat);

If I echo those values, it will show the proper values, but PHP Excel does not accept them.

@Jan-E
Copy link
Collaborator

Jan-E commented Jul 19, 2017

Yes, but license.ini is not loaded when running tests/000.phpt

@bf0x0r
Copy link
Author

bf0x0r commented Jul 19, 2017

When running the test with d3a245c and libxl-3.6.5.0, the tests/000.phpt pass and the Demo message is not displayed in the xlsx file.

The test fails when I use the updated php7 branch and libxl-3.8.0.0. When I make install and then run the sample script in the readme file, the demo message is displayed as well. It seems that after LibXL 3.6.5.0 and d3a245c there are issues with loading the license file, which is what I running into. Do we need to pass an include on the license file when configuring PHP Excel? If so, what should that be?

@Jan-E
Copy link
Collaborator

Jan-E commented Jul 19, 2017

How old is your license? Could it be that it is too old? With my old license, libxl-3.6.5.9 is the latest version that does not show the 'Please renew your license' in the test. Except the ExcelBook('bar', 'baz') test, of course.

@bf0x0r
Copy link
Author

bf0x0r commented Jul 19, 2017

We initially got this license in early 2015.

@Jan-E
Copy link
Collaborator

Jan-E commented Jul 19, 2017

That might be the problem. Mine is from the time that LibXL had release 3.6.2: 2015-04-28

@Jan-E
Copy link
Collaborator

Jan-E commented Jul 19, 2017

3.6.5.41 (Win) still works with my old license. 3.7.0.2 fails. Where did I get those:
ftp://xlware.com/build

@bf0x0r
Copy link
Author

bf0x0r commented Jul 19, 2017

I've been able to get this compiled on another server running with the same commands in the OP, so this may be specific to the server/VM. Is there any case sensitivity paths with checking for licenses?

@bf0x0r
Copy link
Author

bf0x0r commented Jul 19, 2017

@Jan-E
Copy link
Collaborator

Jan-E commented Jul 19, 2017

Did 'make test' run flawlessly?
Looks like configure is checking the php.ini to which phpize points to.

After updating my license, this:

export CFLAGS=-I/usr/local/include/libxml2
export CPPFLAGS=-I/usr/local/include/libxml2
./configure --with-excel=../libxl-3.8.0.0/ --with-libxl-libdir=../libxl-3.8.0.0/lib64 --with-libxl-incdir=../libxl-3.8.0.0/include_c --with-libxml-dir=/usr/local/lib

resulted in

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   47
---------------------------------------------------------------------

Number of tests :   91                91
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    0 (  0.0%) (  0.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   91 (100.0%) (100.0%)
---------------------------------------------------------------------
Time taken      :    7 seconds
=====================================================================

on CentOS 6

@bf0x0r
Copy link
Author

bf0x0r commented Jul 19, 2017

=====================================================================
TEST RESULT SUMMARY

Exts skipped : 0
Exts tested : 55

Number of tests : 94 94
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 25 ( 26.6%) ( 26.6%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 69 ( 73.4%) ( 73.4%)

Time taken : 7 seconds

=====================================================================
FAILED TEST SUMMARY

LibXL licensed version vs trial version test [tests/000.phpt]
Excel date pack/unpack tests [tests/002.phpt]
Numeric Data format tests [tests/006.phpt]
Text rotation test [tests/009.phpt]
Text indentation [tests/010.phpt]
Border Styles [tests/012.phpt]
Border Colors [tests/013.phpt]
Diagonal Border Test [tests/014.phpt]
Fill Pattern Test [tests/015.phpt]
Locked Format [tests/016.phpt]
Hidden Format [tests/017.phpt]
Cell Format Detection [tests/027.phpt]
Width/Height Checks [tests/029.phpt]
Area Clear [tests/034.phpt]
Column/Row insertion/removal [tests/035.phpt]
Row Read [tests/047.phpt]
Column Read [tests/048.phpt]
Row Write [tests/049.phpt]
Column Write [tests/050.phpt]
Sheet protection test [tests/051.phpt]
Test the SKIP_NULLS options, that skips null when writing data [tests/074.phpt]
Test the ExcelSheet::mergeSize(), ExcelSheet::merge(), ExcelSheet::delMergeByIndex() methods introduced in libxl 3.6.0. [tests/076.phpt]
Sheet::colHidden(), Sheet::rowHidden(), Sheet::setColHidden() and Sheet::setRowHidden() [tests/078.phpt]
test Sheet::isLicensed() [tests/086.phpt]
A bug that casues numberic fields with custom formats to be dectected as dates [tests/number_format_bug.phpt]

@Jan-E
Copy link
Collaborator

Jan-E commented Jul 19, 2017

Before updating my license I got roundabout the same test results.

@Jan-E
Copy link
Collaborator

Jan-E commented Jul 19, 2017

With php 7.1.7 on CentOS6 and an updated license the tests result in:

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   44
---------------------------------------------------------------------

Number of tests :   94                94
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    2 (  2.1%) (  2.1%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   92 ( 97.9%) ( 97.9%)
---------------------------------------------------------------------
Time taken      :    8 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Excel date pack/unpack tests [tests/002.phpt]
Sheet protection test [tests/051.phpt]
=====================================================================

@bf0x0r
Copy link
Author

bf0x0r commented Jul 20, 2017

One new finding is that it appears to be specific to VMs deployed with VirtualBox. VMs deployed with VMWare the issue does not exist. We use both and need this to work on both. Any ideas?

@cjsfj
Copy link

cjsfj commented Jul 26, 2017

I'm able to reproduce this with PHP 7.1.7 and CentOS 7 on latest VirtualBox. The license test fails:

FAIL LibXL licensed version vs trial version test [tests/000.phpt]

Then a bug that I may have found a problem with PHP:

A bug that casues numberic fields with custom formats to be dectected as dates [tests/number_format_bug.phpt]
=====================================================================

You may have found a problem in PHP.

This report can be automatically sent to the PHP QA team at
...

Oddly this doesn't have an issue with a VMWare-based VM.

@Jan-E
Copy link
Collaborator

Jan-E commented Jul 27, 2017

Is this with a recent license? After renewing my license, this issue was solved on a physical machine with centOS6 and PHP 7.1 for me.

@johmue
Copy link
Contributor

johmue commented Jul 27, 2017

Do not trust so much in the isLicensed() test. It relies on a string served by libxl that is dependend from the OS. If you do not have a proper license there should actually fail a lot more tests. ... also from my understanding libxml dependencies should have been removed in the php7 branch.

@cjsfj
Copy link

cjsfj commented Jul 27, 2017

Thanks for the feedback. I've contacted libxl support to confirm our license.

@cjsfj
Copy link

cjsfj commented Sep 7, 2017

Ours was fixed with a new license file.

@bf0x0r
Copy link
Author

bf0x0r commented Sep 7, 2017

Getting a new license file addressed the issue.

@bf0x0r bf0x0r closed this as completed Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants