My situation:
I've installed phpcodegenie and changed settings.php to suit my configuration.
The first problem i encountered tho, was when i would go to index.php, a username/password window would pop-up. This seems to be a left over code from phpmyedit i think. I've solved this by changing the $cfgServers[1]['auth_type'] value in config.inc.php to config instead of http.
Now index.php works, i get an overview of the database in mysql, but when i select a database or tabel, it says 'unable to select data'. Im still browsing the code to see where the problem comes from, but so far no luck.
Any ideas?
thanks,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-01-30
I am getting the same error is there anyone who has gotten past this..I am interested to find out how to use this. This looks like it would really ease things
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This message is printed from the datacon.php file which contains the following code.
<?
include("settings.php");
/* make connection to database */
/* If no connection made, display error Message */
$dblink=MYSQL_CONNECT($MySqlHostname, $MySqlUsername, $MySqlPassword) OR DIE("Unable to connect to database");
/* Select the database name to be used or else print error message if unsuccessful*/
@mysql_select_db("$db") or die( "Unable to select database");
?>
I think it will throw this error if the hostname, userName and password that you have put in the settings.php file dont allow u to choose a db.. easy way to check.. try accessing mysql and the db in question by mysql command line argument
mysql -uUserName -pPassword -hHostname dbName
and see if that causes any error.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok. Register_globals WAS turned on, both in php.ini and in apache.
Sometimes however, it seems that Apache needs the Register_globals flag turned on as a per directory directive. Which is what i've done: problem solved
tnx.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I still can't select the database even after trying the sample files and suggestions here. Any ideas? Register_globals is On. Any ideas would be appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm getting this exact error message. phpCodeGenie runs fine (ie it connects to my database) but the forms it generates cannot connect to the same db. I'm on WinXP/IIS5.1 and php 4.12.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Register globals is turned ON for my host provider. How do I correct this error, do I place an .htaccess file in the root of the phpcodegenie application and what do I need to have in that file? Anyone corrected this yet?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been mailed with questions on how i specifically solved this problem. As i run my own Apache server i can only answer for that and this won't work for those depending on a providers apache server, though there may be a workaround.
============================
In Apache, its simple:
Create a per directory options line and add this directive:
php_flag register_globals on
In your httpd.conf this would look like this:
<Directory "/home/user/www/phpcodegenie/">
php_flag register_globals on
</Directory>
====================
The workaround if you rely on a provider:
Add a .htaccess file to the directory where the applications (phpcodegenie) is running from and put
php_flag register_globals on
in it. That should do the trick, but i havent tested it. And beware that the global conf file (your providers httpd.conf) can override this.
You may need to include <Directory "/home/etc> and </Directory>.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
as the first with a problem, i'm honourred :o
My situation:
I've installed phpcodegenie and changed settings.php to suit my configuration.
The first problem i encountered tho, was when i would go to index.php, a username/password window would pop-up. This seems to be a left over code from phpmyedit i think. I've solved this by changing the $cfgServers[1]['auth_type'] value in config.inc.php to config instead of http.
Now index.php works, i get an overview of the database in mysql, but when i select a database or tabel, it says 'unable to select data'. Im still browsing the code to see where the problem comes from, but so far no luck.
Any ideas?
thanks,
btw, that should be 'unable to select database'
I am getting the same error is there anyone who has gotten past this..I am interested to find out how to use this. This looks like it would really ease things
This message is printed from the datacon.php file which contains the following code.
<?
include("settings.php");
/* make connection to database */
/* If no connection made, display error Message */
$dblink=MYSQL_CONNECT($MySqlHostname, $MySqlUsername, $MySqlPassword) OR DIE("Unable to connect to database");
/* Select the database name to be used or else print error message if unsuccessful*/
@mysql_select_db("$db") or die( "Unable to select database");
?>
I think it will throw this error if the hostname, userName and password that you have put in the settings.php file dont allow u to choose a db.. easy way to check.. try accessing mysql and the db in question by mysql command line argument
mysql -uUserName -pPassword -hHostname dbName
and see if that causes any error.
That is not the problem. For testing purposes, i'm using an username/password with all rights to the complete database. u/p/h are correct.
I noticed it's datacon.php that produces the message and that it is due to an apparent inability to select the database as it 'dies'...
is ur Register Globals Turned on on our machine?? if not, $db will not be passed in the get String..
Ok. Register_globals WAS turned on, both in php.ini and in apache.
Sometimes however, it seems that Apache needs the Register_globals flag turned on as a per directory directive. Which is what i've done: problem solved
tnx.
I still can't select the database even after trying the sample files and suggestions here. Any ideas? Register_globals is On. Any ideas would be appreciated.
I'm getting this exact error message. phpCodeGenie runs fine (ie it connects to my database) but the forms it generates cannot connect to the same db. I'm on WinXP/IIS5.1 and php 4.12.
Hi. I've got the same problem. (Windows NT running phpdev (apache+mysql+php) and in redhat 8.0).
Also, when I try to disply a file (readme install, etc) I get :
File not found. Try again
Also I've noticed that $db in datacon.php is allways null. But I've set the $db="mydatabase" and I still 'dies'....
Miguel
Register globals is turned ON for my host provider. How do I correct this error, do I place an .htaccess file in the root of the phpcodegenie application and what do I need to have in that file? Anyone corrected this yet?
I have been mailed with questions on how i specifically solved this problem. As i run my own Apache server i can only answer for that and this won't work for those depending on a providers apache server, though there may be a workaround.
============================
In Apache, its simple:
Create a per directory options line and add this directive:
php_flag register_globals on
In your httpd.conf this would look like this:
<Directory "/home/user/www/phpcodegenie/">
php_flag register_globals on
</Directory>
====================
The workaround if you rely on a provider:
Add a .htaccess file to the directory where the applications (phpcodegenie) is running from and put
php_flag register_globals on
in it. That should do the trick, but i havent tested it. And beware that the global conf file (your providers httpd.conf) can override this.
You may need to include <Directory "/home/etc> and </Directory>.