alexc7018 / vvv-site-wizard

Automates setting up new WordPress sites in Varying Vagrant Vagrants
GNU General Public License v2.0
346 stars 47 forks source link

Encountered strange Fatal Error while trying to phar WP 4.0 #25

Open GhostToast opened 10 years ago

GhostToast commented 10 years ago

During script, encountered this error:

==> default: Updating to version 4.0 (en_US)...
==> default: Success: WordPress is at the latest version.
==> default: Success: WordPress database upgraded successfully.
==> default: Creating database 'examplesite' (if it does not exist)...
==> default: Installing WordPress (release version) in examplesite/htdocs...
==> default: Downloading WordPress 4.0 (en_US)...
==> default: Using cached file '/root/.wp-cli/cache/core/en_US-4.0.tar.gz'...
==> default: 
==> default: Fatal error: Uncaught exception 'UnexpectedValueException' with message 'phar tar error: "/root/.wp-cli/cache/core/en_US-4.0.tar.gz" already exists as a regular phar and must be deleted from disk prior to creating as a tar-based phar' in /srv/www/wp-cli/php/commands/core.php:180
==> default: Stack trace:
==> default: #0 /srv/www/wp-cli/php/commands/core.php(180): PharData->__construct('/root/.wp-cli/c...')
==> default: #1 /srv/www/wp-cli/php/commands/core.php(153): Core_Command::_extract('/root/.wp-cli/c...', '/srv/www/exampl...')
==> default: #2 [internal function]: Core_Command->download(Array, Array)
==> default: #3 /srv/www/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(52): call_user_func(Array, Array, Array)
==> default: #4 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
==> default: #5 /srv/www/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(293): call_user_func(Object(Closure), Array, Array)
==> default: #6 /srv/www/wp-cli/php/WP_CLI/Runner.php(304): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
==> default: #7 /srv/www/wp-cli/php/WP_CLI/Runner.php(311): WP_CLI\Runner->ru in /srv/www/wp-cli/php/commands/core.php on line 180
==> default: Error: This does not seem to be a WordPress install.
==> default: Pass --path=`path/to/wordpress` or run `wp core download`.
==> default: Error: This does not seem to be a WordPress install.
==> default: Pass --path=`path/to/wordpress` or run `wp core download`.
==> default: /srv/www/examplesite`

Not surprisingly, the WP install never happened. I was able to get this back to working after logging into vagrant (vagrant ssh, sudo -i) changing dir to the hidden .wp-cli folder and removing the tar files within. Hope this helps someone else.

jwebcat commented 10 years ago

yep I had the same thing happen when creating a new site I removed the /home/vagrant/.wp-cli/cache/core/en_US-4.0.tar.gz and ran the vvv.init.sh install script manually from /vagrant/www/sitename and it worked.

==> default: Creating database 'realestate' (if it does not exist)...
==> default: Installing WordPress (release version) in realestate/htdocs...
==> default: Downloading WordPress 4.0 (en_US)...
==> default: Using cached file '/home/vagrant/.wp-cli/cache/core/en_US-4.0.tar.gz'...
==> default: PHP Fatal error:  Uncaught exception 'UnexpectedValueException' with message 'phar tar error: "/home/vagrant/.wp-cli/cache/core/en_US-4.0.tar.gz" already exists as a regular phar and must be deleted from disk prior to creating as a tar-based phar' in /srv/www/wp-cli/php/commands/core.php:180
==> default: Stack trace:
==> default: #0 /srv/www/wp-cli/php/commands/core.php(180): PharData->__construct('/home/vagrant/....')
==> default: #1 /srv/www/wp-cli/php/commands/core.php(153): Core_Command::_extract('/home/vagrant/....', '/srv/www/reales...')
==> default: #2 [internal function]: Core_Command->download(Array, Array)
==> default: #3 /srv/www/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(52): call_user_func(Array, Array, Array)
==> default: #4 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
==> default: #5 /srv/www/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(293): call_user_func(Object(Closure), Array, Array)
==> default: #6 /srv/www/wp-cli/php/WP_CLI/Runner.php(304): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
==> default: #7 /srv/www/wp-cli/php/WP_CLI/Runner.php(311): WP_CLI\Ru in /srv/www/wp-cli/php/commands/core.php on line 180
==> default:
==> default: Fatal error: Uncaught exception 'UnexpectedValueException' with message 'phar tar error: "/home/vagrant/.wp-cli/cache/core/en_US-4.0.tar.gz" already exists as a regular phar and must be deleted from disk prior to creating as a tar-based phar' in /srv/www/wp-cli/php/commands/core.php:180
==> default: Stack trace:
==> default: #0 /srv/www/wp-cli/php/commands/core.php(180): PharData->__construct('/home/vagrant/....')
==> default: #1 /srv/www/wp-cli/php/commands/core.php(153): Core_Command::_extract('/home/vagrant/....', '/srv/www/reales...')
==> default: #2 [internal function]: Core_Command->download(Array, Array)
==> default: #3 /srv/www/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(52): call_user_func(Array, Array, Array)
==> default: #4 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
==> default: #5 /srv/www/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(293): call_user_func(Object(Closure), Array, Array)
==> default: #6 /srv/www/wp-cli/php/WP_CLI/Runner.php(304): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
==> default: #7 /srv/www/wp-cli/php/WP_CLI/Runner.php(311): WP_CLI\Ru in /srv/www/wp-cli/php/commands/core.php on line 180
==> default: Error: This does not seem to be a WordPress install.
==> default: Pass --path=`path/to/wordpress` or run `wp core download`.
==> default: Error: This does not seem to be a WordPress install.
==> default: Pass --path=`path/to/wordpress` or run `wp core download`.
==> default: /srv/www/realestate

when creating a new site with the install script seems like the worpdress updater during the provisioning runs before the install script installs wordpress and so fails.

danielbachhuber commented 9 years ago

Related https://github.com/wp-cli/wp-cli/issues/1427

chadbush commented 9 years ago

I had this error too, and this issue report helped me get things working, at least for now. Thanks!