FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » error from phpadmin
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
error from phpadmin [message #176709] Thu, 19 January 2012 13:04 Go to next message
John is currently offline  John
Messages: 18
Registered: September 2010
Karma: 0
Junior Member
Hello everybody,

I'm new here and I hope to find some help.

I'm using XAMPP and so far without problems.

Now I'm trying to create via a small php utility, a database and tables.
Apparently all went well, according to a message which I echoed on the
screen.

However, when I start phpadmin, just to double check that everything
really went OK, I get the following error message :

#2002 - The server is not responding (or the local MySQL server's socket
is not correctly configured)


Looking up in internet I found an answer to a similar question, so I
added the following line :

$cfg['Servers'][$i]['socket'] = '';


to the file config.inc.php .

Still doesnt work. I get the same error.

What could have gone wrong in the whole process ?

Thanks for any hints.
Re: error from phpadmin [message #176710 is a reply to message #176709] Thu, 19 January 2012 13:15 Go to previous messageGo to next message
Andre[2] is currently offline  Andre[2]
Messages: 1
Registered: January 2012
Karma: 0
Junior Member
Le 19/01/2012 14:04, John a écrit :
> Hello everybody,
>
> I'm new here and I hope to find some help.
>
> I'm using XAMPP and so far without problems.
>
> Now I'm trying to create via a small php utility, a database and tables.
> Apparently all went well, according to a message which I echoed on the
> screen.
>
> However, when I start phpadmin, just to double check that everything
> really went OK, I get the following error message :
>
> #2002 - The server is not responding (or the local MySQL server's socket
> is not correctly configured)
>
>
> Looking up in internet I found an answer to a similar question, so I
> added the following line :
>
> $cfg['Servers'][$i]['socket'] = '';
>
>
> to the file config.inc.php .
>
> Still doesnt work. I get the same error.
>
> What could have gone wrong in the whole process ?
>
> Thanks for any hints.
>
>
>
>
>
>
This is my config.ini.php
$i++;
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'homepc';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';


hoppe it help.
André
Re: error from phpadmin [message #176711 is a reply to message #176709] Thu, 19 January 2012 13:17 Go to previous messageGo to next message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma: 0
Senior Member
On 1/19/2012 2:04 PM, John wrote:
> Hello everybody,
>
> I'm new here and I hope to find some help.
>
> I'm using XAMPP and so far without problems.
>
> Now I'm trying to create via a small php utility, a database and tables.
> Apparently all went well, according to a message which I echoed on the
> screen.
>
> However, when I start phpadmin, just to double check that everything
> really went OK, I get the following error message :
>
> #2002 - The server is not responding (or the local MySQL server's socket
> is not correctly configured)
>
>
> Looking up in internet I found an answer to a similar question, so I
> added the following line :
>
> $cfg['Servers'][$i]['socket'] = '';
>
>
> to the file config.inc.php .
>
> Still doesnt work. I get the same error.
>
> What could have gone wrong in the whole process ?
>
> Thanks for any hints.
>
>

Hi,

See my answer to cerr, in this very group, just 2 days ago.
The thread is named "phpmyadmin config problems".

Erwin Moller

--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
Re: error from phpadmin [message #176712 is a reply to message #176709] Thu, 19 January 2012 13:13 Go to previous messageGo to next message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma: 0
Senior Member
On Jan 19, 1:04 pm, John <J...@agdp.de> wrote:
> Hello everybody,
>
> I'm new here and I hope to find some help.
>
> I'm using XAMPP and so far without problems.
>
> Now I'm trying to create via a small php utility, a database and tables.
> Apparently all went well, according to a message which I echoed on the
> screen.
>
> However, when I start phpadmin, just to double check that everything
> really went OK, I get the following error message :
>
> #2002 - The server is not responding (or the local MySQL server's socket
> is not correctly configured)
>
> Looking up in internet I found an answer to a similar question, so I
> added the following line :
>
> $cfg['Servers'][$i]['socket'] = '';
>
> to the file config.inc.php .
>
> Still doesnt work. I get the same error.
>
> What could have gone wrong in the whole process ?
>
> Thanks for any hints.

See the thread https://groups.google.com/group/comp.lang.php/browse_frm/thread/c6c8b6d1027 615ae?hl=en#
also in this group.
Re: error from phpadmin [message #176734 is a reply to message #176711] Fri, 20 January 2012 13:31 Go to previous messageGo to next message
John is currently offline  John
Messages: 18
Registered: September 2010
Karma: 0
Junior Member
Am 19.01.2012 14:17, schrieb Erwin Moller:

>
> See my answer to cerr, in this very group, just 2 days ago.
> The thread is named "phpmyadmin config problems".
>

thanks to Erwin, André and Captain. I have tried all suggested
variations, without success. I have even re-installed the whole XAMPP.
There must be something odd in my code which provokes the error, and
still couldnt find the cause.

It's a simple test (I am a scratch beginner with php+MySQL) and I just
wanted to see if I can create a database, just create it without
tables. And then check with phpadmin if it has bee created successfully.

My php code is :

<?php
require('config.php');
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)
or die('Could not connect to MySQL database. ' . mysql_error());

mysql_select_db(SQL_DB,$conn);
$sql1 =
"CREATE DATABASE IF NOT EXISTS normative_db";
mysql_query($sql1) or die(mysql_error());
?>

and config.php is as follows :

<?php
define ("SQL_HOST","localhost");
define ("SQL_USER","root");
define ("SQL_DB","normative_db");
define ("SQL_PASS", "ciccio");
?>

A rather mysterious thing happens : as soon as I run the above code,
after that I cant access the MySQL any more.
It comes with errors like 'connect error', telling me to check all the
parameters, or it gives the error which I reported on my first post.
I have tried all the variations suggested in here. Nothng helps.

I have re-installed XAMPP already twice.

If I dare run the code, from that moment, NOTHING seem to work any more.

Out of desperation I am now trying to understand deeper the httd.conf
from Apache and the my.ini files of MySQL.

But its big waste of time and I wonder how much it will take before I
solve the problem and if it is all worth it.

But i HAVE to do my task with a database on the network, there's no way out.

Anybody has the faintest idea of what I am doing wrong ?

Is it so terrible to create a database without tables, and then check
that everything is OK by running phpadmin ?


Thanks again for all hints.

John.
Re: error from phpadmin [message #176738 is a reply to message #176734] Fri, 20 January 2012 13:36 Go to previous messageGo to next message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma: 0
Senior Member
On Jan 20, 1:31 pm, John <J...@agdp.de> wrote:
> Am 19.01.2012 14:17, schrieb Erwin Moller:
>
>
>
>> See my answer to cerr, in this very group, just 2 days ago.
>> The thread is named "phpmyadmin config problems".
>
> thanks to Erwin, Andr and Captain. I have tried all suggested
> variations, without success.  I have even re-installed the whole XAMPP.

I don't know about XAMPP but WAMPserver installs with a working copy
of PMA.
Re: error from phpadmin [message #176739 is a reply to message #176734] Fri, 20 January 2012 15:24 Go to previous message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma: 0
Senior Member
On 1/20/2012 2:31 PM, John wrote:
> Am 19.01.2012 14:17, schrieb Erwin Moller:
>
>>
>> See my answer to cerr, in this very group, just 2 days ago.
>> The thread is named "phpmyadmin config problems".
>>
>
> thanks to Erwin, André and Captain. I have tried all suggested
> variations, without success. I have even re-installed the whole XAMPP.
> There must be something odd in my code which provokes the error, and
> still couldnt find the cause.
>
> It's a simple test (I am a scratch beginner with php+MySQL) and I just
> wanted to see if I can create a database, just create it without tables.
> And then check with phpadmin if it has bee created successfully.
>
> My php code is :
>
> <?php
> require('config.php');
> $conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)
> or die('Could not connect to MySQL database. ' . mysql_error());
>
> mysql_select_db(SQL_DB,$conn);
> $sql1 =
> "CREATE DATABASE IF NOT EXISTS normative_db";
> mysql_query($sql1) or die(mysql_error());
> ?>
>
> and config.php is as follows :
>
> <?php
> define ("SQL_HOST","localhost");
> define ("SQL_USER","root");
> define ("SQL_DB","normative_db");
> define ("SQL_PASS", "ciccio");
> ?>
>
> A rather mysterious thing happens : as soon as I run the above code,
> after that I cant access the MySQL any more.
> It comes with errors like 'connect error', telling me to check all the
> parameters, or it gives the error which I reported on my first post.
> I have tried all the variations suggested in here. Nothng helps.
>
> I have re-installed XAMPP already twice.
>
> If I dare run the code, from that moment, NOTHING seem to work any more.
>
> Out of desperation I am now trying to understand deeper the httd.conf
> from Apache and the my.ini files of MySQL.
>
> But its big waste of time and I wonder how much it will take before I
> solve the problem and if it is all worth it.
>
> But i HAVE to do my task with a database on the network, there's no way
> out.
>
> Anybody has the faintest idea of what I am doing wrong ?
>
> Is it so terrible to create a database without tables, and then check
> that everything is OK by running phpadmin ?
>
>
> Thanks again for all hints.
>
> John.


Hi John,

I strongly advise you to ask in the forum of mysql:
http://forums.mysql.com/
We are PHP folk, not mysql folk.

This is a common problem, so read up there a little first, I am sure
many people asked the same question.

Good luck.
Regards,
Erwin Moller

--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Implied cast differs from explicit cast
Next Topic: HTTP headers and header()
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 02:00:57 GMT 2024

Total time taken to generate the page: 0.05600 seconds