Re: [PHP] Case Sensitivity

2002-08-11 Thread Rasmus Lerdorf

Filesystems are meant to be case-sensitive, and yes, URL's are as well.
It's an abomination that Windows and old-style Mac filesystems are not.
You need to keep track of that in your code.  'a' and 'A' are just as
different as 'a' and 'b'.

-Rasmus

On Sun, 11 Aug 2002, Rich Hutchins wrote:

> I've had a web site under development on my Win2k box at home. I built and
> tested everything with PHP 4.2.2 and Apache 1.3.24.
>
> Now, I have transitioned everything up to my host who is using a Linux box,
> PHP 4.2.2 and Apache 1.3.26.
>
> One of the pages I designed has code that retrieves a list of thumbnails
> from a directory name passed into the page then embeds a hyperlink to a full
> size version of the thumbnail. Incidentally, the full size version is in the
> same directory as the thumbnail and has a very similar filename:
> tn_01.jpg and 01.jpg (guess which one's the thumbnail).
>
> Here's the problem:
> When I run the page on the web host's server, the link to the full size
> image dies. I've tracked the problem to the case of the linked filename.
> Basically, unless the filename in the href matches the case of the target
> file, the link dies and I get that nice, little red X indicating the link to
> the image is broken.
>
> For example, the target image DSC01.JPG _MUST_ be referenced in the href
> as: href='../path/to/resource/DSC01.JPG' If I reference it as
> href='../path/to/resource/dsc01.jpg' the target image won't show up.
>
> I have temporarily resolved the issue by designating the filename used in
> the href as upper case using the strtoupper() function, but I can't believe
> that's the way it's SUPPOSED to be done.
>
> What I'd like to know is does the Linux server introduce case-sensitivity
> issues? It doesn't seem to matter with the elements of the path, just the
> target filename.
>
> Help is appreciated.
>
> Rich
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Case Sensitivity

2002-08-11 Thread Andrew Brampton

Linux file systems are case sensitive... So the file Hello.php is different
to hello.php... Both can exist at the same time and contain different
content, but they are different...On the windows file system files aren't
case sensitive so Hello.php would be the same as hello.php...

So I suggest in your PHP coding that you get all the cases (of files) the
same throughout your app, or if you want to be lazy do what you are doing at
the moment (ie changing the case with strtoupper())

Andrew
- Original Message -
From: "Rich Hutchins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 12, 2002 2:20 AM
Subject: [PHP] Case Sensitivity


> I've had a web site under development on my Win2k box at home. I built and
> tested everything with PHP 4.2.2 and Apache 1.3.24.
>
> Now, I have transitioned everything up to my host who is using a Linux
box,
> PHP 4.2.2 and Apache 1.3.26.
>
> One of the pages I designed has code that retrieves a list of thumbnails
> from a directory name passed into the page then embeds a hyperlink to a
full
> size version of the thumbnail. Incidentally, the full size version is in
the
> same directory as the thumbnail and has a very similar filename:
> tn_01.jpg and 01.jpg (guess which one's the thumbnail).
>
> Here's the problem:
> When I run the page on the web host's server, the link to the full size
> image dies. I've tracked the problem to the case of the linked filename.
> Basically, unless the filename in the href matches the case of the target
> file, the link dies and I get that nice, little red X indicating the link
to
> the image is broken.
>
> For example, the target image DSC01.JPG _MUST_ be referenced in the
href
> as: href='../path/to/resource/DSC01.JPG' If I reference it as
> href='../path/to/resource/dsc01.jpg' the target image won't show up.
>
> I have temporarily resolved the issue by designating the filename used in
> the href as upper case using the strtoupper() function, but I can't
believe
> that's the way it's SUPPOSED to be done.
>
> What I'd like to know is does the Linux server introduce case-sensitivity
> issues? It doesn't seem to matter with the elements of the path, just the
> target filename.
>
> Help is appreciated.
>
> Rich
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Case Sensitivity

2002-08-11 Thread Rich Hutchins

I've had a web site under development on my Win2k box at home. I built and
tested everything with PHP 4.2.2 and Apache 1.3.24.

Now, I have transitioned everything up to my host who is using a Linux box,
PHP 4.2.2 and Apache 1.3.26.

One of the pages I designed has code that retrieves a list of thumbnails
from a directory name passed into the page then embeds a hyperlink to a full
size version of the thumbnail. Incidentally, the full size version is in the
same directory as the thumbnail and has a very similar filename:
tn_01.jpg and 01.jpg (guess which one's the thumbnail).

Here's the problem:
When I run the page on the web host's server, the link to the full size
image dies. I've tracked the problem to the case of the linked filename.
Basically, unless the filename in the href matches the case of the target
file, the link dies and I get that nice, little red X indicating the link to
the image is broken.

For example, the target image DSC01.JPG _MUST_ be referenced in the href
as: href='../path/to/resource/DSC01.JPG' If I reference it as
href='../path/to/resource/dsc01.jpg' the target image won't show up.

I have temporarily resolved the issue by designating the filename used in
the href as upper case using the strtoupper() function, but I can't believe
that's the way it's SUPPOSED to be done.

What I'd like to know is does the Linux server introduce case-sensitivity
issues? It doesn't seem to matter with the elements of the path, just the
target filename.

Help is appreciated.

Rich


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Case-Sensitivity with PHP and MySQL

2001-04-11 Thread Plutarck

I had a similar question about case-sensitivity, and I was told that MySQL
is automatically case-insensitive! But it depends on your version of MySQL.

Go to the mysql manual and look at chapter 20.16 "Case sensitivity in
searches".

In the newest versions of MySQL, all searches are case-insensitive by
default. To make them case-sensitive however, is a royal pain in the arse.


--
Plutarck
Should be working on something...
...but forgot what it was.


"midget2000x" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I am writing a PHP script that operates on a MySQL database that uses the
> e-mail address as the primary key.  If the e-mail doesn't exist in the
database
> (when a form is submitted), I want to insert a new record.  If it does, I
want
> to update the existing record.
>
> How can I make the query that checks if the e-mail exists
case-insensitive?  I
> want to avoid users creating another record if they type in their e-mail
in a
> different case.
>
> Thanks!
>
> rory
>
>  ---
> providing the finest in midget technology
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Case-Sensitivity with PHP and MySQL

2001-04-11 Thread midget2000x


I am writing a PHP script that operates on a MySQL database that uses the
e-mail address as the primary key.  If the e-mail doesn't exist in the database
(when a form is submitted), I want to insert a new record.  If it does, I want
to update the existing record.  

How can I make the query that checks if the e-mail exists case-insensitive?  I
want to avoid users creating another record if they type in their e-mail in a
different case.

Thanks!

rory

 ---
providing the finest in midget technology

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] case sensitivity checking?

2001-02-15 Thread Martin A. Marques

El Jue 15 Feb 2001 16:41, James, Yz escribió:
>
> Oh, another thing.  Anyone know of any tools like PHP MyAdmin for
> PostGresSQL ?

phpPgAdmin?

http://www.greatbridge.org/project/phppgadmin/projdisplay.php

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] case sensitivity checking?

2001-02-15 Thread James, Yz

> make the login field BINARY.

Thanks! ;)

James.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] case sensitivity checking?

2001-02-15 Thread Mark Maggelet

On Thu, 15 Feb 2001 19:41:04 -, James, Yz ([EMAIL PROTECTED])
wrote:
>Hi Guys,
>
>Just a quick question.  If I have a user database, with joe_bloggs
>as a
>user, what would I need to do to make sure that his login details
>matched
>the case sensitivity in a MySQL database?  Say if he logged in as
>JOE_BLOGGS, could I return an error?

make the login field BINARY.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] case sensitivity checking?

2001-02-15 Thread James, Yz

Hi Guys,

Just a quick question.  If I have a user database, with joe_bloggs as a
user, what would I need to do to make sure that his login details matched
the case sensitivity in a MySQL database?  Say if he logged in as
JOE_BLOGGS, could I return an error?  I'm guessing this is going to turn
into some complicated regex that mashes my brain.

Oh, another thing.  Anyone know of any tools like PHP MyAdmin for
PostGresSQL ?

Thanks,
James.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]