Hello everybody,
As promised, the create-release.sh is ready, and located
in the scripts/ subdirectory, where I moved the other two
scripts.
And speaking about releases, what about getting rc4 out ?
It must simply be at least as good as the rc3... :)
Just a small thing : where is now the "Users" link ? (was in main.php3
in rc3). (which calls user_details.php3).
Regards,
Olivier
--
_________________________________________________________________
Olivier Mueller - om(a)8304.ch - PGPkeyID: 0E84D2EA - Switzerland
qmail projects: http://omail.omnis.ch - http://webmail.omnis.ch
I was using phpmyadmin with different user
account and discovered that while phpmyadmin
doesn't list the tables on the left frame for
restricted databases (which is good) when you
click on the database, it gives a confusing error
that no tables are found...which is not really
correct (also giving a mysql error output) it
should say that the user is restricted to use the
database...This might be more of an idea, but
here is a patch to correct this. Build on it.
Dan Allen
--- phpMyAdmin2.2.0rc3/db_details.php Sat Jul 21
22:02:58 2001
+++ phpMyAdmin/db_details.php Tue Aug 7 23:59:11
2001
@@ -10,7 +10,20 @@
} else {
show_message($message);
}
-
+/* We first need to check if we can actually do
anything with this database, because if not, no
point in
+ showing any of the stuff on the page
+ If you can't see the tables, then you can't
do anything, so here we go
+*/
+$query = "show open tables from $db";
+$result = mysql_query($query);
+if($result == "") {
+ if($AUTH)
+ $denied_user = $cfgServer['stduser'];
+ else
+ $denied_user = $cfgServer['user'];
+ echo "The user <span style=\"font-weight:
bold;\">$denied_user</span> does not have the
proper permissions to access this database.";
+}
+else {
/**
* Displays an html table with all the tables
contained into the current
* database
@@ -464,6 +477,7 @@
<?php
+} // End the if...else loop for permission to
access the database from all the way up top
/**
* Displays the footer
*/
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
Recently I installed mysql in my /home directory
and began to setup phpMyAdmin when I realized
that it was missing support for an alternative
'socket' connect, which is necessary to point to
any other mysql server than the main mysql server
on the machine. I have added a patch to version
2.2.0-rc3 that I downloaded just yesterday. I am
not an expert at using diff, but I did run diff
-Nuar and here are the results for lib.inc.php
and config.inc.php. I would really like this to
be added to the main tree, so if anyone likes the
idea but hates the way I send it, please e-mail
me at: bigredlinux at yahoo dot com to get me
on the right track because I have lots of these
patches.
--- phpMyAdmin2.2.0rc3/lib.inc.php Sat Jul 21
22:02:59 2001
+++ phpMyAdmin/lib.inc.php Tue Aug 7 23:27:27
2001
@@ -222,9 +222,19 @@
auth();
} else {
if(empty($cfgServer['port'])) {
- $dbh =
$connect_func($cfgServer['host'],$cfgServer['stduser'],$cfgServer['stdpass'])
or mysql_die();
+ // Check for socket
+ if(empty($cfgServer['socket'])) {
+ $dbh =
$connect_func($cfgServer['host'],$cfgServer['stduser'],$cfgServer['stdpass'])
or mysql_die();
+ } else {
+ $dbh = $connect_func($cfgServer['host'] . ':'
.
$cfgServer['socket'],$cfgServer['stduser'],$cfgServer['stdpass'])
or mysql_die();
+ }
} else {
- $dbh =
$connect_func($cfgServer['host'].":".$cfgServer['port'],$cfgServer['stduser'],$cfgServer['stdpass'])
or mysql_die();
+ // Check for socket
+ if(empty($cfgServer['socket'])) {
+ $dbh =
$connect_func($cfgServer['host'].":".$cfgServer['port'],$cfgServer['stduser'],$cfgServer['stdpass'])
or mysql_die();
+ } else {
+ $dbh =
$connect_func($cfgServer['host'].":".$cfgServer['port'].':'.$cfgServer['socket'],$cfgServer['stduser'],$cfgServer['stdpass'])
or mysql_die();
+ }
}
$PHP_AUTH_USER =
addslashes($PHP_AUTH_USER);
$PHP_AUTH_PW = addslashes($PHP_AUTH_PW);
@@ -303,12 +313,23 @@
$cfgServer['user']=$PHP_AUTH_USER;
$cfgServer['password']=$PHP_AUTH_PW;
}
-
- if (empty($cfgServer['port'])) {
- $link = $connect_func($cfgServer['host'],
$cfgServer['user'], $cfgServer['password']) or
mysql_die();
+
+ if(empty($cfgServer['port'])) {
+ // Check for socket
+ if(empty($cfgServer['socket'])) {
+ $link =
$connect_func($cfgServer['host'],$cfgServer['user'],$cfgServer['password'])
or mysql_die();
+ } else {
+ $link = $connect_func($cfgServer['host'] .
':' .
$cfgServer['socket'],$cfgServer['user'],$cfgServer['password'])
or mysql_die();
+ }
} else {
- $link =
$connect_func($cfgServer['host'].":".$cfgServer['port'],
$cfgServer['user'], $cfgServer['password']) or
mysql_die();
+ // Check for socket
+ if(empty($cfgServer['socket'])) {
+ $link =
$connect_func($cfgServer['host'].":".$cfgServer['port'],$cfgServer['user'],$cfgServer['password'])
or mysql_die();
+ } else {
+ $link =
$connect_func($cfgServer['host'].":".$cfgServer['port'].':'.$cfgServer['socket'],$cfgServer['user'],$cfgServer['password'])
or mysql_die();
+ }
}
+
}
else{
echo $strHostEmpty;
--- phpMyAdmin2.2.0rc3/config.inc.php Sat Jul 21
22:02:58 2001
+++ phpMyAdmin/config.inc.php Tue Aug 7 23:37:16
2001
@@ -23,6 +23,7 @@
// You can disable a server config entry by
setting host to ''.
$cfgServers[1]['host'] = 'localhost';
// MySQL hostname
$cfgServers[1]['port'] = '';
// MySQL port - leave blank for default port
+$cfgServers[1]['socket'] = '';
// MySQL socket - leave blank for default socket
$cfgServers[1]['adv_auth'] = false;
// Use advanced authentication?
$cfgServers[1]['stduser'] = '';
// MySQL standard user (only needed with advanced
auth)
$cfgServers[1]['stdpass'] = '';
// MySQL standard password (only needed with
advanced auth)
@@ -33,8 +34,9 @@
$cfgServers[1]['bookmarkdb'] = '';
// Bookmark db - leave blank for no bookmark
support
$cfgServers[1]['bookmarktable'] = '';
// Bookmark table - leave blank for no bookmark
support
-$cfgServers[2]['host'] = '';
+$cfgServers[2]['host'] = 'localhost';
$cfgServers[2]['port'] = '';
+$cfgServers[3]['socket'] = '';
$cfgServers[2]['adv_auth'] = false;
$cfgServers[2]['stduser'] = '';
$cfgServers[2]['stdpass'] = '';
@@ -62,7 +64,7 @@
// or set it to 0 to be given a list of servers
without logging in
// If you have only one server configured,
$cfgServerDefault *MUST* be
// set to that server.
-$cfgServerDefault = 1;
// Default server (0 = no default server)
+$cfgServerDefault = 0;
// Default server (0 = no default server)
$cfgServer = '';
unset($cfgServers[0]);
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
Hello,
Step 1 :
CREATE TABLE `test` (`id` VARCHAR(50) not null, `txt` VARCHAR(50) not null ,
PRIMARY KEY (`id`), INDEX (`id`));
INSERT INTO `test` (`id`, `txt`) VALUES ('1', 'test "test" test');
Step 2 :
Use phpmyadmin to Select id 1 (using tbl_select.php3),
Click Edit (do nothing) then click save.
<phpmyadmin>
SELECT `id`,`txt` FROM `test` WHERE 1 AND `id` LIKE \"1\" LIMIT 0, 30
MySQL said: You have an error in your SQL syntax near '\"1\" LIMIT 0, 30' at
line 1
</phpmyadmin>
No problem if you key is an int. Yuk.
Regards,
Alain.
P.S : php 4.0.5, phpmyadmin cvs, mysql 3.23.39
Hello,
Step 1 :
CREATE TABLE `test` (`id` VARCHAR(50) not null, `txt` VARCHAR(50) not null ,
PRIMARY KEY (`id`), INDEX (`id`));
INSERT INTO `test` (`id`, `txt`) VALUES ('1', 'test "test" test');
Step 2 :
Use phpmyadmin to Select id 1 (using tbl_select.php3),
Click Edit (do nothing) then click save.
<phpmyadmin>
SELECT `id`,`txt` FROM `test` WHERE 1 AND `id` LIKE \"1\" LIMIT 0, 30
MySQL said: You have an error in your SQL syntax near '\"1\" LIMIT 0, 30' at
line 1
</phpmyadmin>
No problem if you key is an int. Yuk.
Regards,
Alain.
Ok my subject is for fun, but seriously, I received an email
with an attached file:
phpMyAdmin-2.2.0rc3-php3.zip.bat
asking to take a look at the file.
I guess that depending on my email client, I could have seen
phpMyAdmin-2.2.0rc3-php3.zip and be tempted to double-click it.
Well I didn't because this contains a virus.
Bye
Marc
> > - in Documentation.html: "Obviously, you're free to use whatever
> > coding style you want." Thas was true by the time Tobias started
> > coding. Now, I would put "Please follow the PEAR coding
> standards as
> > close as possible when indenting and formating your code."
>
> Good idea! Are you modifying the file?
I'll do it tonight if it's not yet done...
> > - PLEASE TELL IT WHEN YOU CHANG ALL END OF LINES! It's really a hell
> > dealing with confilcts all over each file! It's really
> not a common
> > thing, so you *MUST* warn everybody before doing it!
I'm sorry I got angry a bit fast. Actually dealing with such simple
conflicts is not such a big thing...
> Do you mean when I used remove_control_m.sh?
Yep. In fact it is kind a coordination problem. Coordination is needed
as mentionnend in "what is not CVS" in Molli's CVS manual.
I thought you would warn the mailing list before doing such an
update. I think freezing CVS or something like that is required
before updates that deal with such an amount of lines or else
every body who has made changes in the meanwhile can't commit
them because they conflict.
An entry in ChangeLog is not sufficient because developers can't
see it early enough. When they try to commit and have conficts,
it's too late.
> Yes I added that line and it was to fix an error involving
> round brackets.
So that really was a quick hack. I think you should have
mentionned that in the code.
> The problem is that
> readdump.php is
> set-up to try and handle too many different types of queries.
Well, I still think it's suitable like that. Indeed dealing with
an uploaded dump and a dump that would have been pasted in the
SQL query textarea is really the same and I think it really has
to be treated the same way.
> > Actually, there is another big bug in this function that is here
> > since the very begining of phpMyAdmin. Try that kind of manual SQL
> > insert and it won't work:
> > insert into table values ('\\');insert into table values ('\\');
>
> This problem can be fixed with some quite complex code, but
> is will make the
> code so slow it will be absolutely useless for database/table
> restoration.
Well, it's already fixed in CVS. Go and have a look at the code.
Honestly, I don't think it's as complex as that. If you find
some bug, please tell me.
> The only solution I can think of is to split the database
> restore code from the normal queries text box
> So the choice is to either live with the current small bugs
> or rethink and
> redesign the whole section.
Now, the bug should be away. Could you test?
> I have included a small test table containing lots of
> different symbols,
> this was the test data used to verify the current system.
Could you test the current CVS version with your test table, to
see if my modification is ok? That would really help.
Benjamin
> > - lib.inc.php3: the function remove_remarks() is bugged because
> > if a string contains a '#' in a string, it is considered as a
> > comment. As stated in bug #444279.
> >
> > I already said that comments need not being stripped off queries.
> > Mysql works just fine if you give it all the comments. No need
> > removing them (as is was in my 2.1.0.1 version).
>
> do you know if there are old MySQL versions that would not like
> comments?
Well... I don't know. I just think that parsing scheme sould have been
designed to accept comments in queries for a while or else every client
would have to include a query parser to remove comments, which is not
really acceptable. One parser is enough.
In version 2.1.0 from Tobias, removal of comments was all but very
smart :
$sql = ereg_replace("#[^\n]*\n", "", $sql);
In fact I think Tobias had just thought it would speed up the SQL
query when adding this small feature. ChangeLog doesn't say
anything about a bug involving comments in queries...
Benjamin
PS: if you want to see original 2.1.0 sources, go to
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpnextadmin/phpMyAdmin/
:)))