When I try to install a Wordpress from the panel I get the following error:
Fatal error: Uncaught Error: Class “Phar” not found in /home/userdomain/.wp-cli/wp:3 Stack trace: #0 {main} thrown in /home/userdomain/.wp-cli/wp on line 3 Error: cmd exited with errors
But if I run wp cli as root it works, but if I try to run it as a normal user it throws the above error.
Any idea?
su - YourUser
su - minasealemonclarinet
This account is currently not available.
But the account exists in Hestiacp
From here on down I could not continue since I cannot access the user as you indicated.
But if I do it like this, I can access the user:
sudo -u MyUser bash
.wp-cli/wp
Fatal error: Uncaught Error: Class “Phar” not found in /home/minasealemonclarinet/.wp-cli/wp:3
Stack trace:
#0 {main} thrown in /home/minasealemonclarinet/.wp-cli/wp on line 3
Regarding the php why it is there I do not know the truth, once I had a problem with php and tinkering I managed to repair it, but I had not even noticed the path.
If it can be changed then I make the change
If I execute ./wp-cli/wp
I get:
-bash: ./wp-cli/wp: The file or directory does not exist.
But if I access cd .wp-cli
minasealemonclarinet@host:~/.wp-cli$ wp
Fatal error: Uncaught Error: class “Phar” not found in /home/minasealemonclarinet/.wp-cli/wp:3
Stack tracking: #0 {main}
thrown in /home/minasealemonclarinet/.wp-cli/wp on line 3
Ok, the wp-cli thing I think is solved now I get the error I told you about:
Error: file /tmp/hst.gSp8i9 was not copied
But I do not know what log file I have to look for, as far as I could see the wp-config.php file does not create it, but if you have installed the wordpress.
v-run-cli-cmd minasealemonclarinet /home/minasealemonclarinet/.wp-cli/wp cli info
OS: Linux 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php8.2
PHP version: 8.2.24
php.ini used: /etc/php/8.2/cli/php.ini
MySQL binary: /usr/bin/mysql
MySQL version: mysql Ver 15.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
SQL modes:
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /
WP-CLI packages dir:
WP-CLI cache dir: /home/minasealemonclarinet/.wp-cli/cache
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.11.0
The log:
2024/10/22 10:38:24 [error] 768#0: *472 FastCGI sent in stderr: “PHP message: PHP Notice: Error: file /tmp/hst.gSp8i9 was not copied in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 46” while reading response header from upstream, client: xx.xxx.xxx.xx, server: _, request: “POST /add/webapp/?app=WordPress&domain=domainuser.com HTTP/2.0”, upstream: “fastcgi://unix:/run/hestia-php.sock:”, host: “xxx.xx.es:8083”, referrer: “https://xxx.xxxx.es:8083/add/webapp/?app=WordPress&domain=domainuser.com”
The same thing happens, the temporary file it createThe same thing happens, the temporary file it creates cannot be copied or created in the destination.
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the installation.
* You don't have to use the website, you can copy this file to "wp-config.php"
* and fill in the values.
*
* This file contains the following configurations:
*
* * Database settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/
*
* @package WordPress
*/
// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'minasealemonclarinet_91991' );
/** Database username */
define( 'DB_USER', 'minasealemonclarinet_91991' );
I do it with the empty folder, but as soon as the installation is finished, the error pops up and that blue sign that appears in the background.
Here you can see several attempts I have made
rwxr-xr-x 2 admin admin 4096 oct 19 18:34 hestia-webapp
-rw-r–r-- 1 admin admin 3363 oct 23 13:14 hst.8Re2VR
-rw-r–r-- 1 admin admin 3363 oct 23 13:10 hst.gwv2jS
-rw-r–r-- 1 admin admin 3363 oct 23 12:58 hst.OwKupD
I have tried with another user and everything went fine, so the problem may be in permissions issues.
That the user does not have permissions to create that file or to move it.
I don’t know how to check the user permissions.
The thread is closed, in the end I deleted the user and recreated it and the problem is solved.
We will remain with the doubt that happened to this user.
Thank you very much for your support.
Best regards.