Codeigniter backend with vuejs frontend

Can you show your DB settings? Is there a display error message that you can turn on?

3 Likes

does it all work on your local host well?

if yes - then you should look for differences between local and here on the server

on local - PATH and addresses are mostly “localhost”
or sometimes even worse C:/user/docs/

while there on the server they are much more specific


“walk” through the addresses of your website (domain)
and see which ones work normally (e.g. domain only)

and when you go to some other addresses like “/user/login”
you get 500 (now I don’t see it anymore, so I don’t know exactly what you changed)

but in short it means you need to experiment and find out
“at which place” you get the error

and then when you know the “place” (address) where it happens
you look at the code yourself and what all the components are included there

and use the process of elimination until you find the cause

you can even comment some code
or create a dummy file that does not contain everything like the original
then call it (test)
then add more and more code inside and see when it “cracks”.


It is difficult for us to help you because we do not have insight into your files (php code is not displayed to us, also all files that start with .dot)

Additional problem is because you have more components

  • your app
  • then CI
  • .htaccess
  • DB

all of them can make e-500

it doesn’t have to be one cause, there can be 5 of them

5 Likes

Debug your code?

It’s your website, your account, your code, your framework of choice and your configuration. You’re by far the best person equipped here to diagnose this.

Remember: this is your code returning an error code. Only you can tell why that is.

If you find out that it’s caused by an error or odd behavior of the hosting, then we can definitely look into that. But if that’s the case, we need a LOT more information than “I get a 500 error” to be of any help.

5 Likes

@Rusty29

I meant to hide your website URL
because it throws out the user password and other data during the error
but here in the topic are many posts + imgs mentioning that address

So it would be best if you either change the environment in CI
so it doesn’t print sensitive data

or to upload it all on another subdomain that you will create
and which no one knows about except you
and that you are experimenting there

Because in the current state,
if I add “public” to the appropriate place in the address, I can see sensitive data

if I can do it, then someone malicious can “make a mess”.


after I discovered “the changed address”
I see error 500 again
I have a feeling that your PDO is breaking on DSN
or some other information it needs for DB is not correct

https://www.codeigniter.com/user_guide/database/configuration.html#dsn

6 Likes

Thank you for the help. I will look into my code.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.