concrete5.6 on PHP7
Permalink 1 user found helpful
Hi everyone
I've made some minor changes to concrete5.6 and merged a commit made by mkly a long time ago. After these changes I managed to install and run concrete5.6 on PHP7.
Please let me know if you find any issues!
Also, make sure you enable mysqli (i!)
Here's the pull request showing you what exactly had to be changedhttps://github.com/concrete5/concrete5-legacy/pull/1927...
Thanks,
Remo
---
# concrete5 Version
5.6.3.5b1
# concrete5 Packages
None
# concrete5 Overrides
None
# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
# Server Software
PHP 7.0.0RC6 Development Server
# Server API
cli-server
# PHP Version
7.0.0RC6
# PHP Extensions
bcmath, bz2, calendar, cli_server, Core, ctype, curl, date, dom, exif, fileinfo, filter, gd, gettext, hash, iconv, intl, json, libxml, mbstring, mcrypt, mysqli, mysqlnd, pcre, PDO, pdo_mysql, Phar, Reflection, session, SimpleXML, soap, sockets, SPL, standard, tidy, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, zlib.
# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 2M
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
I've made some minor changes to concrete5.6 and merged a commit made by mkly a long time ago. After these changes I managed to install and run concrete5.6 on PHP7.
Please let me know if you find any issues!
Also, make sure you enable mysqli (i!)
Here's the pull request showing you what exactly had to be changedhttps://github.com/concrete5/concrete5-legacy/pull/1927...
Thanks,
Remo
---
# concrete5 Version
5.6.3.5b1
# concrete5 Packages
None
# concrete5 Overrides
None
# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
# Server Software
PHP 7.0.0RC6 Development Server
# Server API
cli-server
# PHP Version
7.0.0RC6
# PHP Extensions
bcmath, bz2, calendar, cli_server, Core, ctype, curl, date, dom, exif, fileinfo, filter, gd, gettext, hash, iconv, intl, json, libxml, mbstring, mcrypt, mysqli, mysqlnd, pcre, PDO, pdo_mysql, Phar, Reflection, session, SimpleXML, soap, sockets, SPL, standard, tidy, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, zlib.
# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 2M
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
It's definitely faster in a way end-users can notice. I didn't run any proper benchmarks though.
In other words, I'll probably switch to PHP7 way too early..
In other words, I'll probably switch to PHP7 way too early..
I realized that I should add a note to my post above after a comment made by Korvin.
To get things working with PHP7 I had to hide all warnings! While we've been hiding notices and more for quite a while, hiding warnings is even worse.
Your own faults wouldn't show up and you'd have a hard time to track down errors.
That's the reason why I haven't merged my pull request yet, it's not clean and shouldn't be done the way I did. It's just meant as a preview for those who care and for me to see if there's an interest to use 5.6 on PHP7.
Use at your own risk!
To get things working with PHP7 I had to hide all warnings! While we've been hiding notices and more for quite a while, hiding warnings is even worse.
Your own faults wouldn't show up and you'd have a hard time to track down errors.
That's the reason why I haven't merged my pull request yet, it's not clean and shouldn't be done the way I did. It's just meant as a preview for those who care and for me to see if there's an interest to use 5.6 on PHP7.
Use at your own risk!
Sort of related to some of the warning stuff, is it possible to declare a method that can be called both statically and on and instance?
Or to declare static and instance methods having the same name?
... and in a way that is backward compatible with php5.2?
Just thinking of a hypothetical bug-case where a method now edited to be static has actually been called on an instance.
Or to declare static and instance methods having the same name?
... and in a way that is backward compatible with php5.2?
Just thinking of a hypothetical bug-case where a method now edited to be static has actually been called on an instance.
Not that I'm aware of and certainly not without hacks, not sure I'd want to go there.
I think getting rid of the warnings the correct way would break a few things. No one should use PHP7 without testing anyway..
I think getting rid of the warnings the correct way would break a few things. No one should use PHP7 without testing anyway..
Out of interest, do you notice any obvious performance improvements?