Upgrade to PHP 7 Runtime error

  • Hi- We upgraded our server to PHP 7 and now on our pages it seems the runtime reference isn't working for any secondary pages.


    I've tried.. <?php include('/perch/runtime.php'); ?> and include($_SERVER['DOCUMENT_ROOT'].'/perch/runtime.php');


    But nothing seems to work. Any ideas?

  • drewm

    Approved the thread.
  • Here's the diagnostics report. I'm fairly certain its the most up to date.

    Health check

    • PHP 5.6.17-pl0-gentoo is up to date

    • MySQL 5.6.43-84.3-56-log is up to date

    • Image processing available

    Summary information

    • Perch: 3.1.4, PHP: 5.6.17-pl0-gentoo, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $, with PDO
    • Server OS: Linux, cgi-fcgi
    • Installed apps: content (3.1.4), assets (3.1.4), categories (3.1.4), perch_forms (1.9.1), perch_gallery (2.8.9), perch_backup (1.2), perch_mailchimp (3.1)
    • App runtimes: <?php $apps_list = [ 'content', 'categories', 'perch_forms', 'perch_gallery', 'shafer_insightly', ];
    • PERCH_LOGINPATH: /perch
    • PERCH_PATH: /data/51/4/44/37/4696363/user/5566977/htdocs/perch
    • PERCH_CORE: /data/51/4/44/37/4696363/user/5566977/htdocs/perch/core
    • PERCH_RESFILEPATH: /data/51/4/44/37/4696363/user/5566977/htdocs/perch/resources
    • Image manipulation: GD Imagick
    • PHP limits: Max upload 100M, Max POST 100M, Memory: 64M, Total max file upload: 64M
    • F1: 3b606135b33e6a102526838f4152a807
    • Resource folder writeable: Yes
    • SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
    • REQUEST_URI: /perch/core/settings/diagnostics/
    • DOCUMENT_ROOT: /data/51/4/44/37/4696363/user/5566977/htdocs
    • HTTP_HOST: http://www.i-83beltway.com


  • I reverted back to 5.4 so I don't have the errors in front of me, but it wasn't running any of the Perch tags because it can't find runtime.php. If I set it to <?php include('perch/runtime.php'); ?> on the template, all the first level pages are working. But anything in a directory below that (i.e. projects/projectA) doesn't work. I know it's because the reference is incorrect, but I can't figure out how to reference the correct path. include($_SERVER['DOCUMENT_ROOT'].'/perch/runtime.php') doesn't work after switching.

  • It's clearly an issue with the hosting environment. I just tried installing a new instance of Perch on the host and am getting the same issue. This is using a fresh install of Perch on a shared hosting environment. Home pages are fine, but secondary pages can't find the runtime.php.


    &lt;br /&gt;

    &lt;b&gt;Fatal error&lt;/b&gt;: Uncaught Error: Call to undefined function perch_pages_title() in /data/2/5/74/155/5400970/user/6467411/htdocs/perch/templates/pages/default.php:6

    Stack trace:

    #0 /data/2/5/74/155/5400970/user/6467411/htdocs/home-sub.php(1): include()

    #1 {main}

    thrown in &lt;b&gt;/data/2/5/74/155/5400970/user/6467411/htdocs/perch/templates/pages/default.php&lt;/b&gt; on line &lt;b&gt;6&lt;/b&gt;&lt;br /&gt;


    http://njdotlocalaidrc.com/home-1.php <-- works

    http://njdotlocalaidrc.com/home-sub.php <-- doesn't work