Results 1 to 6 of 6

Thread: Contao Check Tool | Server 500 error after PHP upgrade

  1. #1
    User
    Join Date
    03-17-10.
    Posts
    83

    Default Contao Check Tool | Server 500 error after PHP upgrade

    My hosting provider did an upgrade to PHP 5.6.14. After the upgrade all my sites run fine, and that since a few weeks already. However I recently noticed that when I install and try to run the Contao Check tool I get a server 500 error. I could not find anything wrong with the file permissions, so I am puzzled about what this may be.

    A manual install of Contao also worked without a problem. There only seems to be a problem when I try to execute the Contao Check tool.

    Any hints are appreciated.

  2. #2
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,287

    Default

    Do you have access to the server's error_log file?
    Contao Community Moderator
    → Support options

  3. #3
    User
    Join Date
    03-17-10.
    Posts
    83

    Default

    Quote Originally Posted by xchs View Post
    Do you have access to the server's error_log file?
    No, I may have to ask the provider if he is willing to provide a subset of the log-file.

  4. #4
    User
    Join Date
    03-17-10.
    Posts
    83

    Default

    I have contacted the provider. The log-file shows:

    Cannot redeclare posix_getpwuid() in ...../check/controller/bootstrap.php on line 173

  5. #5
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,287

    Default

    Hi,

    you might want to try this: edit the check/controller/bootstrap.php script, go to the bottom to line 171 (https://github.com/contao/check/blob....php#L171-L176) and replace
    PHP Code:
    // Add the posix_getpwuid function
    if (!function_exists('posix_getpwuid')) {
        function 
    posix_getpwuid($int) {
            return array(
    'name'=>$int);
        }

    with
    PHP Code:
    // Add the posix_getpwuid function
    if (!function_exists('posix_getpwuid')) {
        
    create_function('$int''return array("name"=>$int);');

    /*    function posix_getpwuid($int) {
            return array('name'=>$int);
        } */

    Contao Community Moderator
    → Support options

  6. #6
    User
    Join Date
    03-17-10.
    Posts
    83

    Default

    That fixed it - thank you.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •