|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 18 Jan 2006 22:23:44 -0000 Issue 3913
php-general-digest-help
lists.php.net
Date: Wed Jan 18 2006 - 16:23:44 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 18 Jan 2006 22:23:44 -0000 Issue 3913
Topics (messages 228749 through 228784):
Re: error de php!
228749 by: Ahmed Saad
Re: Image handling advice needed
228750 by: Ahmed Saad
228752 by: Miles Thompson
228754 by: Jochem Maas
Re: Validating Radio Buttons in two directions
228751 by: Steve Clay
mcrypt
228753 by: Duffy, Scott E
Re: header data being inserted into message
228755 by: ET Support
228764 by: ET Support
help me plz
228756 by: suresh kumar
228757 by: Max Belushkin
help me pllzzzzzz
228758 by: suresh kumar
228760 by: Jay Blanchard
228761 by: John Nichel
228762 by: Dan Parry
228763 by: Duffy, Scott E
228765 by: Jochem Maas
228770 by: Anas Mughal
228772 by: Robert Cummings
228778 by: Richard Correia
Re: PHP load to high on server
228759 by: Adi
228766 by: Jochem Maas
228768 by: Stefan Moldoveanu
Re: PHP Cache (was PHP load to high on server)
228767 by: Albert
228769 by: Jochem Maas
228771 by: Stefan Moldoveanu
parse string
228773 by: Ron Eggler (Paykiosks)
Drop down directory structure list box
228774 by: Sugrue, Sean
228775 by: Sumeet
228776 by: Jay Blanchard
URL -> stream context
228777 by: Richard Lynch
Interesting problem in PHP and Squirrelmail
228779 by: Mark
228780 by: Robert Cummings
228781 by: Robert Cummings
228782 by: Mark
228784 by: Richard Lynch
SimpleXML
228783 by: Jay Paulson
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
On 1/18/06, Miguel Guirao <miguel.guirao
mail.telcel.com> wrote:
> $this->$NumDias = $unixtime2 - $unixtime1; <--- This is the line 44
hmm wasn't it supposed to be $this->NumDias? (with no $ before the propery name)
-ahmed
attached mail follows:
On 1/18/06, William Stokes <kalles
operamail.com> wrote:
> 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.
Why not scaled them once and for all (first option)? are you going to
need them in BIG size on the server or anything else?
-ahmed
attached mail follows:
At 04:10 AM 1/18/2006, William Stokes wrote:
>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
Will,
Before you go too far, have you looked at Gallery or Gallery2?
Miles
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.371 / Virus Database: 267.14.18/230 - Release Date: 1/14/2006
attached mail follows:
William Stokes wrote:
> 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?
Will - do a bit of both.
upload and store the original in fullsize (and _without_ any compression or whatever).
then have a script (or set of them, depending or your needs) that doesn't just blindly
resample a requested image according some given criteria (set in either the script or
the from the request) but first check it's 'own' cache for previously resampled files ...
if it finds a valid file in 'its cache' then just spit it out; otherwise generate the
requested image file (manipulating/resampling however you like) and save it to the cache
(most likely to disk) and also output the image data.
this effectively gives you one time resampling with some added bonuses:
1. when the underlying extension (e.g. GDlib) is upgraded you can clear your image
cache and have all your images regenerated automatically using the improved routines
(e.g. crisper resamping)
2. when the client wants all the images on the site to be a different
tint/size/ratio/format/etc you can change you image generation scripts, clear the image
cache and bingo - 'fixed' images.
below is a class I use to store images I cache in the manner I described above.
using it is quite simple [if you don't want it to use values of named REQUEST args
as the basis of the unique cache identifier (i.e. the filename) then you'll have
to do some hacking]:
// create the object
$ic = ImageCache('/dev/shm/site-image-cache'); // read up on /dev/shm !!!
// set out an array of REQUEST arguments. e.g. imagine the following url
// "./showimg.php?id=12345&size=big" - how you use the actual REQUEST argument values
// to generate an non-existant image is up to you.
$cacheArgs = array('size', 'id')
// use the image cacher to determine the generated name of the cached image file.
$ic->genCacheFileName( $cacheArgs, 'jpeg', 'some-prefix' );
// determine a set of files with which to check the file modification
// time against (at least 1 is required)
$files = array('/path/to/your/original/image/file.jpg');
// check the cache
if (!$ic->checkCache($files)) {
// do some stuff to create an image
// use the value from $ic->getCacheFilePath()
// as the path+filename under which to store the
// new image
}
// show cache image.
$ic->showImage();
<?php
class ImageCache
{
var $validTypes = array('png','gif','jpeg');
var $cacheFileName;
var $cacheFileType;
var $cacheDir;
var $dirSep;
var $im;
/* you must give a valid 'cache' dir AND you must have already generated
* a cache file name for the file we want to cache (may have already been cached)
*
* in effect you must always call ImageCache::genCacheFileName() before calling this function.
*/
function ImageCache($cDir)
{
$this->cacheDir = $cDir;
$this->dirSep = defined('DIR_SEP') ? DIR_SEP: '/';
// just to be safe we define this if it does not exist.
if (!defined('WEBROOT')) {
define('WEBROOT', realpath($_SERVER['DOCUMENT_ROOT']));
}
}
function genCacheFileName( $args = array(), $type = '', $prefix = '' )
{
/* name/val pair delimiter in the string that results in the hash for the cache id */
$qHashMark = '%~^*';
$args = (array)$args; natsort($args);
$qry = array();
foreach ($args as $arg) {
if (($val = $this->getR( $arg, false )) !== false) {
$qry[] = "{$arg}=".str_replace($qHashMark,'',$val);
}
}
//var_dump(WEBROOT . $_SERVER['PHP_SELF'] .'-:-'. join($qHashMark, $qry));
$hash = md5(WEBROOT . $_SERVER['PHP_SELF'] .'-:-'. join($qHashMark, $qry));
if (!in_array($type, $this->validTypes)) {
if ($type == 'jpg') {
$type = 'jpeg';
} else {
$type = 'png';
}
}
$this->cacheFileType = $type;
if (!$prefix) {
$prefix = 'cacheimg';
}
return ($this->cacheFileName = "{$prefix}_{$hash}.{$type}");
}
function getCacheFilePath()
{
return $this->cacheDir . $this->dirSep . $this->cacheFileName;
}
/* Return true if the cache file is younger than the source file(s),
* false otherwise.
*
* the (array of) files passed to this function should be complete paths,
* not just filesnames.
*/
function checkCache( $files = array() )
{
$cacheState = true;
$cf = $this->getCacheFilePath();
$mTime = is_readable($cf) ? filemtime($cf): 0;
$lastModified = gmdate("D, d M Y H:i:s ", $mTime)."GMT";
$files = (array) $files;
if (!count($files) || !$mTime) {
$cacheState = false;
} else {
foreach($files as $file) {
if ($mTime < filemtime( $file )) {
$cacheState = false;
break;
}
}
}
if ($cacheState) {
$headers = getallheaders();
if (isset($headers['If-Modified-Since']) && ($headers['If-Modified-Since'] == $lastModified)) {
/* The UA has the exact same image we have. */
header("HTTP/1.1 304 Not Modified");
exit;
} else {
unset($headers);
header("Last-Modified: ".$lastModified);
return true;
}
} else {
// not cached - or cache invalidated
// must cache the (new) data.
header("Last-Modified: ".$lastModified);
return false;
}
}
function showImage($type = '', $quality = 100)
{
header( "Content-type: image/{$this->cacheFileType}" );
readfile( $this->getCacheFilePath() );
exit;
}
/* helper function - saves typing - added to the class to make it selfcontained for this example */
function getR($v = '', $r = null, $t = null)
{
if (!empty($v)) { if (isset($_REQUEST[$v])) {$r=!is_null($t)?$t:$_REQUEST[$v];} }
return $r;
}
}
>
> Thanks for your advice
> -Will
>
attached mail follows:
Tuesday, January 17, 2006, 11:33:18 PM, HiFi Tubes 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.
Ugh. If you absolutely can't use Javascript, here's an idea:
Present this question by itself as two lists: on top an unordered list of
options, on bottom an ordered list (initially empty). Each item will have a
set of links (icons maybe) to place this item next (if in the top list)
or move up/down or remove the item (if in the ordered list). The user
would click the links to move around the choices until he/she is ready to
submit that question:
add items: _eggs_ , _milk_
1 candy _remove_
2
3
----------
1 candy _remove_ _down_
2 eggs _remove_ _up_ _down_
3 milk _remove_ _up_
The nice thing is, each page you generate would be a valid response so you,
nor the user, has to worry about, eg. submitting two items in 3rd place.
It would also be /much/ simpler for the user to rearrange items since
he/she no longer has the burden of renumbering each choice.
You could potentially add Javascript onto this setup so that the movement
would be updated purely on the page or with only a minimal XMLHTTPRequest
call.
Another idea: just require Javascript and save yourself reinventing the
wheel. http://www.phpsurveyor.org/index.php is a mature survey system with
ranking question types and nice data export options.
Steve
--
http://mrclay.org/
attached mail follows:
Is it possible to set the key length for mcrypt with the cipher
Blowfish? Specifically to lets say 128 bits?
mcrypt_get_key_size
returns int but is it bytes bits?
Maybe I could do with openssl?
Ideas and thoughts very welcome.
Thanks,
Scott
attached mail follows:
Hi Richard,
Thanks for the response, however I do not want to have to use any special
classes or other software... I want to get it working just using the basic
php functions, which should be possible as far as I understand the php
documentation... if I keep finding that I can't get it working then maybe
I'll go to majordomo2.
Anyone else have some advice for me here?
Thanks,
Ben
-----Original Message-----
From: Richard Correia [mailto:php5perl
gmail.com]
Sent: Tuesday, January 17, 2006 12:37 PM
To: ET Support
Cc: php-general
lists.php.net
Subject: Re: [PHP] RE: header data being inserted into message
Hey,
You can use the readymase mailer class from
http://www.weberdev.com/get_example-462.html
and
http://www.weberdev.com/get_example-3724.html
Thanks
Richard
On 1/17/06, ET Support <support
earthtecinc.com> wrote:
Hello all,
I am having a problem using PHP's mail function to send mail via BCC to
multiple recipients. Here's my code;
--------------------------------------
$get_emails = pg_exec($dbh,"SELECT email FROM mailing_list WHERE conf = 1");
$count = pg_numrows($get_emails);
$bcc_count = $envelope_count = 0;
$bcc_limit = 200;
$subject = $body = 'test message';
$from = 'support
earthtecinc.com';
$header = "From: $from\r\n";
for($x = 0; $x < $count; $x++) {
$email = pg_result($get_emails,$x,0);
if($bcc_count >= $bcc_limit) {
if($x > 0) {
$envelope_count++;
mail($from,$subject,$body,$headers);
}
$headers = $header . "Bcc: $email\r\n";
$bcc_count = 1;
} else {
$headers .= "Bcc: $email\r\n";
$bcc_count++;
}
}
# send the last envelope
mail($from,$subject,$body,$headers);
--------------------------------------
The problem is that for some recipients they get a message body like this;
--------------------------------------
Message-Id: < 20060116170640.424CFA51997
earthtecinc.com>
Date: Mon, 16 Jan 2006 17:06:40 +0000 (GMT)
test message
--------------------------------------
Any idea why those headers are being inserted into the message body and how
that can be prevented?
Thanks,
Ben King
support
earthtecinc.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
That did not work, however what does seem to work is changing all my \r\n to
just \n ... which I found after going over the php docs again at
http://www.php.net/manual/en/function.mail.php ... "Note: If messages are
not received, try using a LF (\n) only. Some poor quality Unix mail transfer
agents replace LF by CRLF automatically (which leads to doubling CR if CRLF
is used). This should be a last resort, as it does not comply with RFC
2822."
... we're using FreeBSD 4.11-STABLE so that must be in the category of one
of the "poor quality Unix mail transfer agents"
Thanks for the input!
-----Original Message-----
From: replies-lists-php
listmail.innovate.net
[mailto:replies-lists-php
listmail.innovate.net]
Sent: Wednesday, January 18, 2006 11:29 AM
To: ET Support
Subject: RE: [PHP] RE: header data being inserted into message
what you're showing indicates that an MTA is getting confused about
the structure of the message and putting the message-id into the
body, rather than header.
you need to have a cr/lf (null line) between the header and the body,
otherwise the/an MTA can get things mixed up. so, when you exit your
bcc loop write out (another) "\n".
------------ Original Message ------------
> Date: Wednesday, January 18, 2006 10:52:10 AM -0400
> From: ET Support <support
earthtecinc.com>
> To: Richard Correia <php5perl
gmail.com>
> Cc: php-general
lists.php.net
> Subject: RE: [PHP] RE: header data being inserted into message
>
> Hi Richard,
>
> Thanks for the response, however I do not want to have to use any
> special classes or other software... I want to get it working just
> using the basic php functions, which should be possible as far as I
> understand the php documentation... if I keep finding that I can't
> get it working then maybe I'll go to majordomo2.
>
> Anyone else have some advice for me here?
>
> Thanks,
> Ben
>
> -----Original Message-----
> From: Richard Correia [mailto:php5perl
gmail.com]
> Sent: Tuesday, January 17, 2006 12:37 PM
> To: ET Support
> Cc: php-general
lists.php.net
> Subject: Re: [PHP] RE: header data being inserted into message
>
>
> Hey,
>
> You can use the readymase mailer class from
> http://www.weberdev.com/get_example-462.html
>
> and
>
> http://www.weberdev.com/get_example-3724.html
>
> Thanks
> Richard
>
>
> On 1/17/06, ET Support <support
earthtecinc.com> wrote:
> Hello all,
>
> I am having a problem using PHP's mail function to send mail via
> BCC to multiple recipients. Here's my code;
> --------------------------------------
> $get_emails = pg_exec($dbh,"SELECT email FROM mailing_list WHERE
> conf = 1"); $count = pg_numrows($get_emails);
> $bcc_count = $envelope_count = 0;
> $bcc_limit = 200;
> $subject = $body = 'test message';
> $from = 'support
earthtecinc.com';
> $header = "From: $from\r\n";
> for($x = 0; $x < $count; $x++) {
> $email = pg_result($get_emails,$x,0);
> if($bcc_count >= $bcc_limit) {
> if($x > 0) {
> $envelope_count++;
> mail($from,$subject,$body,$headers);
> }
> $headers = $header . "Bcc: $email\r\n";
> $bcc_count = 1;
> } else {
> $headers .= "Bcc: $email\r\n";
> $bcc_count++;
> }
> }
># send the last envelope
> mail($from,$subject,$body,$headers);
> --------------------------------------
>
> The problem is that for some recipients they get a message body
> like this;
>
> --------------------------------------
> Message-Id: < 20060116170640.424CFA51997
earthtecinc.com>
> Date: Mon, 16 Jan 2006 17:06:40 +0000 (GMT)
>
> test message
> --------------------------------------
>
> Any idea why those headers are being inserted into the message body
> and how that can be prevented?
>
> Thanks,
> Ben King
> support
earthtecinc.com
>
> --
> 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
---------- End Original Message ----------
attached mail follows:
hi,
i am using 2 combo box one for country & another
one for city.when i select country name from combo box
their corresponding city names has to be changed in
their corresponding combo box.i dont know how 2
implement this.pz give me some idea.its urgent.
A.suresh
Send instant messages to your online friends http://in.messenger.yahoo.com
attached mail follows:
If this is on the same web page, your question has nothing to do with
PHP - look into, i.e., JavaScript.
suresh kumar wrote:
> hi,
> i am using 2 combo box one for country & another
> one for city.when i select country name from combo box
> their corresponding city names has to be changed in
> their corresponding combo box.i dont know how 2
> implement this.pz give me some idea.its urgent.
> A.suresh
>
> Send instant messages to your online friends http://in.messenger.yahoo.com
>
attached mail follows:
hi,
i am having 2 combo box one for city & another one
for country,when i select particular country say
"india" their corresponding cities will be displayed
in city combobox as "delhi,bangalore.........",when i
select "Australia" thier cities like
"perth,brisbane........"will be displayed.plz help me
itz very urgent.
A.suresh
Send instant messages to your online friends http://in.messenger.yahoo.com
attached mail follows:
[snip]
i am having 2 combo box one for city & another one
for country,when i select particular country say
"india" their corresponding cities will be displayed
in city combobox as "delhi,bangalore.........",when i
select "Australia" thier cities like
"perth,brisbane........"will be displayed.plz help me
itz very urgent.
[/snip]
Hmmmm, is everything you do urgent? Anyhow, you want JavaScript for this,
not PHP.
attached mail follows:
Jay Blanchard wrote:
> [snip]
> i am having 2 combo box one for city & another one
> for country,when i select particular country say
> "india" their corresponding cities will be displayed
> in city combobox as "delhi,bangalore.........",when i
> select "Australia" thier cities like
> "perth,brisbane........"will be displayed.plz help me
> itz very urgent.
> [/snip]
>
>
> Hmmmm, is everything you do urgent?
I think he and I must have the same boss.
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel
dotcomholdingsofbuffalo.com
attached mail follows:
Or my sense of sailing to deadlines :)
-----Original Message-----
From: John Nichel [mailto:john
kegworks.com]
Sent: 18 January 2006 16:11
To: php-general
lists.php.net
Subject: Re: [PHP] help me pllzzzzzz
Jay Blanchard wrote:
> [snip]
> i am having 2 combo box one for city & another one
> for country,when i select particular country say
> "india" their corresponding cities will be displayed
> in city combobox as "delhi,bangalore.........",when i
> select "Australia" thier cities like
> "perth,brisbane........"will be displayed.plz help me
> itz very urgent.
> [/snip]
>
>
> Hmmmm, is everything you do urgent?
I think he and I must have the same boss.
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel
dotcomholdingsofbuffalo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__________ NOD32 1.1370 (20060118) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
attached mail follows:
I have a combo php javascript to do that. Trying to dig it up.
Send email to scott-duffy
uiowa.edu and ill have it separated by then.
-----Original Message-----
From: Dan Parry [mailto:dan
virtuawebtech.co.uk]
Sent: Wednesday, January 18, 2006 10:18 AM
To: 'John Nichel'; php-general
lists.php.net
Subject: RE: [PHP] help me pllzzzzzz
Or my sense of sailing to deadlines :)
-----Original Message-----
From: John Nichel [mailto:john
kegworks.com]
Sent: 18 January 2006 16:11
To: php-general
lists.php.net
Subject: Re: [PHP] help me pllzzzzzz
Jay Blanchard wrote:
> [snip]
> i am having 2 combo box one for city & another one
> for country,when i select particular country say
> "india" their corresponding cities will be displayed
> in city combobox as "delhi,bangalore.........",when i
> select "Australia" thier cities like
> "perth,brisbane........"will be displayed.plz help me
> itz very urgent.
> [/snip]
>
>
> Hmmmm, is everything you do urgent?
I think he and I must have the same boss.
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel
dotcomholdingsofbuffalo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__________ NOD32 1.1370 (20060118) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
suresh kumar wrote:
> hi,
> i am having 2 combo box one for city & another one
> for country,when i select particular country say
> "india" their corresponding cities will be displayed
> in city combobox as "delhi,bangalore.........",when i
> select "Australia" thier cities like
> "perth,brisbane........"will be displayed.plz help me
> itz very urgent.
hire a (*#
%^(*#% programmer? because we are here to help
you not write your whole project for you.
I'll tell you what I do when things are urgent (I think John's
boss is a client of mine because 'urgent' occurs 20 times a day)...
I go here: http://www.yahoo.com
or here: http://www.google.com
or here: http://php.net
or here: http://beeblex.com
then I type something relevant into a search box, hit send and start reading
(nice side effect of reading is that you learn that words like 'please',
for instance, don't contain any 'z's but it does contain a number of vowels)
click below for approx 586,000 pages related to your urgent problem:
http://www.google.com/search?num=100&q=dynamic+combo+boxes+php
> A.suresh
rgd,
A. Raving Loon.
>
> Send instant messages to your online friends http://in.messenger.yahoo.com
we let it go because its a yahoo ad ;-)
>
attached mail follows:
You need to build JavaScript logic for that.
Try searching on JavaScript developer sites and mailing lists.
This has nothing to do with PHP -- unless you are dynamically building the
JavaScript.
--
Anas Mughal
On 1/18/06, suresh kumar <asureshkumar_1983
yahoo.co.in> wrote:
>
> hi,
> i am having 2 combo box one for city & another one
> for country,when i select particular country say
> "india" their corresponding cities will be displayed
> in city combobox as "delhi,bangalore.........",when i
> select "Australia" thier cities like
> "perth,brisbane........"will be displayed.plz help me
> itz very urgent.
> A.suresh
>
> Send instant messages to your online friends http://in.messenger.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Anas Mughal
attached mail follows:
On Wed, 2006-01-18 at 11:11, John Nichel wrote:
> Jay Blanchard wrote:
> > [snip]
> > i am having 2 combo box one for city & another one
> > for country,when i select particular country say
> > "india" their corresponding cities will be displayed
> > in city combobox as "delhi,bangalore.........",when i
> > select "Australia" thier cities like
> > "perth,brisbane........"will be displayed.plz help me
> > itz very urgent.
> > [/snip]
> >
> >
> > Hmmmm, is everything you do urgent?
>
> I think he and I must have the same boss.
At least you don't write help emails in stupid speak. Every time I see
plzzzzz and itz and 2 I want to go find a big brick... well nevermind.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
attached mail follows:
Whatever ....
Suresh, I know as a beginer you are facing this problems.
I would suggest that you check standalone htm version of php document.
The dynamic combo script can be located at
http://www.weberdev.com/get_example.php3?count=4074&mode=text
This site has 1000s of FREE ready to use PHP,MySQL scripts. Check out and
list can saved from future urgent requests :)
Thanks,
Richard Correia
On 1/18/06, suresh kumar <asureshkumar_1983
yahoo.co.in> wrote:
>
> hi,
> i am having 2 combo box one for city & another one
> for country,when i select particular country say
> "india" their corresponding cities will be displayed
> in city combobox as "delhi,bangalore.........",when i
> select "Australia" thier cities like
> "perth,brisbane........"will be displayed.plz help me
> itz very urgent.
> A.suresh
>
> Send instant messages to your online friends http://in.messenger.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Run some tracer apps on your code...could be some wild loops of some sort?
Never the less, ZEND debugger with the module should do the job....it will
tell you which files/functions etc are running....nice tool to track
execution time etc...
On 1/18/06, Albert <albert
fastworx.com> wrote:
>
> 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
>
>
>
--
Take care...
Adam
attached mail follows:
Adi wrote:
> Run some tracer apps on your code...could be some wild loops of some sort?
> Never the less, ZEND debugger with the module should do the job....it will
> tell you which files/functions etc are running....nice tool to track
> execution time etc...
>
> On 1/18/06, Albert <albert
fastworx.com> wrote:
>
>>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
what changes? DB related per chance? doing any queries on tables that are
not indexed properly? or maybe your app creates tons of objects? (in which
case you might look at being able to clone objects rather than init new
ones where possible).
>>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
>>
>>
>>
>
>
>
> --
> Take care...
> Adam
>
attached mail follows:
Hello,
The same problem I've had on a FreeBSD 4.11 box, running Apache 1.3.3 and PHP 4.3.5.
From time to time, httpd went to 90%+ (I supposed it was a memory leak or smth).
After upgrading Apache to 1.3.4 and PHP to 4.4.2, everything smoothed down and we got no more 90+% httpd, even on heavy load.
If possible, try to downgrade/upgrade PHP and/or Apache (eventually on a test machine).
Regards,
Stefan
From: Jochem Maas
Sent: Mi 18.01.2006 18:59
To: Adi
Cc: Albert; PHP List
Subject: Re: [PHP] PHP load to high on server
Adi wrote:
> Run some tracer apps on your code...could be some wild loops of some sort?
> Never the less, ZEND debugger with the module should do the job....it will
> tell you which files/functions etc are running....nice tool to track
> execution time etc...
>
> On 1/18/06, Albert <albert
fastworx.com> wrote:
>
>>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
what changes? DB related per chance? doing any queries on tables that are
not indexed properly? or maybe your app creates tons of objects? (in which
case you might look at being able to clone objects rather than init new
ones where possible).
>>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
>>
>>
>>
>
>
>
> --
> Take care...
> Adam
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I wrote:
> 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.
I have resolved this issue by removing a piece of code which reads a set of
parameters from a database. It seems that the hard disk on the machine is
quite slow, slowing down all database access with it...
I now check if the parameters are set in the session, if it is I use them
otherwise I read them from the database and save it as session variables.
When it changes I simply remove it from the session so it forces an update.
So far it is working quite well.
I now want to go and take all the static stuff that the user will configure
once in a life time and put it in the session and only update it when it
changes instead of reading it from the database every five seconds or so.
For this I don't want to use a disk based session handler. I want the
session variables to remain in memory (about 20KB per user) as to speed up
the whole process.
I also want an opcode cache to cache the compiled pages on the server in an
attempt to speed up the HTTP server.
For this I wanted to use mmCache (actually I want to use Zend Performance
Suite but first I need to prove that it is worth $ 1000 per CPU and from the
stats on the mmCache site mmCache is faster...) but it seems that the
mmCache project has been abandoned as there have been no work done on it
since 2003.
Can someone confirm this or recommend an alternate cache (doesn't have to be
free but should break the bank) which will do what I want?
Albert
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.20/233 - Release Date: 2006/01/18
attached mail follows:
on your *nix cmdline type this:
pear install apc
(if you don't have pear installed then you should fix that first ;-)
now read here about how to use it:
http://php.net/apc
I love it even though it crashes when caching the opcodes of certain
class files (php5 files that make use of __get()/__set() to retrieve
[sub-]objects).
take note that APC does 2 things:
1. op code caching
2. manage some shared memory (a central place where you can stick stuff
that needs to be read again and again and again; but doesn't need updating
very often)
by all means come back if you get stuck or have specific issues ( I can't
garantee I will be able to help - I'm only a little further down the apc road
than you**)
rgds,
Jochem
** the internals mailing list archive can attest to the ammount of
times I have badgered Rasmus about APC ;-) (Rasmus cowrote APC btw)
Albert wrote:
> I wrote:
>
>>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.
>
>
> I have resolved this issue by removing a piece of code which reads a set of
> parameters from a database. It seems that the hard disk on the machine is
> quite slow, slowing down all database access with it...
>
> I now check if the parameters are set in the session, if it is I use them
> otherwise I read them from the database and save it as session variables.
> When it changes I simply remove it from the session so it forces an update.
> So far it is working quite well.
>
> I now want to go and take all the static stuff that the user will configure
> once in a life time and put it in the session and only update it when it
> changes instead of reading it from the database every five seconds or so.
>
> For this I don't want to use a disk based session handler. I want the
> session variables to remain in memory (about 20KB per user) as to speed up
> the whole process.
>
> I also want an opcode cache to cache the compiled pages on the server in an
> attempt to speed up the HTTP server.
>
> For this I wanted to use mmCache (actually I want to use Zend Performance
> Suite but first I need to prove that it is worth $ 1000 per CPU and from the
> stats on the mmCache site mmCache is faster...) but it seems that the
> mmCache project has been abandoned as there have been no work done on it
> since 2003.
>
> Can someone confirm this or recommend an alternate cache (doesn't have to be
> free but should break the bank) which will do what I want?
>
> Albert
>
attached mail follows:
http://eaccelerator.net/HomeUk
Actually, is the former mmCache with a new team of developers and some impovements.
The last known version of mmCache I've played with one week ago core dumped the httpd on ./apachectl stop.
The last stable version of eAccelerator (0.9.3, I think) works like a charm with PHP 4.4.2 / Apache 1.3.4
Stefan
Albert wrote:
>
> I also want an opcode cache to cache the compiled pages on the server in an
> attempt to speed up the HTTP server.
>
> For this I wanted to use mmCache (actually I want to use Zend Performance
> Suite but first I need to prove that it is worth $ 1000 per CPU and from the
> stats on the mmCache site mmCache is faster...) but it seems that the
> mmCache project has been abandoned as there have been no work done on it
> since 2003.
>
> Can someone confirm this or recommend an alternate cache (doesn't have to be
> free but should break the bank) which will do what I want?
>
> Albert
>
attached mail follows:
Hi,
I need to parse a String like pasted below for all information (values)
those are included like 'var=value'. How can I do that? Are there any
XML-parsing functions available those'd fit for that job? I've ust found
that one (http://ca.php.net/simplexml) but it seems like i could use it
only for exctracting the 'terms' cause they're in the format that
simplexml
expects.
Thank you for every help!
[String]
<xs:response xmlns:xs="urn:pinXpressSchema">
<SKUlisting>
<globalInfo slogan="Welcome to PayGo!" supportPhone="1-866-339-3299"/>
<carrierInfo carrier="Reconex (test)"
icon="https://www.pinsprepaid.com/image.aspx?name=c38-reconex_logo.gif" />
<carrierInfo carrier="IDT POSA"
icon="https://www.pinsprepaid.com/image.aspx?name=" />
<carrierInfo carrier="IDT MasterCard"
icon="https://www.pinsprepaid.com/image.aspx?name=" />
<carrierInfo carrier="PLAYPHONE (Test)"
icon="https://www.pinsprepaid.com/image.aspx?name=PlayPhone-200x100.gif" />
<carrierInfo carrier="EWI POSA TEST"
icon="https://www.pinsprepaid.com/image.aspx?name=PayGo_200_100.gif" />
<carrierInfo carrier="IDT POSA"
icon="https://www.pinsprepaid.com/image.aspx?name=" />
<carrierInfo carrier="IDT Visa"
icon="https://www.pinsprepaid.com/image.aspx?name=" />
<carrierInfo carrier="Bell Mobility (TEST)"
icon="https://www.pinsprepaid.com/image.aspx?name=" />
<carrierInfo carrier="Boost Mobile (Test)"
icon="https://www.pinsprepaid.com/image.aspx?name=c59-BoostMobile.gif" />
<carrierInfo carrier="Cingular (test)"
icon="https://www.pinsprepaid.com/image.aspx?name=cing-blue.gif" />
<carrierInfo carrier="Page Plus (Test)"
icon="https://www.pinsprepaid.com/image.aspx?name=pageplus.gif" />
<carrierInfo carrier="T-Mobile (test)"
icon="https://www.pinsprepaid.com/image.aspx?name=c29-t-mobile_ticketlogo.gif" />
<carrierInfo carrier="Unefon"
icon="https://www.pinsprepaid.com/image.aspx?name=unefon_logo.gif" />
<carrierInfo carrier="Verizon (test)"
icon="https://www.pinsprepaid.com/image.aspx?name=verizon.gif" />
<carrierInfo carrier="Virgin Mobile (test)"
icon="https://www.pinsprepaid.com/image.aspx?name=Virgin+Mobile
+200x100.gif" />
<cardSKU category="Local Dial Tone/Telephone Service" distributor="EWI"
discontinued="false" cardtype="PIN" transactionType="PURC">
<card cardID="180" carrier="Reconex (test)" partNumber="PN-180"
region="Optional Services (test)" amount="5" wholesalePrice="4.5"
icon="https://www.pinsprepaid.com/image.aspx?name=c38-reconex_logo.gif"
upc="870368000420">
<cinfo costPerMinute="" lifetime="0" longDistRate="" roamingRate=""
numberOfMin=""/>
</card>
<terms>
Refer to the Reconex brochure for complete terms and conditions.
</terms>
<pinfo type="Optional Services" value="Call Forwarding, Call Waiting,
Caller ID, Three Way Calling, Speed Dialing & Non-Published
Number"/>
</cardSKU>
<cardSKU category="Local Dial Tone/Telephone Service" distributor="EWI"
discontinued="false" cardtype="PIN" transactionType="PURC">
<card cardID="181" carrier="Reconex (test)" partNumber="PN-181"
region="Optional Services (test)" amount="10" wholesalePrice="9"
icon="https://www.pinsprepaid.com/image.aspx?name=c38-reconex_logo.gif"
upc="870368000437">
<cinfo costPerMinute="" lifetime="0" longDistRate="" roamingRate=""
numberOfMin=""/>
</card>
<terms>
Refer to the Reconex brochure for complete terms and conditions.
</terms>
<pinfo type="Optional Services" value="Call Forwarding, Call Waiting,
Caller ID, Three Way Calling, Speed Dialing & Non-Published
Number"/>
</cardSKU>
<cardSKU category="Local Dial Tone/Telephone Service" distributor="EWI"
discontinued="false" cardtype="PIN" transactionType="PURC">
<card cardID="178" carrier="Reconex (test)" partNumber="PN-178"
region="Regional Refill (test)" amount="52.99" wholesalePrice="47.7"
icon="https://www.pinsprepaid.com/image.aspx?name=c38-reconex_logo.gif"
upc="870368000413">
<cinfo costPerMinute="" lifetime="0" longDistRate="" roamingRate=""
numberOfMin=""/>
</card>
<terms>
Refer to the Reconex brochure for complete terms and conditions.
</terms>
<pinfo type="Basic Service" value="Includes 30 days of basic service
in
select states. Also includes variable state, federal & service line
fees"/>
</cardSKU>
<cardSKU category="Local Dial Tone/Telephone Service" distributor="EWI"
discontinued="false" cardtype="PIN" transactionType="PURC">
<card cardID="177" carrier="Reconex (test)" partNumber="PN-177"
region="Regional Starter (test)" amount="39" wholesalePrice="35.1"
icon="https://www.pinsprepaid.com/image.aspx?name=c38-reconex_logo.gif"
upc="870368000406">
<cinfo costPerMinute="" lifetime="0" longDistRate="" roamingRate=""
numberOfMin=""/>
</card>
<terms>
Refer to the Reconex brochure for complete terms and conditions.
</terms>
<pinfo type="Basic Service" value="15 Days of basic service"/>
</cardSKU>
[/String]
attached mail follows:
Does anyone know what the best way to list a directory dialog box or
directory drop down list in
Php? The script I'm writing has a form that asks the user where his
files are and I don't want the
user to have to remember the whole directory path in order to type it.
Sean
attached mail follows:
Sugrue, Sean wrote:
>Does anyone know what the best way to list a directory dialog box or
>directory drop down list in
>Php? The script I'm writing has a form that asks the user where his
>files are and I don't want the
>user to have to remember the whole directory path in order to type it.
>
>Sean
>
>
>
u can also use <input name="myfile" type="file"> this will open the
Explorer dialog box for select files.
sumeet shroff
attached mail follows:
[snip]
>Does anyone know what the best way to list a directory dialog box or
>directory drop down list in
>Php? The script I'm writing has a form that asks the user where his
>files are and I don't want the
>user to have to remember the whole directory path in order to type it.
>
>Sean
>
>
>
u can also use <input name="myfile" type="file"> this will open the
Explorer dialog box for select files.
[/snip]
Along these same lines, does anyone know how to make the file dialog start
in a specific directory? I saw this the other day but forgot where. I
clicked browse and the dialog popped up pointed to My Pictures (which at
least works for most Windblows users). I meant to look at the code, but
didn't....
attached mail follows:
So I've been poring over the docs for the new stream stuff, and it
looks pretty nifty, except...
I'd really like to be able to just hand a URL to PHP like:
http://php.net/manual/en/ref.stream.php
And let PHP figure out how to create a stream context out of that, and
which port to use, and how to do the GET to start things off, so I can
just read my data.
In other words, I'm greedy, and I want *BOTH* the simplicity of
fopen() *and* the flexiblity of adding filters and all the fun new
stuff.
I don't want to have to tear apart the URL myself and mess with
sending 'GET ...' and 'host: ...'
Did I miss a stream_url_to_context() function somewhere?...
Not just parse_url() -- That will tear apart the URL, but then I have
to do all the work that's buried in fopen()
Bigger Picture:
I have an old class that will take an array of HTTP URLs, and
fsockopen them, set them non-blocking, and then fread() each in turn,
and gather an array of results.
The class has a 'timeout' parameter that limits how long it will wait
for all this to happen.
Each result set is marked as complete or incomplete.
Complete results may be cached, for however long you choose in another
setting.
If results are incomplete, the cached version is used, no matter how
obsolete. (This is for a search engine.)
Blah, blah, blah.
Anyway, I'd *LIKE* to be able to just allow *ANY* URL to be passed in,
and have some nifty stream function, not unlike fopen(), that will
take care of the grotty details of doing whatever it takes to get the
data, but let me set the socket non-blocking and read them
asynchronously.
I feel like I must be missing something fundamentally simple here in
all this stream stuff, but it's sure not obvious what I'm missing in
the docs.
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
I am working on an XML serializer module for PHP. It will allow session
information to be stored as XML in the database. While this sounds like
self promotion, and it probably is a bit, it is needed to make sense of why
I am doing this. Anyway, the XML stream is so that I can use PHP session
data outside of PHP. I'm working on a PostgreSQL function to extract the
PHP session information when it is stored as this format of XML.
Anyway, to make a long story short, I was crashing badly with certain pages
in squirrelmail. I suspected it was endlessly recursing over a few
variables. Not the immediate predecessor either, but a couple back which
would be hard to find unless you scanned the recursion stack.
So, I added this capability in the serializer, and low and behold, I found
that squirrelmail was using a self referencing hierarchy. Which looked
something like this:
messages->1126708752->544->entities->4->parent->entities
Where the "messages" variable had an item "1126708752" which had an item
"544" etc. etc.
The first "entities" variable was in fact the same pointer as the second
"entities" pointer in the chain.
Here's a point of debate, should this sort of behavior be allowed? If it is
allowable, how does one support it in any sort of serialized methodology? I
have a few ideas but none very pretty. I'm pretty sure it causes problems
in regular PHP as these sorts of pages sometimes have problems anyway.
attached mail follows:
On Wed, 2006-01-18 at 15:36, Mark wrote:
>
> [-- CLIPPED --]
>
> Here's a point of debate, should this sort of behavior be allowed? If it is
> allowable, how does one support it in any sort of serialized methodology? I
> have a few ideas but none very pretty. I'm pretty sure