Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

WallyJ's avatar

Cashier Issue - No Subscriptions Table

Some time ago I installed Cashier, then gave up on my Braintree integration.

Came back and upgraded my Laravel app to 6.0 and continued with trying to use Stripe instead.

Paused my efforts for a bit, came back, and everything was going swimmingly until I tried to create a subscription. I received this error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'livewire.subscriptions' doesn't exist (SQL: insert into subscriptions (name, stripe_id, stripe_status, stripe_plan, quantity, trial_ends_at, ends_at, user_id, updated_at, created_at) values (Pro, sub_HQ0mXbcjZM4IkC, active, plan_HL5jsx4kxls9W7, 1, ?, ?, 1, 2020-06-06 22:45:09, 2020-06-06 22:45:09))

I then looked to find that there was no "subscriptions" table... so I checked and found there is no migration for that table either. Not sure why this didn't install, though I have moved my app via Laragon a few times.

I figured I would "reinstall" Cashier. But when I run:

composer require laravel/cashier

I get this:

The "https://repo.packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed Failed to enable crypto failed to open stream: operation failed https://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date

[Composer\Downloader\TransportException] The "https://packagist.org/p/laravel/cashier%245c4d356393720d50a9e647db17075c43fc310cbb72d4e700636f870c4b9be393.json" file could not b e downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed Failed to enable crypto failed to open stream: operation failed

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []...

How do I fix this?

0 likes
8 replies
WallyJ's avatar

Thanks. Should I remove cashier before trying to require it again, or just run composer require laravel/cashier?

WallyJ's avatar

Cleared the composer cache. ran require laravel/cashier and received this message:

[Composer\Downloader\TransportException] The "https://repo.packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed Failed to enable crypto failed to open stream: operation failed

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []...

I turned Windows Defender Firewall off and tried again. No change. Same error.

Btw, I'm running Laragon as my server, in case that helps anything.

WallyJ's avatar

Good idea, but when I run composer self-update I receive this:

[Composer\Downloader\TransportException] The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed Failed to enable crypto failed to open stream: operation failed

self-update [-r|--rollback] [--clean-backups] [--no-progress] [--update-keys] [--stable] [--preview] [--snapshot] [--set-channel-only] [--] []

WallyJ's avatar

So... I was able to run composer self-update after adding the line:

openssl.cafile= "C:\laragon\etc\ssl\cacert.pem"

to my php.ini file.

But though I ran composer require laravel/cashier to get the migrations again, they did not show up after the install again. So I removed Cashier and required it again. Then I ran into an error when composer tries to update symfony after I required laravel/cashier again:

Installation failed, reverting ./composer.json to its original content.

[RuntimeException] Could not scan for classes inside "L:\www\Livewire\vendor/symfony/intl/Resources/stubs" which does not appear to be a file nor a folder

I'm thinking about completely reinstalling laragon and a fresh Laravel install, then moving my app over to the new install.

I don't know what to do at this point.

WallyJ's avatar

I ran php artisan migrate just for kicks, and it added the stripe columns in my user table, but did not add the subscriptions table as described in the Cashier docs here:

https://laravel.com/docs/7.x/billing

I thought that maybe it never got to that migration due to an error in the past, so I manually deleted the 4 Cashier/Stripe fields in the DB and re-ran php artisan migrate.

This time I received this error: L:\www\Livewire\vendor\laravel\framework\src\Illuminate\Database\Connection.php:464 PDOException::("SQLSTATE[HY000]: General error: 7 Error on rename of '.\livewire#sql-15ac_2b.frm' to '.\livewire\users.frm' (Errcode: 13 - Permission denied)")

Isn't developing fun??? :(

I googled the error and found a few people talking about Foreign Key problems. I have no idea.

Would it be easier to remove Cashier, Push the changes to my Git repo, then do a fresh Laragon, fresh Laravel install, then pull the repo and then try and reinstall Cashier again?

bugsysha's avatar

Isn't developing fun??? :(

It is when you are not on Windows. Install Ubuntu and enjoy IT.

Please or to participate in this conversation.