CodeIgniter Forums
Server not found - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Server not found (/showthread.php?tid=81891)



Server not found - B.R. - 05-16-2022

Hello,

I am working together with another person. We are using xamp to develop the website.
On my computer with windows 10 everything works fine, but he gets this error. It's showing up after he tries to login or signup to the website.
So I believe it has something to do with the database as every function works except these two interacting with the database.
He tried also with windows 10, 11 and also WAMP. Additionaly he uses the same version of the website. All his CI4 files are equal as mine

[Image: txzgbifgb3nz.png]


RE: Server not found - InsiteFX - 05-17-2022

We cannot see the error in the image the image is to small.

But taking a guess here I would say that the database password is wrong.

Set MySQLi password.


Code:
// Shell from Control Panel or CMD - change your_password to yours.
cd mysql\bin
mysqladmin --user=userName password "yourPassword"

Try that.


RE: Server not found - pvt - 05-17-2022

1. Edit file
Code:
C:\Windows\System32\drivers\etc\hosts
add code:
Code:
127.0.0.1 testsite.test

2. In XAMPP Control Panel -> click button SHELL. In command line, use cd command to move code directory (ex:c:\xampp\htdocs\testsite)

3. use command:
Code:
php spark serve --host testsite.test --port 80

Note: In file .env and App/Config/App.php use must config base_url is: testsite.test

if OK, open web browser and access: testsite.test


RE: Server not found - B.R. - 05-29-2022

I have found the problem. Turns out that he hasn't edited the hosts file.
Thanks for your answers.