waiting for localhost

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Re: waiting for localhost

Postby gsc1ugs » 08. March 2016 17:34

Thank you in advance helping me with this problem, I have just changed db_driver from mysqli to MySQL which are both available and got this... ive hidden some credentials, this is defineatly a db driver issue but not sure what to do about it

Fatal error: Uncaught Error: Call to undefined function DB\mysql_connect() in C:\xampp\htdocs\auctioneerslive\system\library\db\mysql.php:7 Stack trace: #0 C:\xampp\htdocs\auctioneerslive\system\library\db.php(9): DB\MySQL->__construct('localhost:8000', 'g**********'', 'x**********'', 'auctioneerslive', '3306') #1 C:\xampp\htdocs\auctioneerslive\index.php(31): DB->__construct('mysql', 'localhost:8000', 'g**********', 'x**********', 'auctioneerslive', '3306') #2 {main} thrown in C:\xampp\htdocs\auctioneerslive\system\library\db\mysql.php on line 7
gsc1ugs
 
Posts: 21
Joined: 08. March 2016 12:45
Operating System: windows 7

Re: waiting for localhost

Postby Altrea » 08. March 2016 17:48

gsc1ugs wrote:What program you recommend to debug php? I could at least get to the line where it hangs

You already know the line:
[Tue Mar 08 15:17:24.594050 2016] [:error] [pid 7888:tid 1612] [client ::1:50388] PHP Warning: mysqli::__construct(): MySQL server has gone away in C:\\xampp\\htdocs\\auctioneerslive\\system\\library\\db\\mysqli.php on line 7


gsc1ugs wrote:I have just changed db_driver from mysqli to MySQL which are both available and got this... ive hidden some credentials, this is defineatly a db driver issue but not sure what to do about it

No it is not. Read the red box: http://php.net/manual/en/function.mysql-connect.php
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: waiting for localhost

Postby gsc1ugs » 08. March 2016 17:54

Altrea wrote:No it is not. Read the red box: http://php.net/manual/en/function.mysql-connect.php


Sorry, don't understand, which bit, its a large page
gsc1ugs
 
Posts: 21
Joined: 08. March 2016 12:45
Operating System: windows 7

Re: waiting for localhost

Postby Altrea » 08. March 2016 18:20

There is only one red box very early at the top of this page
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: waiting for localhost

Postby gsc1ugs » 08. March 2016 18:48

So no sqli?
gsc1ugs
 
Posts: 21
Joined: 08. March 2016 12:45
Operating System: windows 7

Re: waiting for localhost

Postby Altrea » 09. March 2016 01:08

No...
The old MySQL Drivers are removed in PHP 7.0.
So you need to use MySQLi or PDO (which are two new MySQL drivers) to connect with your MySQL Database
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: waiting for localhost

Postby gsc1ugs » 09. March 2016 09:32

Its the mysqli thats hanging
gsc1ugs
 
Posts: 21
Joined: 08. March 2016 12:45
Operating System: windows 7

Re: waiting for localhost

Postby Altrea » 09. March 2016 10:10

I know (!!!)
but you was wondering about the message which occurs if you switch the Database driver to old MySQL...
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: waiting for localhost

Postby gsc1ugs » 09. March 2016 10:22

Yes that is correct, I get an error message which would be nice with mysqli, I'm stumped
gsc1ugs
 
Posts: 21
Joined: 08. March 2016 12:45
Operating System: windows 7

Php connection type PHP Version 7.0.4

Postby gsc1ugs » 09. March 2016 10:49

Hi

I have a problem with connection using latest xampp for windows, what connection should I use that works with PHP Version 7.0.4, ive been told MySQL is not supported in this version

Thanks inadvance
gsc1ugs
 
Posts: 21
Joined: 08. March 2016 12:45
Operating System: windows 7

Re: Php connection type PHP Version 7.0.4

Postby Altrea » 09. March 2016 11:10

Hi,

You have also been told that you should use MySQLi or PDO.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Php connection type PHP Version 7.0.4

Postby gsc1ugs » 09. March 2016 11:21

Thanks Altrea ... that's what the waiting is... what is the syntax for using PDO?
gsc1ugs
 
Posts: 21
Joined: 08. March 2016 12:45
Operating System: windows 7

Re: Php connection type PHP Version 7.0.4

Postby Nobbie » 09. March 2016 11:25

The syntax is described in the PDO manual: http://php.net/manual/en/book.pdo.php
Nobbie
 
Posts: 8769
Joined: 09. March 2008 13:04

Re: Php connection type PHP Version 7.0.4

Postby gsc1ugs » 09. March 2016 11:43

This is re-inventing the wheel, this site works online, its obviously configuration with XAMPP which I'm very close to uninstalling, ive got SQL server but I don't want all that on the system, I just want phpmyadmin which also works and ive created the database, mysqli should work but it spinning the localhost and ive no way of checking why, I thought this xampp forum would have an idea
gsc1ugs
 
Posts: 21
Joined: 08. March 2016 12:45
Operating System: windows 7

Re: waiting for localhost

Postby gsc1ugs » 09. March 2016 12:19

Just made a small file to connect and placed it online to my site it works fine, I have the same problem, this must be the MySQL in xampp, any other sugestions

Code: Select all
<?php
// Version
define('VERSION', '2.1.0.1');

// Configuration
if (is_file('config.php')) {
   require_once('config.php');
}

// Install
if (!defined('DIR_APPLICATION')) {
   header('Location: install/index.php');
   exit;
}

// Startup
require_once(DIR_SYSTEM . 'startup.php');

// Registry
$registry = new Registry();

// Loader
$loader = new Loader($registry);
$registry->set('load', $loader);

// Config
$config = new Config();
$registry->set('config', $config);

//Step1
$db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE, DB_PORT);
 if (!$db) {
    die("Database connection failed miserably: " . mysql_error());
 } else {
   die ("Success");
 }
 

?>
<html>
 <head>
 <title>Success</title>
 </head>
 <body>

 </body>
</html>
gsc1ugs
 
Posts: 21
Joined: 08. March 2016 12:45
Operating System: windows 7

PreviousNext

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 64 guests