Announcement

Collapse
No announcement yet.

PHP parse error when installing 7.1.7

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP parse error when installing 7.1.7

    Hello.

    I am installing Espo version 7.1.7 on Debian 11. My PHP version is 7.4.28
    When I attempt to view localhost, Apache redirects me to public/index.php as expected.
    However, at that point I am just seeing a blank page in the browser.
    The apache error log contains this message:
    "PHP Parse Error: syntax error, unexpected '{', expecting identifier (T_STRING) in /var/www/html/public/index.php on line 32"

    I have perused this forum, and the only recommendation I found was to upgrade PHP to version 7.4 or higher.
    My PHP version is already above 7.4, but I am still getting this error.

    Could you please help me debug this?

    Many thanks!

  • #2
    Hi,
    update php to 8.0 (it's ok)
    maybe 8.1 some library not ready (maybe now ready) but espoCrm is ready.

    Comment


    • yuri
      yuri commented
      Editing a comment
      EspoCRM 7.1.7 supports PHP v7.4! It's 100% true. When we state that we support a specific version it means that we really support. No other meaning.
      Last edited by yuri; 05-27-2022, 08:12 PM.

    • item
      item commented
      Editing a comment
      Hello Yuri,
      i know espoCRM support php 7.4.x .. but you drop version in next time.
      so this guy install new version and it's why install 7.4 ?

      my response it's just say : install 8.x .. so your are happy for some time,

      Best Regards

  • #3
    Hi,

    I bet your php version is not 7.4 but much much lower. Create a file in the public directory:

    PHP Code:
    <?php

    phpinfo
    ();
    and open it in the browser.

    Comment


    • #4
      Yuri: you were correct! the cli version of php was indeed 7.4, but Apache was using php5, as evidenced by php-info.

      I issued

      a2dismod php5
      systemctl restart apache2
      a2enmod php7.4
      systemctl restart apache2

      to load the correct php module. Now I am seeing the Espo installation guide. Many thanks!

      Comment


      • #5
        Just to confirm - I had an earlier instance running fine under PHP 7.4 but was unable to upgrade using the recommended command line approach. I was receiving errors when trying to run the update but their meaning was far from clear. I installed a brand new 7.0.1 version and then ran upgrades on that to see if it was something in my configuration. All prior upgrades ran fine on that version - until I hit 7.1.7. Then I started seeing server error 500 messages. Not entirely sure why I tried it - but then upgraded PHP version to 8 and all upgrades proceeded fine. So yes, v7.1.7 does seem to require PHP v8+

        Comment


        • #6
          Originally posted by Liudmila Mainzer View Post
          Yuri: you were correct! the cli version of php was indeed 7.4, but Apache was using php5, as evidenced by php-info.

          I issued

          a2dismod php5
          systemctl restart apache2
          a2enmod php7.4
          systemctl restart apache2

          to load the correct php module. Now I am seeing the Espo installation guide. Many thanks!
          I had it the other way around, somehow my cli version was 7.0 and in PLESK it showed Version 8.0 i manually selected the php 8.0 version and it worked. Maybe this helps someone:
          Code:
          /opt/plesk/php/8.0/bin/php command.php upgrade

          Comment

          Working...
          X