php-general Digest 18 Jan 2006 09:56:19 -0000 Issue 3912
Topics (messages 228729 through 228748):
Re: Using GPG in Safe Mode
228729 by: emil.vanster.nu
228742 by: comex
228748 by: M
Re: need help arranging files!
228730 by: Nicholas Couloute
228731 by: Michael Hulse
generate database driven web pages
228732 by: Bing Du
228733 by: John Nichel
228735 by: Adi
228746 by: Gerry Danen
Re: Help with regular expressions
228734 by: Al
228736 by: php-mail
228737 by: Al
PHP CGI Security
228738 by: Tim Traver
mcrypt
228739 by: emil.vanster.nu
Re: error de php!
228740 by: Miguel Guirao
Re: Using aliases to have an email trigger a php script
228741 by: Sean Lerner
Re: Validating Radio Buttons in two directions
228743 by: HiFi Tubes
228744 by: HiFi Tubes
PHP load to high on server
228745 by: Albert
Image handling advice needed
228747 by: William Stokes
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Hi Edwin!
Thanks for the tips but my ISP hasn't given me root. I'm very sad to hear gpg
from cli won't work under safe mode. Are there any 100% php implementations of
GPG I could use? (because I guess that is the only way that is left?)
/Emil
>If you are using gnupg comand line, there is not way on PHP-safe mode.
>The only way that i know to wrap around this problem it's install pecl
>extension package
--- End Message ---
--- Begin Message ---
> >If you are using gnupg comand line, there is not way on PHP-safe mode.
I think it's possible to create a shell script that the PHP script can
call and get around safe_mode that way.
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
Hi Edwin!
Thanks for the tips but my ISP hasn't given me root. I'm very sad to hear gpg
from cli won't work under safe mode. Are there any 100% php implementations of
GPG I could use? (because I guess that is the only way that is left?)
/Emil
If you are using gnupg comand line, there is not way on PHP-safe mode.
The only way that i know to wrap around this problem it's install pecl
extension package
there is a way. if gpg binary is in safe_mode_exec_dir
--- End Message ---
--- Begin Message ---
Weberdev.com is a nice site!
On Tue, 17 Jan 2006 11:34 am, Richard Correia wrote:
You can locate a good directory reading script at
http://www.weberdev.com/get_example-1456.html
Thanks,
Richard
On 1/17/06, Nicholas Couloute <[EMAIL PROTECTED]> wrote:
I need to know how to arrange files alphabetically in my directory when
I display it on the browser! I have it display the filename foreach
that
exist is there a way to arrange by alphabet?
~Nick Couloute
co-owner/web Designer
SiDEkiCk2MuSiC.CoM
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
~Nick Couloute
co-owner/web Designer
SiDEkiCk2MuSiC.CoM
--- End Message ---
--- Begin Message ---
On Jan 17, 2006, at 7:09 AM, tedd wrote:
Worked great for me -- no problems whatsoever!
Sweet, thanks for checking... glad someone got it working. :)
--- End Message ---
--- Begin Message ---
Hello everyone,
Here is what I want to accomplish. Query the backend database and
generate a page listing all the staff members in table format that has
name, title, phone and office address. Staff name should be a link.
Clicking the link should query the database again and use the
information retrieved (e.g. projects, educations, etc.) to generate a
page for each staff member. A staff list page can be generated pretty
easily.
Now my question is how to keep the staffID (although it is not shown on
the staff list page, but is queried along with name, title, etc.) so
that when a staff name is clicked, his/her staffID will then be used to
query the DB for personal information.
Anybody have any handy working examples to give me some hints?
Thanks in advance for any help.
Bing
--- End Message ---
--- Begin Message ---
Bing Du wrote:
Hello everyone,
Here is what I want to accomplish. Query the backend database and
generate a page listing all the staff members in table format that has
name, title, phone and office address. Staff name should be a link.
Clicking the link should query the database again and use the
information retrieved (e.g. projects, educations, etc.) to generate a
page for each staff member. A staff list page can be generated pretty
easily.
Now my question is how to keep the staffID (although it is not shown on
the staff list page, but is queried along with name, title, etc.) so
that when a staff name is clicked, his/her staffID will then be used to
query the DB for personal information.
Anybody have any handy working examples to give me some hints?
Thanks in advance for any help.
<basic>
Pass it along in the url query string.
</basic>
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
you can also make it a hidden form variable that is updated dynamically when
a 'staff' member is clicked before form subimmion.
generated staff link:
<a href="javascript:sendForm(<?echo $staffID;?>);">
javascript:
function sendForm(staffID) {
document.myform.staffID.value = staffID;
document.myform.submit();
}
On 1/17/06, Bing Du <[EMAIL PROTECTED]> wrote:
>
> Hello everyone,
>
> Here is what I want to accomplish. Query the backend database and
> generate a page listing all the staff members in table format that has
> name, title, phone and office address. Staff name should be a link.
> Clicking the link should query the database again and use the
> information retrieved (e.g. projects, educations, etc.) to generate a
> page for each staff member. A staff list page can be generated pretty
> easily.
>
> Now my question is how to keep the staffID (although it is not shown on
> the staff list page, but is queried along with name, title, etc.) so
> that when a staff name is clicked, his/her staffID will then be used to
> query the DB for personal information.
>
> Anybody have any handy working examples to give me some hints?
>
> Thanks in advance for any help.
>
> Bing
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Take care...
Adam
--- End Message ---
--- Begin Message ---
Bing,
I think I have implemented at http://www.arls-lilies.org/h/board.php
what you are looking for. If so, let me know.
On 1/17/06, Bing Du <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> Here is what I want to accomplish. Query the backend database and
> generate a page listing all the staff members in table format that has
> name, title, phone and office address. Staff name should be a link.
> Clicking the link should query the database again and use the
> information retrieved (e.g. projects, educations, etc.) to generate a
> page for each staff member. A staff list page can be generated pretty
> easily.
>
> Now my question is how to keep the staffID (although it is not shown on
> the staff list page, but is queried along with name, title, etc.) so
> that when a staff name is clicked, his/her staffID will then be used to
> query the DB for personal information.
>
> Anybody have any handy working examples to give me some hints?
>
--- End Message ---
--- Begin Message ---
John Nichel wrote:
Carl Furst wrote:
Ok I am so stumped.. I'm doing something stupid and I can't figure it
out..
Here's the code:
<?php
$eml = '[EMAIL PROTECTED] ceo';
if (strpos($eml, ' ')) echo "yep, there are spaces\n"; //does strpos
see the
spaces?
echo preg_replace('/\s/', '', $eml); //WTF? Preg_replace does not?
echo "$eml\n";
?>
As you can see there are a bunch of spaces in that email address. I'm
trying
to use preg_replace to get rid of them. Strpos sees the spaces and the
first
echo statement is executed. The second echo prints nothing and the third
prints the original $eml with nothing substituted.
Can anyone see why the perl reg isn't seeing the spaces?
Carl
Working fine on my end (copy/pasted your code)
$eml= trim($eml);
$pattern= "%\s%"; //I use % as delimiters, more obvious for
me when debugging
if(preg_match($pattern, $eml) echo "yep, there are spaces\n";
preg_replace($pattern, '', $eml); echo "works now\n";
--- End Message ---
--- Begin Message ---
I tested this with
$t = "string string";
preg_replace('/\s/', '', $t);
echo $t;
And the replace left a space... so then I tried this
$t = "string string";
$t = preg_replace('/\s/', '', $t);
echo $t;
And the output was spaceless (spaced out?)... maybe worth a try?
HTH
Dan
--
-----Original Message-----
From: Al [mailto:[EMAIL PROTECTED]
Sent: 17 January 2006 22:45
To: [email protected]
Subject: Re: [PHP] Help with regular expressions
John Nichel wrote:
> Carl Furst wrote:
>
>> Ok I am so stumped.. I'm doing something stupid and I can't figure it
>> out..
>>
>> Here's the code:
>>
>> <?php
>>
>> $eml = '[EMAIL PROTECTED] ceo';
>> if (strpos($eml, ' ')) echo "yep, there are spaces\n"; //does strpos
>> see the
>> spaces?
>> echo preg_replace('/\s/', '', $eml); //WTF? Preg_replace does not?
>> echo "$eml\n";
>>
>>
>> ?>
>>
>> As you can see there are a bunch of spaces in that email address. I'm
>> trying
>> to use preg_replace to get rid of them. Strpos sees the spaces and the
>> first
>> echo statement is executed. The second echo prints nothing and the third
>> prints the original $eml with nothing substituted.
>>
>> Can anyone see why the perl reg isn't seeing the spaces?
>>
>> Carl
>>
>
> Working fine on my end (copy/pasted your code)
>
$eml= trim($eml);
$pattern= "%\s%"; //I use % as delimiters, more
obvious for me when debugging
if(preg_match($pattern, $eml) echo "yep, there are spaces\n";
preg_replace($pattern, '', $eml); echo "works now\n";
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__________ NOD32 1.1369 (20060117) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
--- End Message ---
--- Begin Message ---
Al wrote:
John Nichel wrote:
Carl Furst wrote:
Ok I am so stumped.. I'm doing something stupid and I can't figure it
out..
Here's the code:
<?php
$eml = '[EMAIL PROTECTED]
ceo';
if (strpos($eml, ' ')) echo "yep, there are spaces\n"; //does strpos
see the
spaces?
echo preg_replace('/\s/', '', $eml); //WTF? Preg_replace does not?
echo "$eml\n";
?>
As you can see there are a bunch of spaces in that email address. I'm
trying
to use preg_replace to get rid of them. Strpos sees the spaces and
the first
echo statement is executed. The second echo prints nothing and the third
prints the original $eml with nothing substituted.
Can anyone see why the perl reg isn't seeing the spaces?
Carl
Working fine on my end (copy/pasted your code)
$eml= trim($eml);
$pattern= "%\s%"; //I use % as delimiters, more obvious for
me when debugging
if(preg_match($pattern, $eml) echo "yep, there are spaces\n";
preg_replace($pattern, '', $eml); echo "works now\n";
Sorry, left off the new $eml
$eml= preg_replace($pattern, '', $eml); echo "works now\n";
--- End Message ---
--- Begin Message ---
Hi all,
ok, I have come up with an architecture to offer PHP to customers as a
CGI, and want to get some opinions to make sure I'm not missing any
glaring holes...
I've decided to use suPHP to fork off PHP CGI scripts as the user and
group. It seems to work pretty well, and I have tweaked suPHP (i.e.
hacked the source) to force a particular GID as the group that is
different than the web server group. I have also forced a chroot to a
jailed filesystem in which they have access to the php libraries just
like they would on a real system.
So here's the gist of it :
1) For arguments sake, lets say that Apache is running as user www and
group www.
2) Each user has their own user ID and all files in their directories
are group www, allowing apache to serve all of their web data.
3) When suPHP is invoked, it changes the script to user "u1234" and
group "www2", and jails the script to /jail
4) Because the user directories are shared across NFS, the users
structure (and all other users structures) are also mounted in the /jail
5) Because the users PHP script is running as user "u1234" and group
"www2", it has no access to any of the other users data.
6) All directories within a users space are in group "www" and have the
group sticky bit turned on, so that any files created will get created
with the "www" group and not the "www2" group. This will allow any files
the user creates in their own directories to be read by apache.
7) I have created an auto_prepend_file that sets the "session.save_path"
ini variable to a local directory within the users account so that
session files are not in a place that can be read by anyone else.
8) Safe mode is disabled to allow users to be able to use PHP scripts
that need safe mode to be turned off.
9) In the /jail area, all unnecessary binaries have been removed (things
like ifconfig, mount, and dev stuff) to make it more secure, but useful
binaries were left for scripts to use (things like ls, rm, etc...)
Does anyone see any glaring holes in this model ???
Thanks,
Tim.
--- End Message ---
--- Begin Message ---
Hello,
Since I'm running php under safe mode and the gpglib extension is not installed
in php at my isp gpg seems to be unavalible for me. Are there anything else I
can use with public/private keys that is as safe/solid/hard to crack as gpg?
The mcrypt extension is installed if that helps, or are all those crypts using
the same key for encryption and decryption? (I've read a couple pages about the
crypt algorithms at wikipedia, but it didn't really help me)
Regards Emil
--- End Message ---
--- Begin Message ---
Hi list!
I'm migrating to a new server, the old was:
-Apache/2.0.46 (Unix) y PHP/4.3.2
-MySQL 4.0.13
-Solaris 8
The following script used to run nicely in the old sever, but now that I
migrated the script to a new server with Apache/2.0.54 (Unix Solaris 9),
PHP/5.0.5 and MySQL 5.0.18.
I got the following error:
Fatal error: Cannot access empty property in
/usr/local/apache2/htdocs/intranet/phpclass/cdate.php on line 44
I hope any one here can help me!! Best Regards!!
I'm noting out line 44 in the following code fragment!
<?php
class CDate
{
var $mDate; // in actual OOP it should be private
var $NumDias;
var $AddmDate;
function CDate($d=0,$m=0,$y=0)
{
If ($y==0) // these three "if" are necessary because default parameters
must be constants.
{ $y=Date("Y"); }
If ($m==0)
{ $m=Date("m"); }
if ($d==0)
{ $d=Date("d"); }
$this -> mDate = Date("d-m-Y",mktime(0,0,0,$m,$d,$y));
} // end of constructor
function AddTime($y=0,$m=0,$d=0) // this method adds y years, m months and
d days to date
{
$array_date = explode("-",$this->mDate);
$this->AddmDate=Date("d-m-Y",mktime(0,0,0,$array_date[1]+$m,$array_date[0]+$
d,$array_date[2]+$y));
} // end of AddTime
// Devuelve el numero de dias que hay entre 2 fechas.
function DifTime($d1, $m1, $y1, $d2, $m2, $y2)
{
$unixtime1=mktime(0,0,0,$m1,$d1,$y1);
$unixtime2=mktime(0,0,0,$m2,$d2,$y2);
$this->$NumDias = $unixtime2 - $unixtime1; <--- This is the line 44
}
// Devuelve el resultado del numero de dias entre un intervalo.
function ReadNumDias()
{
return ($this->$NumDias / 86400)+1;
}
// crea un arreglo en donde pone las fechas intermedias de un intervalo
dado
function ArregloDias($d2,$m2,$y2)
{
$date_ini = explode("-",$this->mDate);
$alarray=
Date("Y-m-d",mktime(0,0,0,$date_ini[1],$date_ini[0],$date_ini[2]));
$aux=
Date("d-m-Y",mktime(0,0,0,$date_ini[1],$date_ini[0],$date_ini[2]));
//introduce el primer dato al array
$this -> DifTime($date_ini[0],$date_ini[1],$date_ini[2],$d2,$m2,$y2);
//Calcula el No. de dias entre intervalos
for($i=0;$i<$this -> ReadNumDias();$i++)
{
$dato_proc = explode("-", $alarray);
$date_proc = explode("-", $aux); // Exploda el valor anterior del
array
$aux=Date("d-m-Y",mktime(0,0,0, $date_proc[1], $date_proc[0]+1,
$date_proc[2])); //Calcula el siguiente valor y se lo asigna al array.
$alarray=Date("Y-m-d",mktime(0,0,0, $date_proc[1], $date_proc[0]+1,
$date_proc[2]));
$ArrayDias[$i]=$dato_proc[0]."-".$dato_proc[1]."-".$dato_proc[2];
}
return $ArrayDias;
}
function ReadArray()
{
return $this -> $ArrayDias;
}
// If you are a rigorous man, the following method should be your way to
access date
function ReadDate()
{
return $this->AddmDate; // you get the date in same format as
Date("Y-m-d")
} // ends of ReadDate
} // end of declaration class CDate
?>
Este mensaje es exclusivamente para el uso de la persona o entidad a
quien esta dirigido; contiene informacion estrictamente confidencial y
legalmente protegida, cuya divulgacion es sancionada por la ley. Si el
lector de este mensaje no es a quien esta dirigido, ni se trata del empleado
o agente responsable de esta informacion, se le notifica por medio del
presente, que su reproduccion y distribucion, esta estrictamente prohibida.
Si Usted recibio este comunicado por error, favor de notificarlo
inmediatamente al remitente y destruir el mensaje. Todas las opiniones
contenidas en este mail son propias del autor del mensaje y no
necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna
de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este
mensaje intencionalmente no contiene acentos.
This message is for the sole use of the person or entity to whom it is
being sent. Therefore, it contains strictly confidential and legally
protected material whose disclosure is subject to penalty by law. If the
person reading this message is not the one to whom it is being sent and/or
is not an employee or the responsible agent for this information, this
person is herein notified that any unauthorized dissemination, distribution
or copying of the materials included in this facsimile is strictly
prohibited. If you received this document by mistake please notify
immediately to the subscriber and destroy the message. Any opinions
contained in this e-mail are those of the author of the message and do not
necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of
its control, controlled, affiliates and subsidiaries companies. No part of
this message or attachments may be used or reproduced in any manner
whatsoever.<
--- End Message ---
--- Begin Message ---
Hey Everyone,
Thanks for your help. It was the absolute path I needed for the
toronto.txt file.
Sean
On 1/14/06, Sean Lerner <[EMAIL PROTECTED]> wrote:
Hello,
I'd like an email received to [EMAIL PROTECTED] to trigger a
php script.
I've configured the following:
in /var/www/wq/email_toronto.php
#!/usr/bin/php -q
<?
$var_toronto_file = fopen("toronto.txt", "a");
fwrite($var_toronto_file, "Email Received!\n");
fclose($var_toronto_file);
?>
--- End Message ---
--- Begin Message ---
Thanks to all of you who responded. Yes, I am doing the grid --basically
100 radio buttons, that is ten comments that must be ranked from 1 to 10.
Thanks so much Tedd for the JavaScript. I will keep that snippet for use
and study to improve my JS skills.
Unfortunately I should have said that I need to stay away from JS in case
the users have shut that down in their browsers. I know I can detect that
and have them turn it on but I'm dealing with folks who are not technically
adept and the survey is long. Given the length of the survey (over 100
questions) any additional hurdles will further lower the rate of return. So
I really think I need to do this in PHP though I am open to suggestions
here.
John, you said this could easily be done by returning to the page -- that is
what I am doing for the validation of the other questions on this page of
the survey. My question, then, is how do I validate this grid of radio
buttons in php without using Javascript and remember, too, that the user
only has to answer one question so I have to deal with possible numerous
null or no responses within the grid of radio buttons. They might rank
only one color and that would be okay or they might rank any number between
1 and 10.
(Additional note -- I am already carrying their responses over when they
submit the page so that any radio buttons selected are still selected when
the page shows up again after submitting.)
Again, thanks so much for the help so far but I'd like to keep this in php
if I could.
HiFi Tubes
On 1/17/06, tedd <[EMAIL PROTECTED]> wrote:
>
> >On Tue, 17 Jan 2006 10:45:01 -0500
> >John Nichel <[EMAIL PROTECTED] > wrote:
> >>
> >> Huh? Maybe I'm just not awake this morning and not understanding
> >> what you're trying to explain, but if you're using *radio* buttons,
> >> only *one* of the same name can be checked at any give time. ie:
> >>
> >> <input type="radio" name="color" value="1" /> Blue
> >> <input type="radio" name="color" value="2" /> Red
> >> <input type="radio" name="color" value="3" /> Black
> >> <input type="radio" name="color" value="4" /> Green
> >> <input type="radio" name="color" value="5" /> Mauve
> >>
> >> If you click "Red" and "Blue" is already selected, "Blue" will
> >> automatically be unselected. It's basic HTML.
> >
> >That's not what he's trying to do. Grab some coffee #;-D
>
>
> Thanks Ozz -- I was not in the mood to be wrong (again -- too much
> lately).
>
> When I was confronted with a similar problem before, I used html/php/js:
>
> <input type="radio" name="alter" onClick="return uncheckall(<?php
> echo($what_button); ?>)">
>
> Where the javascript was:
>
> <script language="javascript">
>
> function uncheckall(num)
> {
> var els=document.forms[0].elements;
> for ( i=els.length; i--; )
> {
> if( els[i].type.toLowerCase() == 'radio' )
> {
> if (i != num)
> {
> els[i].checked = false;
> }
> }
> }
> els[num].checked = true;
> document.alter; return false;
> }
> </script>
>
> That way, when the user clicks any rank, all of the buttons within
> that rank are unchcecked leaving only the most current checked.
>
> tedd
>
> --
> --------------------------------------------------------------------------------
>
> http://sperling.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Oops I should have said Austin not John below. Austin, could you or someone
point my in the direction of how to do this in PHP?
Thanks so much.
HiFi Tubes
On 1/17/06, HiFi Tubes <[EMAIL PROTECTED]> wrote:
>
> Thanks to all of you who responded. Yes, I am doing the grid --basically
> 100 radio buttons, that is ten comments that must be ranked from 1 to 10.
>
> Thanks so much Tedd for the JavaScript. I will keep that snippet for use
> and study to improve my JS skills.
>
> Unfortunately I should have said that I need to stay away from JS in case
> the users have shut that down in their browsers. I know I can detect that
> and have them turn it on but I'm dealing with folks who are not technically
> adept and the survey is long. Given the length of the survey (over 100
> questions) any additional hurdles will further lower the rate of return. So
> I really think I need to do this in PHP though I am open to suggestions
> here.
>
> John, you said this could easily be done by returning to the page -- that
> is what I am doing for the validation of the other questions on this page of
> the survey. My question, then, is how do I validate this grid of radio
> buttons in php without using Javascript and remember, too, that the user
> only has to answer one question so I have to deal with possible numerous
> null or no responses within the grid of radio buttons. They might rank
> only one color and that would be okay or they might rank any number between
> 1 and 10.
>
> (Additional note -- I am already carrying their responses over when they
> submit the page so that any radio buttons selected are still selected when
> the page shows up again after submitting.)
>
> Again, thanks so much for the help so far but I'd like to keep this in php
> if I could.
>
> HiFi Tubes
>
> On 1/17/06, tedd <[EMAIL PROTECTED]> wrote:
> >
> > >On Tue, 17 Jan 2006 10:45:01 -0500
> > >John Nichel < [EMAIL PROTECTED] > wrote:
> > >>
> > >> Huh? Maybe I'm just not awake this morning and not understanding
> > >> what you're trying to explain, but if you're using *radio* buttons,
> > >> only *one* of the same name can be checked at any give time. ie:
> > >>
> > >> <input type="radio" name="color" value="1" /> Blue
> > >> <input type="radio" name="color" value="2" /> Red
> > >> <input type="radio" name="color" value="3" /> Black
> > >> <input type="radio" name="color" value="4" /> Green
> > >> <input type="radio" name="color" value="5" /> Mauve
> > >>
> > >> If you click "Red" and "Blue" is already selected, "Blue" will
> > >> automatically be unselected. It's basic HTML.
> > >
> > >That's not what he's trying to do. Grab some coffee #;-D
> >
> >
> > Thanks Ozz -- I was not in the mood to be wrong (again -- too much
> > lately).
> >
> > When I was confronted with a similar problem before, I used html/php/js:
> >
> > <input type="radio" name="alter" onClick="return uncheckall(<?php
> > echo($what_button); ?>)">
> >
> > Where the javascript was:
> >
> > <script language="javascript">
> >
> > function uncheckall(num)
> > {
> > var els=document.forms[0].elements;
> > for ( i=els.length; i--; )
> > {
> > if( els[i].type.toLowerCase() == 'radio' )
> > {
> > if (i != num)
> > {
> > els[i].checked = false;
> > }
> > }
> > }
> > els[num].checked = true;
> > document.alter; return false;
> > }
> > </script>
> >
> > That way, when the user clicks any rank, all of the buttons within
> > that rank are unchcecked leaving only the most current checked.
> >
> > tedd
> >
> > --
> > --------------------------------------------------------------------------------
> >
> > http://sperling.com/
> >
> > --
> > PHP General Mailing List ( http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
--- End Message ---
--- Begin Message ---
Hi
I am running SuSE 9.2 (Kernel 2.6.8-24-default) with Apache 2.0.50 and PHP
4.3.8 (as an Apache module) on a Celeron 900 with 304MB RAM. This machine is
used for testing. We have made some changes to our PHP application and now
the machine is having trouble serving the pages. Apache is occupying almost
90% CPU usage.
My Apache log configuration is:
%a %b %H %r %>s %t %T %X
%a : Remote IP
%b : Size of response
%H : Protocol
%r : Request
%>s : Last status of request
%t : Time of request
%T : Time to serve
%X : Connection status after serving request
In the log below the last character after the timestamp indicates the
following:
X : Connection terminated before end serving request
+ : Connection might not be terminated
- : Connection terminated
As you will notice almost all the statuses is connection might not have been
terminated.
The page having the heaviest load uses 5 simultaneous sessions - they
refresh every 5 seconds. Even with just one connection there are 16 Apache
threads running all occupying between 5 and 20% of CPU.
Does anyone have an idea of what I can do (short of recoding)?
TIA
Albert
>From our Apache log:
192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200
[17/Jan/2006:16:16:29 +0000] 1 X
192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D1024&w=3D1280 HTTP/1.1 200
[17/Jan/2006:16:16:28 +0000] 2 +
192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200
[17/Jan/2006:16:16:29 +0000] 1 +
192.168.x.x 2839 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:29
+0000] 2 +
192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200
[17/Jan/2006:16:16:31 +0000] 1 +
192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200
[17/Jan/2006:16:16:31 +0000] 1 +
192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200
[17/Jan/2006:16:16:33 +0000] 0 +
192.168.x.x 429 HTTP/1.1 GET /display_background.php HTTP/1.1 200
[17/Jan/2006:16:16:32 +0000] 2 +
192.168.x.x 178 HTTP/1.1 GET /selObject.php HTTP/1.1 200
[17/Jan/2006:16:16:33 +0000] 3 +
192.168.x.x 3325 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200
[17/Jan/2006:16:16:33 +0000] 3 +
192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200
[17/Jan/2006:16:16:33 +0000] 3 X
192.168.x.x 1249 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:33
+0000] 4 +
192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200
[17/Jan/2006:16:16:34 +0000] 3 +
192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200
[17/Jan/2006:16:16:37 +0000] 1 +
192.168.x.x 431 HTTP/1.1 GET /display_background.php HTTP/1.1 200
[17/Jan/2006:16:16:35 +0000] 3 +
192.168.x.x 2823 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:35
+0000] 4 +
192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200
[17/Jan/2006:16:16:39 +0000] 0 +
192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D768&w=3D1024 HTTP/1.1 200
[17/Jan/2006:16:16:37 +0000] 3 +
192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200
[17/Jan/2006:16:16:38 +0000] 3 X
192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200
[17/Jan/2006:16:16:39 +0000] 2 X
192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200
[17/Jan/2006:16:16:39 +0000] 2 +
192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200
[17/Jan/2006:16:16:39 +0000] 3 +
192.168.x.x 2828 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:39
+0000] 3 +
192.168.x.x 429 HTTP/1.1 GET /display_background.php HTTP/1.1 200
[17/Jan/2006:16:16:42 +0000] 2 +
192.168.x.x 178 HTTP/1.1 GET /selObject.php HTTP/1.1 200
[17/Jan/2006:16:16:43 +0000] 2 +
192.168.x.x 3325 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200
[17/Jan/2006:16:16:43 +0000] 3 +
192.168.x.x 1260 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:43
+0000] 3 +
192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D1024&w=3D1280 HTTP/1.1 200
[17/Jan/2006:16:16:43 +0000] 3 +
192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200
[17/Jan/2006:16:16:46 +0000] 0 +
192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200
[17/Jan/2006:16:16:44 +0000] 1 +
192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200
[17/Jan/2006:16:16:46 +0000] 1 +
192.168.x.x 2807 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:46
+0000] 1 +
192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200
[17/Jan/2006:16:16:48 +0000] 0 +
192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200
[17/Jan/2006:16:16:48 +0000] 0 +
192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200
[17/Jan/2006:16:16:48 +0000] 0 +
192.168.x.x 431 HTTP/1.1 GET /display_background.php HTTP/1.1 200
[17/Jan/2006:16:16:49 +0000] 1 +
192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200
[17/Jan/2006:16:16:49 +0000] 1 +
192.168.x.x 2808 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:49
+0000] 2 +
192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200
[17/Jan/2006:16:16:51 +0000] 1 +
192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200
[17/Jan/2006:16:16:53 +0000] 0 +
192.168.x.x 429 HTTP/1.1 GET /display_background.php HTTP/1.1 200
[17/Jan/2006:16:16:51 +0000] 2 +
192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D768&w=3D1024 HTTP/1.1 200
[17/Jan/2006:16:16:51 +0000] 2 +
192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200
[17/Jan/2006:16:16:53 +0000] 2 X
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.19/231 - Release Date: 2006/01/16
--- End Message ---
--- Begin Message ---
Hello,
I need to build an image 'library'. The library will consist mostly of
images taken with digital cameras. Since unedited digicam pics will most
likely be too big for web usage they need to be edited automatically so that
they can be put to a web page.
I'am trying to deside between two options. To resize (=scale down) the
images once they are uploaded to server and store the smaller file or upload
and store the original BIG file and scale it to thumbnail once it's viewed.
Any opinnions about this.
I think that if the disk space is not an issue I could upload the original
file. But are there performance issues if the thumbnails are created "on the
fly" if there are hundreds of pics?
Thanks for your advice
-Will
--- End Message ---