Clear cache with deploy console not working

I updated to OC 4.x and try to clear the cache with the deploy plugin console like this:

Artisan::call('cache:clear');
echo Artisan::output();

The output is this:

Undefined constant "STDIN"

I don’t see the new dashboard. I use PHP 8.3 with deploy plugin 3.x.

I tried to clear the cache manually with FTP, but with no luck.

Hey @mathilde

In Deploy v3 and for Laravel 12 compatibility, you need to redeploy the Beacon files. Download them again and redeploy the script.

Now I’m getting following error:

posix_isatty(): Could not use stream of type 'Output'

And the cache isn’t cleared.

That’s a new one, I haven’t seen that error before. Will need to re-test it, because it was working last time I checked.

I have an OC installment, which I updated since version 1.x to now version 4.x. There clearing the cache command with the deploy console worked, even without re-deploying the beacon.

The ones that do not work were created from 3.x.

Oh, you’re using 3.x OCMS with 3.x Deploy?

Try using 3.x OCMS with 2.x Deploy

No, I updated from 3.x to 4.x and I’m using deploy plugin 3.x.

I have an installation I started with OC 1.x, which is now updated to 4.x. There the artisan command worked even without re-deploying the beacon. I have several installations I started with OC 3.x and updated to OC 4.x, there this error appears with re-deploying the beacon:

posix_isatty(): Could not use stream of type 'Output'
1 Like

I have the same problem. Deploy 3.1.0, OctoberCMS 4.1.9. It worked after first deploy. I re-deployed several times, run the october:install locally and re-deploy again.
Any command execution on Console returns:
posix_isatty(): Could not use stream of type 'Output'.

1 Like

I updated to OC 4.1.13 and I’m getting a new error when trying to set an artisan command:

file_exists(): open_basedir restriction in effect. File(/usr/share/terminfo/78/xterm) is not within the allowed path(s): (/home/ch26855/web/files:/home/ch26855/web/vorlage-rot.creation-handicap.ch/public_html:/home/ch26855/web/vorlage-rot.creation-handicap.ch/software_data:/home/ch26855/tmp:/home/ch26856/web/vorlage-rot.creation-handicap.ch/stats)

This could be a hint why it happens… I still haven’t been able to reproduce it. Will try again soon.

Update: after updating the app to v4.1.15, the problem was solved.

1 Like

In one installation it worked with v4.1.15. On another installation the error with file_exists() remains.

The installation that worked with the artsian command still had the deploy plugin v2.2.0 in place and it worked with OC v4.1.15.

OC’s v4.1.15 with deploy plugin v3.1.0 produce the open_basedir error.

To help with this.

There will be a Clear Cache button in the backend soon via:

  • System → Updates → Manage Plugins → Clear Cache

Just need to apply a few more security fixes, then release it. Added to both v3 and v4.