Running on PHP 5.4
-
Please upgrade the code of FOG to run under PHP 5.4.
-
I run PHP 5.4
All seems to work as expected!
-
[quote=“Tom Elliott, post: 18232, member: 7271”]I run PHP 5.4
All seems to work as expected![/quote]
After correcting some code in the TaskScheduler, it starts to work. Can you add members to groups for e.g.? Don’t you have an apache log full of errors like this:
nit.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: id in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: imageid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: sub in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: snapinid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: userid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: storagegroupid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: storagenodeid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: crit in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: sort in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: userid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: confirm in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: tab in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: fog_user in /var/www/fog/management/index.php on line 44, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: uname in /var/www/fog/management/includes/processlogin.include.php on line 17, referer: [url]http://absinth/fog/management/index.php[/url]
[Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined variable: Proxy in /var/www/fog/commons/functions.include.php on line 3506, referer: [url]http://absinth/fog/management/index.php?node=images[/url]
… -
What version of fog are you using?
0.32 is not what I’m modifying, but I assure you 0.33b is running fine on php 5.4
-
It is 0.32.
If 0.33 gets further delayed for various reasons, it would be nice a PHP devel could port the existing to work on PHP 5.4. and release it as 0.32.1 or so. I think there are many people out there, who do not want to feed their work horse beta carrots and use 0.32 until 0.33 will be released. Unfortunately Debian squeeze is already oldstable and wheezy brings PHP 5.4.
I guess for a resonable talented PHP developper it shouldn’t take too long to port the code, it’s just very uninspiring work to do…
-
While I’m sure I could figure out how to fix this issue, it seems rather odd that you only have to replace a few referenced variables, when there’s actually quite a bit throughout the pages. It only errors at specific times. In 0.33 there’s also a ton of referenced variables. If we had a listing of all the ‘deprecated’ code used that’s causing the issue, I might have a better standpoint. But seeing as this issue seemed to be irrelevant in php releases prior to 5.4, why not setup your apt-get repo’s to point to the squeeze / oldstable branches, degrade php 5.4 to php 5.3, exclude with apt-mark hold, then change the repo’s back to wheeze branch?
I’m not too familiar with debian, but this ought to do the job for you.
I know it’s a little extra work, but ultimately it’s easier to do that than have to wait for a developer to change all the ‘deprecated’ code through all of the files.
-
[quote=“Tom Elliott, post: 18239, member: 7271”]degrade php 5.4 to php 5.3, exclude with apt-mark hold, then change the repo’s back to wheeze branch?
[/quote]This is easy, but there will be a time when squeeze gets unsupported. It doesn’t seem to me that 0.33 will be released in the somewhat near future. And what if there are other PHP projects from wheezy running on that server that do require php 5.4? So your suggestion is just a work around.
For those who want to know, how to downgrade php on Debian wheezy to 5.3 from squeeze to use with fog: Use apt-pinning.
- add squeeze to /etc/apt/sources.list: deb [url]http://ftp.debian.org/debian/[/url] squeeze main contrib non-free
- create /etc/apt/preferences.d/preferences:
Package: php5*
Pin: release a=oldstable
Pin-Priority: 700Package: libapache2-mod-php5
Pin: release a=oldstable
Pin-Priority: 700Package: *
Pin: release a=stable
Pin-Priority: 600- save your php.inis from /etc/php5/cli/php.ini and /etc/php5/apache/php.ini to where ever
-> you will need them again, when upgrading back to php 5.4 - apt-get update
- apt-get dist-upgrade
- review the php.inis
- service FOGImageReplicator restart
- service FOGMulticastManager restart
- service FOGScheduler restart
- service apache2 restart
-
Those are just notices, so you can safely ignore them, or disable the E_NOTICE level in error_reporting. If you have reference passing errors, you can remove them by replacing &$tmp by $tmp in most PHP files.
-
This post is deleted!