[PHP] Strong Web Hosts in Canada?

2002-07-17 Thread Analysis Solutions

Hi Folks:

A client of mine has a large series of high traffic, PHP/MySQL intensive
websites.  They're looking for dedicated hosting in Canada.  Any
recommendations?

Enjoy,

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




[PHP] Re: PHP and Jigsaw

2002-07-17 Thread Murray Nicholas

Some careful testing and results...

All tests invoke the URL http://myserver:jigsawport/phpinfo.php;

Test 1:
* phpinfo.php contains exactly one line
?php phpinfo();?

* Jigsaw's debug flag in the default extension indexer cgiframe definition
for .php files is true.

The browser shows a white page with the text:
X-Powered-By: PHP/4.2.1
Content-type: text/html

Invoking the view-source menu path launches a notepad session showing
exactly the same text as the browser with NO html tags.

Test 2.
* phpinfo.php contains exactly one line
?php phpinfo();?

* Jigsaw's debug flag is false.

The browser shows an empty white page.

Invoking the view-source menu path launches a notepad session showing the
following:
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTMLHEAD
META http-equiv=Content-Type content=text/html;
charset=windows-1252/HEAD
BODY/BODY/HTML

Test 3.
* phpinfo.php now contains some trivial container html.
html
headtitlephpinfo page/title/head
body
phpinfo follows...
?php phpinfo();?
/body
/html

* Jigsaw's debug flag is false.

The browser shows an empty white page.

Invoking the view-source menu path launches a notepad session showing the
following:
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTMLHEAD
META http-equiv=Content-Type content=text/html;
charset=windows-1252/HEAD
BODY/BODY/HTML


The DOS prompt running Jigsaw has the process name JAVA until the php page
is invoked.  At this time it is renamed to php and stays that way.  The
Jigsaw server, however, does still respond to JigAdmin commands and can be
stopped correctly.

Ummm

Murray Nicholas

-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 16 July 2002 15:13
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP and Jigsaw

With Jigsaw's debug facility Enabled, I get two lines on the page and the
same two lines (without html tags of any sort) in view source display:
X-Powered-By: PHP/4.2.1
Content-type: text/html

If these two lines are showing up in the BROWSER, then something is pretty
wrong...

They're supposed to be headers...

So something could be sending out a blank line or something before these,
somehow...

If they are just showing up in debugging output, and they *ARE* headers,
then PHP *IS* getting invoked, and then dying when it tries to execute your
code.

Try using *JUST* this in your PHP document:

?php phpinfo();?

It's pretty hard to screw up something that short, so you'll know the PHP is
valid :-)

And, if it works, you get a wonderfully long HTML document spewed out.  It's
so fun to type so little and get so much :-)

--
Like Music?  http://l-i-e.com/artists.htm


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


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




Re: [PHP] Opening and Editing Quark Binaries

2002-07-17 Thread Miguel Cruz

On Sun, 14 Jul 2002, Simon Troup wrote:
 ... quark reports things like unexpected EOF (even though when I open
 the file in a text editor they have same number of lines and look
 identical), I've also tried a few things with the Mac resource forks to
 no avail.
 
 Has anyone tried something like this before? Does the fread() fwrite()
 change line endings from mac to unix or something?

I am guessing the problem is that you're changing string lenghts and the 
data structure used by QuarkXPress contains string length indicators. Once 
you make a change to the length of a string without changing the length 
indicator, it gets hopelessly confused.

Frankly, I do not think this will be an easy project. The QuarkXPress data 
file is a pretty complex beast.

What are you actually trying to achieve? Perhaps there is another way.

miguel


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




[PHP] Require some help about the date comparison

2002-07-17 Thread Manisha

I am writing one program -

I want to display some text on web. This text should appear for limited 
period e.g from 20th July 12pm till 25th July 3pm. After 25th July 3pm the 
text should disappear from screen.

I tried to look for date comparison / string conversion to date etc, I got 
lot info but could not figure out which would be best for above (rather how 
can I do it).

Anybody can share some expert comments please ?

Thanking in advance,
Manisha


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




Re: [PHP] Preventing Multiple Log-Ins after Authentication

2002-07-17 Thread Lars Olsson

I agree. Using a database is usually a good way of storing session 
information. But as noted by Dennis below, automatic logout may require 
additional scripts running in the background. This is a bit inferior in 
PHP compared to ASP. In ASP, support for automatic session destruction 
is implemented by having a magic function (called Session_End) which 
will be called automagically by the web server whenever a session 
expires. Having this in PHP would be very nice too!

/lasso ([EMAIL PROTECTED])



Dennis Moore wrote:
 If you do not want to use cookes and use SID or trans SID; Another method is
 to track your logins via a database.   This can be resource intensive
 though.You need to update the database upon each click or have an empty
 window refresh every 1-5 minutes.  If there is no activity for 15 or 30
 minutes automatically log the person off in the database.  This requires a
 process to run in cron or a separate background program.  The advantage of
 this is that is very easy to add time based accounting to the session
 management system.


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




Re: [PHP] Require some help about the date comparison

2002-07-17 Thread Jason Wong

On Wednesday 17 July 2002 14:55, Manisha wrote:
 I am writing one program -

 I want to display some text on web. This text should appear for limited
 period e.g from 20th July 12pm till 25th July 3pm. After 25th July 3pm the
 text should disappear from screen.

 I tried to look for date comparison / string conversion to date etc, I got
 lot info but could not figure out which would be best for above (rather how
 can I do it).

 Anybody can share some expert comments please ?

1) Use strtotime() to convert your start and end dates to unixtimestamps. 

2) Use time() to get the current unixtimestamp. 

3) Use the standard less-than (), greater-than () comparison operators on 
the above 3 items to decide whether or not to display the text.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
A chronic disposition to inquiry deprives domestic felines of vital qualities.
*/


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




Re: [PHP] Require some help about the date comparison

2002-07-17 Thread Andrey Hristov

I think that it is better to use unixtimestamps and if you save them to a
RDBMS then save according to GMT. When retrieving use timezone to convert to
your local time -
ex

define('MY_TIMEZONE',-2);
list($time) = mysql_fetch_array(mysql_query('select tstamp from table where
user='.$user_id.';'));
$tt_ar = explode(':',gmstrftime('%H:%M:%S:%m:%d:%Y',$time));
$local_time = gmmktime($tt_ar[0]+MY_TIMEZONE, $tt_ar[1],
$tt_ar[2],$tt_ar[3],$tt_ar[4],$tt_ar[5]);

Regards,
Andrey

- Original Message -
From: Manisha [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 9:55 AM
Subject: [PHP] Require some help about the date comparison


 I am writing one program -

 I want to display some text on web. This text should appear for limited
 period e.g from 20th July 12pm till 25th July 3pm. After 25th July 3pm the
 text should disappear from screen.

 I tried to look for date comparison / string conversion to date etc, I got
 lot info but could not figure out which would be best for above (rather
how
 can I do it).

 Anybody can share some expert comments please ?

 Thanking in advance,
 Manisha


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




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




Re: [PHP] Opening and Editing Quark Binaries

2002-07-17 Thread Justin French

I've attached a file I received with Quark 3.32, which has sample text
complete with Quark Xpress tags.

Perhaps rather than using PHP to edit a whole .qxd file, perhaps you can use
it to help format some text to be imported into a template file.  It's not a
complete solution, but a part of one -- perhaps to be used in conhjuntion
with AppleScript or Macros? (I think the later quark versions have
macros)...


Just to throw a complete spanner in the works, Adobe InDesign2.0 has a lot
of XML capabilities, and much more integrated PDF capabilities than Quark...
perhaps either an XML based solution, or a PDFLib based solution can be
achieved?

Considering InDesign is about 1/3rd the price of Quark, *maybe* you might
want to consider other options aside from Quark.


Justin French


on 17/07/02 4:53 PM, Miguel Cruz ([EMAIL PROTECTED]) wrote:

 On Sun, 14 Jul 2002, Simon Troup wrote:
 ... quark reports things like unexpected EOF (even though when I open
 the file in a text editor they have same number of lines and look
 identical), I've also tried a few things with the Mac resource forks to
 no avail.
 
 Has anyone tried something like this before? Does the fread() fwrite()
 change line endings from mac to unix or something?
 
 I am guessing the problem is that you're changing string lenghts and the
 data structure used by QuarkXPress contains string length indicators. Once
 you make a change to the length of a string without changing the length
 indicator, it gets hopelessly confused.
 
 Frankly, I do not think this will be an easy project. The QuarkXPress data
 file is a pretty complex beast.
 
 What are you actually trying to achieve? Perhaps there is another way.
 
 miguel
 


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




Re: [PHP] Opening and Editing Quark Binaries

2002-07-17 Thread Justin French

on 17/07/02 5:28 PM, Justin French ([EMAIL PROTECTED]) wrote:

 I've attached a file I received with Quark 3.32, which has sample text
 complete with Quark Xpress tags.

Sorry forgot to attach the file!

Justin



@DropCapParagraphStyle=*L*hStandard*kn0*kt0*ra0*rb0*d(1,3)*p(0,0,0,0,0,0,g)*t(0,0, 
):
Ps100t0h100z12k0b0cBlackfTimes
@DropCapParagraphStyle:*L*hStandard*kn0*kt0*ra0*rb0*d(1,3)*p(0,0,0,0,0,0,g)*t(0,0, 
):
Ps100t0h100z12k0b0cBlackfTimesSi meliora dies, ut vina, poemata reddit, scire 
velim, chartis pretium quotus arroget annus. scriptor abhinc annos centum qui decidit, 
inter perfectos veteresque referri debet an inter vilis atque novos? Excludat iurgia 
finis, ÒEst vetus atque probus, centPum qui perficit annos.Ó Quid, qui deperiit 
minor uno mense vel anno, inter quos referendus erit? Veteresne poetas, an quos et 
praesens et postera respuat aetas?
@BodyCopyStyle=*L*hStandard*kn0*kt0*ra0*rb0*d0*p(0,12,0,0,0,0,g)*t(0,0, ):
Ps100t0h100z12k0b0cBlackfTimes
@BodyCopyStyle:PÒIste quidem veteres inter 
ponetur honeste, qui vel mense brevi vel toto est iunior anno.Ó Utor permisso, 
caudaeque pilos ut equinae paulatim vello unum, demo etiam unum, dum cadat elusus 
ratione ruentis acervi, qui redit in fastos et virtutem aestimat annPis miraturque 
nihil nisi quod Libitina sacravit. 
PEnnius et sapines et fortis et alter Homerus, 
ut critici dicunt, leviter curare videtur, quo promissa cadant et somnia Pythagorea. 
Naevius in manibus non est et mentibus haeret paene recens? Adeo sanctum est vetus 
omne poema. ambigitur quotiens, uter utro Psit prior, aufert Pacuvius docti famam 
senis Accius alti, dicitur Afrani toga convenisse Menandro, Plautus ad exemplar Siculi 
properare Epicharmi, vincere Caecilius gravitate, Terentius arte. 
@FloatingSubStyle=*L*hStandard*kn0*kt0*ra(24,0,Blue,100,T0,0,-4.97)*rb0*d0*p(0,0,0,0,12,0,g)*t(12,0,
 ,93,0, ,0,0, ):
PBs50t0h100z18k0b0cYellowfTimes
@FloatingSubStyle:  
Subhead 
@BodyCopyStyle:PHos ediscit et hos arto stipata theatro spectat Roma 
potens; habet hos numeratque poetas ad nostrum tempus Livi scriptoris ab aevo. 
PInterdum volgus rectum videt, est ubi peccat. Si veteres ita miratur laudatque 
poetas, ut nihil anteferat, nihil illis comparet, errat. Si quaedam nimis antique, si 
peraque dure dicere credit eos, ignave multa fatetur, et sapit et mecum facit et Iova 
iudicPat aequo.
PNon equidem insector delendave carmina Livi esse reor, memini 
quae plagosum mihi parvo Orbilium dictare; sed emendata videri pulchraque et exactis 
minimum distantia miror. Inter quae verbum emicuit si forte decorum, et si versus 
paulo concinnior unus et alPter, iniuste totum ducit venditque poema.

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


[PHP] Problem on file_exists() function

2002-07-17 Thread Jack

Dear all
I had made a test.txt file which stored in the following window path :
c:\pdf_reports\dealing\test.txt,
In my page, i ask php to check the test.txt exist in foler
(c:\pdf_reports\dealing) using the following script:

if (file_exists(c:\\pdf_reports\\dealing\\test.txt))
{
print (exist);
}
else
{
print (Doesn't Exist!);
}

It seems that php can't detect the file in such path!!!
I had made another test on this, i moved the test.txt to one level up which
is (c:\pdf_reports) and i use the following script :

if (file_exists(c:\\pdf_reports\\test.txt))
{
print (exist);
}
else
{
print (Doesn't Exist!);
}
Then it can detect the file is there! why?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




RE: [PHP] Sessions / logins / cookies / security

2002-07-17 Thread John Holmes

  Sure, why not? Users can't create session variables (unless you're
on a
  virtual server...)
 
 ... and I am -- A shared host server that is.

Now I'm not sure on this, I haven't tested it. Has anyone?

If we're on a virtual server, why can't I just open the
session.save_path with PHP and read all of the files. Determine which
one is yours and try to determine which variables you are saving. Say
you are setting $_SESSION['logged_in'] = 1 and $_SESSION['admin'] =
Yes. Then your session file will look like a serialized version of the
$_SESSION array. 

So say I figure out which ones are yours. I use a PHP script to write my
own bad_session_file.whatever in the session folder. Then I call up your
web page with www.example.com?PHPSESSID=bad_session_file and PHP will
load up the session file I just created and make me an admin... 

Like I said, I haven't tested it though. Safe mode might protect against
this, not sure. Anyone have any experience here?

---John Holmes...


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




RE: [PHP] IF inside LOOP?

2002-07-17 Thread Ford, Mike [LSS]

 -Original Message-
 From: César Aracena [mailto:[EMAIL PROTECTED]]
 Sent: 15 July 2002 03:04

 This is what I have so far:
  
 for ($m=0; $m$num_rows2; $m++)
 {
 $row2 = mysql_fetch_array($result2);
  
 echo $row2[devlanguage];
  
 if ($m  $num_rows2)
 {
 echo , ;
 }
 else
 {
 echo .;
 }
 }

My approach to this is like this:

   for ($m=0; $m$num_rows2; $m++)
   {
  $row2 = mysql_fetch_array($result2);

  if ($m0) echo ', ';
  echo $row2[devlanguage];
   }
   echo '.';

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




Re: [PHP] Multiple Tables -add, edit, delete

2002-07-17 Thread Paul Dionne

Thanks Dan

Paul

Analysis  Solutions wrote:

 Oh, yes!  I forgot about deleting countries that have been unchecked!
 Hmm...  Lock the table to prevent people from reading from it, delete
 all records for that company, then loop through and insert the new
 data, then unlock the table.
 
 --Dan
 


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




[PHP] To fill an Array

2002-07-17 Thread Gabor Niederlaender

Hi all!

I would like to fill the values from my $_POST array to another array
called xy which is not an associative array.

F.Ex:

$_POST['smthing'] should be $xy[0]  etc...

How do I do this?

Best regards,
Gabor

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




Re: [PHP] To fill an Array

2002-07-17 Thread Andrey Hristov


 $xy = array_values($_POST);


HTH

Regards,
Andrey Hristov

- Original Message - 
From: Gabor Niederlaender [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 1:19 PM
Subject: [PHP] To fill an Array


 Hi all!
 
 I would like to fill the values from my $_POST array to another array
 called xy which is not an associative array.
 
 F.Ex:
 
 $_POST['smthing'] should be $xy[0]  etc...
 
 How do I do this?
 
 Best regards,
 Gabor
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




Re: [PHP] Strong Web Hosts in Canada?

2002-07-17 Thread Andre Dubuc

Hi Dan,

Try http://www.hub.org.

Hth,
Andre

On Wednesday 17 July 2002 02:23 am, you wrote:
 Hi Folks:

 A client of mine has a large series of high traffic, PHP/MySQL intensive
 websites.  They're looking for dedicated hosting in Canada.  Any
 recommendations?

 Enjoy,

 --Dan

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




Re: [PHP] Sessions / logins / cookies / security

2002-07-17 Thread Justin French

on 17/07/02 6:51 PM, John Holmes ([EMAIL PROTECTED]) wrote:

 ... and I am -- A shared host server that is.
 
 Now I'm not sure on this, I haven't tested it. Has anyone?

Is this particular vulnerability only in existence when the server is pretty
open?  I mean, on my particular host, I can't FTP to anything outside my
docroot, and I can't use SSH, telnet, etc.

phpinfo() says my session.save-path is /tmp -- since (in theory) I can't get
the files via telnet, FTP or HTTP, the only option I can think of would be
another user on the host gaining access to it via a PHP script... which I'm
not sure can be done, and can't really test, because I wouldn't know how to
do it.

Justin


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




Re: [PHP] Strong Web Hosts in Canada?

2002-07-17 Thread Adam Alkins

 Hi Folks:

 A client of mine has a large series of high traffic, PHP/MySQL intensive
 websites.  They're looking for dedicated hosting in Canada.  Any
 recommendations?

You might have better luck getting recommendation on
http://www.webhostingtalk.com

--
Adam Alkins
http://www.rasadam.com
--


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




[PHP] php 4.2.1 compilation errors with apache 2.0

2002-07-17 Thread electroteque

hi guys i am getting this message when trying to compile php 4.2.1 with
apache 2.0

os.h: No such file or directory , there is a missing file, i tried a symlink
to /os/unix/os.h but still didnt work ??



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




[PHP] php Similar to C in Pointer Memory Accessing or not?

2002-07-17 Thread Kondwani Spike Mkandawire

Hi Folks:

Just for interest sake, for those of you who have messed
with C know about Pointers hence probably know that
one can access stuff from Memory Locations in very wierd
ways via pointers and Arrays:

int * ptr;
ptr = array[0];
ptr=ptr-1;

The last statement does not generate an error but lets you
access that location...
Firstly I want to know if PHP has pointers (I know it uses
dereferencing values via ) and if it does use pointers
does it let you do stuff like this (or does its nature not
let you interact with the lower level hardware components?
I've never seen the need to investigate if there are pointers
in PHP but it would be an interesting thing to know...
Being a Server Side tool, it would not surprise me if it did,
it appears to have some similarities to C anywayz notably
function printf()

Spike...



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




[PHP] Sessions Vars under 4.0.4pl1

2002-07-17 Thread Henry

Hello All,

I, having problems getting HTTP_SESSION_VARS to work the way I think they
should.
Shouldn't I just be able to do something like:

in a file called index.php I have the following;

?php
session_start();
?
html
head/head
body
The session_id is ?php echo \.session_id().\; ?

a href=index2.phpNext/a
?php
$HTTP_SESSION_VARS['count']=123;
?
/body
/html

In index2.php I then have
?php
session_start();
?
html
head/head
body
The session_id is ?php echo \.session_id().\; ?
?php
echo \$HTTP_SESSION_VARS['count']=.$HTTP_SESSION_VARS['count']..BR;
?
/body
/html

Now when I go to the first one all is great and the session id is shown. But
when I click on the Next link I get the next page with the same session id
shown (all well and good) but no value in $HTTP_SESSION_VARS['count']!!!

Where am I going wrong?

Henry





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




[PHP] Forms problem?

2002-07-17 Thread Mark Colvin

I have a php script that queries a mysql db and build a form on a page for
each row returned. Each form has four fields and a thumbnail of a JPEG.
Below the image is a link to view the full image in a new window by using a
javascript function. (No javascript  jibes before I go any further, it was
the only way I knew how). When I enter a query and say 10 records are
returned (10 forms are created with the same name), the data and appropriate
thumbnails are displayed correctly. When I click on the link the full image
is only displayed for the first six links. After this clicking on the link
has no effect. In the example above, the first five images were the same and
the last five were also the same. I should also mention that when I load
this page, I get an IE error 'unterminated string constant' but the page
does load correctly. I have checked my code for closing quotes etc but they
seem OK. Is there a max number of forms that can be created on a page or do
I have to name them all different or is there some other explanation as to
why the images won't display. Any ideas would be helpful and I can post more
code if required.

The call to the function is:

echo td width='200' colspan='2' align='center' class=labelsa
href='javascript:void(0)' onclick='ViewFullImage(\$img_code\)'View full
size/a/td;

The function is:

function ViewFullImage(strCode)
   {

msg=window.open(,msg,height=400,width=750,left=20,top=80,scrollbars=yes
,resizable=yes);
  msg.document.write(htmltitleDecoration Image/title);
  msg.document.write(body bgcolor='white' onblur=window.close());

  msg.document.write(centerimg src=images/ + strCode + .jpg
align=center valign=center/center);
  msg.document.write(/body/htmlp);
   }



This e-mail is intended for the recipient only and
may contain confidential information. If you are
not the intended recipient then you should reply
to the sender and take no further ation based
upon the content of the message.
Internet e-mails are not necessarily secure and
CCM Limited does not accept any responsibility
for changes made to this message. 
Although checks have been made to ensure this
message and any attchments are free from viruses
the recipient should ensure that this is the case.


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




Re: [PHP] Forms problem?

2002-07-17 Thread Jason Wong

On Wednesday 17 July 2002 19:17, Mark Colvin wrote:

Misleading subject. Nothing to do with php or forms.

[snip]

 mention that when I load this page, I get an IE error 'unterminated string
 constant' but the page does load correctly. 

Obviously there is a problem. What does 'load correctly' mean?

My guess is that $img_code contains a space?

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Veni, vidi, vici.
[I came, I saw, I conquered].
-- Gaius Julius Caesar
*/


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




RE: [PHP] Sessions / logins / cookies / security

2002-07-17 Thread John Holmes

  ... and I am -- A shared host server that is.
 
  Now I'm not sure on this, I haven't tested it. Has anyone?
 
 Is this particular vulnerability only in existence when the server is
 pretty
 open?  I mean, on my particular host, I can't FTP to anything outside
my
 docroot, and I can't use SSH, telnet, etc.

That's for you, but when you run a PHP script, you run it as user
Apache, www, nobody, etc...however your system is set up (if PHP is a
module).

 phpinfo() says my session.save-path is /tmp -- since (in theory) I
can't
 get
 the files via telnet, FTP or HTTP, the only option I can think of
would be
 another user on the host gaining access to it via a PHP script...
which
 I'm
 not sure can be done, and can't really test, because I wouldn't know
how
 to
 do it.

Yes, the attack could only come from someone on the same server. That's
why dedicated servers are preferred and why safe_mode is used on virtual
aervers. Safe_mode may protect the sessions, too, not sure. 

?
$_SESSION['Logged_On'] = 1;
$_SESSION['Admin'] = 1;
$s = serialize($_SESSION);

$fp = fopen(/tmp/bad_session.file,w);
fwrite($fp,$s);
fclose($fp);
?

http://www.yoursite.com?PHPSESSID=bad_session

I don't have a virtual server environment to actually test this out
with, though...and it would require a lot of work from the hacker...but
what else do they have to do. Get a dedicated server...they really
aren't that expensive anymore.

---John Holmes...



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




[PHP] Regular expression for correcting proper nouns

2002-07-17 Thread Henry

Hi All,

I'm looking for a simple was to correct a list of proper nouns given all in
lower case!

For example

given $string=london paris rome;

I would like London Paris Rome.

However there is one cavet; if the word already has a captital anywhere in
it, it should be left alone!!!

Is there a soultion using regular expressions?

Also is there one for removing multiple spaces?

i..e given A   B C D E it would give A B C D E.

I have never used regular expression before and thought that if I had some
examples like these, I could go from there.

Henry



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




[PHP] DPHPEdit new version

2002-07-17 Thread Davor Pleskina

PHP (and other) programmers,

Feel free to download and use this small PHP IDE.

There is a new, completely stable version 0.9.2.3 available at
http://www.pleskina.com/dphped

Thanks all you guys who helped me making this program better and more
usable!

Keep looking ahead for more features in the future.

__
Davor Pleskina - [EMAIL PROTECTED]
http://www.pleskina.com
ICQ#: 38632789
Programmers don't die; they just GOSUB without RETURN...
__



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




Re: [PHP] Sessions / logins / cookies / security

2002-07-17 Thread René Moonen

snip

What I'm looking to do is when a user logs in, I start up the session.. I
then have the registered session var to verify they are authenticated as
they move throughout the site.

/snip

This solution is no garantuee that the authenticated user is in control 
during that session. The only thing you realy *know* is that there was a 
succesful authentication at the beginning of the current session and you 
would *assume*  that the user is at the client screen during the 
complete session. (the authenticated user could leave the browser 
unattended).

snip

Now, when they close the browser and come back, I want them to still be
authenticated.  

/snip

The only thing you *know* for sure is that there was a valid 
authentication during some *previous* session. And that *some* user has 
still access to that client based on some client specific authentication 
(pressing ESC during Windows login dialog). So what's your definition of 
'authenticated'.

snip

What's the most secure way, that's not easily spoofed?  

/snip

My point is this. You will never know for sure if the authenticated user 
is still in control in whatever session (not even the first). If you 
realy need to be sure, you would use authentication more than once 
during a session. For example a first time login and then again just 
before the user wants to post or read important information.

If this is of no concern to your application, than it will be no problem 
to use cookies with some session identifier to allow continuing without 
authentication during the next session. But it might be wise to force 
authentication if a user where to enter some kind of admin area of your 
site during the second session.


Success


René




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




[PHP] function for finding one character in a string?

2002-07-17 Thread Scott Fletcher

I have been looking around in the PHP function listing for a function that
can find or match one character from a string.  I thought it would be
something like post_str() or something but never found anything close to
that.  I get the idea of post and str from the SQL command.  I did check the
ereg() but it is so confusing, no clear instruction on it.

--clip--
 $str = ;
 $str = X;
 $str = XY
 $str = Y;
 $str = YX;
--clip--

Those same variables from above, I only need to know if hte X exist in the
string, nothing else.

Thanks,
 FletchSOD



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




Re: [PHP] Regular expression for correcting proper nouns

2002-07-17 Thread Jason Wong

On Wednesday 17 July 2002 20:07, Henry wrote:
 Hi All,

 I'm looking for a simple was to correct a list of proper nouns given all in
 lower case!

 For example

 given $string=london paris rome;

 I would like London Paris Rome.

 However there is one cavet; if the word already has a captital anywhere in
 it, it should be left alone!!!

ucwords()

 Is there a soultion using regular expressions?

Yes.

 Also is there one for removing multiple spaces?

Yes.

 i..e given A   B C D E it would give A B C D E.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Stability itself is nothing else than a more sluggish motion.
*/


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




Re: [PHP] function for finding one character in a string?

2002-07-17 Thread Jason Wong

On Wednesday 17 July 2002 05:36, Scott Fletcher wrote:
 I have been looking around in the PHP function listing for a function that
 can find or match one character from a string.  I thought it would be
 something like post_str() or something but never found anything close to
 that.  I get the idea of post and str from the SQL command.  I did check
 the ereg() but it is so confusing, no clear instruction on it.

 --clip--
  $str = ;
  $str = X;
  $str = XY
  $str = Y;
  $str = YX;
 --clip--

 Those same variables from above, I only need to know if hte X exist in
 the string, nothing else.

strstr()

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Think of it this way: threads are like salt, not like
 pasta. You like salt, I like salt, we all like salt. But we
 eat more pasta.

- Larry McVoy
*/


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




[PHP] Debugging LDAP_connect problems

2002-07-17 Thread Brad Harriger

I'm trying to connect to a server using ldap_connect.  The connection is 
failing, but I'm not sure why.  When I try to use ldap_error() to narrow 
down the problem, I get a messaging saying ... 0 is not a LDAP link 
index at   I'm not sure what other options I have.  Any suggestions 
would be apprecieated.

Thanks in advance,

Brad


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




Re: [PHP] CRON JOB

2002-07-17 Thread José León Serna

MAAS wrote:

What do I have to do before I can run my file.php as a cron job in Linux?

What problem do you have? I have no problems with it calling it as php 
myfile.php

-- 
Best Regards.
--
QaDRAM Studio, RAD development for the web
http://studio.qadram.com




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




Re: [PHP] CRON JOB

2002-07-17 Thread Jason Wong

On Wednesday 17 July 2002 20:51, MAAS wrote:
 What do I have to do before I can run my file.php as a cron job in Linux?

search archives for cron.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Never underestimate the power of a small tactical nuclear weapon.
*/


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




Re: [PHP] function for finding one character in a string?

2002-07-17 Thread Adam Voigt

Or, if you want a count of the number of times a character (or string if
you want) ocurrs in a string, you could use: substr_count()

http://www.php.net/manual/en/function.substr-count.php

Adam Voigt
[EMAIL PROTECTED]

On Tue, 2002-07-16 at 17:36, Scott Fletcher wrote:
 I have been looking around in the PHP function listing for a function that
 can find or match one character from a string.  I thought it would be
 something like post_str() or something but never found anything close to
 that.  I get the idea of post and str from the SQL command.  I did check the
 ereg() but it is so confusing, no clear instruction on it.
 
 --clip--
  $str = ;
  $str = X;
  $str = XY
  $str = Y;
  $str = YX;
 --clip--
 
 Those same variables from above, I only need to know if hte X exist in the
 string, nothing else.
 
 Thanks,
  FletchSOD
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



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




[PHP] Re: CRON JOB

2002-07-17 Thread val petruchek

*/1 * * * * val /usr/local/bin/lynx -source
http://php.net/crontab/steward.php
- example of how to call script every minute

--
Sincerely, val petruchek
Maas [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 What do I have to do before I can run my file.php as a cron job in Linux?






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




[PHP] CRON JOB

2002-07-17 Thread MAAS


What do I have to do before I can run my file.php as a cron job in Linux?




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




RE: [PHP] CRON JOB

2002-07-17 Thread Jay Blanchard

[snip]
What do I have to do before I can run my file.php as a cron job in Linux?
[/snip]

Look at the archives for the past couple of days, it has been covered in
some detail. Make sure to compile PHP without apsx, and for practical
purposes move the PHP executable to the /usr/local/bin directory. Then put
this as the first line of the PHP file you want to run from a CRON;

#!/usr/local/bin/php

Then set up your CRON.

HTH!

Jay

Philosophy is a study that lets us be unhappy more intelligently.

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*



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




[PHP] imap connection problem

2002-07-17 Thread Korbinian Schmid

when i try to connect to my local imap server by php i get the message
(standard ie message) that the page can't be shown. with another server
(imap.web.de) everything works fine. with outlook i can access my server
without any problems and also mtest seems to work without any errors. what's
wrong. would be nice if anybody could help me.

CU Korbi



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




[PHP] win32 mail()

2002-07-17 Thread val petruchek

don't be afraid - it works perfect.

i mean mail() on win32 server

my question is - how to set up SMTP
authorization in php ini
(if smtp server requires pop auth)

is it possible or should i use direct smtp
connection?

--
Sincerely, val petruchek



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




[PHP] Classes Constructor syntax

2002-07-17 Thread David Russell

Hi all,

I am finally spending some time converting a million and one functions 
into a class - this is for a software issue tracking system.

I have:

class issue {
   var
   var
   ...

   function issue() { //default constructor
 //initialise all variables to defaults, and start getting the stuff 
from forms
   }

   function issue($number) { //1 variable constructor
 // Query database and populate variables accordingly
   }
}

My question is: will this work? does PHP OOP support more than one 
constructor? If my syntax is wrong, please let me know the correct syntax.

Thanks

David R


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




[PHP] Regular expression

2002-07-17 Thread Michal Albrecht

Hi,

Could anyone help me with the following:

I have to strip the domain from string only if it is not preceded with @ 
which means - when it is not an e-mail address.

Examples:

1. blah blah blah [EMAIL PROTECTED] blah blah

should result in:

blah blah blah [EMAIL PROTECTED] blah blah

2. blah blah blah something.org blah blah

should result in:

blah blah blah  blah blah

Thanks a lot,


Michal


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




[PHP] Re: Classes Constructor syntax

2002-07-17 Thread Matthew Gray

PHP does not support multiple constructors. But, It does support 
variable argument lists, so you can fake it with func_get_args() and 
func_get_num_args():

function issue() {

if( func_get_num_args()  0 ) {
   
$args = func_get_args()

} else {

 // do something else...
}
}

Matt

David Russell wrote:

 Hi all,

 I am finally spending some time converting a million and one functions 
 into a class - this is for a software issue tracking system.

 I have:

 class issue {
   var
   var
   ...

   function issue() { //default constructor
 //initialise all variables to defaults, and start getting the 
 stuff from forms
   }

   function issue($number) { //1 variable constructor
 // Query database and populate variables accordingly
   }
 }

 My question is: will this work? does PHP OOP support more than one 
 constructor? If my syntax is wrong, please let me know the correct 
 syntax.

 Thanks

 David R




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




Re: [PHP] Regular expression

2002-07-17 Thread Andrey Hristov

Something like this.
$your_string = preg_replace('/[\d\w]+@([\w\d]{3,}\.)+([\w]{2,4})/','',
$your_string);

HTH

Best regards,
Andrey Hristov

- Original Message -
From: Michal Albrecht [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 1:08 PM
Subject: [PHP] Regular expression


 Hi,

 Could anyone help me with the following:

 I have to strip the domain from string only if it is not preceded with @
 which means - when it is not an e-mail address.

 Examples:

 1. blah blah blah [EMAIL PROTECTED] blah blah

 should result in:

 blah blah blah [EMAIL PROTECTED] blah blah

 2. blah blah blah something.org blah blah

 should result in:

 blah blah blah  blah blah

 Thanks a lot,


 Michal


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




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




Re: [PHP] Classes Constructor syntax

2002-07-17 Thread Michael Hall


PHP does not support multiple constructors.

Michael

On Wed, 17 Jul 2002, David Russell wrote:

 Hi all,
 
 I am finally spending some time converting a million and one functions 
 into a class - this is for a software issue tracking system.
 
 I have:
 
 class issue {
var
var
...
 
function issue() { //default constructor
  //initialise all variables to defaults, and start getting the stuff 
 from forms
}
 
function issue($number) { //1 variable constructor
  // Query database and populate variables accordingly
}
 }
 
 My question is: will this work? does PHP OOP support more than one 
 constructor? If my syntax is wrong, please let me know the correct syntax.
 
 Thanks
 
 David R
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] win32 mail()

2002-07-17 Thread Jason Wong

On Wednesday 17 July 2002 21:18, val petruchek wrote:
 don't be afraid - it works perfect.

 i mean mail() on win32 server

 my question is - how to set up SMTP
 authorization in php ini
 (if smtp server requires pop auth)

Standard mail() doesn't do auth.

 is it possible or should i use direct smtp
 connection?

Have a look the the Pear mail.php or google for php smtp auth

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
The full impact of parenthood doesn't hit you until you multiply the
number of your kids by thirty-two teeth.
*/


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




[PHP] File reading help with Syntax

2002-07-17 Thread Chris Crane

I am getting data froma website for stock information. If I type in the
brower the URL I get a text file display list this;

Date,Open,High,Low,Close,Volume
16-Jul-02,7.92,8.10,7.68,7.82,605500
15-Jul-02,7.98,8.02,7.59,8.02,577200
12-Jul-02,7.80,8.00,7.57,7.95,411100
11-Jul-02,7.82,7.94,7.34,7.80,802400

Now I want to break each line and then seperate each line by the commas. The
amount of linesin the file is never known so I assume I have to use
something like a foreach or while statement,but I am not sure the best way
to do it. This is what I have so far.

 $Symbol = IKN; $LookupUrl =
http://demos.inxdesign.com/download?sym=$Symbolformat=.txt;; $Results =
implode('', file($LookupUrl));
 $Data = array(); split(\n, $Results) = array_push($Data, $line)

The end result I am trying to get is each line to be an element in an array.
Later I will go back and stepthrough each element of the array and then
split that by the commas and have it output into an HTML table.At least this
is the best way I can think to deal with it. I suppose a better way to do
this would be to make this an associative array and have the data of each
line be associated with the date then I could producea variable something
like $StockData[16-Jul-02][value], but I don't know how to do any of that.






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




Re: [PHP] Regular expression

2002-07-17 Thread Michal Albrecht

Andrey Hristov wrote:
 Something like this.
 $your_string = preg_replace('/[\d\w]+@([\w\d]{3,}\.)+([\w]{2,4})/','',
 $your_string);
 
 HTH
 
 Best regards,
 Andrey Hristov

Thank you very much for your time, but this strips the e-mail address 
and lives the domain. Could you give me some hints on how to make it 
working the opposite way?


Regards,

Michal


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




Re: [PHP] Classes Constructor syntax

2002-07-17 Thread Michael Hall


I'm no guru, but here goes anyway ...

default variable values can simply be set with a var statement:

var $somevar1 = value1;
var $somevar2 = value2;

or with a set function:

var $somevar1;
var $somevar2;

function setsomevar1()
{
$this-somevar1 = value1;
}

function setsomevar2()
{
$this-somevar2 = value2;
}

One set function could probably query a database and set all your vars
in one go:

function setallvars()
{
// query db, get values
$this-somevar1 = value1;
$this-somevar2 = value2;
}

Amyway, you could then call the set var functions from within your
constructor:

function issue()
{
setallvars();
or
setsomevar1();
setsomevar2();
}

Just a suggestion. No doubt someone will correct me if I'm wrong ... I'm
new to OOP myself.

Michael



On Wed, 17 Jul 2002, David Russell wrote:

 Hi all,
 
 I am finally spending some time converting a million and one functions 
 into a class - this is for a software issue tracking system.
 
 I have:
 
 class issue {
var
var
...
 
function issue() { //default constructor
  //initialise all variables to defaults, and start getting the stuff 
 from forms
}
 
function issue($number) { //1 variable constructor
  // Query database and populate variables accordingly
}
 }
 
 My question is: will this work? does PHP OOP support more than one 
 constructor? If my syntax is wrong, please let me know the correct syntax.
 
 Thanks
 
 David R
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] win32 mail()

2002-07-17 Thread val petruchek

 Have a look the the Pear mail.php or google for php smtp auth

already done, but i've my own smtp class anyway.

i hoped to avoid rewriting code which used mail().

thanks

--
Sincerely, val petruchek
Jason Wong [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...



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




[PHP] $HTTP_SESSION_VARS ? Have I got it wrong

2002-07-17 Thread Henry

The answer is probably yes.

I do a
session_start() followed by a $HTTP_SESSION_VARS['count']=2 on one page.
Then I go to another page and do a session_start() again; unfortunately
the $HTTP_SESSION_VARS['count'] is empty!!!

I tried doing a session_register('count2'); $count2=123; in the first page
followed by another page where I display $count2 and that works fine.

Why?

Henry



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




Re: [PHP] $HTTP_SESSION_VARS ? Have I got it wrong

2002-07-17 Thread Martin Clifford

Define the value of $count before registering it, and it should work fine :o)

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


 Henry [EMAIL PROTECTED] 07/17/02 10:14AM 
The answer is probably yes.

I do a
session_start() followed by a $HTTP_SESSION_VARS['count']=2 on one page.
Then I go to another page and do a session_start() again; unfortunately
the $HTTP_SESSION_VARS['count'] is empty!!!

I tried doing a session_register('count2'); $count2=123; in the first page
followed by another page where I display $count2 and that works fine.

Why?

Henry



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



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




Re: [PHP] $HTTP_SESSION_VARS ? Have I got it wrong

2002-07-17 Thread Martin Clifford

Ignore that, I'll just go grab my copy of Hooked on Phonics so I can learn to read 
before replying.

:trots off:

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


 Martin Clifford [EMAIL PROTECTED] 07/17/02 10:15AM 
Define the value of $count before registering it, and it should work fine :o)

Martin Clifford
Homepage: http://www.completesource.net 
Developer's Forums: http://www.completesource.net/forums/ 


 Henry [EMAIL PROTECTED] 07/17/02 10:14AM 
The answer is probably yes.

I do a
session_start() followed by a $HTTP_SESSION_VARS['count']=2 on one page.
Then I go to another page and do a session_start() again; unfortunately
the $HTTP_SESSION_VARS['count'] is empty!!!

I tried doing a session_register('count2'); $count2=123; in the first page
followed by another page where I display $count2 and that works fine.

Why?

Henry



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



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



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




[PHP] querying for one specific row number

2002-07-17 Thread Phil Schwarzmann

I want query my mysql table and get one particular row.
 
So let's say my table had 5 rows (entries) in it, and I want to pull
just row #2, how would I do this??
 
THANKS!!



Re: [PHP] querying for one specific row number

2002-07-17 Thread Martin Clifford

If you are using an auto_increment primary key field named id, then you would use this:

SELECT * FROM table WHERE id=2 LIMIT 1

Just so long as you know that if for some reason you delete that row, there will NEVER 
Be another id of 2, unless you set it that way.

If you only want to select certain columns from the row, then list those columns in 
place of the wildcard.

SELECT first_name, last_name FROM table WHERE id=1 LIMIT 1

HTH!

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


 Phil Schwarzmann [EMAIL PROTECTED] 07/17/02 10:21AM 
I want query my mysql table and get one particular row.
 
So let's say my table had 5 rows (entries) in it, and I want to pull
just row #2, how would I do this??
 
THANKS!!


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




Re: [PHP] querying for one specific row number

2002-07-17 Thread René Moonen

Phil Schwarzmann wrote:

I want query my mysql table and get one particular row.
 
So let's say my table had 5 rows (entries) in it, and I want to pull
just row #2, how would I do this??
 
THANKS!!

  

It's OT but OK:

SELECT * FROM table LIMIT 1,1;

Have another look at the MySQL manual (6.4.1. Select Syntax)



René



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




Re: [PHP] imap connection problem

2002-07-17 Thread Latex Master

Hello Korbinian,
  Can you provide the script code?
Let's see how we can help

Wednesday, July 17, 2002, 4:50:44 PM, you wrote:

KS when i try to connect to my local imap server by php i get the message
KS (standard ie message) that the page can't be shown. with another server
KS (imap.web.de) everything works fine. with outlook i can access my server
KS without any problems and also mtest seems to work without any errors. what's
KS wrong. would be nice if anybody could help me.

KS CU Korbi






-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




[PHP] Of Jobs and Certs

2002-07-17 Thread Martin Clifford

Howdy everyone,

I'd like to get everyone's input on Jobs and Certs.  I know there are a couple 
Certifications for web developers out there, such as the CIW and CWP certifications.

Here are my questions:

1.  What is the best method to go about becoming certified?
2.  What is the best way to go about getting into the web development industry?
3.  If you have ever taken online courses relating to web development, what is your 
opinion on them?  Good, bad, ugly?
4.  Which certification is most beneficial?  I know that CWP requires work experience 
before becoming certified past certain points, and CIW does not require this.
5.  Why can't I remember what question five was? Doh.

At any rate, I'm current a data entry clerk, but have quite a bit of web experience 
(none at a job, though), and I know that I have TONS more to learn, but I am very 
passionate about it and want to be able to do it as a career.  I just don't know where 
the hell to start, and I know that some of you might be able to offer some advice in 
this area.

Thanks in advance!  This is very important to me, so I thought I'd ask the people that 
would know best :o)

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/



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




[PHP] $_SESSION - autostart, or session_start() ?

2002-07-17 Thread Matt Babineau

If I set the SESSION autostart = 1 in the PHP config, would that
eliminate my need to use session_start() in my code? I have some PHP
inline with some HTML, and the PHP is telling me:
 
Warning: Cannot send session cookie - headers already sent
 
Any ideas how to remedy this?
 
Matt Babineau
MCWD / CCFD
-
e:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
p: 603.943.4237
w:  http://www.criticalcode.com/ http://www.criticalcode.com
PO BOX 601
Manchester, NH 03105
 



Re: [PHP] $_SESSION - autostart, or session_start() ?

2002-07-17 Thread Andrey Hristov

Try with output buffering.

Regards,
Andrey Hristov
 
- Original Message - 
From: Matt Babineau [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 6:20 PM
Subject: [PHP] $_SESSION - autostart, or session_start() ?


 If I set the SESSION autostart = 1 in the PHP config, would that
 eliminate my need to use session_start() in my code? I have some PHP
 inline with some HTML, and the PHP is telling me:
  
 Warning: Cannot send session cookie - headers already sent
  
 Any ideas how to remedy this?
  
 Matt Babineau
 MCWD / CCFD
 -
 e:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 p: 603.943.4237
 w:  http://www.criticalcode.com/ http://www.criticalcode.com
 PO BOX 601
 Manchester, NH 03105
  
 


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




[PHP] Queries - Sometimes I need to use apostrophe, other times idon't

2002-07-17 Thread Phil Schwarzmann

When running a mysql_query, sometimes i need to have apostrophes
surrounding variables...other times i don't
 
example...
 
$query = SELECT * FROM table WHERE id='$id';
 
or
 
$query = SELECT * FROM table WHERE id=$id;
 
...it kinda seems random when it wants apostrophes and when it doesn't
want them.
 
Any ideas?



Re: [PHP] $_SESSION - autostart, or session_start() ?

2002-07-17 Thread Martin Clifford

The error is pretty self-explanatory.  You aren't starting the session before 
soemthing is being written to the page.

This will yeild the same error:

-top of document--
!-- BEGIN DOCUMENT 
?php session_start(); ?
-botton of doc-

This is because something has been sent to the browser (the comment line), which is 
after the HTTP headers have already returned from the server.

HTH

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


 Matt Babineau [EMAIL PROTECTED] 07/17/02 11:20AM 
If I set the SESSION autostart = 1 in the PHP config, would that
eliminate my need to use session_start() in my code? I have some PHP
inline with some HTML, and the PHP is telling me:
 
Warning: Cannot send session cookie - headers already sent
 
Any ideas how to remedy this?
 
Matt Babineau
MCWD / CCFD
-
e:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] 
p: 603.943.4237
w:  http://www.criticalcode.com/ http://www.criticalcode.com 
PO BOX 601
Manchester, NH 03105
 


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




Re: [PHP] Queries - Sometimes I need to use apostrophe, other times i don't

2002-07-17 Thread Asmodean

QUOTE//

When running a mysql_query, sometimes i need to have apostrophes
surrounding variables...other times i don't
 
example...
 
$query = SELECT * FROM table WHERE id='$id';
 
or
 
$query = SELECT * FROM table WHERE id=$id;
 
...it kinda seems random when it wants apostrophes and when it doesn't
want them.
 
Any ideas?

//QUOTE

Use apostrophes when $id is a string.

// Asmodean
[EMAIL PROTECTED]


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




Re: [PHP] Queries - Sometimes I need to use apostrophe, other times idon't

2002-07-17 Thread 1LT John W. Holmes

It's not random. Strings need to be enclosed. You can use single or double
quotes, but you have to use them.

---John Holmes...

- Original Message -
From: Phil Schwarzmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 11:19 AM
Subject: [PHP] Queries - Sometimes I need to use apostrophe, other times
idon't


 When running a mysql_query, sometimes i need to have apostrophes
 surrounding variables...other times i don't

 example...

 $query = SELECT * FROM table WHERE id='$id';

 or

 $query = SELECT * FROM table WHERE id=$id;

 ...it kinda seems random when it wants apostrophes and when it doesn't
 want them.

 Any ideas?



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




Re: [PHP] $_SESSION - autostart, or session_start() ?

2002-07-17 Thread 1LT John W. Holmes

Call session_start() before ANY output. html is OUTPUT. 

---John Holmes...

- Original Message - 
From: Matt Babineau [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 11:20 AM
Subject: [PHP] $_SESSION - autostart, or session_start() ?


 If I set the SESSION autostart = 1 in the PHP config, would that
 eliminate my need to use session_start() in my code? I have some PHP
 inline with some HTML, and the PHP is telling me:
  
 Warning: Cannot send session cookie - headers already sent
  
 Any ideas how to remedy this?
  
 Matt Babineau
 MCWD / CCFD
 -
 e:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 p: 603.943.4237
 w:  http://www.criticalcode.com/ http://www.criticalcode.com
 PO BOX 601
 Manchester, NH 03105
  
 


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




Re: [PHP] querying for one specific row number

2002-07-17 Thread 1LT John W. Holmes

 I want query my mysql table and get one particular row.

 So let's say my table had 5 rows (entries) in it, and I want to pull
 just row #2, how would I do this??

What is row #2?? The second row when the table is ordered by the first
column? second column? ascending? decending? without an ORDER BY in your
query...row #2 can be different every time.

Once you add your ORDER BY, you can use LIMIT 1,1 on the end of your query
to have it just return the second row.

---John Holmes...


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




[PHP] Re: OT [PHP] querying for one specific row number

2002-07-17 Thread 1LT John W. Holmes

Off topic...

 So let's say my table had 5 rows (entries) in it, and I want to pull
 just row #2, how would I do this??

 SELECT * FROM table LIMIT 1,1;

Technically, without an ORDER BY in your query, the database can return a
different row each time with this query. Without an ORDER BY, how do you
define row #2? The database just stores the data in any way it wants to and
doesn't order it unless you tell it to.

---John Holmes...


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




Re: [PHP] $HTTP_SESSION_VARS ? Have I got it wrong

2002-07-17 Thread 1LT John W. Holmes

If you're going to use $HTTP_SESSION_VARS, then you have to use
session_register().

?
session_start();
session_register('count');
?

Next page:
?
session_start();
echo $HTTP_SESSION_VARS['count'];
?

That should work. If you use $_SESSION, instead, then you don't have to use
session_register.

That's how I understand it...

---John Holmes...

 Henry [EMAIL PROTECTED] 07/17/02 10:14AM 
The answer is probably yes.

I do a
session_start() followed by a $HTTP_SESSION_VARS['count']=2 on one page.
Then I go to another page and do a session_start() again; unfortunately
the $HTTP_SESSION_VARS['count'] is empty!!!

I tried doing a session_register('count2'); $count2=123; in the first page
followed by another page where I display $count2 and that works fine.

Why?

Henry



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



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



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




[PHP] timer on sessions?

2002-07-17 Thread Jas

Not sure how to go about setting up a function to parse the date, hour,
minutes, seconds, take the seconds and register them in a session var, then
do a check on the session var (seconds) vs. the seconds var + 5*60 (or 5
minutes) to time out the session and force the user to log back in.  My
problem is finding the correct way to check the seconds in php.  Any help or
pointers is appreciated.
Jas



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




Re: [PHP] timer on sessions?

2002-07-17 Thread Asmodean

J Not sure how to go about setting up a function to parse the date, hour,
J minutes, seconds, take the seconds and register them in a session var, then
J do a check on the session var (seconds) vs. the seconds var + 5*60 (or 5
J minutes) to time out the session and force the user to log back in.  My
J problem is finding the correct way to check the seconds in php.  Any help or
J pointers is appreciated.
J Jas

time() will give you a UNIX timestamp. Use it to do the math.

-- 
Best regards,
 Asmodeanmailto:[EMAIL PROTECTED]


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




Re: [PHP] Problem on file_exists() function

2002-07-17 Thread Analysis Solutions

On Wed, Jul 17, 2002 at 03:55:10PM +0800, Jack wrote:
 
 if (file_exists(c:\\pdf_reports\\dealing\\test.txt))
 It seems that php can't detect the file in such path!!!

While this isn't your problem, it's nicer coding.  Single quotes and 
forward slashes:

  if ( file_exists('c:/pdf_reports/dealing/test.txt') )


 if (file_exists(c:\\pdf_reports\\test.txt))
 Then it can detect the file is there! why?

Probably, PHP doesn't have permissions on the dealing directory or you 
misspelled it.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




[PHP] ARRAY_PUSH()

2002-07-17 Thread Chris Crane

I am getting data froma website for stock information. If I type in the
brower the URL I get a text file display list this;

Date,Open,High,Low,Close,Volume
16-Jul-02,7.92,8.10,7.68,7.82,605500
15-Jul-02,7.98,8.02,7.59,8.02,577200
12-Jul-02,7.80,8.00,7.57,7.95,411100
11-Jul-02,7.82,7.94,7.34,7.80,802400

Now I want to break each line and then seperate each line by the commas. The
amount of linesin the file is never known so I assume I have to use
something like a foreach or while statement,but I am not sure the best way
to do it. This is what I have so far.

 $Symbol = IKN; $LookupUrl =
http://demos.inxdesign.com/download?sym=$Symbolformat=.txt;; $Results =
implode('', file($LookupUrl));
 $Data = array(); split(\n, $Results) = array_push($Data, $line)

The end result I am trying to get is each line to be an element in an array.
Later I will go back and stepthrough each element of the array and then
split that by the commas and have it output into an HTML table.At least this
is the best way I can think to deal with it. I suppose a better way to do
this would be to make this an associative array and have the data of each
line be associated with the date then I could producea variable something
like $StockData[16-Jul-02][value], but I don't know how to do any of that.








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




Re: [PHP] timer on sessions?

2002-07-17 Thread Jas

I am not able to test from this machine so please tell me if I am right or
wrong on this:
$tmp = time();
$tme = time() - 5*60;
session_register('tmp');
if ($tmp = $tme) {
echo 'Time has not reached 5 minutes, session still valid';
} else {
echo 'Timer has reached 5 minutes, you will need to log back in to
continue.'; }

Asmodean [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 J Not sure how to go about setting up a function to parse the date, hour,
 J minutes, seconds, take the seconds and register them in a session var,
then
 J do a check on the session var (seconds) vs. the seconds var + 5*60 (or
5
 J minutes) to time out the session and force the user to log back in.  My
 J problem is finding the correct way to check the seconds in php.  Any
help or
 J pointers is appreciated.
 J Jas

 time() will give you a UNIX timestamp. Use it to do the math.

 --
 Best regards,
  Asmodeanmailto:[EMAIL PROTECTED]




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




Re[2]: [PHP] timer on sessions?

2002-07-17 Thread Asmodean

J I am not able to test from this machine so please tell me if I am right or
J wrong on this:
J $tmp = time();
J $tme = time() - 5*60;
J session_register('tmp');
if ($tmp = $tme) {
J echo 'Time has not reached 5 minutes, session still valid';
J } else {
J echo 'Timer has reached 5 minutes, you will need to log back in to
J continue.'; }

J Asmodean [EMAIL PROTECTED] wrote in message
J [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 J Not sure how to go about setting up a function to parse the date, hour,
 J minutes, seconds, take the seconds and register them in a session var,
J then
 J do a check on the session var (seconds) vs. the seconds var + 5*60 (or
J 5
 J minutes) to time out the session and force the user to log back in.  My
 J problem is finding the correct way to check the seconds in php.  Any
J help or
 J pointers is appreciated.
 J Jas

 time() will give you a UNIX timestamp. Use it to do the math.

 --
 Best regards,
  Asmodeanmailto:[EMAIL PROTECTED]


Let's assume you've set your session timestamp (assume it's called
$session_time) to time() at the time of login. Now, in the script...

if ((time() + 300)  $session_time) {

}

This would be a check to see if the session is still valid. Timewise.

-- 
Best regards,
 Asmodeanmailto:[EMAIL PROTECTED]


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




Re: [PHP] Regular expression

2002-07-17 Thread Analysis Solutions

On Wed, Jul 17, 2002 at 04:03:02PM +0200, Michal Albrecht wrote:
 Andrey Hristov wrote:

 $your_string = preg_replace('/[\d\w]+([\w\d]{3,}\.)+([\w]{2,4})/','',
 
 Thank you very much for your time, but this strips the e-mail address 
 and lives the domain. Could you give me some hints on how to make it 
 working the opposite way?

Let alone, it assumes TLD's are 2-4 characters long, when in reality, 
they're presently up to 6 characters long.

preg_replace('/^([a-z0-9_.=+-])+([a-z0-9-]+\.)+([a-z]{2,6})$/',
  '\\1', $your_string);

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re[3]: [PHP] timer on sessions?

2002-07-17 Thread Asmodean

J I am not able to test from this machine so please tell me if I am right or
J wrong on this:
J $tmp = time();
J $tme = time() - 5*60;
J session_register('tmp');
if ($tmp = $tme) {
J echo 'Time has not reached 5 minutes, session still valid';
J } else {
J echo 'Timer has reached 5 minutes, you will need to log back in to
J continue.'; }

J Asmodean [EMAIL PROTECTED] wrote in message
J [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 J Not sure how to go about setting up a function to parse the date, hour,
 J minutes, seconds, take the seconds and register them in a session var,
J then
 J do a check on the session var (seconds) vs. the seconds var + 5*60 (or
J 5
 J minutes) to time out the session and force the user to log back in.  My
 J problem is finding the correct way to check the seconds in php.  Any
J help or
 J pointers is appreciated.
 J Jas

 time() will give you a UNIX timestamp. Use it to do the math.

 --
 Best regards,
  Asmodeanmailto:[EMAIL PROTECTED]


A Let's assume you've set your session timestamp (assume it's called
A $session_time) to time() at the time of login. Now, in the script...

if ((time() + 300)  $session_time) {

A }

A This would be a check to see if the session is still valid. Timewise.

A -- 
A Best regards,
A  Asmodeanmailto:[EMAIL PROTECTED]


Wrong. My fault. ;)

It's...

if (time()  $session_time + 300) {

}

Sorry.


-- 
Best regards,
 Asmodeanmailto:[EMAIL PROTECTED]


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




Re: Re[2]: [PHP] timer on sessions?

2002-07-17 Thread Jas

So under the time() call, comparing it to a simple numerical value such as
300 it knows that you are talking about 300 seconds?  Is that because it
is a unix timestamp?  I previously tried using date(s) to give me the
seconds from today's date then tried the compare, so using time() will work
better.  Thanks a ton.
Jas
Asmodean [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 J I am not able to test from this machine so please tell me if I am right
or
 J wrong on this:
 J $tmp = time();
 J $tme = time() - 5*60;
 J session_register('tmp');
 if ($tmp = $tme) {
 J echo 'Time has not reached 5 minutes, session still valid';
 J } else {
 J echo 'Timer has reached 5 minutes, you will need to log back in to
 J continue.'; }

 J Asmodean [EMAIL PROTECTED] wrote in message
 J [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  J Not sure how to go about setting up a function to parse the date,
hour,
  J minutes, seconds, take the seconds and register them in a session
var,
 J then
  J do a check on the session var (seconds) vs. the seconds var + 5*60
(or
 J 5
  J minutes) to time out the session and force the user to log back in.
My
  J problem is finding the correct way to check the seconds in php.  Any
 J help or
  J pointers is appreciated.
  J Jas
 
  time() will give you a UNIX timestamp. Use it to do the math.
 
  --
  Best regards,
   Asmodeanmailto:[EMAIL PROTECTED]
 

 Let's assume you've set your session timestamp (assume it's called
 $session_time) to time() at the time of login. Now, in the script...

 if ((time() + 300)  $session_time) {

 }

 This would be a check to see if the session is still valid. Timewise.

 --
 Best regards,
  Asmodeanmailto:[EMAIL PROTECTED]




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




[PHP] New York PHP Presents: Implementing an Object-based Web Framework in PHP

2002-07-17 Thread Daniel Kushner

Posted by Daniel Kushner (on behalf of Hans Zaunere)

New York PHP Presents:

Implementing an Object-based Web Framework in PHP

NYPHP's monthly meeting is a week away (7/24), and after an informal
networking event last month, we're excited to offer what certainly
will
be a highly valuable presentation to many.

Web frameworks and object-orientated programming are forging the way
for increasingly functional Internet applications, and PHP is
continuing to be an integral part of the progress.  Two top
developers
from Tanjero (http://tanjero.com) will be showing us how they've
leveraged the AMP Technology suite to quickly provide powerful, yet
reusable and cost-effective web applications for their clients.

NYPHP meetings are the 4th Wednesday of every month at 6:30pm, with
this meeting slated for 7/24.  Please visit http://nyphp.org for
location details, a map, and further information.

Thank you,

Hans Zaunere
New York PHP
http://nyphp.org


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




Re[4]: [PHP] timer on sessions?

2002-07-17 Thread Asmodean

J So under the time() call, comparing it to a simple numerical value such as
J 300 it knows that you are talking about 300 seconds?  Is that because it
J is a unix timestamp?  I previously tried using date(s) to give me the
J seconds from today's date then tried the compare, so using time() will work
J better.  Thanks a ton.
J Jas

Yes. time() returns a UNIX timestamp (currently a 10-digit number)
representing the number of seconds since a certain date (sometime in
1972).

-- 
Best regards,
 Asmodeanmailto:[EMAIL PROTECTED]


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




[PHP] Tips for better PHP, wish I read yesterday

2002-07-17 Thread Peter J. Schoenster

Hi,

Awhile back I was asking for just what I'm reading here:

http://www.php9.com/index.php/section/articles/name/PHP%20Guidelines

Some snippets to give you an idea what you will find on that page:

 Another mistake I see around a lot is people writing scripts that will
 not work if register_globals is off. In the next release of PHP
 register_globals will be off by default, so you need to start writing
 your scripts with this in mind.


 ?php
 $name = 'Bill';
 echo table align=\center\trtdMy name is
 $name/td/tr/table; ?
 
 No, don't do that.


 ?=$name?
 
 This is a short-hand in PHP for:
 
 ?php echo $name; ?


I have come across some of this in the documentation but not in your face like it is 
here (and 
should be).

Does anyone have any more links to articles like that?

Thanks,
Peter

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




[PHP] regex in_array or array_search

2002-07-17 Thread Dave [Hawk-Systems]

other than each'ing an array and performing a regex match, is there an easier
way to parse through the values in an array for a value matching
*something*somethingelse*

thanks

Dave


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




Re: [PHP] regex in_array or array_search

2002-07-17 Thread Chris Boget

 other than each'ing an array and performing a regex match, is there an easier
 way to parse through the values in an array for a value matching
 *something*somethingelse*

No, I don't believe so.  But I'm sure you can set up something to use with
array_walk().

Chris



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




[PHP] Confused about the list() function

2002-07-17 Thread DonPro

Hi,

I have the following situation.  I have an array of colors that I would like to print 
out.  My first course of action would be to convert the array to a string so that I 
can parse it.  My command would be:

$color_list = explode(,, $color);

Now that I have a string of colors delimited by commas, I would like to parse the 
string and print out all my colors.  I have read the documentation on using the list() 
function but I find it confusing.  Can someone clear the fog from my mind please?

Thanks,
Don




Re: [PHP] Classes Constructor syntax

2002-07-17 Thread Analysis Solutions

On Wed, Jul 17, 2002 at 03:26:15PM +0200, David Russell wrote:
 
 class issue {
   function issue() { //default constructor
   }
   function issue($number) { //1 variable constructor
   }
 }
 
 My question is: will this work? does PHP OOP support more than one 
 constructor?

No.  But, here's a workaround:

class issue {

  function issue($number=NULL) {
 if ( is_null($number) ) {
echo 'doing the first function';
 } else {
$this-issue1($number);
 }
  }

  function issue1($number) {
 echo 'in the second function';
  }

}

# To call first function only...
$Obj = new issue();

echo 'hr /';

# To call second function...
$Obj = new issue('blue');


Enjoy,

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] Confused about the list() function

2002-07-17 Thread 1LT John W. Holmes

How do you want to parse the string? why not just echo $color_list?

---John Holmes...

- Original Message -
From: DonPro [EMAIL PROTECTED]
To: php list [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 12:26 PM
Subject: [PHP] Confused about the list() function


Hi,

I have the following situation.  I have an array of colors that I would like
to print out.  My first course of action would be to convert the array to a
string so that I can parse it.  My command would be:

$color_list = explode(,, $color);

Now that I have a string of colors delimited by commas, I would like to
parse the string and print out all my colors.  I have read the documentation
on using the list() function but I find it confusing.  Can someone clear the
fog from my mind please?

Thanks,
Don




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




RE: [PHP] Tips for better PHP, wish I read yesterday

2002-07-17 Thread Jay Blanchard

[snip]
Awhile back I was asking for just what I'm reading here:

http://www.php9.com/index.php/section/articles/name/PHP%20Guidelines

I have come across some of this in the documentation but not in your face
like it is here (and
should be).

Does anyone have any more links to articles like that?
[/snip]

http://www.zend.com/zend/columns.php
http://www.zend.com/zend/art/mistake.php
http://www.zend.com/zend/art/



Jay

Nobody in football should be called a genius. A genius is a guy like Norman
Einstein. -Joe Theismann

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*



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




[PHP] remove header tags - include file

2002-07-17 Thread Juan Pablo Aqueveque

Hi guys, me again.
(thanks kevin, but i'm afraid you didn't understand me).

After looking for untiringly in the archives I have I decide to ask again.

This is my problem:
I want include the file html.html inside of my file index.php, but before 
include it I want to remove html../head tags from my html.html file.
My pseudo code would be look like this:

  index.php

?php

include_once(common.php);

header(Welcome to my page);
 include_html_file(html.html);
footer()
?


  common.php
function include_html_file($f)
  {
 (your kind contribution:-) )
  }

thanks!!

--jp



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




Re: [PHP] imap connection problem

2002-07-17 Thread Korbinian Schmid

the important part (without this line the script works):

$mbox = imap_open ({localhost/imap}INBOX,, );

it`s the same without INBOX
i also tried different downloaded mailbox scripts so i think it's a
php-system problem.

Latex Master [EMAIL PROTECTED] schrieb in im Newsbeitrag:
[EMAIL PROTECTED]
 Hello Korbinian,
   Can you provide the script code?
 Let's see how we can help

 Wednesday, July 17, 2002, 4:50:44 PM, you wrote:

 KS when i try to connect to my local imap server by php i get the message
 KS (standard ie message) that the page can't be shown. with another
server
 KS (imap.web.de) everything works fine. with outlook i can access my
server
 KS without any problems and also mtest seems to work without any errors.
what's
 KS wrong. would be nice if anybody could help me.

 KS CU Korbi






 --
 Best regards,
  Latexmailto:[EMAIL PROTECTED]




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




[PHP] Someone Help please

2002-07-17 Thread Chris Crane

I am getting data froma website for stock information. If I type in the
brower the URL I get a text file display list this;

Date,Open,High,Low,Close,Volume
16-Jul-02,7.92,8.10,7.68,7.82,605500
15-Jul-02,7.98,8.02,7.59,8.02,577200
12-Jul-02,7.80,8.00,7.57,7.95,411100
11-Jul-02,7.82,7.94,7.34,7.80,802400

Now I want to break each line and then seperate each line by the commas. The
amount of linesin the file is never known so I assume I have to use
something like a foreach or while statement,but I am not sure the best way
to do it. This is what I have so far.

 $Symbol = IKN; $LookupUrl =
http://demos.inxdesign.com/download?sym=$Symbolformat=.txt;; $Results =
implode('', file($LookupUrl));
 $Data = array(); split(\n, $Results) = array_push($Data, $line)

The end result I am trying to get is each line to be an element in an array.
Later I will go back and stepthrough each element of the array and then
split that by the commas and have it output into an HTML table.At least this
is the best way I can think to deal with it. I suppose a better way to do
this would be to make this an associative array and have the data of each
line be associated with the date then I could producea variable something
like $StockData[16-Jul-02][value], but I don't know how to do any of that.










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




Fw: [PHP] Someone Help please

2002-07-17 Thread Kevin Stone

Parse all lines of a txt file into an array..
$ary = explode(\n, $results);
-Kevin

- Original Message -
From: Chris Crane [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 11:16 AM
Subject: [PHP] Someone Help please


 I am getting data froma website for stock information. If I type in the
 brower the URL I get a text file display list this;

 Date,Open,High,Low,Close,Volume
 16-Jul-02,7.92,8.10,7.68,7.82,605500
 15-Jul-02,7.98,8.02,7.59,8.02,577200
 12-Jul-02,7.80,8.00,7.57,7.95,411100
 11-Jul-02,7.82,7.94,7.34,7.80,802400

 Now I want to break each line and then seperate each line by the commas.
The
 amount of linesin the file is never known so I assume I have to use
 something like a foreach or while statement,but I am not sure the best way
 to do it. This is what I have so far.

  $Symbol = IKN; $LookupUrl =
 http://demos.inxdesign.com/download?sym=$Symbolformat=.txt;; $Results =
 implode('', file($LookupUrl));
  $Data = array(); split(\n, $Results) = array_push($Data, $line)

 The end result I am trying to get is each line to be an element in an
array.
 Later I will go back and stepthrough each element of the array and then
 split that by the commas and have it output into an HTML table.At least
this
 is the best way I can think to deal with it. I suppose a better way to do
 this would be to make this an associative array and have the data of each
 line be associated with the date then I could producea variable something
 like $StockData[16-Jul-02][value], but I don't know how to do any of that.










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



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




Re[2]: [PHP] remove header tags - include file

2002-07-17 Thread Asmodean

JPA  Do you mean you want to include the file
JPA html.html but not the html.../head part?
JPA Yes!!. In other words I just want show the part inside of body tag of the 
JPA html.html

JPA I know the answer is in a Regulars expression.. but.. i don't know much 
JPA about it.


JPA At 19:08 17-07-2002, you wrote:
JPA Hi guys, me again.
JPA (thanks kevin, but i'm afraid you didn't understand me).

JPA After looking for untiringly in the archives I have I decide to ask 
again.

JPA This is my problem:
JPA I want include the file html.html inside of my file index.php, but 
before
JPA include it I want to remove html../head tags from my html.html file.
JPA My pseudo code would be look like this:

JPA   index.php

JPA ?php

JPA include_once(common.php);

JPA header(Welcome to my page);
JPA  include_html_file(html.html);
JPA footer()
?


JPA   common.php
JPA function include_html_file($f)
JPA   {
JPA  (your kind contribution:-) )
JPA   }

JPA thanks!!

JPA --jp

How do you mean remove? Do you mean you want to include the file
html.html but not the html.../head part? And why?

--
Best regards,
  Asmodeanmailto:[EMAIL PROTECTED]


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

JPA 
JPA Juan Pablo Aqueveque [EMAIL PROTECTED]
JPA Ingeniero de Sistemas
JPA Departamento de Redes y Comunicaciones http://www.drc.uct.cl
JPA Universidad Católica de Temuco.
JPA Tel:(5645) 205 630 Fax:(5645) 205 628

Seems like a... strange thing to do. Anyway. Since I do not know of
any other way (if there is, anyone, tell), this is what you will have
to do.

1. Open the file with fopen()
2. Perform a regular expression on the content
3. Print the parsed cntents

For example:

$fp = fopen('html.html', 'r');
$content = fread($fp, filesize(html.html));

preg_match(/body(.*?)\/body/s, $content, $matches);

The parsed contents are now in $matches[1].

I still don't understand why you want to do this, though. Seems like
there must be a better way.

-- 
Best regards,
 Asmodeanmailto:[EMAIL PROTECTED]


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




[PHP] ErrorDocument 404 Form

2002-07-17 Thread Fabien Penso

Hi.

I got a trouble I don't know if Apache or PHP is in fault. Let's say I
got something like :

ErrorDocument 404 /engine.php

If I make a form which use POST and redirect to something which doesn't
exist, then a phpinfo() in engine.php won't show the variables. Am I
wrong thinking it should ? Is there a way to make this work ?

Thanks.

-- 
Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/

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




Re: [PHP] Of Jobs and Certs

2002-07-17 Thread Danny Shepherd

I agree - nothing beats a good portfolio.

Danny.

- Original Message -
From: Miguel Cruz [EMAIL PROTECTED]
To: Martin Clifford [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 6:55 PM
Subject: Re: [PHP] Of Jobs and Certs


 On Wed, 17 Jul 2002, Martin Clifford wrote:
  I'd like to get everyone's input on Jobs and Certs.  I know there are a
  couple Certifications for web developers out there, such as the CIW and
  CWP certifications.

 I don't know if this is what you want to hear, but I can tell you that as
 a rule, I don't hire people who advertise certifications on their resume.

 I've found that they correlate pretty strongly with incompetence, to the
 point where nothing saves me more time when filtering through resumes than
 first throwing away the ones covered with acroyms starting with C or MC.

 People who have the skills, demonstrate it through their work experience,
 walking through their sample code with me, and their ability to explain
 how they would perform a task. People who trumpet certifications
 overwhelmingly seem to be people who were unable to advance their careers
 based on the strength of their skills, and so chose to resort to a paper
 method instead. I'm not saying anything about you here, just suggesting
 that you consider alternate means of impressing employers.



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




Re: [PHP] Opening and Editing Quark Binaries

2002-07-17 Thread Miguel Cruz

On Wed, 17 Jul 2002, Justin French wrote:
 I've attached a file I received with Quark 3.32, which has sample text
 complete with Quark Xpress tags.

XPress Tags is a great format, and easy to work with for auto-generated 
content.

However, all you can do with it is prepare text for a single running 
block - not lay out an entire document (unless you're extremely creative 
with rules and positioning, I guess).

 Just to throw a complete spanner in the works, Adobe InDesign2.0 has a lot
 of XML capabilities, and much more integrated PDF capabilities than Quark...
 perhaps either an XML based solution, or a PDFLib based solution can be
 achieved?
 
 Considering InDesign is about 1/3rd the price of Quark, *maybe* you might
 want to consider other options aside from Quark.

Good luck convincing seasoned Quark operators to change, though!

miguel


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




[PHP] how many requests can php serve?

2002-07-17 Thread Andy

Hi there,

I am wondering how many requests at one time php can serve before the site
brakes down. Someone told me that my site has been down yesterday for a
while after I did anounce it through a university email list going to 2500
users.

Maybe there is a smart artikle on that.

Thanx for any help,

Andy-






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




Re: [PHP] File reading help with Syntax

2002-07-17 Thread Analysis Solutions

On Wed, Jul 17, 2002 at 10:00:29AM -0400, Chris Crane wrote:
 I am getting data froma website for stock information. If I type in the
 brower the URL I get a text file display list this;
 
 Date,Open,High,Low,Close,Volume
 16-Jul-02,7.92,8.10,7.68,7.82,605500
 15-Jul-02,7.98,8.02,7.59,8.02,577200
 12-Jul-02,7.80,8.00,7.57,7.95,411100
 11-Jul-02,7.82,7.94,7.34,7.80,802400

So, now you're working an another approach to the stock quote question, 
eh?

Use these functions:
   fopen()
   fgetcsv()

Look at the manual on how to use them.  If, for some reason, that's not 
clear, check out the archives for this list on http://groups.google.com/.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] how many requests can php serve?

2002-07-17 Thread Miguel Cruz

On Wed, 17 Jul 2002, Andy wrote:
 I am wondering how many requests at one time php can serve before the site
 brakes down. Someone told me that my site has been down yesterday for a
 while after I did anounce it through a university email list going to 2500
 users.

It depends on:

- Your network connection

- Your hard drive

- Your RAM

- Your CPU

- Your database

- The design of your site

- What the users are doing

- Your caching strategy

miguel


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




RE: [PHP] Of Jobs and Certs [long]

2002-07-17 Thread Jay Blanchard

[snip]
I don't know if this is what you want to hear, but I can tell you that as
a rule, I don't hire people who advertise certifications on their resume.

I've found that they correlate pretty strongly with incompetence, to the
point where nothing saves me more time when filtering through resumes than
first throwing away the ones covered with acroyms starting with C or MC.

People who have the skills, demonstrate it through their work experience,
walking through their sample code with me, and their ability to explain
how they would perform a task. People who trumpet certifications
overwhelmingly seem to be people who were unable to advance their careers
based on the strength of their skills, and so chose to resort to a paper
method instead. I'm not saying anything about you here, just suggesting
that you consider alternate means of impressing employers.
[/snip]

+1 Miguel

I recently had the opportunity to hire someone for a basic web developer
position, so I decided to approach the process differently. I decided that
in all fairness I would give each candidate who applied the chance to prove
themselves. I started with a written test with 20 questions, basic web
development, mostly multiple choice. The highest score was a 68, (out of a
possible 100) posted by a recent (less than 6 months earlier) college
graduate with a degree in Computer Science. Needless to say I was shocked! I
saw all sorts of certs attached to this group.

I brought in the top 5 scorers (they took the original test during the
application process, or were sent the test if they e-mailed their apps with
a requirement to complete and return the test is 24 hours ... and these
e-mail resume senders didn't bother to use the 24 given them TO LOOK UP THE
ANSWERS...DUH!) who actually sent URL's for me to look at (I looked at the
source to see if FrontPage or anything such as that had been used - if so
they were eliminated) for 2 additional tests.

I gave each a 5 question verbal exam which included questions about
standards, documentation, identification of code, basic database knowledge,
etc. Each question was worth 20 points. Hell, I even gave a person 5 points
for honestly answering I don't know.. High score: 65 points.

The final test. I gave each a basic visual site layout on paper which
included a small table, unordered list, basic headers, basic paragraph,
etc.. (No dynamic elemnets or db connections)  They were seated at a Windows
computer with a copy of notepad and IE. They were given the address of the
graphic to include. All they had to do was type, save, change to browser,
reload, check their progress and move on. Each correct element (tag) was
awarded 5 points for a total of 100 (20 correct elements). I had another 25
bonus points I would give if any used basic CSS. They had 1 hour to hand
code as close as they could get to what had been laid out on paper.

High Score: 60, none used CSS, but I did see lots of font tags!
Total High Score: 178 (The Guy with the BS in CS above) out of a possible
300 ... 59.3 % (Johnny can't read or write code either :^] )

I didn't hire him...I went to have a beer. Myself and a couple of other app
devs were sitting ROFLOAO about the whole thing. I guess the beer increased
our volume level, because a guy came up and said he heard what we were
saying and that he was a web guy looking for a steady gig. I started
interviewing him right there. No certs, no degree. Went to the office,
looked at sites he had a hand in. He described not only basic HTML stuff,
but CSS, ASP, JavaScript, PHP, a smattering of SQL (in which he clames to be
weak), and a couple of other things. He took the 20 question multiple
(remember, we had had a few ;^] ) and he got a 95. Missed the question about
which tag is absolutely required in an HTML page. He hand coded the example
while drinking a Bud Lite, completed it in 15 minutes, missed a couple of
completion tags (like /li) and used CSS.

Hired him. Took him back to the bar. Happy ever since.

Moral of story? Learn to write code and listen to loud guys in bars. It may
pay someday.

Jay

Football incorporates the two worst elements of American society: violence
punctuated by committee meetings. -George Will

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*



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




Re: [PHP] how many requests can php serve?

2002-07-17 Thread Andy

ok .. you are right. But how about an average.. between 20 users per minute
or similar is this a common rate on this data? :

 - Your network connection
  100 MBit
 - Your hard drive
 pretty fast
 - Your RAM
 256MB
 - Your CPU
 Celleron 900
 - Your database
 mysql
 - The design of your site
 as good as it gets:-)
 - What the users are doing
 mainly displaying images 4 - 40 kb
 - Your caching strategy
? No cashing server site.

Is there something like a benchmark available on such thing?

Andy



Miguel Cruz [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Wed, 17 Jul 2002, Andy wrote:
  I am wondering how many requests at one time php can serve before the
site
  brakes down. Someone told me that my site has been down yesterday for a
  while after I did anounce it through a university email list going to
2500
  users.

 It depends on:

 - Your network connection

 - Your hard drive

 - Your RAM

 - Your CPU

 - Your database

 - The design of your site

 - What the users are doing

 - Your caching strategy

 miguel




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




[PHP] imap_mail_move and imap_mail_copy

2002-07-17 Thread Jeff Schwartz

Has anyone had experience with imap_mail_move or imap_mail_copy? 

Can they copy or move a message from one mail server to another or only
into a subfolder on the same server? 

Jeff

__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

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




Re: [PHP] how many requests can php serve?

2002-07-17 Thread Blair Colbey


Ever tried the basic ab (apache benchmark)??  It comes with the unix
distro of it.. not sure about windows..YOu can test say 1000 requests
with as many as you want at the same time..

Works good for load testing a group of servers behind a load balancer..



On Wed, 17 Jul 2002, Andy wrote:

 ok .. you are right. But how about an average.. between 20 users per minute
 or similar is this a common rate on this data? :
 
  - Your network connection
   100 MBit
  - Your hard drive
  pretty fast
  - Your RAM
  256MB
  - Your CPU
  Celleron 900
  - Your database
  mysql
  - The design of your site
  as good as it gets:-)
  - What the users are doing
  mainly displaying images 4 - 40 kb
  - Your caching strategy
 ? No cashing server site.
 
 Is there something like a benchmark available on such thing?
 
 Andy
 
 
 
 Miguel Cruz [EMAIL PROTECTED] schrieb im Newsbeitrag
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  On Wed, 17 Jul 2002, Andy wrote:
   I am wondering how many requests at one time php can serve before the
 site
   brakes down. Someone told me that my site has been down yesterday for a
   while after I did anounce it through a university email list going to
 2500
   users.
 
  It depends on:
 
  - Your network connection
 
  - Your hard drive
 
  - Your RAM
 
  - Your CPU
 
  - Your database
 
  - The design of your site
 
  - What the users are doing
 
  - Your caching strategy
 
  miguel
 
 
 
 
 -- 
 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




  1   2   >