Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I clear the cache in Windows and access the admin/content page, all the developers that are using Linux (Ubuntu 14) gets this error.
Fatal error: Call to undefined function Drupal\Component\Uuid\com_create_guid()
Comment | File | Size | Author |
---|---|---|---|
#19 | 2614202-19.patch | 1.31 KB | alexpott |
#19 | 14-19-interdiff.txt | 760 bytes | alexpott |
#14 | 2614202-14.patch | 1.31 KB | alexpott |
#8 | 2614202.8.patch | 797 bytes | alexpott |
Comments
Comment #2
felribeiro CreditAttribution: felribeiro at CI&T commentedComment #3
catchThis is because the uuid class is registered in container build.
Can you confirm whether rebuild.php fixes it?
If so then container portability between environments isn't critical for me, but it certainly would be major/rc target.
Comment #4
catchAlso could you confirm if you're using a shared development database - i.e. each developer connecting from their own machine to the same database server?
Comment #5
felribeiro CreditAttribution: felribeiro at CI&T commentedIf I execute "drush cache-rebuild" in a Linux, it return to works fine.
We are using a shared development database.
Comment #6
catchRe-titling.
Comment #7
Chetabahana CreditAttribution: Chetabahana as a volunteer commentedFrom PHP 5.4.5, COM and DOTNET is no longer built into the php core.
Applying
extension=php_com_dotnet.dll
on Windows to add COM support in php.ini seems to work.I'm installing Zircon 8 on Linux Apache/2.4.16 (Amazon) OpenSSL/1.0.1k-fips PHP/5.6.17 here, I have tried to add
extension=php_com_dotnet.so
in php.ini but the error is still persist.Finaly by enable debugging I can solve this problem by create GUIDs manually:
Take a look on the core/lib/Drupal/Component/Uuid/Com.php file.
Change the following code:
with this code:
Comment #8
alexpottSo the container being moved to the database as caused this. One simple solution would be to add the OS into the container key. This can be done by setting the
deployment_identifier
in settings.php. Another solution would to do this...@hyipscript we already have a php implementation for UUID generation - see
Drupal\Component\Uuid\Php
which is the fallback is OS specific methods aren't available.Comment #9
dawehnerYou could also run into a case with once a pecl extension installed and once without it. In general I think we should document why we are adding specific bits here.
Comment #11
Tregonia CreditAttribution: Tregonia at Parallax Information Technology commentedI have been getting these errors on a D7 -> D8 migration. Applying patch 2614202.8.patch from #8 resolved the issue.
Note:: this is from a WAMP environment
Comment #12
dawehnerI doubt we can really test this.
Comment #13
catchLet's add the docs mentioned in #9.
Comment #14
alexpottExpanded the docs.
Comment #15
alexpottI've created #2709769: DrupalKernel::getContainerCacheKey() should include some dynamics about PHP to discuss whether we should include a few more things in the container key.
Comment #16
dawehnerCool
Comment #17
tim.plunkettoptimize
Comment #18
alexpottoh lol
Comment #19
alexpottFixed #17
Comment #20
dawehnerHe, well I couldn't see a problem with that.
Comment #23
catchCommitted/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!