Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #4544

Re: error from phpadmin

From John <John@agdp.de>
Newsgroups comp.lang.php
Subject Re: error from phpadmin
Date 2012-01-20 14:31 +0100
Organization linuxfan.it News Server
Message-ID <jfbqau$9cg$1@nnrp.linuxfan.it> (permalink)
References <jf94cf$kkr$1@nnrp.linuxfan.it> <4f1817fc$0$6881$e4fe514c@news2.news.xs4all.nl>

Show all headers | View raw


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.

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

error from  phpadmin John <John@agdp.de> - 2012-01-19 14:04 +0100
  Re: error from  phpadmin Andre <pasMois@ailleur.be> - 2012-01-19 14:15 +0100
  Re: error from  phpadmin Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-01-19 14:17 +0100
    Re: error from  phpadmin John <John@agdp.de> - 2012-01-20 14:31 +0100
      Re: error from phpadmin Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-20 05:36 -0800
      Re: error from  phpadmin Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-01-20 16:24 +0100
  Re: error from phpadmin Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-19 05:13 -0800

csiph-web