[PHP-DB] Sorting the output (opendir() and readdir())

2002-01-12 Thread Christian Krzywicki


we have a directory with pics, that a user can associate with his data in a
form. we use opendir/readdir to show the directory contents. unfortunately,
this is not sorted. How can we achieve a listing in alphabetical order?

this is our code:

echo select name='image';
echo option value=''please select/option;
$fp = opendir(../pics/);
while ($file = readdir($fp)) { 
$selectfile=/pics/.$file;
if ($file==. OR $file==..) { } else {
$string_image .= option value='/pics/.$file.';
if ($selectfile==$image) { $string_image .=  SELECTED; }
$string_image .= .$file./option;
}   
}   
echo $string_image;
echo /select; 

-- 
PHP Database 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-DB] Problem with PHP, MySQL and Apache System

2002-01-10 Thread Christian Krzywicki


Hi all!

I do not know, if this is the right forum, but I need help . 

We have a stable Website, that handeled several thousand visitors a day
before xmas. We did some additional programming (mostly PHP) and are running
into problems right now, that can be reproduced, but we do not know where
they come from:

Server-side: Linux, Apache, PHP, MySQL
Client: Windows 2000, IE 5.5

Surfing the site is fast and traffic is very low today. After surfing around
for some minutes and trying to open a new page i just get back a blank page,
the browser tries to load the page but finally, a site not found appears.
This happens with all pages ... When i Restat my browser after closing all
windows, everything is fine.

Does anybody have a clue, what could be wrong? My knowledge on PHP and MySQL
is medium, on Apache it is almost zero... Any tips are appreciated!

Thanks

Christian

-- 
PHP Database 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]




AW: [PHP-DB] Problem with PHP, MySQL and Apache System

2002-01-10 Thread Christian Krzywicki

Hi Miles,

First of all: THANK YOU!

It seems, that the header() was causing the problem. After disabeling some
foreign code used for Banner mamangement i could not reproduce the hang
(hopefully...)

What is the problem with the header() - just curious...

Anyway, here what would have been my answers to your prior mail (-):

-
let me see, if i can get all answere here:

Is it possible to go upload an earlier version of one of the pages and hit 
it repeatedly to see if you get the same behaviour?
- they work all right, as far, as I can see ...


When you get the blank page, what do you see in View Source?
- while loading the page, I see the correct links  var display in the
status line at the bottom, then after a while it show the MS site not
found stuff...

What are browser settings for reloading the page?
- ??? As the vars change all the time, i guess it is a reload always? I did
not change the setting in the last serveral months and it always worked ...

What happens with other browsers, NS 4.x, NS 6.2, Opera?
- it seems that it works fine with NS 4.7   - correction - it just took
longer to reproduce :-(


I tend to suspect the browser. Is there another system you can use to 
patch/apply MSFT's updates?
- my browser ist 5.5 SP-I plus Sec.Patch

Are you trying to deliver files directly to the browser using header() 
calls, IE 5.5, w/o SP2 doesnt' handle them well.
- header() calls ??? 
- Yes, we included a piece of GPL for a poll system and another for
Banners. These use header(). will try to disable!

--- there is an admin section, which access the same data - no problem with
this, so i guess the mysql DB is ok
--- Is there a way, i can see on the server, what requests are coming in
from the browser?
--- I am quite shure, that some log files will have more information on
whats going on. What log files should I look at (Apache, MySQL, ?)(and where
to find them in a standard install under Linux?)  


-Ursprungliche Nachricht-
Von: Miles Thompson [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 10. Januar 2002 16:25
An: Christian Krzywicki; '[EMAIL PROTECTED]'
Betreff: Re: [PHP-DB] Problem with PHP, MySQL and Apache System


Is it possible to go upload an earlier version of one of the pages and hit 
it repeatedly to see if you get the same behaviour?
When you get the blank page, what do you see in View Source?
What are browser settings for reloading the page?
What happens with other browsers, NS 4.x, NS 6.2, Opera?

I tend to suspect the browser. Is there another system you can use to 
patch/apply MSFT's updates?
Are you trying to deliver files directly to the browser using header() 
calls, IE 5.5, w/o SP2 doesnt' handle them well.

Good luck - Miles Thompson

At 04:06 PM 1/10/2002 +0100, Christian Krzywicki wrote:

Hi all!

I do not know, if this is the right forum, but I need help .

We have a stable Website, that handeled several thousand visitors a day
before xmas. We did some additional programming (mostly PHP) and are
running
into problems right now, that can be reproduced, but we do not know where
they come from:

Server-side: Linux, Apache, PHP, MySQL
Client: Windows 2000, IE 5.5

Surfing the site is fast and traffic is very low today. After surfing
around
for some minutes and trying to open a new page i just get back a blank
page,
the browser tries to load the page but finally, a site not found appears.
This happens with all pages ... When i Restat my browser after closing all
windows, everything is fine.

Does anybody have a clue, what could be wrong? My knowledge on PHP and
MySQL
is medium, on Apache it is almost zero... Any tips are appreciated!

Thanks

Christian

--
PHP Database 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 Database 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 Database 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]