dreadnaut / PHPloy

PHPloy - Incremental Git (S)FTP deployment tool that supports multiple servers, submodules and rollbacks.
http://wplancer.com/phploy/
12 stars 1 forks source link

Difficulties durring installation... #4

Closed OhMyLuDoo closed 1 month ago

OhMyLuDoo commented 3 months ago

Hi ! Sorry for the incinvenience... I am trying to install this fork using composer but it's my first time using it ! (after banago's repo) i try to run this command : composer global require dreadnaut/phploy:dev-master --with-all-dependencies

but there is the result : Changed current directory to /home/OhMyLuDoo/.config/composer ./composer.json has been updated Running composer update dreadnaut/phploy --with-all-dependencies Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

I try to understand what this errors are saying but as i saying earlier, i'm verry new here...

dreadnaut commented 3 months ago

See if this helps: https://github.com/dreadnaut/PHPloy/issues/1#issuecomment-2218711714 and https://github.com/dreadnaut/PHPloy/issues/1#issuecomment-2223406427

OhMyLuDoo commented 3 months ago

Thank you a lot ! The installation worked ! But now I have a second problem… When I run phploy using 'phploy' (after doing phploy --init and configure the phploy.ini file), I have the beautiful phploy's green headband, but that's it. My phploy don't do anything more… What did I do wrong ?

I just saw if I run phploy -l, it tells me something, but then I have the same issue, I can't do anything, the program is running but nothing happen

dreadnaut commented 3 months ago

Does phploy terminate without saying anything, or does it get stuck, and you have to ^C or something to stop it?

You can run phploy --debug to get more information. If you post the log here, we can have a look.

OhMyLuDoo commented 3 months ago

Even with --debug, my phploy remains blocked and I only have the green banner. I wait a very long time, hoping that phploy will tell me that my ftp credentials are bad or something, but unfortunately it doesn't say anything. I have to do ^C to stop it. I don't know how to get the logs, I was supposed to get them with --debug? Tanks for your time !

dreadnaut commented 3 months ago

You can a log file by adding a configuration parameter, see https://github.com/dreadnaut/PHPloy?tab=readme-ov-file#logging

OhMyLuDoo commented 3 months ago

I configured my .ini to generate logs for me. Then I ran phploy for a very long time to make sure I didn't cut it off too early. First remark, it didn't create a .log. Second remark, I got a message other than just the banner! I got this, which terminated the program: "Oh Snap: Unable to check existence for: .revision" I'm sorry, I don't quite understand what's going on here…

dreadnaut commented 3 months ago

Thanks for your patience! Waiting to see the message is actually very useful: it seems that the FTP server leaves PHPloy hanging, and you end up waiting until the "timeout". You can set a lower timeout in the configuration, could be just 5 seconds

[production]
  timeout = 10

That said, why is the server not replying in time? Could you make sure that you have all the correct parameters? Host, port, FTP or SFTP, etc. You can double check with a different FTP client as well.

OhMyLuDoo commented 3 months ago

Hello again ! Thank YOU for your patience ! I checked my ftp info, and it is good (I tested it on filezilla). I would also like to point out that timout = 10 does not work for me, phploy tells me that it expects a value of type int and that it has one of type string even though I did not put a quote. I wrote this exactly like you.

EDIT : Just in case, here is my .ini (with changed identifiers) :

[production]
    scheme = sftp
    host = example
    path = /
    port = 21
    user = "example"
    pass = "example"
    logger = on
dreadnaut commented 3 months ago

I would also like to point out that timout = 10 does not work for me

That's a bug, should be fixed now!

Your parameters look unusual to me: the port for SFTP is usually 22. I wonder if your server uses "FTPS", which is different from "SFTP" 😅

Could you try with scheme = ftp and port = 21 ?

OhMyLuDoo commented 3 months ago

Oh yes, you're right ! I just saw that it is ftps !!! I'm so sorry I didn't know ftps exists... I will try right now and tell you the result !

OhMyLuDoo commented 3 months ago

It works !! Of course, I have plenty of errors I have to read now, but yeah it works ! However, I don't know how to get the version of phploy where the timeout bug that we talked about previously is resolved because I still have it after having done :

composer update dreadnaut/phploy:dev-master
dreadnaut commented 3 months ago

Composer can install packages in the current project, or globally. You probably installed PHPloy globally, so you should update it with

composer global update dreadnaut/phploy:dev-master
OhMyLuDoo commented 3 months ago

If I give you this :

No revision found. Fresh upload...

SERVER: production
PHP Warning:  ftp_fput(): php_connect_nonb() failed: Operation now in progress (115) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'pages/compta.php', $contents = '<?php\n    require_once "../resources/fonctions.php";\n?>\n\n<!DOCTYPE html>\n<html lang="fr">\n<head>\n    <meta charset="UTF-8">\n    <meta name="viewport" content="width=device-width, initial-scale=1.0">\n    <title>Compta</title>\n</head>\n<body>\n    <?php var_dump(get_entries()) ?>\n</body>\n</html>', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'pages/compta.php', $contents = '<?php\n    require_once "../resources/fonctions.php";\n?>\n\n<!DOCTYPE html>\n<html lang="fr">\n<head>\n    <meta charset="UTF-8">\n    <meta name="viewport" content="width=device-width, initial-scale=1.0">\n    <title>Compta</title>\n</head>\n<body>\n    <?php var_dump(get_entries()) ?>\n</body>\n</html>', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'pages/compta.php', $contents = resource(94) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/pages/compta.php', $stream = resource(94) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
PHP Warning:  ftp_fput(): OK. Current directory is / in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'pages/compta.php', $contents = '<?php\n    require_once "../resources/fonctions.php";\n?>\n\n<!DOCTYPE html>\n<html lang="fr">\n<head>\n    <meta charset="UTF-8">\n    <meta name="viewport" content="width=device-width, initial-scale=1.0">\n    <title>Compta</title>\n</head>\n<body>\n    <?php var_dump(get_entries()) ?>\n</body>\n</html>', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'pages/compta.php', $contents = '<?php\n    require_once "../resources/fonctions.php";\n?>\n\n<!DOCTYPE html>\n<html lang="fr">\n<head>\n    <meta charset="UTF-8">\n    <meta name="viewport" content="width=device-width, initial-scale=1.0">\n    <title>Compta</title>\n</head>\n<body>\n    <?php var_dump(get_entries()) ?>\n</body>\n</html>', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'pages/compta.php', $contents = resource(94) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/pages/compta.php', $stream = resource(94) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
 ! Failed to upload pages/compta.php.
 ^ 1 of 4 pages/compta.php
PHP Warning:  ftp_fput(): php_connect_nonb() failed: Operation now in progress (115) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'readme.md', $contents = '# Ludine\nDescription du projet', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'readme.md', $contents = '# Ludine\nDescription du projet', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'readme.md', $contents = resource(98) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/readme.md', $stream = resource(98) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
PHP Warning:  ftp_fput(): Entering Passive Mode (109,234,166,138,231,220) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'readme.md', $contents = '# Ludine\nDescription du projet', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'readme.md', $contents = '# Ludine\nDescription du projet', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'readme.md', $contents = resource(98) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/readme.md', $stream = resource(98) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
 ! Failed to upload readme.md.
 ^ 2 of 4 readme.md
PHP Warning:  ftp_fput(): php_connect_nonb() failed: Operation now in progress (115) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'resources/bdd.php', $contents = '<?php\n\nclass BDD{\n    private string $dsn = \'mysql:host=example;dbname=example;charsetutf8\';\n    private string $username = \'example\';\n    private string $password = \'example\';\n    private PDO $bdd;\n\n    public function __construct(){\n        $this->bdd = new PDO($this->dsn, $this->username, $this->password);\n    }\n\n    public function get_bdd(){\n        return $this->bdd;\n    }\n}', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'resources/bdd.php', $contents = '<?php\n\nclass BDD{\n    private string $dsn = \'mysql:host=example;dbname=example;charsetutf8\';\n    private string $username = \'example\';\n    private string $password = \'example\';\n    private PDO $bdd;\n\n    public function __construct(){\n        $this->bdd = new PDO($this->dsn, $this->username, $this->password);\n    }\n\n    public function get_bdd(){\n        return $this->bdd;\n    }\n}', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'resources/bdd.php', $contents = resource(101) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/resources/bdd.php', $stream = resource(101) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
PHP Warning:  ftp_fput(): Entering Passive Mode (109,234,166,138,197,228) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'resources/bdd.php', $contents = '<?php\n\nclass BDD{\n    private string $dsn = \'mysql:host=example;dbname=example;charsetutf8\';\n    private string $username = \'example\';\n    private string $password = \'example\';\n    private PDO $bdd;\n\n    public function __construct(){\n        $this->bdd = new PDO($this->dsn, $this->username, $this->password);\n    }\n\n    public function get_bdd(){\n        return $this->bdd;\n    }\n}', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'resources/bdd.php', $contents = '<?php\n\nclass BDD{\n    private string $dsn = \'mysql:host=example;dbname=example;charsetutf8\';\n    private string $username = \'example\';\n    private string $password = \'example\';\n    private PDO $bdd;\n\n    public function __construct(){\n        $this->bdd = new PDO($this->dsn, $this->username, $this->password);\n    }\n\n    public function get_bdd(){\n        return $this->bdd;\n    }\n}', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'resources/bdd.php', $contents = resource(101) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/resources/bdd.php', $stream = resource(101) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
 ! Failed to upload resources/bdd.php.
 ^ 3 of 4 resources/bdd.php
PHP Warning:  ftp_fput(): php_connect_nonb() failed: Operation now in progress (115) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'resources/fonctions.php', $contents = '<?php\n    require_once "bdd.php";\n\n    function get_entries(){\n        $bdd = new BDD;\n        $bdd = $bdd->get_bdd();\n\n        $query = $bdd->prepare("SELECT * FROM `entries`;");\n        $query->execute([]);\n        $entries = $query->fetchAll(PDO::FETCH_ASSOC);\n\n        return $entries;\n    }', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'resources/fonctions.php', $contents = '<?php\n    require_once "bdd.php";\n\n    function get_entries(){\n        $bdd = new BDD;\n        $bdd = $bdd->get_bdd();\n\n        $query = $bdd->prepare("SELECT * FROM `entries`;");\n        $query->execute([]);\n        $entries = $query->fetchAll(PDO::FETCH_ASSOC);\n\n        return $entries;\n    }', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'resources/fonctions.php', $contents = resource(104) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/resources/fonctions.php', $stream = resource(104) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
PHP Warning:  ftp_fput(): Entering Passive Mode (109,234,166,138,213,20) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'resources/fonctions.php', $contents = '<?php\n    require_once "bdd.php";\n\n    function get_entries(){\n        $bdd = new BDD;\n        $bdd = $bdd->get_bdd();\n\n        $query = $bdd->prepare("SELECT * FROM `entries`;");\n        $query->execute([]);\n        $entries = $query->fetchAll(PDO::FETCH_ASSOC);\n\n        return $entries;\n    }', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'resources/fonctions.php', $contents = '<?php\n    require_once "bdd.php";\n\n    function get_entries(){\n        $bdd = new BDD;\n        $bdd = $bdd->get_bdd();\n\n        $query = $bdd->prepare("SELECT * FROM `entries`;");\n        $query->execute([]);\n        $entries = $query->fetchAll(PDO::FETCH_ASSOC);\n\n        return $entries;\n    }', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'resources/fonctions.php', $contents = resource(104) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/resources/fonctions.php', $stream = resource(104) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
 ! Failed to upload resources/fonctions.php.
 ^ 4 of 4 resources/fonctions.php
PHP Warning:  ftp_fput(): php_connect_nonb() failed: Operation now in progress (115) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. Banago\PHPloy\PHPloy->setRevision($localRevision = '0419cb90e89efb3b021a90b00fd821f83c461b07') /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1249
PHP   7. League\Flysystem\Filesystem->write($location = '.revision', $contents = '0419cb90e89efb3b021a90b00fd821f83c461b07', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1282
PHP   8. League\Flysystem\Ftp\FtpAdapter->write($path = '.revision', $contents = '0419cb90e89efb3b021a90b00fd821f83c461b07', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   9. League\Flysystem\Ftp\FtpAdapter->writeStream($path = '.revision', $contents = resource(106) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP  10. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/.revision', $stream = resource(106) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
PHP Warning:  ftp_fput(): Entering Passive Mode (109,234,166,138,245,245) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. Banago\PHPloy\PHPloy->setRevision($localRevision = '0419cb90e89efb3b021a90b00fd821f83c461b07') /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1249
PHP   7. League\Flysystem\Filesystem->write($location = '.revision', $contents = '0419cb90e89efb3b021a90b00fd821f83c461b07', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1282
PHP   8. League\Flysystem\Ftp\FtpAdapter->write($path = '.revision', $contents = '0419cb90e89efb3b021a90b00fd821f83c461b07', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   9. League\Flysystem\Ftp\FtpAdapter->writeStream($path = '.revision', $contents = resource(106) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP  10. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/.revision', $stream = resource(106) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171

Oh Snap: Unable to write file at location: .revision. writing the file failed

Are you able to tell me if the error it's in my side or if it's in your side ?

EDIT : Is it me or it is missing some quotes ?

dreadnaut commented 3 months ago

Seems something connected to passive mode, which can be a problem depending on your home / office network connection. Try adding passive = false to your configuration, and see if that solves it 😀

I can see the color changing oddly in the text above, but I think is GitHub getting confused

OhMyLuDoo commented 3 months ago

Even with passive=false my files don't want to deploy. Do you want me to send you back what phploy tells me? Thank you a lot for your patience !

dreadnaut commented 3 months ago

Yep, logs are always welcome!

OhMyLuDoo commented 3 months ago
No revision found. Fresh upload...

SERVER: production
PHP Warning:  ftp_fput(): I won't open a connection to 100.68.207.26 (only to 89.85.201.227) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'pages/compta.php', $contents = '<?php\n    require_once "../resources/fonctions.php";\n?>\n\n<!DOCTYPE html>\n<html lang="fr">\n<head>\n    <meta charset="UTF-8">\n    <meta name="viewport" content="width=device-width, initial-scale=1.0">\n    <title>Compta</title>\n</head>\n<body>\n    <?php var_dump(get_entries()) ?>\n</body>\n</html>', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'pages/compta.php', $contents = '<?php\n    require_once "../resources/fonctions.php";\n?>\n\n<!DOCTYPE html>\n<html lang="fr">\n<head>\n    <meta charset="UTF-8">\n    <meta name="viewport" content="width=device-width, initial-scale=1.0">\n    <title>Compta</title>\n</head>\n<body>\n    <?php var_dump(get_entries()) ?>\n</body>\n</html>', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'pages/compta.php', $contents = resource(94) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/pages/compta.php', $stream = resource(94) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
 ! Failed to upload pages/compta.php.
 ^ 1 of 4 pages/compta.php
PHP Warning:  ftp_fput(): I won't open a connection to 100.68.207.26 (only to 89.85.201.227) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'readme.md', $contents = '# Ludine\nDescription du projet', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'readme.md', $contents = '# Ludine\nDescription du projet', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'readme.md', $contents = resource(98) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/readme.md', $stream = resource(98) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
 ! Failed to upload readme.md.
 ^ 2 of 4 readme.md
PHP Warning:  ftp_fput(): I won't open a connection to 100.68.207.26 (only to 89.85.201.227) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'resources/bdd.php', $contents = '<?php\n\nclass BDD{\n    private string $dsn = \'mysql:host=example;dbname=example;charsetutf8\';\n    private string $username = \'example\';\n    private string $password = \'example\';\n    private PDO $bdd;\n\n    public function __construct(){\n        $this->bdd = new PDO($this->dsn, $this->username, $this->password);\n    }\n\n    public function get_bdd(){\n        return $this->bdd;\n    }\n}', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'resources/bdd.php', $contents = '<?php\n\nclass BDD{\n    private string $dsn = \'mysql:host=example;dbname=example;charsetutf8\';\n    private string $username = \'example\';\n    private string $password = \'example\';\n    private PDO $bdd;\n\n    public function __construct(){\n        $this->bdd = new PDO($this->dsn, $this->username, $this->password);\n    }\n\n    public function get_bdd(){\n        return $this->bdd;\n    }\n}', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'resources/bdd.php', $contents = resource(101) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/resources/bdd.php', $stream = resource(101) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
 ! Failed to upload resources/bdd.php.
 ^ 3 of 4 resources/bdd.php
PHP Warning:  ftp_fput(): I won't open a connection to 100.68.207.26 (only to 89.85.201.227) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. League\Flysystem\Filesystem->write($location = 'resources/fonctions.php', $contents = '<?php\n    require_once "bdd.php";\n\n    function get_entries(){\n        $bdd = new BDD;\n        $bdd = $bdd->get_bdd();\n\n        $query = $bdd->prepare("SELECT * FROM `entries`;");\n        $query->execute([]);\n        $entries = $query->fetchAll(PDO::FETCH_ASSOC);\n\n        return $entries;\n    }', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1190
PHP   7. League\Flysystem\Ftp\FtpAdapter->write($path = 'resources/fonctions.php', $contents = '<?php\n    require_once "bdd.php";\n\n    function get_entries(){\n        $bdd = new BDD;\n        $bdd = $bdd->get_bdd();\n\n        $query = $bdd->prepare("SELECT * FROM `entries`;");\n        $query->execute([]);\n        $entries = $query->fetchAll(PDO::FETCH_ASSOC);\n\n        return $entries;\n    }', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   8. League\Flysystem\Ftp\FtpAdapter->writeStream($path = 'resources/fonctions.php', $contents = resource(104) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP   9. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/resources/fonctions.php', $stream = resource(104) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171
 ! Failed to upload resources/fonctions.php.
 ^ 4 of 4 resources/fonctions.php
PHP Warning:  ftp_fput(): I won't open a connection to 100.68.207.26 (only to 89.85.201.227) in /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php on line 171
PHP Stack trace:
PHP   1. {main}() /home/omydoo/.config/composer/vendor/bin/phploy:0
PHP   2. include() /home/omydoo/.config/composer/vendor/bin/phploy:119
PHP   3. Banago\PHPloy\PHPloy->__construct($opt = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/bin/phploy:14
PHP   4. Banago\PHPloy\PHPloy->deploy() /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:335
PHP   5. Banago\PHPloy\PHPloy->push($files = ['delete' => [], 'upload' => [0 => 'pages/compta.php', 1 => 'readme.md', 2 => 'resources/bdd.php', 3 => 'resources/fonctions.php'], 'exclude' => [0 => '.gitignore']], $localRevision = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:922
PHP   6. Banago\PHPloy\PHPloy->setRevision($localRevision = '0419cb90e89efb3b021a90b00fd821f83c461b07') /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1249
PHP   7. League\Flysystem\Filesystem->write($location = '.revision', $contents = '0419cb90e89efb3b021a90b00fd821f83c461b07', $config = *uninitialized*) /home/omydoo/.config/composer/vendor/dreadnaut/phploy/src/PHPloy.php:1282
PHP   8. League\Flysystem\Ftp\FtpAdapter->write($path = '.revision', $contents = '0419cb90e89efb3b021a90b00fd821f83c461b07', $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem/src/Filesystem.php:55
PHP   9. League\Flysystem\Ftp\FtpAdapter->writeStream($path = '.revision', $contents = resource(106) of type (stream), $config = class League\Flysystem\Config { private array $options = [] }) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:155
PHP  10. ftp_fput($ftp = class FTP\Connection {  }, $remote_filename = '/.revision', $stream = resource(106) of type (stream), $mode = 2) /home/omydoo/.config/composer/vendor/league/flysystem-ftp/FtpAdapter.php:171

Oh Snap: Unable to write file at location: .revision. writing the file failed

I'm sorry, I don't understand all of this logs yet.. I saw "I wont open this connection", why ? Is the problem server side ?

dreadnaut commented 3 months ago

Er... I gave you the wrong suggestion: should be passive = true! For more information on the problem, see this Q&A.

But that would bring us in the original situation 🤔 Which seems connected to this error. What is happening here is that we can reach your FTP server on port 21 and login, but not on the port where we need to send files.

I'm not sure PHPloy supports this server configuration at the moment, might take a bit to understand what's going on.

OhMyLuDoo commented 2 months ago

Oh thank you very much for your patience! I'll keep looking on my own and I'll let you know if I have anything new!