-js
> was wondering if it were possible to transfer a
> mysql database setup on one server to another
> without having to re-setup all the entire
> database. if so, how?
Dump the schema of the database to a file, and then import it on the new
server.
If you use phpMyAdmin, there are built-in features for doing this. I can't
remember offhand what the actual query is to get MySQL to show the schema,
but I'm sure someone on the MySQL list would know (hint, hint)
Cheers
Jon
Todd
--
Ariste Software, Petaluma, CA 94952
The manual entry for readdir() shows an example for displaying the files in a
directory. Use that as a basis for your code.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
We should have a Vollyballocracy. We elect a six-pack of presidents.
Each one serves until they screw up, at which point they rotate.
-- Dennis Miller
*/
Thanks again!
-Doug
I'm rather at a loss and my site is two days over deadline... :( If anyone
could point me in the right direction I'd be VERY appreciative...
The page I'm playing with is here:
http://www.kspope.com/phpswitch/test6.php
The switcher is at the bottom of the page... And it reloads the NN page, but
doesn't change it. (Don't mind the NN "mess" I"m working on the styling for
that browser right now)...
Thank in advance for any input... :)
Stephanie Sullivan
VioletSky Design
http://www.violetsky.net
³I am always doing that which I can not do, in order that I may learn how to
do it." -Picasso
Just my $0.02
Kevin Stone wrote:
> Well one option is obvious.. stop coding for legacy browsers. The company I
> work for recently decided to stop developing for anything older than NN6 and
> IE5. It is no longer cost effective for us to spend time developing for the
> other browsers. Okay so this may not be an option for you but it is
> something that I highly recommend you consider.
>
> Fortunately there is a fix to your problem and that is not to rely on
> Cookies. Many programmers have noted a number of incompatibilities and bugs
> with Cookies and legacy browsers which seem to change on a per-installation
> basis. You can instead use the $HTTP_USER_AGENT environment variable to
> cloak the style sheet.
>
> For example here's the $HTTP_USER_AGENT for Netscape 7.0 on Windows..
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1)
> Gecko/20020823 Netscape/7.0
>
> And for Internet Explorer 6.0 on Windows...
> Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
>
> You can preg_match() for the indicators and write a function that cloaks
> your CSS file. Something like this..
>
> -----------------
> <?
> function css_cloak ($useragent)
> {
> if (preg_match("/Netscape\/4/i", $useragent))
> return "legacy.css";
> else
> return "modern.css";
> }
>
> echo "<link href=\"".css_cloak($HTTP_USER_AGENT)."\" rel=\"stylesheet\"
> type=\"text/css\">";
> ?>
> ------------------
>
> Note I really don't know exactly what indicators are in the $HTTP_USER_AGENT
> for Netscape 4.0 but this should do the trick. Good luck!
>
> -Kevin
>
> ----- Original Message -----
> From: "Stephanie Sullivan" <des...@violetsky.net>
> To: <php-g...@lists.php.net>
>>łI am always doing that which I can not do, in order that I may learn how
>
> to
>
>>do it." -Picasso
>>
>>
-Kevin
> łI am always doing that which I can not do, in order that I may learn how
to
> do it." -Picasso
>
>
> ----- Original Message -----
> From: "Stephanie Sullivan" <des...@violetsky.net>
> To: "Kevin Stone" <ke...@helpelf.com>
> Sent: Friday, October 18, 2002 2:54 PM
> Subject: Re: [PHP] Newbie NN4 help...
>
>
> > on 10/18/02 4:22 PM, Kevin Stone at ke...@helpelf.com wrote:
> >
> > > Fortunately there is a fix to your problem and that is not to rely on
> > > Cookies. Many programmers have noted a number of incompatibilities
and
> bugs
> > > with Cookies and legacy browsers which seem to change on a
> per-installation
> > > basis. You can instead use the $HTTP_USER_AGENT environment variable
to
> > > cloak the style sheet.
> >
> > I wish that not counting NN4 into the mix was possible for this site...
> But
> > alas, this is the MOST backward-compatible-requirement client I've ever
> > had... That said, one question about the "fix" you posted...
> >
> > Will it do the same thing as the cookie idea? In other words... When
> someone
> > chooses the way they want to view the site, will it keep the same look
> > throughout the site? And when they come back, how does it know what to
> > "show" them?
> >
> > Stephanie Sullivan
> > VioletSky Design
> > http://www.violetsky.net
> >
> > "If we knew what we were doing, it wouldn't be called research , would
> > it?"-- Albert Einstein
> >
> >
>
> No this method is automatic. It will not give the user a choice. It will
> simply display the page one way for Netscape and another way for other
> browsers.
> -Kevin
Oh, ok... That won't work for me then... What I'm "fighting" with is a PHP
style switcher... I have six different CSS sheets and NN4 doesn't want to
play nice... I already know how to serve one stylesheet to NN and another to
newer browsers...
Thanks...
Stephanie Sullivan
VioletSky Design
http://www.violetsky.net
"When one door of happiness closes, another opens; but often we look so long
at the closed door that we do not see the one which has been opened for us."
-- Helen Keller
Chase
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Linux: Because rebooting is for adding hardware.
Fingerprint = CE24 057D 1E88 A253 3196 89DB 9FF0 9EF0 2F70 8BE8 BE8
On Saturday, October 19, 2002 8:14 AM
Stephanie Sullivan wrote:
[snip]
> NN4 doesn't want to play nice... I already know how to serve one
stylesheet to NN and another to
> newer browsers...
[/snip]
...then it seems like your problem has nothing to do with PHP.
Remember, NN might not even understand the CSS you are using. So, it's like
making the <blink> tag work in IE...
Also, you might want to check your (strict) DTD and see whether it is
causing any problem with NN.
- E
> Who is shutting who out? Upgrade. That's the clients job, not ours. The
> idea that being 100% compatible adds value to your service is a myth..
Well, though I don't disagree with your premise overall, I must disagree for
this particular site... This site is for a psychologist who has a myriad of
accessibility requirements which include supporting EVERY version browser
(at least by degrading well)... As well as blind, people that can't use a
mouse, etc... Yes, it's been quite an ordeal building this site in some
ways... And very interesting in others...
So whether it's a myth or not, that's what he hired me to do. And I will be
including a "gentle statement" on why/how to upgrade with a link to the
browser upgrade initiative... However, though I hate to admit it, there are
many people, my parents included, that have NO CLUE how to download and
install ANY kind of software... Hard to understand to us techie people...
But the facts... :-/
Stephanie Sullivan
VioletSky Design
http://www.violetsky.net
³I am always doing that which I can not do, in order that I may learn how to
do it." -Picasso
> [snip]
>> NN4 doesn't want to play nice... I already know how to serve one
> stylesheet to NN and another to
>> newer browsers...
> [/snip]
>
> ...then it seems like your problem has nothing to do with PHP.
Why is that? I have no problem with NN4 SEEING and SHOWING my CSS
correctly... My problem lies with SWITCHING to another style sheet using my
PHP switcher... And it works in every other browser I tried which is why I
thought asking you PHP experts might tell me why there might be a problem
with NN4 and some of the PHP coding... I am DEFINITELY NOT a PHP expert...
Nor do I know much about it...
But I do know how to write clean code that works cross browser... And I've
done that... Thus my reason for asking about the switcher here. :)
>
> Remember, NN might not even understand the CSS you are using. So, it's like
> making the <blink> tag work in IE...
It understands... There's no problem with the INITIAL load... Just the
switch...
>
> Also, you might want to check your (strict) DTD and see whether it is
> causing any problem with NN.
Nope... Used it before without a problem... :)
Thanks...
Stephanie Sullivan
VioletSky Design
http://www.violetsky.net
"Hide not your talents. They for use were made. What's a sundial in the
shade." -- Benjamin Franklin
> Why not simply specify them as alternate style sheets as per W3C
> recommendations? Check out http://www.alistapart.com/stories/alternate/
> for some great help.
Because that solution uses javascript (and other than that I HAVE used the
alternate stylesheet code that Mozilla reads)... My client has requested I
use server side code rather than client-side in case someone is surfing with
JS turned off...
Thus the attempted PHP solution...
Stephanie Sullivan
VioletSky Design
http://www.violetsky.net
"Opportunity is missed by most people because it is dressed in overalls and
looks like work." -- Thomas A. Edison
On Sunday, October 20, 2002 7:13 AM
Stephanie Sullivan wrote:
...[snip]...
>
> Why is that? I have no problem with NN4 SEEING and SHOWING my CSS
> correctly...
How did you check it? Are you sure the paths are correct? (".././" etc. <-
notice the dots)
> My problem lies with SWITCHING to another style sheet using my
> PHP switcher... And it works in every other browser I tried
So, how come you suspect that PHP is the problem? If it works on other
browsers, that means, most likely the problem lies somewhere else. For
example, NN will not work with @import. (I think you know that.) NN also has
a lot of problems relative paths. And most of the time, putting the
(external) CSS in the webroot folder fixes many problems.
...[snip]...
>
> It understands... There's no problem with the INITIAL load... Just the
> switch...
Again, this depends on how you test it.
Try this, after "switching" check the resulting source code and see if what
you're expecting is really there.
...[snip]...
Well, since we cannot see how you're doing it, it's really hard to tell
where the problem lies.
Anyway, here's a very simple (and, I hope, easy to understand) code. It
works on NN4. After each "switch" try checking the resulting code. Then, try
removing the <style> tags and change the "echo" commands to echo your
"<link /> 's ". During the process, you might just find out where the
problem is. :)
- E
PS.
If ever, just try posting your code esp. the portion where you think the
problem lies...
---------- test.php ----------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>TEST</title>
<style type="text/css">
<!--
<?php
if (isset($_GET['var'])){
switch ($_GET['var']){
case 1:
echo 'h1 { color:black; background:white; }';
break;
case 2:
echo 'h1 { color:white; background:blue; }';
break;
case 3:
echo 'h1 { color:blue; background:yellow; }';
break;
default:
echo 'h1 { color:black; background:white; }';
break;
}
}
echo "\n";
?>
//-->
</style>
</head>
<body>
<h1>TEST</h1>
<br />
<a href="test.php?var=1">Original</a> | <a href="test.php?var=2">White -
Blue</a> | <a href="test.php?var=3">Blue - Yellow</a>
</body>
</html>
>> Why is that? I have no problem with NN4 SEEING and SHOWING my CSS
>> correctly...
>
> How did you check it? Are you sure the paths are correct? (".././" etc. <-
> notice the dots)
Well, the reason I don't think it's related to my paths is that it shows the
ORIGINAL style sheet... It just won't switch to a new one... They all have
the same path...
>
>> My problem lies with SWITCHING to another style sheet using my
>> PHP switcher... And it works in every other browser I tried
>
> So, how come you suspect that PHP is the problem? If it works on other
> browsers, that means, most likely the problem lies somewhere else. For
> example, NN will not work with @import. (I think you know that.) NN also has
> a lot of problems relative paths. And most of the time, putting the
> (external) CSS in the webroot folder fixes many problems.
Then why would it see my path but then NOT see it when I "switch" the
sheets?
>
> ...[snip]...
>
>>
>> It understands... There's no problem with the INITIAL load... Just the
>> switch...
>
> Again, this depends on how you test it.
>
> Try this, after "switching" check the resulting source code and see if what
> you're expecting is really there.
It's not... It remains the original smreg.css sheet in the code and on the
page... Which is what I'd expect since my page color and text size didn't
change.
>
> ...[snip]...
> PS.
> If ever, just try posting your code esp. the portion where you think the
> problem lies...
Hmmm... The code you posted looks very similar to what I'm using... Here's
my code: http://contrastsweb.com/switcher/
Stephanie Sullivan
VioletSky Design
http://www.violetsky.net
"Your assumptions are your windows on the world. Scrub them off every once
in a while, or the light won't come in." - Isaac Asimov
On Sunday, October 20, 2002 11:22 PM
Subject: Re: [PHP] Newbie NN4 help...
Stephanie Sullivan wrote:
...[snip]...
> Well, the reason I don't think it's related to my paths is that it shows
the
> ORIGINAL style sheet... It just won't switch to a new one... They all have
> the same path...
OK. Perhaps, what I noticed is for a different topic: The path for your
"alternates" have ".././". Don't you think it should have two dots instead
of one? I think this doesn't have anything to do with the original problem
but those "alternates" doesn't really do anything in your code.
> >> My problem lies with SWITCHING to another style sheet using my
> >> PHP switcher... And it works in every other browser I tried
> >
> > So, how come you suspect that PHP is the problem? If it works on other
> > browsers, that means, most likely the problem lies somewhere else. For
> > example, NN will not work with @import. (I think you know that.) NN also
has
> > a lot of problems relative paths. And most of the time, putting the
> > (external) CSS in the webroot folder fixes many problems.
>
> Then why would it see my path but then NOT see it when I "switch" the
> sheets?
Have you tried putting them in a place where you wouldn't need to use
"../../", etc.?
...[snip]...
>
> It's not... It remains the original smreg.css sheet in the code and on the
> page... Which is what I'd expect since my page color and text size didn't
> change.
Well, then, now I think I'm convinced that the problem is with your
"switcher"...
> > PS.
> > If ever, just try posting your code esp. the portion where you think the
> > problem lies...
>
> Hmmm... The code you posted looks very similar to what I'm using... Here's
> my code: http://contrastsweb.com/switcher/
Interesting. The code that I posted was just for *testing*. Have you tried
it? Did you notice one big difference? The (very "crude") code that I posted
actually works in NN(4.78) the one that you're using doesn't. ->
http://contrastsweb.com/switcher/example.php (In my NN, it's always
"normal.css".)
There are at least two things you could do:
1. Tell the author that there seems to be a problem with the "switcher". I'm
sure the person will be happy to hear about it and perhaps give you some
advice how to fix it. Or,
2. Try creating your own. This way, you'll know how your own "switcher"
works. And perhaps, if there's a problem, you can ask the list more specific
questions while showing us which part of the code is creating havoc.
Try # 2--I'm sure you can do it... ;)
- E