Parallels Desktop 14 throws Ubuntu PHP off

Discussion in 'Linux Virtual Machine' started by sam452, Oct 29, 2018.

  1. sam452

    sam452 Member

    Messages:
    28
    This is hard to describe, but it's provable to be due to the new Parallels Desktop 14.01. Perhaps others can provide better search terms.
    I use Parallels Desktop 13 with an Ubuntu 14 guest OS to run Apache and PHP 7.1.15 successfully. This morning, I installed Parallels Desktop 14.01 for its features. Apache and PHP seemingly OK as my apps were running seemingly OK. Except, there were odd signs when I went to modify some working PHP code and I would get PHP errors. I spent most of the day trying to figure out why a PHP conditional was returning an error about "unexpected character in input" as if my code was introducing an un-matched apostrophe from somewhere out of the blue. I'm sorry I don't have more examples, just that this change burned a whole day to figure out what on earth was going wrong.
    Since this code was working before, and I could see no reason what is introducing the error, I removed Parallels Desktop 14 and reverted back tp 13. Mystery PHP error goes away and the code change that should have worked, worked as expected. Same Guest OS, same Apache, same PHP. Only difference is Parallels Desktop 14.0.1 What would make PHP go goofy?
     
  2. KebhaK@Parallels

    KebhaK@Parallels Hunter

    Messages:
    123
    Hi @sam452 , Please update your Parallels Desktop 14 to latest build (45837) and check the issue.
     
  3. sam452

    sam452 Member

    Messages:
    28
    Yes, thank you for the notice. I happily downloaded ParallelsDesktop-14.1.0-45387 and applied, installed Parallel Tools and restarted the Ubuntu 16 guest. I should note that earlier this year, I updated the Ubuntu 14 guest to Ubuntu 16, prior to installing Parallels 14. This may have an impact and should be noted.
    The installed PHP I've been using in Apache and the CLI is 7.1.15, then later 7.1.20. These are the modules installed:
    calendar
    Core
    ctype
    date
    dom
    exif
    fileinfo
    filter
    ftp
    gettext
    hash
    iconv
    json
    ldap
    libxml
    mbstring
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    Phar
    posix
    readline
    Reflection
    session
    shmop
    SimpleXML
    sockets
    SPL
    standard
    sysvmsg
    sysvsem
    sysvshm
    tokenizer
    wddx
    xml
    xmlreader
    xmlwriter
    xsl
    Zend OPcache
    zlib

    [Zend Modules]
    Zend OPcache

    There are still unexplained PHP errors when running this latest Parallels 14. I've found a smallish php file that returns an unexplained errors. Under Parallels 13 this code returns no problems and works as it should. Under every iteration of Parallels 14 it returns odd errors, at least to me.
    <?php
    /**
    * @file
    * Code for the my Webform feature.
    */

    /**
    * Implements hook_form_alter().
    */
    function my_webform_form_webform_node_form_alter(&$form, &$form_state, $form_id) {
    // only when creating a new webform
    if($form["nid"]["#value"] == null) {

    drupal_set_message("Configure the basic settings for your webform page below. You will be able to add fields to your form after you save this page.",'status');
    }
    }

    unexpected &#039;*&#039;, expecting end of file in drupal_load() (line 22 of /media/psf/Home/apps/my_webform.module.

    In a very large PHP file, this kept appearing:
    Unexpected character in input: ' in /media/psf/Home/apps/anotherlargePHPfile.php

    Parallels 14 and Ubuntu 16 guest seems to not work with the same PHP 7.1 code, in ways that suggest to me that it might be not interpreting the characters correctly. It's the same PHP, same PHP file, the only differentiating factor is that we're operating from the latest Parallels 14 build.
     
  4. sam452

    sam452 Member

    Messages:
    28
    Working on this issue some more, I upgraded to Parallels 14.01. build 45837 and created a new Ubuntu 18 server and migrated my working Apache installation. In this new server I use phpbrew to compile the most recent PHP 7.1.25 to try to reduce the variables to find out the cause.
    Running a Drupal 7 app that works fine in Parallels 13 it immediately shows an error:
    Parse error: syntax error, unexpected '$info = arr' in /media/psf/Home/apps/dom/includes/common.inc on line 8484
    Fatal error: Exception thrown without a stack frame in Unknown on line 0

    This is a section of that code indicated:
    function drupal_get_filetransfer_info() {
    $info = &drupal_static(__FUNCTION__);
    if (!isset($info)) {
    // Since we have to manually set the 'file path' default for each
    // module separately, we can't use module_invoke_all().
    $info = array();
    foreach (module_implements('filetransfer_info') as $module) {
    $function = $module . '_filetransfer_info';
    if (function_exists($function)) {
    $result = $function();
    if (isset($result) && is_array($result)) {
    foreach ($result as &$values) {
    if (empty($values['file path'])) {
    $values['file path'] = drupal_get_path('module', $module);
    }
    }
    $info = array_merge_recursive($info, $result);
    }
    }
    }
    drupal_alter('filetransfer_info', $info);
    uasort($info, 'drupal_sort_weight');
    }
    return $info;
    }
    It seems that Parallels 14 is not passing in the text correctly for PHP. Look at the error reported error that seems to indicate that "ay();" is dropped from the code of "$info = array();"
    My working Ubuntu 16 and this Ubuntu18 will not have issues with this code when I revert back to Parallels 13.

    My subscription is set to renew next week and I am hesitant to renew if I cannot use the updated product.
    For context, the code can be found here in git.
    https://github.com/drupal/drupal/blob/7.x/includes/common.inc
     
  5. NickK6

    NickK6 Bit poster

    Messages:
    3
    I too am experiencing this issue and have been pulling my hair out with it. The same code running from a local copy on the guest (ubuntu) is fine. It's totally something to do with parallels tools shared folders. Waiting on a response from support!
     
  6. NickK6

    NickK6 Bit poster

    Messages:
    3
    Can anyone confirm if this has been resolved? - I'm currently running 13.X to avoid this issue, no word from support.
     

Share This Page