Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-3487

verify PHP lang server / debug / linting works in che-code

XMLWordPrintable

    • False
    • None
    • False
    • Documentation (Ref Guide, User Guide, etc.), Release Notes
    • Hide
      [Move the RN text to the collector issue]

      = PHP DI sample removed from registry

      To streamline the user experience, we are removing samples that have become outdated and are too much effort to maintain, so we can focus efforts on fewer samples that Just Work.

      Note that PHP debugging may still be broken [TBC]
      Show
      [Move the RN text to the collector issue] = PHP DI sample removed from registry To streamline the user experience, we are removing samples that have become outdated and are too much effort to maintain, so we can focus efforts on fewer samples that Just Work. Note that PHP debugging may still be broken [TBC]
    • Removed Functionality
    • Rejected

       PHP debug issues:

      Failed loading /usr/lib64/php/modules/xdebug.so:  /usr/lib64/php/modules/xdebug.so: undefined symbol: zend_get_properties_for
      

      also:

      if (!extension_loaded('intl')) {
          trigger_error('You must enable the intl extension to use CakePHP.' . PHP_EOL, E_USER_ERROR);
      }
      if (!extension_loaded('mbstring')) {
          trigger_error('You must enable the mbstring extension to use CakePHP.' . PHP_EOL, E_USER_ERROR);
      }
      

      Not sure but seems like we have to recompile xdebug.so to include these; or else find a binary version that includes them.

      ----- 

      From: https://xdebug.org/wizard

      Installation Wizard

      Summary

      • Xdebug installed: no
      • Server API: Command Line Interface
      • Windows: no
      • Zend Server: no
      • PHP Version: 7.3.20
      • Zend API nr: 320180731
      • PHP API nr: 20180731
      • Debug Build: no
      • Thread Safe Build: no
      • OPcache Loaded: yes
      • Configuration File Path: /etc
      • Configuration File: /etc/php.ini
      • Extra Configuration Files Path: /etc/php.d
      • Extra Configuration Files:
        /etc/php.d/10-opcache.ini
        /etc/php.d/20-bz2.ini
        /etc/php.d/20-calendar.ini
        /etc/php.d/20-ctype.ini
        /etc/php.d/20-curl.ini
        /etc/php.d/20-dom.ini
        /etc/php.d/20-exif.ini
        /etc/php.d/20-fileinfo.ini
        /etc/php.d/20-ftp.ini
        /etc/php.d/20-gd.ini
        /etc/php.d/20-gettext.ini
        /etc/php.d/20-iconv.ini
        /etc/php.d/20-mysqlnd.ini
        /etc/php.d/20-pdo.ini
        /etc/php.d/20-phar.ini
        /etc/php.d/20-posix.ini
        /etc/php.d/20-shmop.ini
        /etc/php.d/20-simplexml.ini
        /etc/php.d/20-sockets.ini
        /etc/php.d/20-sqlite3.ini
        /etc/php.d/20-sysvmsg.ini
        /etc/php.d/20-sysvsem.ini
        /etc/php.d/20-sysvshm.ini
        /etc/php.d/20-tokenizer.ini
        /etc/php.d/20-xml.ini
        /etc/php.d/20-xmlwriter.ini
        /etc/php.d/20-xsl.ini
        /etc/php.d/30-mysqli.ini
        /etc/php.d/30-pdo_mysql.ini
        /etc/php.d/30-pdo_sqlite.ini
        /etc/php.d/30-wddx.ini
        /etc/php.d/30-xmlreader.ini
      • Extensions directory: /usr/lib64/php/modules

      Instructions

      1. Download xdebug-3.1.5.tgz
      2. Install the pre-requisites for compiling PHP extensions.
        On your RedHat system, install them with: yum groupinstall "Development tools" && yum install php-devel autoconf automake
      3. Unpack the downloaded file with tar -xvzf xdebug-3.1.5.tgz
      4. Run: cd xdebug-3.1.5
      5. Run: phpize (See the FAQ if you don't have phpize).

      As part of its output it should show:
      Configuring for: ... Zend Module Api No: 20180731 Zend Extension Api No: 320180731
       

      If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.

      1. Run: ./configure
      2. Run: make
      3. Run: cp modules/xdebug.so /usr/lib64/php/modules
      4. Create /etc/php.d/99-xdebug.ini and add the line:
        zend_extension = xdebug

      Enabling Features

      Now Xdebug is installed, you can enable its features. Please refer to the dedicated sections in the documentation about information on how to enable and configure these Xdebug features. Where these sections refer to php.ini or similar, please remember to use /etc/php.d/99-xdebug.ini:

      • Development Helpers — help you get better error messages and obtain better information from PHP's built-in functions.
      • Step Debugging — allows you to interactively walk through your code to debug control flow and examine data structures.
      • Profiling — allows you to find bottlenecks in your script and visualize those with an external tool.

       

        1. screenshot-1.png
          screenshot-1.png
          19 kB
        2. screenshot-2.png
          screenshot-2.png
          85 kB
        3. screenshot-3.png
          screenshot-3.png
          54 kB
        4. screenshot-4.png
          screenshot-4.png
          7 kB
        5. screenshot-5.png
          screenshot-5.png
          19 kB
        6. screenshot-6.png
          screenshot-6.png
          5 kB

              vsvydenk Valerii Svydenko
              nickboldt Nick Boldt
              Fionn Kelleher Fionn Kelleher (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: