> Ok, dans le cas où l'on :
> - est "in_string" pour une chaîne commençant par
> ' ou ";
It true that when not in string we ca look for the next
interesting char with a regexp like '\'|"|`|#|; and then
decide what to do with a select/case. Well... I'm not sure
that this will bring better performances... usually, there
is not much characters between an end of string and the next
interesting character.
> - on a trouvé le pendant de l'un de ces caractères
> plus avant dans la chaîne
>
> On pourrait peut-être tenter de :
> 1) utiliser un expression régulière du type
> ereg('([\]*)' . $char, $sql, $part)
> et mesurer la taille de $part[1] pour determiner
> s'il s'agit bien de la fin de chaine ou pas;
Will it really be faster ? If you have big text strings
with few quotes in it, yes. But before using ereg(), you
have to do some substr() (which can cost much time), don't
you ?
> 2) sinon réiterer la recherche sur la sous-chaine
> qui démarre à la position du caractère précédemment
> trouvé + 1
Well. If you want to test such an idea, you can. In my
opinion substr() has quite a heavy cost...
Benjamin
> Note: I've started to optimize the 'split_sql_file()' function.
> Running it with large dump files is now a bit better in
> terms of server charge... but there is still some work
> to do: just try to import the dump file from phpNuke
> with a distant connection...
Well, actually you've broken that piece of code again :((( It's the same
error than before I fixed that.
Your script makes no difference between \\\' and \\\\' because it
looks only two places backward before the quote when looking for
the end of a string.
That's why there was tat boolean value $escaped_backslash which could
handle an arbitrary big number of backslashes before a quote.
You can look for another way (other than mine) to do that faster, but
I don't think there is really one...
Benjamin
Hi!
I agree to Marc recommendation: your code has
to be under GPL just like the phpMyAdmin one.
No problem for me in this case.
It's nice to have an "associated" project :)
Loïc
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif
Hi,
First of all, sorry for disturbing you with my questions.
I made a JSP version of phpMyAdmin called jspMyAdmin. You can see a working demo at: http://www.webappcabaret.com/jspmyadmin/index.jsp
Webappcabaret is a free hosting with jsp and mysql support, but with banners, so I am sorry for the banners that appear on the right sight.
As you can see the layout of jspMyAdmin is same as phpMyAdmin's.
I made this script because some hosting providers support jsp, mysql but not php, and we have to admit that phpMyAdmin is the most used WWW tool for mysql administration.
So what's your opinion about this? How thoes this script interfere with phpMyAdmin License?
I intend to open on sourceforge.net a project (jspMyAdmin) to let people download and test the script, report bugs and sugestions.
So this is my problem.
Thank's for you patience.
Best regards.
Zsolti.
Hi List!
I've rewritten the way dump files are splitted into parts and
commited the new version of the scripts to the CVS.
If you have some free time, would you please test if it works
for you?
Note: I've started to optimize the 'split_sql_file()' function.
Running it with large dump files is now a bit better in
terms of server charge... but there is still some work
to do: just try to import the dump file from phpNuke
with a distant connection...
Loïc
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif
On Mon, 10 Sep 2001, Loïc wrote:
> Hi Lance!
>
> >No - I had already tried the cvs version with exactly
> >the same result - both on my home and office
> >machines - IE 5.0
>
> OK, with the current cvs version just try this:
> ---- new code starts here ----
> // lem9: we need "inline" instead of "attachment" for IE 5.5
> $content_disp = (USR_BROWSER_AGENT == 'IE')
> ? ''
> : 'attachment; ';
> header('Content-Disposition: ' . $content_disp . 'filename="' . $filename
> . '.' . $ext . '"');
> ---- new code ends here ----
>
> It seems that IE5.0 doesn't like this 'Content-Disposition'
> header as soon as it is used with a valid syntax ;)
Actually I've now realised that it works fine with or without 'inline'
when run under http, but the failures are occuring consistently under
https ??
REgards
Lance
>
> Regards,
> Loïc
>
>
> ______________________________________________________________________________
> ifrance.com, l'email gratuit le plus complet de l'Internet !
> vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
> http://www.ifrance.com/_reloc/email.emailif
>
>
Hi Lance!
>Hmm - I just tried that - now it opens a window saying
>'Getting File Information' first - then a few seconds later
>has the same error as previously.
Well, you may try what is in the current cvs version:
.....
} else {
$ext = 'sql';
// loic1: 'application/octet-stream' is the registered IANA type but
// MSIE and Opera seems to prefer 'application/octetstream'
$mime_type = (USR_BROWSER_AGENT == 'IE' || USR_BROWSER_AGENT ==
'OPERA')
? 'application/octetstream'
: 'application/octet-stream';
}
// Send headers
header('Content-Type: ' . $mime_type);
// lem9: we need "inline" instead of "attachment" for IE 5.5
$content_disp = (USR_BROWSER_AGENT == 'IE') ? 'inline' : 'attachment';
header('Content-Disposition: ' . $content_disp . '; filename="' .
$filename . '.' . $ext . '"');
header('Pragma: no-cache');
header('Expires: 0');
} // end download
.....
>BTW did yhou mean tbl_dump.php ??
No matter: we develop with php3 estensions, but you may
use php or php3 extensions depending on your server declared
script types.
Hope that helps,
Loïc
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif
Hi Olivier and List!
Well I take into account your suggestions Olivier: I hadn't
change directories names and created a new subdir which
name is "libraries" (since we use "images" and not "img",
etc.. this is the most consistant way to do).
I'm currently testing (since more than one hour) and all
seems right. I hope to commit the changes to the CVS
very soon.
Last question: since db_readdump is called by db_details
and tbl_properties, won't it be convenient to rename it
readdump only?
Loïc
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif
Hi All!
While splitting the big "lib.inc.php3" library I've faced
an other problem: name "libs" for the subdir I created
may be confusing with certain OSes.
And the subdir "images" may also be confusing because
it's a widely used alias for the Apache "images" subdir
Do you agree I rename all the subdir with the prefix
"pma_"?
Regards,
Loïc
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif
Sorry Guys ....
send dump doesnt seem to work in 2.2.0
Just says :-
Internet Explorer cannot download tbl_dump.php3 from www.uklinux.net
Works fine for dump to screen without the 'send' option ????
Regards
Lance