You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLI-1332: acli app:new:from:drupal7 crashes on cPanel environment with "stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given" on
#1735
Open
obriat opened this issue
Apr 28, 2024
· 3 comments
Describe the bug
I try to migrate a Drupal 7 site with the Acquia Migrate: Accelerate app:new:from:drupal7... , it crashes with the following error message:
TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given in stream_get_contents() (line 22 of phar:///home2/ptgptbfr/bin/acli/vendor/composer/../../src/Command/App/From/JsonResourceParserTrait.php).
Expected behavior
The command should not crash or at least give more info about the problem.
Screenshots
$ acli app:new:from:drupal7 --drupal7-directory=/legacy/www --directory=/new/www -vvv
Box Requirements Checker
========================
> Using PHP 8.1.28
> PHP is using the following php.ini file:
/opt/cpanel/ea-php81/root/etc/php.ini
> Checking Box requirements:
✔ The application requires a version matching "^8.1".
✔ The application requires the extension "json".
✔ The package "guzzlehttp/guzzle" requires the extension "json".
✔ The package "league/csv" requires the extension "json".
✔ The package "m4tthumphrey/php-gitlab-api" requires the extension "json".
✔ The package "ramsey/uuid" requires the extension "json".
✔ The package "zumba/amplitude-php" requires the extension "json".
✔ The package "composer/ca-bundle" requires the extension "openssl".
✔ The package "composer/ca-bundle" requires the extension "pcre".
✔ The package "vlucas/phpdotenv" requires the extension "pcre".
✔ The package "league/csv" requires the extension "filter".
✔ The package "m4tthumphrey/php-gitlab-api" requires the extension "xml".
✔ The package "marc-mabe/php-enum" requires the extension "reflection".
✔ The package "zumba/amplitude-php" requires the extension "curl".
✔ The package "laminas/laminas-servicemanager" conflicts with the extension "psr".
✔ The package "symfony/dependency-injection" conflicts with the extension "psr".
✔ The package "symfony/service-contracts" conflicts with the extension "psr".
[OK] Your system is ready to run the application.
Acquia CLI version: 2.25.0
🤖 Scanning Drupal 7 site.
👍 Found Drupal 7 site (7.98 to be precise) at sites/default, with 77 modules enabled!
TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given in stream_get_contents() (line 22 of phar:///home2/ptgptbfr/bin/acli/vendor/composer/../../src/Command/App/From/JsonResourceParserTrait.php).
Desktop (please complete the following information):
OS: Red Hat 8.2.1-3 / Linux version 4.18.0-513. (cpanle)
PHP 8.1.28
php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
filter
ftp
gd
gettext
hash
iconv
imap
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
soap
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib
Composer version 2.6.5
jq 1.7.1
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
acli app:new:from:drupal7 crashes with "stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given"
CLI-1332: acli app:new:from:drupal7 crashes with "stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given"
Apr 28, 2024
Your right, the cpanel php config seems a bit weird, php is not always returning the same config or version depending on the folder where it is executed.
The allow_url_fopen is "on" for the source folder (--drupal7-directory) but "off" for the target one ( --directory).
Although I set the correct allow_url_fopen value for both folders in the cpanel admin ui.
I finally found a way to fixe it by setting PHPRC: export PHPRC=/new/www/php.ini
I guess it's a local problem, although a more details message would be great.
wimleers
changed the title
CLI-1332: acli app:new:from:drupal7 crashes with "stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given"
CLI-1332: acli app:new:from:drupal7 crashes on cPanel environment with "stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given" on
Apr 30, 2024
Describe the bug
I try to migrate a Drupal 7 site with the Acquia Migrate: Accelerate
app:new:from:drupal7...
, it crashes with the following error message:To Reproduce
Follow the Acquia tutorials : https://dev.acquia.com/blog/acquia-migrate-accelerate-now-open-source#steps
Expected behavior
The command should not crash or at least give more info about the problem.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: