PHPSpreadsheet issue with PHP v5.5 - php

This isn't particularly a coding question.
I have a script running locally (PHP V5.6) and it's absolutely perfect.
However, I FTPd it to our dev server to run as a cron and it failed. Our server has php v5.5 running for dependancy issues. Is there any way I can user composer require to install phpspreadsheet on a machine running PHP 5.5?

PHPSpreadsheet was deliberately written for PHP >=5.6.0 because I was fed up with the way people had made death threats to me for even suggesting that the minimum version of PHP required to run its predecessor (PHPExcel) should be increased from PHP 5.2 to take advantage of newer features of the language to reduce the codebase and memory footprint, and make it more performant
PHPSpreadsheet uses features of PHP that are only available in PHP 5.6 or above, and will soon drop support for even that version when Security support ends for that version of PHP on 31 Dec 2018, and require a minimum of PHP 7.1.0
If you need to create spreadsheets using older unsupported versions of PHP, then you can't use PHPSpreadsheet, and can only use its predecessor PHPExcel

No, PhpSperadsheet requires v5.6 or above.
In the docs # https://phpspreadsheet.readthedocs.io/en/develop/
Software requirements
The following software is required to develop using PhpSpreadsheet:
**PHP version 5.6 or newer**
PHP extension php_zip enabled
PHP extension php_xml enabled
PHP extension php_gd2 enabled (if not compiled in)
Try upgrading PHP.

Related

php extension compatability with php 5.6.6 or higher

Is any one installed the following library or extension (curl,libcurl,pearl,pecl,mongodb driver for php) with php 5.6.6 or higher not 7 in Ubuntu 14
I have used all of this with php 5.5 now I afraid of version compatibility,
if any one ensure me to can I migrate from Ubuntu 12.0.4 to 14 and php 5.5 to 5.6.6 or higher ?
The library or extension are third party softwares which they are developed by there own and able to bind in PHP or any other language.
E.g. CURL library is developed in C and it can be used or bind in many different languages.
Also it is good to stay always up-to date, while upgrading to new version E.g PHP, you can check the change-log of version and base on that you can understand, Is any library supporting change or not.
Many Web Servers are always try to upgrade or staying latest versions of languages or you can also inform them to upgrade server base on requirement and they will do, so it is no worry about server configuration.
From my system I upgraded from Ubuntu 12.4 to 14.4 and currently PHP version is 5.5.9 and every library is working fine.
And thing is that when the language version upgraded some good stuff also come, some bugs are fixed. So its cool stuff to always stay up

Failed installation of zend-escaper with Composer

I'm trying to install zend-escaper but I'm getting this error:
This is strange as my PHP version (from phpinfo()) is 5.5.19, the message claims it is 5.3.5(!) which should satisfy the requirement anyway.
My ZF version is 1.12.13
I'm using PHP Storm
Can anyone help please?
Thanks
Tomasz
The PHP version on the command line can be a different executable than the PHP running inside the web server. It also can use a different pho.ini configuration file.
So if Composer states the PHP it is using is 5.3.5, this is correct because Composer is directly asking the PHP it is running on for its version. The problem is when this PHP version on the command line is way older then the PHP version in the web server.
Try to update your command line PHP.
Some more things to say: the version 5.3.5 is lower than the required 5.3.23, because the last number in the version is 5 compared with 23, and 5 is less than 23. So the version you are using is below the minimum requirement for zend escaper - at least in the version 2.5.1 you try to use. Such an old PHP was last supported in the 2.2 framework versions, so you might as well try to depend on ~2.2. However this will simply be a workaround for the old cli version.
One other note: You are in the process of installing a zend framework 2 component - don't expect your installed zend framework 1 to support any fancy stuff on its own. It is possible to mix classes with namespaces and without, and even use zf2 things together with zf1, but zf1 won't offer any automatic functionality to use these.

Upgraded from PHP 5.3 to PHP 5.6.5 and now no php_oci8.dll

I use php_oci8.dll in our application to access an Oracle 8 database server. I upgraded our PHP version from 5.3 to 5.6.5 and now there is no php_oci8.dll in the ext/ folder.
Can I just copy it from the old version?
php_oci8.dll is a very old library used with very old version of Oracle
Now there is a newer version for this library, like php_oci8_11g
The question is : what is the version of Oracle that you use ?
From http://php.net/manual/en/oci8.requirements.php
The OCI8 1.4 extension is included with PHP 5.3, PHP 5.4 and PHP 5.5. It is also available from PECL.
Read: not incliuded in PHP 5.6 (which is a good thing, not pulling in every single DB interface into the main tree)
Just download that stuff from PECL.
You might need to rebuild it from source, though, if whatever Oracle DB client Libraries you use don't match the needs of the OCI8 in its current version
EDIT: Don't do this, OP. Are you really using Oracle 8i? That has seen its last update in 2003 and should not be used for security reasons, any more. Seriously, how do you even run this on a modern Operating system? Or do you have a Windows XP machine running as a server exposed to the internet somewhere?!

PHP 5.3: how to add PDFlib?

I recently upgraded my Linux server from Apache 2.1 to 2.4 and PHP 5.2 to 5.3. Previously I was using pdf.so from PDFlib fine, but when I tried to install it, as downloaded from here,
http://www.pdflib.com/download/free-software/pdflib-lite-7/
PHP failed to load the module as it was compiled in for PHP 5.3. This install was done using the newest version of PDFlib that I could find, 9.0.2.
Anyone know whether this is possible? I've already got things coded in PHP for PDFlib and prefer not to use another library unless the commands are the same.
UPDATE
Has anyone successfully used PDF Lite with PHP 5.3?
You must compile it. Currently no build is available for PHP 5.3.
On the Download-Site, READ the info:
PDFlib Lite source code must be compiled to generate a usable library. PDFlib GmbH does not offer precompiled (binary) versions of PDFlib Lite.
If you have compile errors, check out the error logs - What say it? Yep, i think you need additional sources for compiling (mostly).

How to build a PHP extension that runs in many PHP versions?

I have created a PHP extension using C++. I want to ship my extension to my clients in its binary form. That means I need to build a separate version of it for each PHP version (5.2, 5.3, 5.4, 5.5) and each processor architecture.
My questions are:
why do they keep updating the API timestamp while the API itself seemingly does not change? Wouldn't it remove a lot of headache while upgrading your system to use the next version of PHP? Just for comparison, I also have a version of my extension for MS Excel using the XLL API and that API has remained backwards compatible since 2003 which allows me to have just two binaries (32 and 64 bit) for all of my clients.
Is there any way around this problem? I.e. is there a way to build a PHP extension that can be run in multiple PHP versions?
Maybe you can try a hybrid approach. Compile your C++ library separately and then create an open source PHP extension wrapper for that. The PHP extension has nearly no logic of its own. It converts data types from PHP to C/C++ back and forth and passes the arguments to functions/methods implemented in your C++ library.
You then just maintain a binary version of your library per platform and the adoption to a particular PHP version is done by the open source PHP extension.
This of course requires that the systems of your customers do have the PHP development packages installed, as well as a compiler.

Categories