#sql problem

106 messages · Page 1 of 1 (latest)

violet mauveBOT
#

Project ID: N/A

junior wraith
#

Please explain your issue in here, if possible.

fresh nest
#

@junior wraith so i have a login on the railway project and everything at the begining deploy on a correct way, but when i send the request of the user and password (previously added on my database) this appears, but on my local project everythng is ok

pine haven
#

your frontend is trying to submit the login form with http, you need to be using https when hosting on railway

fresh nest
#

How i do that @pine haven

#

on my middleware code?

#

or how

pine haven
#

change http to https, please don't overthink this

distant hearthBOT
fresh nest
#

Brody

#

or @junior wraith

#

the error stays

#

its my first time doing this

junior wraith
#

When you send a request to your backend, currently the url you’re sending to is http. You need to change wherever it says http to https

#

simple as that

fresh nest
#

thanks!!

fresh nest
#

keeps persisting

pine haven
#

are you using https now

fresh nest
#

yeap

#

but the problem still there

pine haven
#

that looks like a completely different problem

fresh nest
#

i forced to redirect all to https by the php ... forcehttps

pine haven
#

please send a link to a page and steps to reproduce this issue

fresh nest
#

by dm?

pine haven
#

in this chat

fresh nest
#

let me create a user 4 u

#

or no, the request is the same

#

check dm

pine haven
#

please do not dm people without asking, this doesn't need to move to dms so please keep it in this chat

fresh nest
#

sorry

#

it wont happen again

pine haven
#

please provide some demo credentials

fresh nest
#

123456$

pine haven
#

okay I will look at the network tab when I'm back on the computer

fresh nest
#

ooookay

pine haven
#

in the mean time, have you looked into your deployment logs?

fresh nest
#

but only appears "warnings"

pine haven
#

have you read them?

fresh nest
#

2024-06-06T17:33:35.041970Z 0 [System] [MY-015015] [Server] MySQL Server - start.

2024-06-06T17:33:35.164734Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.0) starting as process 7

2024-06-06T17:33:35.171528Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2024-06-06T17:33:35.617852Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2024-06-06T17:33:35.916257Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

2024-06-06T17:33:35.916317Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

2024-06-06T17:33:35.923363Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.

2024-06-06T17:33:35.958738Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.4.0' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.

2024-06-06T17:33:36.261069Z 8 [Warning] [MY-011302] [Server] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"'

2024-06-06T17:33:36.261473Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock

pine haven
#

these are your database logs

fresh nest
#

huh

pine haven
#

look at your apps logs

fresh nest
#

this are my deploy logs

#

from the app

#

INFO Server running on [http://0.0.0.0:5887].

Press Ctrl+C to stop the server

2024-06-07 19:26:14 ................................................... ~ 0s

2024-06-07 19:30:28 ................................................... ~ 1s

2024-06-07 19:30:31 ................................................... ~ 0s

2024-06-07 19:30:36 ................................................... ~ 0s

2024-06-07 19:31:47 ................................................... ~ 0s

2024-06-07 19:31:52 ................................................... ~ 0s

2024-06-07 19:31:52 ................................................... ~ 0s

2024-06-07 19:36:55 ................................................... ~ 0s

pine haven
#

hmmm that's not helpful

#

are you sure you have setup the connection to the database properly

fresh nest
#

yes sir

#

i changed the var of the .env

pine haven
#

I assume if you set it up correctly it would have worked then lol

#

there is clearly as misconfiguration somewhere

fresh nest
#

idk where because

#

for example

#

the nixconfig that i had to use was this

#

NIXPACKS_BUILD_CMD=composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force

#

and is on the final on .env

#

btw, i had to use them here

pine haven
#

that's not how the build command works, you don't need to set the environment variable there, just specify the command itself

fresh nest
#

so i erase all of them?

#

and what abbout the start command

#

happens that i dont put that lemme show you

#

let the project start

#

brody

#

are u there?

pine haven
#

um when did i say to remove them both completely?

fresh nest
#

#18 0.608 Composer plugins have bee

#18 0.608 Do not run Composer as root/super user! See https://getcomposer.org/root for details

#18 0.761 Installing dependencies from lock file

#18 0.765 Verifying lock file contents can be installed on current platform.

#18 0.808 Package operations: 0 installs, 0 updates, 37 removals

#18 0.808 - Removing theseer/tokenizer (1.2.3)

#18 0.813 - Removing symfony/yaml (v6.4.7)

#18 0.816 - Removing spatie/laravel-ignition (2.7.0)

#18 0.819 - Removing spatie/ignition (1.14.1)

#18 0.823 - Removing spatie/flare-client-php (1.5.1)

#18 0.825 - Removing spatie/backtrace (1.6.1)

#18 0.828 - Removing sebastian/version (4.0.1)

#18 0.830 - Removing sebastian/type (4.0.0)

#18 0.833 - Removing sebastian/recursion-context (5.0.0)

#18 0.836 - Removing sebastian/object-reflector (3.0.0)

#18 0.841 - Removing sebastian/object-enumerator (5.0.0)

#18 0.841 - Removing sebastian/lines-of-code (2.0.2)

#18 0.841 - Removing sebastian/global-state (6.0.2)

#18 0.841 - Removing sebastian/exporter (5.1.2)

#18 0.841 - Removing sebastian/environment (6.1.0)

#18 0.841 - Removing sebastian/diff (5.1.1)

#18 0.841 - Removing sebastian/complexity (3.2.0)

#18 0.841 - Removing sebastian/comparator (5.0.1)

#18 0.841 - Removing sebastian/code-unit-reverse-lookup (3.0.0)

#18 0.841 - Removing sebastian/code-unit (2.0.0)

#18 0.841 - Removing sebastian/cli-parser (2.0.1)

#18 0.841 - Removing phpunit/phpunit (10.5.20)

#18 0.841 - Removing phpunit/php-timer (6.0.0)

#18 0.841 - Removing phpunit/php-text-template (3.0.1)

#18 0.841 - Removing phpunit/php-invoker (4.0.0)

#18 0.841 - Removing phpunit/php-file-iterator (4.1.0)

#18 0.841 - Removing phpunit/php-code-coverage (10.1.14)

#18 0.841 - Removing phar-io/version (3.2.1)

#18 0.841 - Removing phar-io/manifest (2.0.4)

#18 0.841 - Removing nunomaduro/collision (v7.10.0)

#

so this happens

#

:/

#

25 | >>> RUN composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force

26 |

27 |


ERROR: failed to solve: process "/bin/bash -ol pipefail -c composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force" did not complete successfully: exit code: 127

Error: Docker build failed

#

this one

pine haven
#

put your build are start commands back, just without the nixpacks variable

fresh nest
#

so i let the start build

#

but that happen

#

the "error"

pine haven
#

what is your current build and start command now?

fresh nest
#

lemme showu

#

Dockerfile:25


23 | # build phase

24 | COPY . /app/.

25 | >>> RUN composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force

26 |

27 |


ERROR: failed to solve: process "/bin/bash -ol pipefail -c composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force" did not complete successfully: exit code: 127

#

build logs

pine haven
#

please stop spamming build logs

fresh nest
#

okey

pine haven
fresh nest
#

failed

#

didnt deploy

pine haven
#

im sorry but that does not answer the question

fresh nest
#

sorry, im not understanding

#

:c

pine haven
#

im not sure if i will be able to help here then

fresh nest
#

my current build and start comman

#

the start command is php artisan serve --host=0.0.0.0 --port=$PORT, but i deleted the nixbuilds from the custom build how you told me

pine haven
#

i never told you to remove your build command

#

again, put it back, without the nixpacks environment variable

fresh nest
#

I UNDERSTANNNNDDDD

#

the (")

pine haven
#

bruh

fresh nest
#

sorry men

#

hhahahshahsha let me deploy it again

pine haven
#

what is your current build and start command now?

fresh nest
#

composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force && php artisan serve

#

nope

#

Likewise, thank you very much brody