Once installed Zircon Drupal 8 Theme on Linux with PHP/5.6.17 gets this error:

Fatal error: Call to undefined function Drupal\Component\Uuid\com_create_guid()

Comments

tophyips created an issue. See original summary.

Joefry’s picture

The following is a hack that fixed the get UUID problem for me so I could install demo version of Zircon in D8
Dev platform: Windows XAMPP-PORTABLE 5.5.24 [PHP: 5.5.24].
This is a dev demo core hack and should be treated accordingly.

\zirc8\core\lib\Drupal\Component\Uuid\Com.php
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<?php

/**
* @file
* Contains \Drupal\Component\Uuid\Com.
*/

namespace Drupal\Component\Uuid;

/**
* UUID implementation using the Windows internal GUID extension.
*
* @see http://php.net/com_create_guid
*/
class Com implements UuidInterface {
/**
* {@inheritdoc}
*/
Public function generate(){
if (function_exists('com_create_guid')){
return com_create_guid();
}
else {
mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
$charid = strtoupper(md5(uniqid(rand(), true)));
$hyphen = chr(45);// "-"
$uuid = chr(123)// "{"
.substr($charid, 0, 8).$hyphen
.substr($charid, 8, 4).$hyphen
.substr($charid,12, 4).$hyphen
.substr($charid,16, 4).$hyphen
.substr($charid,20,12)
.chr(125);// "}"
return strtolower(trim($uuid, '{}'));
}
}
}

yonglicq’s picture

Joefry's solution works! Thank you.

apaderno’s picture

Version: 8.x-0.0-rc1 » 8.x-0.x-dev
Issue tags: -zircon, -Zircon 8, -fatal error, -linux, -UUID, -Call to undefined function, -Drupal\Component\Uuid\com_create_guid(), -com_create_guid
drupal.ninja03’s picture

Status: Active » Closed (cannot reproduce)

This is working on PHP 7.2 and module version 8.x-0.x-dev, Drupal 8.8.6