zenphoto forums » Bug Discussion

Bug? file_put_contents problem with php 4

(7 posts)

Tags:

  1. reef

    Member
    Joined: Apr '09
    Posts: 23

    Hi,

    I just did a fresh install of 1.2.6rc2 on a server that has php 4.3.11 available. I have asked the hostingprovider to give me access to a newer version of php as I know this is less than the recommended/required version.

    But in the meantime setup.php gives me a curious fatal error:

    Fatal error: Call to undefined function: file_put_contents() in /home/.sites/39/site9/web/zp-core/setup.php on line 1097

    Isn't this function php 5 and higher, so should not be used for php 4?

    Hope this helps in some way :-)

    regards,

    Bob

    Posted 3 years ago #
  2. divan

    Member
    Joined: Jul '09
    Posts: 25

    It's not a bug, but I hit this as well, while trying 1.2.6 RC1. You should use php5. Add the following line to your .htaccess:

    AddHandler application/x-httpd-php5 .php

    Posted 3 years ago #
  3. reef

    Member
    Joined: Apr '09
    Posts: 23

    Hi Divan,

    Thanks for the tip. However adding that line to the .htaccess just makes my browser want to download the page instead of it being executed.

    I googled and found all kinds of variations but these all have the same effect :-(

    regards,

    Bob

    Posted 3 years ago #
  4. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,511

    Thanks for the note. We develope on PHP 5 and sometimes we miss something. But we recommend PHP 5 anyway. Also, stated here http://www.zenphoto.org/2009/07/version-126-rc1/ Zenphoto 1.2.6 raises its requirements a little

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #
  5. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,511

    @reef: I suggest to contact your host if you want to change the php versions.

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #
  6. reef

    Member
    Joined: Apr '09
    Posts: 23

    Hi Acrylian,

    I already contacted the host to change the versions for me but wanted to pass on the error anyway.

    thanks!

    Bob

    Posted 3 years ago #
  7. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,820

    file_put_contents is indeed a PHP5 function. We will have to correct that.

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #

RSS feed for this topic

Reply

You must log in to post.