-
Notifications
You must be signed in to change notification settings - Fork 131
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
License ignored ? #163
Comments
+1 |
Can you do a grep for HAVE_LIBXL_SETKEY inside the excel compilation directory and see if that is defined? In my tests here license works correctly, as all excel tests pass. This define determines if the license is to be used... |
Also make sure you've ran the ./configure command before the compilation, because if you didn't and replied on previous run the define won't be there and license won't work. |
Hi Ilia, Here's the files where I found 'HAVE_LIBXL_SETKEY' just after unzip and run phpize : Right after that I call configure, then make and make install (see the complete steps in PS, it may give you some more insights). But still no luck.
Is there a mistake in the install process ? Or maybe related to using pre-built binaries by ondrej (tested both php 5.6 and 7 without success on Ubuntu Xenial) PS: Installing and configuring the extension (assuming ondrej/php ppa, php7 and libxl in /opt/libxl-3.6.5) $ wget https://github.com/iliaal/php_excel/archive/Excel-1.0.2-PHP7.zip
$ unzip Excel-1.0.2-PHP7.zip
$ cd php_excel-Excel-1.0.2-PHP7/
$ phpize7.0
$ ./configure --with-php-config=/usr/bin/php-config7.0 --with-libxl-incdir=/opt/libxl-3.6.5/include_c/ --with-libxl-libdir=/opt/libxl-3.6.5/lib64/ --with-excel=/opt/libxl-3.6.5
$ make
$ sudo make install Check php-excel version $ php7.0 -d="extension=excel.so" -r "phpinfo();" | grep -i "Excel"
# Will show version
# > excel support => enabled
# > Excel Version => 1.0.2 Create a php test file called test_excel.php <?php
$license_name = '<MY_LICENSE_NAME>';
$license_key = '<MY_LICENSE_KEY>';
$book = new ExcelBook($license_name, $license_key, true);
$sheet = $book->addSheet('sheet 1');
$sheet->write(1, 0, 'Always works');
$sheet->write(0, 0, 'Works only with licensed version'); See output of $ php7.0 -d="extension=excel.so" ./test_excel.php
# PHP Warning: ExcelSheet::write(): Failed to write cell in row 0, column 0 with error 'can't write row 0 in trial version' in /home/sebastien/tmp/test_excel.php on line 8 |
Can you please run grep after configure, as configure supposed to set the That said being able to hardcore licensing settings during configure is an
|
Also here's the output of configure command, my attention have been caught on
Is there something that could be the cause ? PS/ full output
|
The problem is "checking for xlBookSetKeyA in -lxl... no" I just made a patch to the config.m4 file, which I think should fix the issue. Can you fetch latests sources and try again? |
Hi Ilia, You are great, it works !!! 👍 Thanks again and hope you'll still have time to enjoy the week-end. PS: |
Hello, @iliaal Good job! |
Current Version Released Here https://github.com/Gerst20051/php_excel/releases/tag/Excel-1.0.2.1-PHP5 |
Hi Ilia,
thank you so much for good work. Just updated some install scripts and realized that with the latest releases (1.0.2 both PHP5 and PHP7), the license seems to be ignored.
I've tested it with by passing it to the constructor
but also via php.ini settings (ini_set(...)) and two different version of LibXL (3.6.5 and 3.6.2)
Downgrading to v1.0.1 (php5) or johnmue php7 branch solves the license problem. It does not look to be about LibXL, neither unicode related stuff (no special chars in my license name, only a space and 2 capital letters, a bit like "John Doe").
Was there a change I'm not aware about license in v1.0.2 ? or someone has successfully made it works ?
Keep the good work, very useful for many and if I can help let me know.
Sébastien
PS:
Here two gist with with the example install script to quickly test installs on php7 and php5. Easy to exchange versions to test, don't use for other than testing, not really safe scripts
The text was updated successfully, but these errors were encountered: