php - session/localhost issue with shared IP addressGet the solution ↓↓↓
I have two websites on a same hosting provider (reseller account). they have separate domain and cPanel but same IP (shared) address. they both have use of php MySQL session login function. When there was only one website it used to work fine, but after adding the second website, there seems to be some conflictions related to 'sessions'. Like the dashboard pages are now accessible even if not logged in. also, once logged in, it does not show the user name (used to do before).
I am wondering if it happened because both websites uses 'localhost' in their connection string and they have the same IP address (shared). Does it mean they have the same 'localhost'?
Sorry if it a silly question. thanks everyone for reading.
Share solution ↓
Link To Answer People are also looking for solutions of the problem: sqlstate: integrity constraint violation: 1452 cannot add or update a child row: a foreign key constraint fails
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.