Member
Member
kyrd   22-01-2015, 19:14
#1

hi, since a few months ago (my hoster upgraded the server to php5.4) every new post works well but in the homepage shows the following message:
Strict Standards: Only variables should be passed by reference in (...) /zenphoto/zp-core/class-image.php on line 1083

the hoster faq suggested to correct the script, giving this link http://php.net/manual/en/language.references.pass.php

I've tried to check the above line but nothing makes sense to me.

I'd rather correct manually the line instead of upgrading the whole zenphoto, as long time ago I've done some custom mods in the core system (e.g. added missing IPTC field which is working fine, nothing to see with this error message)
btw:
http://www.indirizzofantasma.net/zenphoto/
every new added image shows error message in the homepage, while the image page itself is ok.

Zenphoto versione 1.4.1.6 [8326] (Build ufficiale)
Impostazione lingua corrente: it_IT.UTF8
Tema corrente galleria: kird_zenpage
Versione PHP: 5.4.4-14+deb7u11)

I'm stuck... anybody there can suggest what's wrong and how to avoid the message? thanks in advance!

Administrator
Administrator
fretzl   22-01-2015, 19:54
#2

Unfortunately it's impossible to tell what could be wrong since you modified the core.
In the original class-image.php file (from the 1.4.1.6 release) line 1083 cannot possibly cause the error.

Member
Member
kyrd   22-01-2015, 20:24
#3

thanks for your fast reply!
Imho the error has nothing to do with my mods, which I did at the very beginning, and it has been working fine for hundreds of posts, while now the error went back to the very first post: this means that something which was working now (since the server was updated to php5.4) is not working well anymore...
I'm happy that you agree with me that that line has nothing to do with the error, I guess it has to do with zenpage -that's why I've posted here- not with zenphoto itself.

Administrator
Administrator
acrylian   22-01-2015, 21:08
#4

The note (it's not really an error) you now see is because some standards are stricter in newer PHP versions. Maybe after three years you should really consider an upgrade. Now you know why it is not recommended to modify the core … ;-) The current Zenphoto 1.4.6 works up to PHP 5.6.

Member
Member
sbillard   22-01-2015, 21:42
#5

The easiest solution would be to turn off checking strict standards in your error level.

Member
Member
kyrd   23-01-2015, 11:27
#6

I've realized that the notes don't show when I'm logged in admin, they appear again when I log out.
this might mean that some permissions are asked (with a deprecated syntax) to users?
@fretzl - the above means maybe is true that line 1083 is causing the error!?
@acrylian - well, yes, I'm aware that core shouldn't be touched by a common user as I am, but I was forced to find myself a solution to a missing IPTC field output (there are some posts in the forum...)
@sbillard - as a last chance, I'm trying to follow your suggestion, first from my backend:
... zp-core/admin-options.php?page=options&tab=image > in the "Original Image Protection" I've set the option to "unprotected"
... zp-core/admin-options.php?page=options&tab=plugin > in the "deprecated-functions" I've unchecked "all"
appearently nothing has changed...
is there anything else I can do as admin or is it better to check the hoster's control panel?

Administrator
Administrator
acrylian   23-01-2015, 12:09
#7

I don't remember about the missing IPTC field sadly. I do have a vast memory about something off the standard definition of metadata.

If you can point to a topic. Have you looked if that is fix meanwhile?

Normally you can change error reporting level on your server via htaccess or a php.ini. Depends on the host.

Member
Member
kyrd   23-01-2015, 12:30
#8

use the forum search! ;-)
http://www.zenphoto.org/support/topic.php?id=10680#post-62629

meanwhile I'll check the server htaccess

Administrator
Administrator
acrylian   23-01-2015, 12:49
#9

[i]use the forum search! ;-)[/i]
Hehe ;-) I had a vast memory of that topic indeed and that it was something off the standard. Given that wide investigation by our former colleague I fear there is not much to add …

Member
Member
kyrd   26-01-2015, 15:44
#10

after some (much) efforts and investigations I've done some steps forward. first of all I wasn't able to change the error permissions as @sbillard suggested, but I reconsidered that even if I succeded in that task it was like taking care of the symptoms and not of the disease. however:

  • as I stated in my previous post the error DIDN'T show while I was logged in

  • line 1083 was definitely responsible of the error [i]but[/i] in my class-image.php file (1.4.1.6)

  • this was my function, line 1083 being the last one:
    ` function checkAccess(&$hint=NULL, &$show=NULL) {

      $album = $this->getAlbum();
    
      if ($album->isMyItem($this->view_rights)) {
    
          return true;
    
      }
    
      return $album->checkforGuest($hint=NULL, $show=NULL);

    }

`
therefore I've checked what if I comment the whole function and everything worked fine, error removed.
then I downloaded the last build and replaced the whole old function checkAccess with the new version.
I did test intensively -as much I could- but site is now running well showing no errors!
Being not a coder I'm aware that some other problem could arise, so my question is: having pointed out which was the problem, do you recommend any other step?

Administrator
Administrator
acrylian   26-01-2015, 16:23
#11

Good that you are aware that copying one function from quite different versions is not encouraged. Sorry, the only other step is an proper upgrade to the current version.

Member
Member
kyrd   26-01-2015, 16:41
#12

well, yes... but what can I do? I'm forced to do so 'cause I'm not standard ;-)

Administrator
Administrator
acrylian   26-01-2015, 17:08
#13

Well, what can I say try to follow the standards :-)

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.