Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP Page with Database login wont open!

Featured Replies

Hi,

 

Im using Uniformserver for long time and this is the first time Im facing with the problem. Yesterday I downloaded the latest version of Uniformserver and before that I think I was using 4.3 version. As I said before that I didnt had any kind of problems and all worked OK, but after I unpacked this latest version and added my files within "www" folder I started server and when I want to open any .php page which is connecting to database Im getting fallowing error:

 

Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in D:\CouponsDepo.com\www\connections\coupons_database.php on line 9

 

Warning: mysql_connect() [function.mysql-connect]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in D:\CouponsDepo.com\www\connections\coupons_database.php on line 9

 

Fatal error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in D:\CouponsDepo.com\www\connections\coupons_database.php on line 9

 

now the file whihc is used to connect to database it as fallows:

 

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_coupons_database = "localhost";
$database_coupons_database = "rootdatabase";
$username_coupons_database = "root";
$password_coupons_database = "root";
$coupons_database = mysql_connect($hostname_coupons_database, $username_coupons_database, $password_coupons_database) or trigger_error(mysql_error(),E_USER_ERROR); 
?>

 

what is the problem, why with previous versions I didnt had any problem and with this new open I cant open any php file whos connecting to database. BTW clean .html pages are ok, and also .php pages which are not connecting to database login file so I guess that something is wrong in there.

 

Thanks for help. Best Regards

Instead of:

$hostname_coupons_database = "localhost"

Try:

$hostname_coupons_database = "127.0.0.1"

All the best

Ric :angry:

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...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.