Jump to content
YeYeJuice

Website problem (Xampp). Can't connect to db

Recommended Posts

Whats up yall? I am trying to set up my website with xampp. I've been already setting up simple websites before, but now i am getting this Errors (depending if i use the IP directly or the SQL id name):

 

If i use ./SQLEXPRESS, this pops up (it is the same i am using for gameserver, and gameserver has no problem when connecting to database):

image.png.539dbfbd71ed7eb980a67429123331cd.png

 

If i use the ip directly, i get this:

image.png.22b6089714f50cc3d645b1e9033f0407.png

 

Some additional information:

 

  • I am using SQL server 2014.
  • The xampp version i am using ia 1.6.8.
  • Tried this also with 5 different websites from the public archive.
  • Already opened ports 80 and 1433 and made sure no other application was using them.
  • Enabled all protocols in sql server configuration manager
  • Tried turning firewall off and it didn't work as wel.
  • Reinstalled xampp and tried different versions but it didn't work.
  • In the /SQLEXPRESS host, i also tried adding ,1433 and it didn't work

 

Is there anything i am missing? A few weeks before i made another website and had no problems with it. Now that i am using a new vps i am getting thsi problem, kinda weird.

 

THANKS

Edited by YeYeJuice

Share this post


Link to post
Share on other sites

In SQL Configuration Manager, check the `SQL Server Network Configuration` Tab. Is TCP/IP Enabled there?

image.png.c7c8cfed542ea7c8d1acb647ab4dd175.png

 

If not, enable it.

If it is enabled, double click the TCP/IP protocol and go to the "IP Addresses" tab.

Look for the entry which has IP Address as your local IP (127.0.0.1) and make sure that's enabled as well.

image.png.27fd3e35b95d6a298c943363059da387.png

Share this post


Link to post
Share on other sites
46 minutes ago, Perseus said:

In SQL Configuration Manager, check the `SQL Server Network Configuration` Tab. Is TCP/IP Enabled there?

image.png.c7c8cfed542ea7c8d1acb647ab4dd175.png

 

If not, enable it.

If it is enabled, double click the TCP/IP protocol and go to the "IP Addresses" tab.

Look for the entry which has IP Address as your local IP (127.0.0.1) and make sure that's enabled as well.

image.png.27fd3e35b95d6a298c943363059da387.png

Hi!, yeah, all that was enabled already, but still getting the error 😞

Share this post


Link to post
Share on other sites
On 5/12/2020 at 4:49 PM, YeYeJuice said:

Whats up yall? I am trying to set up my website with xampp. I've been already setting up simple websites before, but now i am getting this Errors (depending if i use the IP directly or the SQL id name):

 

If i use ./SQLEXPRESS, this pops up (it is the same i am using for gameserver, and gameserver has no problem when connecting to database):

image.png.539dbfbd71ed7eb980a67429123331cd.png

 

If i use the ip directly, i get this:

image.png.22b6089714f50cc3d645b1e9033f0407.png

 

Some additional information:

 

  • I am using SQL server 2014.
  • The xampp version i am using ia 1.6.8.
  • Tried this also with 5 different websites from the public archive.
  • Already opened ports 80 and 1433 and made sure no other application was using them.
  • Enabled all protocols in sql server configuration manager
  • Tried turning firewall off and it didn't work as wel.
  • Reinstalled xampp and tried different versions but it didn't work.
  • In the /SQLEXPRESS host, i also tried adding ,1433 and it didn't work

 

Is there anything i am missing? A few weeks before i made another website and had no problems with it. Now that i am using a new vps i am getting thsi problem, kinda weird.

 

THANKS

.\SQLEXPRESS 

try this.

 

suggestion if this won't work., use zendserver you will find a guide here on the forum

Edited by cpworkerz

Share this post


Link to post
Share on other sites
On 5/16/2020 at 4:52 AM, cpworkerz said:

.\SQLEXPRESS 

try this.

 

suggestion if this won't work., use zendserver you will find a guide here on the forum

Tried but still not working. I've read the Zend guide but zend isn't free right?,or at least that what i saw when i researched it.

Share this post


Link to post
Share on other sites
6 hours ago, YeYeJuice said:

Tried but still not working. I've read the Zend guide but zend isn't free right?,or at least that what i saw when i researched it.

it's free, they give you 30 days trail for their admin control panel, but you may stay using it forever.

Share this post


Link to post
Share on other sites

Hello @YeYeJuice!

 

You can specify in config.php the full name of the instance of your MSSQL Server. You can see it in MSSQL Manager Studio program. 

12v.png

 

On 5/17/2020 at 11:21 PM, YeYeJuice said:

I've read the Zend guide but zend isn't free right?,or at least that what i saw when i researched it.

You can configure Apache + PHP. They are free and there are many guides in Google. No need to use heavy stacks like Zend or XAMPP.

  • Thanks 1

Share this post


Link to post
Share on other sites
On 6/3/2020 at 6:16 AM, V3ct0r said:

Hello @YeYeJuice!

 

You can specify in config.php the full name of the instance of your MSSQL Server. You can see it in MSSQL Manager Studio program. 

12v.png

 

You can configure Apache + PHP. They are free and there are many guides in Google. No need to use heavy stacks like Zend or XAMPP.

Hiya @V3ct0r, i triple checked that sql host + user + password were correct but i still get the error. It is rare because my server exes connect without any problem but php still can't connect. Also, i have all the sqlsrv drivers installed. Might there be a specific config inside sql management studio that i need to edit?

Share this post


Link to post
Share on other sites

Why? SQL management studio is only a client for the DB Server. If your SSMS and exes can connect to SQL, then it is likely a configuration issue in your php files.

 

Some common configurations I see:

(localhost)

.

.\SQLEXPRESS

127.0.0.1

<User>\SQLEXPRESS

 

AND WATCH OUT FOR THOSE BACK-SLASH

 


kong.png

a2.png

Share this post


Link to post
Share on other sites
1 hour ago, MonkeyCode said:

Why? SQL management studio is only a client for the DB Server. If your SSMS and exes can connect to SQL, then it is likely a configuration issue in your php files.

 

Some common configurations I see:

(localhost)

.

.\SQLEXPRESS

127.0.0.1

<User>\SQLEXPRESS

 

AND WATCH OUT FOR THOSE BACK-SLASH

 

Tried all of those but still won't connect. I also tried Perseus Web and it isn't connecting to the db as well, also some other extensions that use php aren't connecting. Somehow mssql is blocking the php connections but idk how.

Share this post


Link to post
Share on other sites

Hello @YeYeJuice!

 

Make sure that mixed authentication is enabled in MSSQL Server settings:

msqlprop.png


Share this post


Link to post
Share on other sites

Solution? same problem. the bug start in windows server 2012 R2. i'm using same programs.

I am using SQL server 2014.

The xampp version i am using is 1.6.8.

Tried this also with 5 different websites from the public archive.

Already opened ports 80 and 1433 and made sure no other application was using them.

Enabled all protocols in sql server configuration manager

Tried turning firewall off and it didn't work as wel.

Reinstalled xampp and tried different versions but it didn't work.

In the .\SQLEXPRESS host, i also tried adding ,1433 and it didn't work

Share this post


Link to post
Share on other sites

@neve 

I've done everything, but on older windows it open normal, on windows server 2012 the site doesn't connect to the sqlserver.

 

I installed the php drivers on xampp and even then it won't.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...