php-general Digest 3 May 2001 17:25:01 -0000 Issue 664

Topics (messages 51215 through 51301):

Re: REG_BADPAT ERROR!
        51215 by: Jason Murray
        51255 by: Gyozo Papp

Re: session_register()
        51216 by: Jennifer
        51220 by: Warren Vail
        51222 by: Jennifer
        51284 by: Johnson, Kirk

Proxy
        51217 by: Selvin Sakal

Re: substitute for assigning with array()?
        51218 by: mailing_list.gmx.at

Re: Website production tool in PHP
        51219 by: Albrecht Guenther

Re: HI
        51221 by: Geir Eivind Mork

Working with numbers
        51223 by: Jennifer
        51251 by: Christian Reiniger
        51257 by: Gyozo Papp

how?
        51224 by: elias
        51260 by: Jason Stechschulte
        51261 by: elias
        51285 by: Jason Stechschulte

Re: Decimal to Ascii
        51225 by: Rudolf Visagie

Reading mime attachments into a rdbms
        51226 by: Mattias Segerdahl
        51268 by: Larry Hotchkiss

is this the correct way to use round function?
        51227 by: Jacky
        51296 by: Henrik Hansen

Re: How to catch the output of http:// -> text file?
        51228 by: Kraa de Simon
        51229 by: Kraa de Simon
        51231 by: Kraa de Simon
        51287 by: Wieger Uffink

Problem with Mcrypt + PHP 4.0.5
        51230 by: Stefan Scherf

Goodbye!
        51232 by: Soeren Staun-Pedersen

Help plz!
        51233 by: elias
        51234 by: Mattias Segerdahl
        51236 by: elias
        51237 by: Tristan.Pretty.risk.sungard.com
        51276 by: Tristan.Pretty.risk.sungard.com

Re: Sending information between pages???
        51235 by: Tim Ward

is there free php+mySql hosting?
        51238 by: Peter Stevens
        51240 by: elias
        51282 by: Rene Maldonado
        51283 by: Greg Schnippel
        51293 by: Philip Olson

Re: open foxpro database
        51239 by: Dezider Góra

PHP 4.0.5 and PDFLib
        51241 by: Jochen Kaechelin

Searching for facts on big PHP websites
        51242 by: Björn Schotte

Maximum execution time of 30 seconds exceeded...
        51243 by: Kraa de Simon
        51244 by: Jon Haworth
        51245 by: elias
        51265 by: Michael Geier
        51271 by: heinisch.creaction.de

textarea -- what happens to my new lines
        51246 by: Stampe, Lars
        51249 by: heinisch.creaction.de
        51258 by: Stampe, Lars
        51262 by: elias
        51263 by: Jon Haworth
        51269 by: heinisch.creaction.de

Check if a variable has been posted-- HOW?
        51247 by: Martin Cabrera Diaubalick
        51248 by: Nicolas Guilhot

"maximum execution time exceeded" but !connection_timeout() ???
        51250 by: John Clements
        51252 by: John Clements

odbc
        51253 by: claudia

Include and require
        51254 by: Ronald

Re: Template programming
        51256 by: Gyozo Papp

log analysis scripts
        51259 by: Paul Newby

Returning Lowest Number Not In Array
        51264 by: Mike Potter
        51266 by: Matthew Luchak

Re: mailing list
        51267 by: Nikhil Goyal

sessions and reg_globals=off
        51270 by: ahmad varoqua
        51274 by: Nicolas Guilhot

Problems with ifx
        51272 by: Oleg Stukalov

Homesite - Windows and CVS
        51273 by: Michael Stearne
        51277 by: Altunergil, Oktay

php/mySql SELECT where clause using dates.
        51275 by: Dan Eskildsen
        51278 by: Jon Rosenberg
        51281 by: Pierre-Yves Lemaire

feof with fsockopen don't work
        51279 by: Thomas Häger

Re: php/mySql SELECT where clause using dates. ooops
        51280 by: Jon Rosenberg

Re: Hosts.
        51286 by: Subodh Gupta

Make text a submit button?
        51288 by: Brandon Orther
        51290 by: Sander Pilon

need CORBA/satellite examples
        51289 by: Peter Dudley

very basic question, needs direction!
        51291 by: Web master
        51294 by: Johannes Janson
        51297 by: Henrik Hansen

Re: Strange behaviour of mktime() in objects
        51292 by: Gyozo Papp

Re: apache toolbox
        51295 by: Jerry Lake

OT-Please bare with me :)
        51298 by: Brandon Orther
        51299 by: KPortsmout.aol.com

Error logging in PHP-4pl1 and Apache 1.3.19 w/ output buffering
        51300 by: Simon Stewart

help variables ..
        51301 by: exodus

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


> and the line 236 is:  $url=ereg_replace("&","&",$url);

BADPAT probably means "Bad Pattern".

Try:                    $url=ereg_replace("\&amp\;","&",$url);

Jason





what version of PHP are you running?
It works for me on PHP 4.0.4pl1. (CGI)

but, you may try:

$pattern = quotemeta("&"); // see quotemeta in the manual !
ereg_replace($pattern, "&", $url);

----- Original Message ----- 
From: "Jason Murray" <[EMAIL PROTECTED]>
To: "'Martin Bittner-Lamy'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: 2001. május 3. 07:18
Subject: RE: [PHP] REG_BADPAT ERROR!


> > and the line 236 is:  $url=ereg_replace("&amp;","&",$url);
> 
> BADPAT probably means "Bad Pattern".
> 
> Try:                    $url=ereg_replace("\&amp\;","&",$url);
> 
> Jason
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





"Johnson, Kirk" wrote:
> 
> > -----Original Message-----
> > From: Jennifer [mailto:[EMAIL PROTECTED]]
> > Do you need to register a variable with the session before you
> > assign it a value?
> 
> Not in my experience.
> 
> > session_register should return true if the variable was
> > successfully registered?
> 
> It returns "1".
> 
> > The variable name and it's value should be written to the file
> > with the same name as session_id()?
> 
> Yes, here's a sample from a session file: superUser|s:3:"Yes";
> Here's a sample session filename: sess_01bc2e24aa5291300887948f0af74899


This is all what I thought, but I am still having problems and I
don't have a clue what I am missing. Here's an example that I
have been paying with for testing.

page1.php contains
<?php
session_start();
echo "session id is ".session_id()."<br>\n";
if (session_register("testing")) {
    echo "session_register worked.<br>\n";
}
else {
    echo "session_register did not work<br>\n";
}
if (session_is_registered("testing")) {
    echo "testing is a registered variable<br>\n";
}
else {
    echo "testing is not a registered variable<br>\n";
}
$testing = "Let's see if this works.";
?>
<a href="page2.php?<?=SID?>">Go to next page.</a>


The output of the above page, gives me
session id is e35c2893382e28a14fa0455302edb06e
session_register did not work
testing is a registered variable
Go to next page. 


and page2.php contains
<?php
session_start();
echo "session id is ".session_id()."<br>\n";
echo "Testing: $testing<br>\n";
?>


The output of page2 gives me
session id is e35c2893382e28a14fa0455302edb06e
Testing:

I am totally confused.  First off, why isn't it registering the
variable? There is a file named e35c2893382e28a14fa0455302edb06e
in my /tmp directory, but it is empty.

Second, if it isn't registering the variable then why is
session_is_registered("testing") returning true?

Jennifer




Jennifer,

I could be wrong but this is what I think you have;

When the session_register is executed the session contents are partially
updated.
Your first test actually executed the session_register that posted the
variable with 0 string length, because the variable had not yet been
initialized (the bad return is the only indication of this).
Your test that the variable is registered would seem to suggest this.
You then changed the variable value and failed to register this new value.

The second page found the only value you registered (the uninitialized
variable with zero length) and displayed that.

You can identify what actually happened by viewing the session file contents
after your two pages are displayed.

hope this helps,

Warren Vail

-----Original Message-----
From: Jennifer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 10:55 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session_register()


"Johnson, Kirk" wrote:
>
> > -----Original Message-----
> > From: Jennifer [mailto:[EMAIL PROTECTED]]
> > Do you need to register a variable with the session before you
> > assign it a value?
>
> Not in my experience.
>
> > session_register should return true if the variable was
> > successfully registered?
>
> It returns "1".
>
> > The variable name and it's value should be written to the file
> > with the same name as session_id()?
>
> Yes, here's a sample from a session file: superUser|s:3:"Yes";
> Here's a sample session filename: sess_01bc2e24aa5291300887948f0af74899


This is all what I thought, but I am still having problems and I
don't have a clue what I am missing. Here's an example that I
have been paying with for testing.

page1.php contains
<?php
session_start();
echo "session id is ".session_id()."<br>\n";
if (session_register("testing")) {
    echo "session_register worked.<br>\n";
}
else {
    echo "session_register did not work<br>\n";
}
if (session_is_registered("testing")) {
    echo "testing is a registered variable<br>\n";
}
else {
    echo "testing is not a registered variable<br>\n";
}
$testing = "Let's see if this works.";
?>
<a href="page2.php?<?=SID?>">Go to next page.</a>


The output of the above page, gives me
session id is e35c2893382e28a14fa0455302edb06e
session_register did not work
testing is a registered variable
Go to next page.


and page2.php contains
<?php
session_start();
echo "session id is ".session_id()."<br>\n";
echo "Testing: $testing<br>\n";
?>


The output of page2 gives me
session id is e35c2893382e28a14fa0455302edb06e
Testing:

I am totally confused.  First off, why isn't it registering the
variable? There is a file named e35c2893382e28a14fa0455302edb06e
in my /tmp directory, but it is empty.

Second, if it isn't registering the variable then why is
session_is_registered("testing") returning true?

Jennifer

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








Warren Vail wrote:
> 
> When the session_register is executed the session contents are partially
> updated.
> Your first test actually executed the session_register that posted the
> variable with 0 string length, because the variable had not yet been
> initialized (the bad return is the only indication of this).

Ok.  I changed the script below to set the variable before
registering it and it makes no difference to the output.

 
> You can identify what actually happened by viewing the session file contents
> after your two pages are displayed.

I mentioned that already.  The file is empty.


Jennifer


> "Johnson, Kirk" wrote:
> >
> > > -----Original Message-----
> > > From: Jennifer [mailto:[EMAIL PROTECTED]]
> > > Do you need to register a variable with the session before you
> > > assign it a value?
> >
> > Not in my experience.
> >
> > > session_register should return true if the variable was
> > > successfully registered?
> >
> > It returns "1".
> >
> > > The variable name and it's value should be written to the file
> > > with the same name as session_id()?
> >
> > Yes, here's a sample from a session file: superUser|s:3:"Yes";
> > Here's a sample session filename: sess_01bc2e24aa5291300887948f0af74899
> 
> This is all what I thought, but I am still having problems and I
> don't have a clue what I am missing. Here's an example that I
> have been paying with for testing.
> 
> page1.php contains
> <?php
> session_start();
> echo "session id is ".session_id()."<br>\n";
> if (session_register("testing")) {
>     echo "session_register worked.<br>\n";
> }
> else {
>     echo "session_register did not work<br>\n";
> }
> if (session_is_registered("testing")) {
>     echo "testing is a registered variable<br>\n";
> }
> else {
>     echo "testing is not a registered variable<br>\n";
> }
> $testing = "Let's see if this works.";
> ?>
> <a href="page2.php?<?=SID?>">Go to next page.</a>
> 
> The output of the above page, gives me
> session id is e35c2893382e28a14fa0455302edb06e
> session_register did not work
> testing is a registered variable
> Go to next page.
> 
> and page2.php contains
> <?php
> session_start();
> echo "session id is ".session_id()."<br>\n";
> echo "Testing: $testing<br>\n";
> ?>
> 
> The output of page2 gives me
> session id is e35c2893382e28a14fa0455302edb06e
> Testing:
> 
> I am totally confused.  First off, why isn't it registering the
> variable? There is a file named e35c2893382e28a14fa0455302edb06e
> in my /tmp directory, but it is empty.
> 
> Second, if it isn't registering the variable then why is
> session_is_registered("testing") returning true?
> 
> Jennifer




Jennifer, there are at least two of us totally confused. I did a copy and
paste of your code and got the expected results:

session id is afb1f9e27afc752f7d9e96e096ca2209
session_register worked.
testing is a registered variable

with the contents of /tmp/sess_afb1f9e27afc752f7d9e96e096ca2209 being:

testing|s:24:"Let's see if this works.";

I then tried your code with register_globals = off. Interestingly, I got
"session_register worked" even though $testing was not registered (it can't
be registered with register_globals off).

I see nothing wrong with your code, so... some thoughts:

1. What browser are you using? I, and others, have seen erratic results with
sessions using Netscape 4.x. If this is your browser, try your code with
another browser, if possible.

2. This is a longshot, but who is PHP running as? By default, it is nobody.
In any case, check that whomever PHP is running as has write permission to
/tmp.

3. I cannot think of any other configuration settings in php.ini that might
be the trouble, since turning register_globals off does not reproduce your
results.

I am stumped.

Kirk

> -----Original Message-----
> From: Jennifer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 11:55 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] session_register()
> 
> 
> "Johnson, Kirk" wrote:
> > 
> > > -----Original Message-----
> > > From: Jennifer [mailto:[EMAIL PROTECTED]]
> > > Do you need to register a variable with the session before you
> > > assign it a value?
> > 
> > Not in my experience.
> > 
> > > session_register should return true if the variable was
> > > successfully registered?
> > 
> > It returns "1".
> > 
> > > The variable name and it's value should be written to the file
> > > with the same name as session_id()?
> > 
> > Yes, here's a sample from a session file: superUser|s:3:"Yes";
> > Here's a sample session filename: 
> sess_01bc2e24aa5291300887948f0af74899
> 
> 
> This is all what I thought, but I am still having problems and I
> don't have a clue what I am missing. Here's an example that I
> have been paying with for testing.
> 
> page1.php contains
> <?php
> session_start();
> echo "session id is ".session_id()."<br>\n";
> if (session_register("testing")) {
>     echo "session_register worked.<br>\n";
> }
> else {
>     echo "session_register did not work<br>\n";
> }
> if (session_is_registered("testing")) {
>     echo "testing is a registered variable<br>\n";
> }
> else {
>     echo "testing is not a registered variable<br>\n";
> }
> $testing = "Let's see if this works.";
> ?>
> <a href="page2.php?<?=SID?>">Go to next page.</a>
> 
> 
> The output of the above page, gives me
> session id is e35c2893382e28a14fa0455302edb06e
> session_register did not work
> testing is a registered variable
> Go to next page. 
> 
> 
> and page2.php contains
> <?php
> session_start();
> echo "session id is ".session_id()."<br>\n";
> echo "Testing: $testing<br>\n";
> ?>
> 
> 
> The output of page2 gives me
> session id is e35c2893382e28a14fa0455302edb06e
> Testing:
> 
> I am totally confused.  First off, why isn't it registering the
> variable? There is a file named e35c2893382e28a14fa0455302edb06e
> in my /tmp directory, but it is empty.
> 
> Second, if it isn't registering the variable then why is
> session_is_registered("testing") returning true?
> 
> Jennifer
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




I am behind a LAN and i would like to know to use PHP's get_meta_tags 
function though a proxy.

Can someone write me the help or write me the code

thanks
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





> I had some code that was working nicely.  In it, I was assigning values to
> a
> multidimensional array like:
> 
> $array_name[0] = array(
>     key1 => 'val',
>     key2 => 'val',
>     key3 => 'val');
> 
> I added a function that directly assigns vars to the same array like:
> 
> $array_name[0][key4] = 'val';
> 
> If this function is called prior to the multiple assignment code, it
> erases
> the directly assigned key/value pair [key4] = 'val'.

try :

$array_name[0][key4] = 'val4';
$array_name[0]=array_merge(
  array(
    key1 => 'val1',
    key2 => 'val2',
    key3 => 'val3'
  ),
  $array_name[0]);

this will work ...
michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net





Hello Michael,

> I am wondering if a website planning/production tool exists already in 
> PHP?  This would be something that the agency and the client could use as 
> a central "meeting" place about the project, with deadlines, comps, 
> project brief, etc...

maybe you want to have a look at the groupware tool PHProjekt:
www.PHProjekt.com

greetings
Albrecht





On Thursday 03 May 2001 09:55, Jorge Amaya wrote:

>  I am new user of php, I have installed apache 1.3.x, php3 and mysql, but
>  I have a problem, My navigator doesn't recognize the files of php3, that

why install php3, not php4 ? 

>  is to say it doesn't work me php in the navigator, I have configured
>  such and like says the manual in php.ini and also in the directives of

make sure the httpd.conf / apache.conf have the following datas

LoadModule php4_module        libexec/libphp4.so                              
                                                                             
or one with php3 pointing to a existing resource.
    
DirectoryIndex index.php index.html 

or .php3, .phtml etc

and 
    AddType application/x-httpd-php3 .php3
    AddType application/x-httpd-php3-source .phps

or for php4

    AddType application/x-httpd-php .php 
    AddType application/x-httpd-php-source .phps                              
                                      
now the apache help files might be needed to fully understand what this does 
in case you wonders.

-- 
 php developer / CoreTrek AS        | The skater, Barbara Ann Scott Is so
 Sandnes / Rogaland / Norway        | fuckingly "winsome" a snot,  That when
 web: http://www.moijk.net/         | posed on her toes  She elaborately shows




I have a shopping cart that allows decimal points for quantities.
I like it like that, but would like to remove any trailing zeros
and if the quantity is not a fraction I would like to remove the
decimal point too.

What would be the easiest way to do this?  I don't see any
function that would make it easy.

Jennifer




On Thursday 03 May 2001 08:53, Jennifer wrote:

> I have a shopping cart that allows decimal points for quantities.
> I like it like that, but would like to remove any trailing zeros
> and if the quantity is not a fraction I would like to remove the
> decimal point too.
>
> What would be the easiest way to do this?  I don't see any
> function that would make it easy.

It's so easy that you don't need a function for it :)

$Qty = "12.470";
$Qty_real = (double) $Qty;

echo "$Qty - $Qty_real";

In other words - convert it from a strin to a floating-point number and 
PHP will do the rest.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Drink wet cement. Get stoned.




what about function round() with precision argument ?

check it:

for ($i = 0; $i < 10; $i += 0.25) {
   echo round($i,2). "<br>";
}

----- Original Message ----- 
From: "Jennifer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 3. 08:53
Subject: [PHP] Working with numbers


> I have a shopping cart that allows decimal points for quantities.
> I like it like that, but would like to remove any trailing zeros
> and if the quantity is not a fraction I would like to remove the
> decimal point too.
> 
> What would be the easiest way to do this?  I don't see any
> function that would make it easy.
> 
> Jennifer
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





hello.

i read from a text file a line like: "Key=$value"

so, i do like:

$lines = join('', file("myfile.txt"));

echo $lines;
// output= Key=$value

Now how can i replace the values in the $lines variables?
i want like:

$value = "test";
echo $lines;

and i want ouput like: Key=test

any idea?

-elias
http://eassoft.cjb.net







On Thu, May 03, 2001 at 10:12:55AM -0700, elias wrote:
> hello.
> i read from a text file a line like: "Key=$value"
> so, i do like:
> $lines = join('', file("myfile.txt"));
> echo $lines;
> // output= Key=$value
> Now how can i replace the values in the $lines variables?
> i want like:
> $value = "test";
> echo $lines;
> and i want ouput like: Key=test
> any idea?

May not be the best way, but it works:
<?php
$lines = join('', file("myfile.txt"));
$value = "test";
$lines = str_replace("\$value", $value, $lines);
echo $lines;
?>

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
Well, enough clowning around.  Perl is, in intent, a cleaned up and
summarized version of that wonderful semi-natural language known as
"Unix".
             -- Larry Wall in <[EMAIL PROTECTED]>




No, ...
Actually,...
I want it so generic,
like myfile.txt can have like:
-
Welcome $username
Enjoy your staying at: $site_name
Mail admin. at $admin_mail for any questions...
-
so bascially, i don't want to do str_replace or else i could have used the
sprintf() and with '%s' instead of str_replace...

i even tried the eval() which should work, but it didn't, scroll down to
message with Subject: $hello

-elias

"Jason Stechschulte" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, May 03, 2001 at 10:12:55AM -0700, elias wrote:
> > hello.
> > i read from a text file a line like: "Key=$value"
> > so, i do like:
> > $lines = join('', file("myfile.txt"));
> > echo $lines;
> > // output= Key=$value
> > Now how can i replace the values in the $lines variables?
> > i want like:
> > $value = "test";
> > echo $lines;
> > and i want ouput like: Key=test
> > any idea?
>
> May not be the best way, but it works:
> <?php
> $lines = join('', file("myfile.txt"));
> $value = "test";
> $lines = str_replace("\$value", $value, $lines);
> echo $lines;
> ?>
>
> --
> Jason Stechschulte
> [EMAIL PROTECTED]
> --
> Well, enough clowning around.  Perl is, in intent, a cleaned up and
> summarized version of that wonderful semi-natural language known as
> "Unix".
>              -- Larry Wall in <[EMAIL PROTECTED]>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






On Thu, May 03, 2001 at 03:56:55PM -0700, elias wrote:
> No, ...
> Actually,...
> I want it so generic,
> like myfile.txt can have like:
> -
> Welcome $username
> Enjoy your staying at: $site_name
> Mail admin. at $admin_mail for any questions...
> -
> so bascially, i don't want to do str_replace or else i could have used the
> sprintf() and with '%s' instead of str_replace...
> 
> i even tried the eval() which should work, but it didn't, scroll down to
> message with Subject: $hello

I don't think you understand eval().  Either that or I don't.  If I
understand correctly, eval(); requires a complete PHP statement.  
Welcome $username is not a complete PHP statement.

Why don't you just make myfile.txt a valid php file and then include it?

myfile.txt.php:

Welcome <?php echo $username;?>
Enjoy your staying at: <?php echo $site_name;?>
Mail admin. at <?php echo $admin_mail?> for any questions...

index.php:
<?php
$username="eddie";
$site_name="stripmall";
$admin_mail="[EMAIL PROTECTED]";
include("myfile.txt.php");
?>

I'm not sure if this is what you want, but it will send this to the
browser:

Welcome eddie
Enjoy your staying at stripmall
Mail admin. at [EMAIL PROTECTED]

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
Think of prototypes as a funny markup language--the interpretation is
left up to the rendering engine.
             -- Larry Wall in <[EMAIL PROTECTED]>




Hi there,

Is this what you want?

$a = chr(23);

which should give you ctrl+W in $a.

Rudolf Visagie
QEDI

-----Original Message-----
From: Wee Chua [mailto:[EMAIL PROTECTED]]
Sent: 02 May 2001 08:08
To: PHP (E-mail)
Subject: [PHP] Decimal to Ascii


Hi all,
Can i convert decimal 23 to ascii in PHP? Thanks.

Calvin Chua
Systems Analyst
InterClean Equipment, Inc.
734-975-2967
www.InterClean.com


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




Good morning,

I've been trying to find out how to use IMAP to read attachments from the
MIME E-Mail and save them on the filesystem and later transfer them into a
RDBMS, the problem I have at the moment is that I have no clue what so ever
how to do this, I've tried using imap_headerinfo and other imap_command to
check if anything show up in the given ARRAY or OBJECT that will show that
the mail contains an attachment. But I havn't been able to do this so far. I
bet there are hundreds of you out there that probably has done that same
thing that could help me and guide me to what I should look for, this is in
a bit of a hurry. And since I've been trying to solve this problem myself
and tried not to bother the list with this, I really do need the help now.

So, if anyone could spare a few minutes of their time and give me some
guidelines, I would really love it.

I know that I should look for "#$message .= (Content-Disposition:
attachment; filename="") in some way, but I don't know how, or where to go
from there.

Thanks in advance,

// Mattias





        I did a bit of research on the same subject a couple months back for an
upcomming project. I still have not gotten to it so wont have to many
specifics for you, but what I would recommend is NOT using php for this
task. I would say your best bet, assuming a unix install, is to use
procmail to filter mail and remove attachments to a given directory.
Procmail will need help from something like metamail to decode the
attachment and save it. Then have PHP do the work of putting the file
into the DB. Just my 2 cents.

Mattias Segerdahl wrote:
> 
> Good morning,
> 
> I've been trying to find out how to use IMAP to read attachments from the
> MIME E-Mail and save them on the filesystem and later transfer them into a
> RDBMS, the problem I have at the moment is that I have no clue what so ever
> how to do this, I've tried using imap_headerinfo and other imap_command to
> check if anything show up in the given ARRAY or OBJECT that will show that
> the mail contains an attachment. But I havn't been able to do this so far. I
> bet there are hundreds of you out there that probably has done that same
> thing that could help me and guide me to what I should look for, this is in
> a bit of a hurry. And since I've been trying to solve this problem myself
> and tried not to bother the list with this, I really do need the help now.
> 
> So, if anyone could spare a few minutes of their time and give me some
> guidelines, I would really love it.
> 
> I know that I should look for "#$message .= (Content-Disposition:
> attachment; filename="") in some way, but I don't know how, or where to go
> from there.
> 
> Thanks in advance,
> 
> // Mattias
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Larry Hotchkiss
Universal Capital
612-551-9309
http://www.unicap.com/




Is this the correct way to use round function with 2 decimal?
$x = round((44.057/2.545),2);
cheers?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




"Jacky" <[EMAIL PROTECTED]> wrote:

 > 1.  (*) text/plain          
 > 
 > Is this the correct way to use round function with 2 decimal?
 > $x = round((44.057/2.545),2);

yep

-- 
Henrik Hansen





Thanks,

When I try:

------------------------------------------------------------
<?
        $lines = join('', file("http://www.ansilion.com";));
        echo $lines;
?>
------------------------------------------------------------

I get the following error:

------------------------------------------------------------
Warning: file("http://www.ansilion.com";) - No error in c:\program
files\nusphere\apache\htdocs\test.php on line 2

Warning: Bad arguments to join() in c:\program
files\nusphere\apache\htdocs\test.php on line 2
------------------------------------------------------------

Huh!?!?!

Simon.

> -----Original Message-----
> From: elias [mailto:[EMAIL PROTECTED]]
> Sent: donderdag 3 mei 2001 1:29
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] How to catch the output of http:// -> text file?
> 
> 
> Never tried what i'll write you, but it should work though!
> 
> for ($i=0;$i<2000;$i++)
> {
>    $lines = join('', file(http://www.mysite.com/generator.php?id=$i));
>   // save $lines to a file.....
> }
> 
> -elias
> http://eassoft.cjb.net
> 
> "Kraa de Simon" <[EMAIL PROTECTED]> wrote in message
> C1EBEEBBB842D411B4120000949A1F5875867A@wwmessd135">news:C1EBEEBBB842D411B4120000949A1F5875867A@wwmessd135...
> > Hi,
> >
> > PHP newbie.
> >
> > Can anyone help me with the following?
> >
> > Pseudo code:
> >
> > for(i=1;i<2000;i++)
> > {
> > catch the output of
> > http://www.mysite.com/kb.html?kbid= <? echo i ?>
> > and put the html code in a text file called
> > /www/kb/kbid <? echo i ?> .html
> > }
> >
> > So the end result is 2000 html files on disk "extacted" 
> from the http://
> > address...
> >
> > Thanks...
> >
> > Met vriendelijke groet / With kind regards,
> >
> > Simon de Kraa
> > ICL Logistic Systems
> > mailto:[EMAIL PROTECTED]
> >
> > ---
> >
> > Microsoft Windows 2000 Professional SP 1, Progress 9.1b, 
> Roundtable 9.1b
> > SCO UnixWare 7.1.1, Progress 9.1a11
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




I'm on Windows 2000, Apache 1.3.12 / PHP 4.0.4pl1 and MySQL 3.23.32.

> -----Original Message-----
> From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> Sent: donderdag 3 mei 2001 10:20
> To: 'elias'; [EMAIL PROTECTED]
> Subject: RE: [PHP] How to catch the output of http:// -> text file?
> 
> 
> Thanks,
> 
> When I try:
> 
> ------------------------------------------------------------
> <?
>       $lines = join('', file("http://www.ansilion.com";));
>       echo $lines;
> ?>
> ------------------------------------------------------------
> 
> I get the following error:
> 
> ------------------------------------------------------------
> Warning: file("http://www.ansilion.com";) - No error in c:\program
> files\nusphere\apache\htdocs\test.php on line 2
> 
> Warning: Bad arguments to join() in c:\program
> files\nusphere\apache\htdocs\test.php on line 2
> ------------------------------------------------------------
> 
> Huh!?!?!
> 
> Simon.
> 
> > -----Original Message-----
> > From: elias [mailto:[EMAIL PROTECTED]]
> > Sent: donderdag 3 mei 2001 1:29
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] How to catch the output of http:// -> text file?
> > 
> > 
> > Never tried what i'll write you, but it should work though!
> > 
> > for ($i=0;$i<2000;$i++)
> > {
> >    $lines = join('', 
> file(http://www.mysite.com/generator.php?id=$i));
> >   // save $lines to a file.....
> > }
> > 
> > -elias
> > http://eassoft.cjb.net
> > 
> > "Kraa de Simon" <[EMAIL PROTECTED]> wrote in message
> > C1EBEEBBB842D411B4120000949A1F5875867A@wwmessd135">news:C1EBEEBBB842D411B4120000949A1F5875867A@wwmessd135...
> > > Hi,
> > >
> > > PHP newbie.
> > >
> > > Can anyone help me with the following?
> > >
> > > Pseudo code:
> > >
> > > for(i=1;i<2000;i++)
> > > {
> > > catch the output of
> > > http://www.mysite.com/kb.html?kbid= <? echo i ?>
> > > and put the html code in a text file called
> > > /www/kb/kbid <? echo i ?> .html
> > > }
> > >
> > > So the end result is 2000 html files on disk "extacted" 
> > from the http://
> > > address...
> > >
> > > Thanks...
> > >
> > > Met vriendelijke groet / With kind regards,
> > >
> > > Simon de Kraa
> > > ICL Logistic Systems
> > > mailto:[EMAIL PROTECTED]
> > >
> > > ---
> > >
> > > Microsoft Windows 2000 Professional SP 1, Progress 9.1b, 
> > Roundtable 9.1b
> > > SCO UnixWare 7.1.1, Progress 9.1a11
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: 
> > [EMAIL PROTECTED]
> > >
> > 
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> > [EMAIL PROTECTED]
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




Could it have something to do with the fact that the webserver is behind a
firewall/proxy or something?

When I enter the http addres in the browser everything works fine...

???

Simon.

> -----Original Message-----
> From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> Sent: donderdag 3 mei 2001 10:33
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] How to catch the output of http:// -> text file?
> 
> 
> I'm on Windows 2000, Apache 1.3.12 / PHP 4.0.4pl1 and MySQL 3.23.32.
> 
> > -----Original Message-----
> > From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> > Sent: donderdag 3 mei 2001 10:20
> > To: 'elias'; [EMAIL PROTECTED]
> > Subject: RE: [PHP] How to catch the output of http:// -> text file?
> > 
> > 
> > Thanks,
> > 
> > When I try:
> > 
> > ------------------------------------------------------------
> > <?
> >     $lines = join('', file("http://www.ansilion.com";));
> >     echo $lines;
> > ?>
> > ------------------------------------------------------------
> > 
> > I get the following error:
> > 
> > ------------------------------------------------------------
> > Warning: file("http://www.ansilion.com";) - No error in c:\program
> > files\nusphere\apache\htdocs\test.php on line 2
> > 
> > Warning: Bad arguments to join() in c:\program
> > files\nusphere\apache\htdocs\test.php on line 2
> > ------------------------------------------------------------
> > 
> > Huh!?!?!
> > 
> > Simon.
> > 
> > > -----Original Message-----
> > > From: elias [mailto:[EMAIL PROTECTED]]
> > > Sent: donderdag 3 mei 2001 1:29
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [PHP] How to catch the output of http:// -> 
> text file?
> > > 
> > > 
> > > Never tried what i'll write you, but it should work though!
> > > 
> > > for ($i=0;$i<2000;$i++)
> > > {
> > >    $lines = join('', 
> > file(http://www.mysite.com/generator.php?id=$i));
> > >   // save $lines to a file.....
> > > }
> > > 
> > > -elias
> > > http://eassoft.cjb.net
> > > 
> > > "Kraa de Simon" <[EMAIL PROTECTED]> wrote in message
> > > C1EBEEBBB842D411B4120000949A1F5875867A@wwmessd135">news:C1EBEEBBB842D411B4120000949A1F5875867A@wwmessd135...
> > > > Hi,
> > > >
> > > > PHP newbie.
> > > >
> > > > Can anyone help me with the following?
> > > >
> > > > Pseudo code:
> > > >
> > > > for(i=1;i<2000;i++)
> > > > {
> > > > catch the output of
> > > > http://www.mysite.com/kb.html?kbid= <? echo i ?>
> > > > and put the html code in a text file called
> > > > /www/kb/kbid <? echo i ?> .html
> > > > }
> > > >
> > > > So the end result is 2000 html files on disk "extacted" 
> > > from the http://
> > > > address...
> > > >
> > > > Thanks...
> > > >
> > > > Met vriendelijke groet / With kind regards,
> > > >
> > > > Simon de Kraa
> > > > ICL Logistic Systems
> > > > mailto:[EMAIL PROTECTED]
> > > >
> > > > ---
> > > >
> > > > Microsoft Windows 2000 Professional SP 1, Progress 9.1b, 
> > > Roundtable 9.1b
> > > > SCO UnixWare 7.1.1, Progress 9.1a11
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail: 
> > > [EMAIL PROTECTED]
> > > >
> > > 
> > > 
> > > 
> > > -- 
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: 
> > > [EMAIL PROTECTED]
> > > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> > [EMAIL PROTECTED]
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




Hi Simon,

Try the following for reading the files,

for(i=1;i<2000;i++) {
    
        $response="";
        $request="kbid=$i";
        //Header
        $header =  "POST kb.html HTTP/1.0\r\n";
        $header .= "Content-type: application/x-www-form-urlencoded\r\n";
        $header .= "Content-length: " . strlen($request) . "\r\n\r\n";

        //Open Connection
        $fp = fsockopen("www.mysite.com",80,&$err_num,&$err_msg, 30);
        if($fp) {
                fputs($fp, $header.$request);
                while(!feof($fp))
                $response .= fgets($fp,2048);
                fclose($fp);
        }
        else {
                if(DEBUG) {
                echo "ERR_NUM: $err_num\nERR_MSG: $err_msg";
        }
//write response to a file
echo $response;
}

Hope this helps you,

Wieger


Kraa de Simon wrote:
> 
> Hi,
> 
> PHP newbie.
> 
> Can anyone help me with the following?
> 
> Pseudo code:
> 
> for(i=1;i<2000;i++)
> {
>         catch the output of
>                 http://www.mysite.com/kb.html?kbid= <? echo i ?>
>         and put the html code in a text file called
>                 /www/kb/kbid <? echo i ?> .html
> }
> 
> So the end result is 2000 html files on disk "extacted" from the http://
> address...
> 
> Thanks...
> 
> Met vriendelijke groet / With kind regards,
> 
> Simon de Kraa
> ICL Logistic Systems
> mailto:[EMAIL PROTECTED]
> 
> ---
> 
> Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b
> SCO UnixWare 7.1.1, Progress 9.1a11
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Wieger Uffink
tel: +31 20 428 6868
fax: +31 20 470 6905
web: http://www.usmedia.nl




Hi,

does anybody encountered problems while calling Mcrypt-commands with
PHP4.0.5 (LAMP)?

With 4.0.4pl1 my scripts work fine, but after updating to 4.0.5 they stop
without an error-message (php.ini: error_reporting = E_ALL) when I call for
example mcrypt_ecb().

After downgrading to 4.0.4pl1 everything works fine again.

Greetings

Stefan







Hi!

I've been on this list and working with PHP(/fi) for years now, and I
pretty much know the inns and outs of PHP and what to do and what
not. Meanwhile, I've grown real tired of webtechnology, and wanna do some
hardcore Java integration.

Well, it was fun! Thanks to all the people who helped me during the years,
thanks to Rasmus and all the hardcore developers (from Zend too).

PHP kicks arse, and we know it.

Bye,

Soeren Staun-Pedersen - [EMAIL PROTECTED] 
------
"The internet is full, beat it"
    - Me.







Hello,

It's a little off-topic, but this is driving me crazy!

For some weird reason my IE5.5/View Source command is not working!
not on any page! it's just not working! I click on it and nothing happens!

Any suggestions?

-elias






Wrong place to search for help with this kind of problem...

1) Reboot your computer
2) Call your tech support
3) Call Microsoft tech support
4) Reinstall the browser
5) Don't ever ask questions like these again

// Mattias

PS. Nothing personal DS.

-----Ursprungligt meddelande-----
Från: elias [mailto:[EMAIL PROTECTED]]
Skickat: den 3 maj 2001 21:56
Till: [EMAIL PROTECTED]
Ämne: [PHP] Help plz!


Hello,

It's a little off-topic, but this is driving me crazy!

For some weird reason my IE5.5/View Source command is not working!
not on any page! it's just not working! I click on it and nothing happens!

Any suggestions?

-elias



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






hmm....
take it easy!
i ask whetever...
and you reply if you can't and don't reply at all!

PS. Nothing personal too!

elias.

""Mattias Segerdahl"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Wrong place to search for help with this kind of problem...
>
> 1) Reboot your computer
> 2) Call your tech support
> 3) Call Microsoft tech support
> 4) Reinstall the browser
> 5) Don't ever ask questions like these again
>
> // Mattias
>
> PS. Nothing personal DS.
>
> -----Ursprungligt meddelande-----
> Från: elias [mailto:[EMAIL PROTECTED]]
> Skickat: den 3 maj 2001 21:56
> Till: [EMAIL PROTECTED]
> Ämne: [PHP] Help plz!
>
>
> Hello,
>
> It's a little off-topic, but this is driving me crazy!
>
> For some weird reason my IE5.5/View Source command is not working!
> not on any page! it's just not working! I click on it and nothing happens!
>
> Any suggestions?
>
> -elias
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>








Whoa,
take a deep breath and lets try again shall we.
Elias, I have run into this prob before, but each time, it seemed to dissapear
without reason.

If you fancy joining a more.. liberal disscussion group, I recomend joining
WDVL.
It is a list for all things webby, and most computer related issues are happily
sorted out by its close nit members.

Mail me off list if you want more info about subscribing.

I'll also ask them now for you.
Don't be afriad to ask questions, if you don't ask, you'll never know.
Tris...




=====================

Wrong place to search for help with this kind of problem...

1) Reboot your computer
2) Call your tech support
3) Call Microsoft tech support
4) Reinstall the browser
5) Don't ever ask questions like these again

// Mattias

PS. Nothing personal DS.


====================


Hello,

It's a little off-topic, but this is driving me crazy!

For some weird reason my IE5.5/View Source command is not working!
not on any page! it's just not working! I click on it and nothing happens!

Any suggestions?

-elias




**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**********************************************************************






Here you go mate...
type in:
view-source:http://www.anyurl.com

and you'll see the source code.
I did this in IE, but I presume it'll work in NN

Good luck mate.
Tris...




=======================

hmm....
take it easy!
i ask whetever...
and you reply if you can't and don't reply at all!

PS. Nothing personal too!

elias.





**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**********************************************************************




if you post or get the form $choice is there for php. this is how form
submission works in php.

try this:

<?php
echo("$choice<br>");
?>

<form action="#" method="post">

<select name="choice">
<option>aaa
<option>bbb
<option>ccc
<option>ddd
</select>

<input type="submit" value="default value">
</form>

wh

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Vanden Eynde Pascal [mailto:[EMAIL PROTECTED]]
> Sent: 02 May 2001 10:37
> To: [EMAIL PROTECTED]
> Subject: Sending information between pages???
> 
> 
> Hello,
> I have a page A with a combobox. Next to the combobox I have a link to
> another page (B). The idea is that I select a value in my 
> combobox, then
> click the link and the value of the selected value in the 
> combobox should be
> send to the page B. Is this possible with php and html? I've 
> tried something
> like:
> <select name=choice>
>     <option>aaa
>     <option>bbb
> </select>
> ....
> <a href="B.php?var=$choice" target="this">B</a>
> 
> but this didn't work, guess it only works if you insert a 
> value directly in
> the link and not a variable.
> 
> I thought of working with buttons but the problem got more 
> complicated. Page
> A actually is a form (the global form), containing three 
> comboboxes, each
> one with a link (to page B). The global form has a submit 
> button which leads
> to page C. If I click the global forms button all the values 
> selected in the
> comboboxes should be sent (easily done with 
> sessionvariables). If I click a
> link then only the value of the combobox under whom the link 
> is found should
> be sent to page B. I tried to make  three subforms and to 
> replace the links
> with a postbutton but that didn't work (guess subform don't 
> exist cause I
> didn't find any information about them). So I tried something like:
> <form action="page C" method="post">
>         <form action = "page B" method="post">
>                 <select name="cmbox1">
>                     <option>aaa
>                     <option>bbb
>                 </select>
>                 <input type="submit" name="toB_1">
>         </form>
>         <form action = "page B" method="post">
>                 <select name="cmbox2">
>                     <option>aaa
>                     <option>bbb
>                 </select>
>                 <input type="submit" name="toB_2">
>         </form>
>         <form action = "page B" method="post">
>                 <select name="cmbox3">
>                     <option>aaa
>                     <option>bbb
>                 </select>
>                 <input type="submit" name="toB_3">
>         </form>
> <input type="submit" name="toC">
> </form>
> 
>  The idea now was when I clicked toB_1 or toB_2 or toB_3 then 
> page B would
> be loaded and only one value (of the right combobox) should 
> be sent to page
> B. But when I click toC then all three values should be sent 
> to page C.
> 
> My question is if there is a solution in php to solve this 
> problem (to send
> those variables seperately) and so to solve the above stated problem.
> 
> Thanks in advance
> 
> Pascal
> 
> 
> 
> 




Hi,

Can anyone tell me if you can get free php+mysql hosting anywhere?

Many thanks and regards,

Peter Stevens
Project Assistant DP
---------------------
Berent APS
Njalsgade 21G,5
2300 København S
+45 32 64 12 00
---------------------
http://www.berent.dk
http://www.berent.de






sure www.f2s.com

-elias
http://eassoft.cjb.net

"Peter Stevens" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> Can anyone tell me if you can get free php+mysql hosting anywhere?
>
> Many thanks and regards,
>
> Peter Stevens
> Project Assistant DP
> ---------------------
> Berent APS
> Njalsgade 21G,5
> 2300 København S
> +45 32 64 12 00
> ---------------------
> http://www.berent.dk
> http://www.berent.de
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi try  www.f2s.com



Peter Stevens wrote:

> Hi,
>
> Can anyone tell me if you can get free php+mysql hosting anywhere?
>
> Many thanks and regards,
>
> Peter Stevens
> Project Assistant DP
> ---------------------
> Berent APS
> Njalsgade 21G,5
> 2300 København S
> +45 32 64 12 00
> ---------------------
> http://www.berent.dk
> http://www.berent.de
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




>From the archives: 

"The number of free PHP web hosts is growing .  More and more are 
offering MySQL options too!  Each category below is in alphabetic order.

> Some don't require banners :

    http://www.1st-home.net/ (requires affiliate signups)
    
    http://www.mycgiserver.com/

    http://www.portland.co.uk/ (allows your own domain name)

    http://www.saxen.net/


> Some do require banners AND offer FREE MySQL :

    http://www.f2s.net/free/free%20home.htm

    http://www.grandcity.net/hosting/

    http://hosting.datablocks.net/free/

    http://www.jumpworld.net/
 
    http://www.nexen.net/

    http://www.spaceports.com/

    http://www.surecity.com/

> Some do require banners (no db):

    http://www.netcabins.com/

    http://users.destiney.com/

    http://www.worldzone.net/

> Some require you be Open Source and offer many services :

    http://www.sourceforge.net/

If you later decide to pay for your web hosting, check out :

    http://hosts.php.net/

As it "features a searchable directory and comments from users."

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]O
n Behalf Of Peter Stevens
Sent: Thursday, May 03, 2001 6:02 AM
To: [EMAIL PROTECTED]
Subject: [PHP] is there free php+mySql hosting?


Hi,

Can anyone tell me if you can get free php+mysql hosting anywhere?

Many thanks and regards,

Peter Stevens
Project Assistant DP
---------------------
Berent APS
Njalsgade 21G,5
2300 København S
+45 32 64 12 00
---------------------
http://www.berent.dk
http://www.berent.de



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






for "informational purposes", an updatable page that contains all the
"free php web host" information presented below can be found here :

  http://www.faqts.com/knowledge-base/view.phtml/aid/4058/fid/27/

regards,
philip


On Thu, 3 May 2001, Greg Schnippel wrote:

> >From the archives: 
> 
> "The number of free PHP web hosts is growing .  More and more are 
> offering MySQL options too!  Each category below is in alphabetic order.
> 
> > Some don't require banners :
> 
>     http://www.1st-home.net/ (requires affiliate signups)
>     
>     http://www.mycgiserver.com/
> 
>     http://www.portland.co.uk/ (allows your own domain name)
> 
>     http://www.saxen.net/
> 
> 
> > Some do require banners AND offer FREE MySQL :
> 
>     http://www.f2s.net/free/free%20home.htm
> 
>     http://www.grandcity.net/hosting/
> 
>     http://hosting.datablocks.net/free/
> 
>     http://www.jumpworld.net/
>  
>     http://www.nexen.net/
> 
>     http://www.spaceports.com/
> 
>     http://www.surecity.com/
> 
> > Some do require banners (no db):
> 
>     http://www.netcabins.com/
> 
>     http://users.destiney.com/
> 
>     http://www.worldzone.net/
> 
> > Some require you be Open Source and offer many services :
> 
>     http://www.sourceforge.net/
> 
> If you later decide to pay for your web hosting, check out :
> 
>     http://hosts.php.net/
> 
> As it "features a searchable directory and comments from users."
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]O
> n Behalf Of Peter Stevens
> Sent: Thursday, May 03, 2001 6:02 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] is there free php+mySql hosting?
> 
> 
> Hi,
> 
> Can anyone tell me if you can get free php+mysql hosting anywhere?
> 
> Many thanks and regards,
> 
> Peter Stevens
> Project Assistant DP
> ---------------------
> Berent APS
> Njalsgade 21G,5
> 2300 København S
> +45 32 64 12 00
> ---------------------
> http://www.berent.dk
> http://www.berent.de
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





Just my o.o2 cents...
Isn't this table a members od database? When you use VFP 3.0 and up, VFP
can change header of file to new format. So it's
not compatible with old dbf file. I don't remember all operations that
cause this "upgrade", but including into the
database will certainly do that.
To be sure, that your table is 100% compatible with old dbf format, open
your table in VFP, and issue
copy to olddbftable TYPE FOX2X.
This will save all records from the table in old file format.
About the linux side, make sure, that user nobody have read permissions
on that file.
Apache, thus php too, runs as user "nobody".

hth
    Dezider.

"Benny K. Putera" wrote:

> I used function dbase_xxx to access foxpro database (.dbf) but it's not work.
> Here is my code :
>   <?
>   if (dbase_open("/home/benny/test/employee.dbf",0)) {
>     for ($i=1; $i<=dbase_numrecords($open); $i++) {
>       $rec = dbase_get_record($db, $i);
>       $nf  = dbase_numfields($db);
>       for ($j=0; $j < $nf; $j++) {
>         print $rec[$j]."<br>\n";
>       }
>     }
>   }
>   ?>
> Everytime I call this page there's a message :
>         Warning: unable to open  database /home/benny/test/employee.dbf in      
>/home/benny/htdocs/foxpro.php on line 2
> I used php 4.0.4 and Visual Fox Pro 5.0.
> Before that I have mounted my foxpro dbf file to my linux in the /home/benny/test 
>directory.
> Is there anything wrong?
> Anyone could help me?
>
> Regards;
>
> Benny.




Are there known probs with PDFLib 4.0 and PHP 4.0.5
on a WAMP-System!

It doesn't work after installing PHP 4.0.5!


-- 
phpArbeitsgruppe in Gruendung - Jochen Kaechelin
Stuttgarter Str.3, D-73033 Goeppingen
Tel. 07161-92 95 94, Fax 07161-92 95 98
http://www.php-arbeitsgruppe.de, mailto:[EMAIL PROTECTED]




Hi,

I'm giving a session on the german LinuxDay
(http://www.linuxtag.org/) on the B2B conference
about "PHP in the E-Business".

Therefore, I'm searching for some facts about
the following tasks:

o because of the flatten learning curve the company
  can do "earning while learning" on his employee
  because he can produce good results while learning
  PHP.
  
o because of the flatten learning curve and following
  the shorten time-to-market period, the company can
  do its rollout of the product in a much shorter time
  and can save USD X,-- costs.
  
o the company changed in its project from [Java|Perl|insert
  your favourite language here] to PHP because of <insert
  your reason here>
  
  
I would appreciate if you are in such a company and you
know that one of your big projects was realized with PHP
because of the former reasons. I'm especially searching
for definitive numbers, e.g. "We saved USD X,-- because
of <...>". If you already have some bar charts which
demonstrate one or more of the former reasons, send them
to me :-) Otherwise, tell me what were your decisions in
the sense of the former reasons I mentioned above.

I will publish the results after giving my session which
will happen on the 6th of July.

Please, don't reply to THIS LIST, reply via PM to
[EMAIL PROTECTED]

TIA,
-- 
Björn Schotte                                      [EMAIL PROTECTED]
http://rent-a-phpwizard.de/                   [EMAIL PROTECTED]

          PHP Schulungen, Softwareentwicklung, Coaching  




Hi,

Any ideas how to get by the following error?

Fatal error: Maximum execution time of 30 seconds exceeded in c:\program
files\nusphere\apache\htdocs\test.php on line 8

<?
        for($i=1;$i<=99999;$i++)
        {
                $lines = join("",
file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web
kb.html?TAB=dsp&kbid=' . $i));

                $fp = fopen ($DOCUMENT_ROOT . "/" . $i . ".html", "w");
                fwrite($fp, $lines, strlen($lines));
                fclose($fp);
        }
?>

Met vriendelijke groet / With kind regards,

Simon de Kraa
ICL Logistic Systems
mailto:[EMAIL PROTECTED]

---

Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b
SCO UnixWare 7.1.1, Progress 9.1a11




Change the max_execution_time setting in your php.ini file.

You can also do it on a per-script basis but I can't remember how OTOH - a
search on the manual should find it though.

HTH
Jon


-----Original Message-----
From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2001 11:48
To: Php-General (E-mail)
Subject: [PHP] Maximum execution time of 30 seconds exceeded...


Hi,

Any ideas how to get by the following error?

Fatal error: Maximum execution time of 30 seconds exceeded in c:\program
files\nusphere\apache\htdocs\test.php on line 8

<?
        for($i=1;$i<=99999;$i++)
        {
                $lines = join("",
file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web
kb.html?TAB=dsp&kbid=' . $i));

                $fp = fopen ($DOCUMENT_ROOT . "/" . $i . ".html", "w");
                fwrite($fp, $lines, strlen($lines));
                fclose($fp);
        }
?>

Met vriendelijke groet / With kind regards,

Simon de Kraa
ICL Logistic Systems
mailto:[EMAIL PROTECTED]


**********************************************************************
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**********************************************************************




Never tried it though!
But what if you try this:

<form name=myform method=post action="<?=$PHP_SELF?>">
<? if (!isset($i) $i = 0; else $i++; ?>
<input type=hidden name=i value=<?=$i?>>
</form>
<?
                 $lines = join("",

file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web
 kb.html?TAB=dsp&kbid=' . $i));

                 $fp = fopen ($DOCUMENT_ROOT . "/" . $i . ".html", "w");
                 fwrite($fp, $lines, strlen($lines));
                 fclose($fp);
?>
<script>
  if (myform.i.value > 1234)
  alert('reached max! script finished'); // stop submitting!
 else
   myform.submit(); // submit the form!
</script>


by this you're giving each file a life time of 30secs max! meanwhile this
trick can save solve your problem!

-elias
www.eassoft.cjb.net

"Kraa de Simon" <[EMAIL PROTECTED]> wrote in message
C1EBEEBBB842D411B4120000949A1F5875868B@wwmessd135">news:C1EBEEBBB842D411B4120000949A1F5875868B@wwmessd135...
> Hi,
>
> Any ideas how to get by the following error?
>
> Fatal error: Maximum execution time of 30 seconds exceeded in c:\program
> files\nusphere\apache\htdocs\test.php on line 8
>
> <?
>         for($i=1;$i<=99999;$i++)
>         {
>                 $lines = join("",
>
file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web
> kb.html?TAB=dsp&kbid=' . $i));
>
>                 $fp = fopen ($DOCUMENT_ROOT . "/" . $i . ".html", "w");
>                 fwrite($fp, $lines, strlen($lines));
>                 fclose($fp);
>         }
> ?>
>
> Met vriendelijke groet / With kind regards,
>
> Simon de Kraa
> ICL Logistic Systems
> mailto:[EMAIL PROTECTED]
>
> ---
>
> Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b
> SCO UnixWare 7.1.1, Progress 9.1a11
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>







set_time_limit(n) where n is number of seconds (or 0 for no time limit)
-----Original Message-----
From: Jon Haworth [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 5:53 AM
To: 'Kraa de Simon'; Php-General (E-mail)
Subject: RE: [PHP] Maximum execution time of 30 seconds exceeded...


Change the max_execution_time setting in your php.ini file.

You can also do it on a per-script basis but I can't remember how OTOH - a
search on the manual should find it though.

HTH
Jon


-----Original Message-----
From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2001 11:48
To: Php-General (E-mail)
Subject: [PHP] Maximum execution time of 30 seconds exceeded...


Hi,

Any ideas how to get by the following error?

Fatal error: Maximum execution time of 30 seconds exceeded in c:\program
files\nusphere\apache\htdocs\test.php on line 8

<?
        for($i=1;$i<=99999;$i++)
        {
                $lines = join("",
file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web
kb.html?TAB=dsp&kbid=' . $i));

                $fp = fopen ($DOCUMENT_ROOT . "/" . $i . ".html", "w");
                fwrite($fp, $lines, strlen($lines));
                fclose($fp);
        }
?>

Met vriendelijke groet / With kind regards,

Simon de Kraa
ICL Logistic Systems
mailto:[EMAIL PROTECTED]


**********************************************************************
'The information included in this Email is of a confidential nature and is
intended only for the addressee. If you are not the intended addressee,
any disclosure, copying or distribution by you is prohibited and may be
unlawful. Disclosure to any party other than the addressee, whether
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**********************************************************************

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





At 08:32 03.05.01 -0500, you wrote:
>set_time_limit(n) where n is number of seconds (or 0 for no time limit)

but DO NOT SET 0 on production-servers, your ISP will, after he killed the
processes, kill you :-)

>-----Original Message-----
>From: Jon Haworth [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, May 03, 2001 5:53 AM
>To: 'Kraa de Simon'; Php-General (E-mail)
>Subject: RE: [PHP] Maximum execution time of 30 seconds exceeded...
>
>
>Change the max_execution_time setting in your php.ini file.
>
>You can also do it on a per-script basis but I can't remember how OTOH - a
>search on the manual should find it though.
>
>HTH
>Jon
>
>
>-----Original Message-----
>From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
>Sent: 03 May 2001 11:48
>To: Php-General (E-mail)
>Subject: [PHP] Maximum execution time of 30 seconds exceeded...
>
>
>Hi,
>
>Any ideas how to get by the following error?
>
>Fatal error: Maximum execution time of 30 seconds exceeded in c:\program
>files\nusphere\apache\htdocs\test.php on line 8
>
><?
>         for($i=1;$i<=99999;$i++)
>         {
>                 $lines = join("",
>file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web
>kb.html?TAB=dsp&kbid=' . $i));
>
>                 $fp = fopen ($DOCUMENT_ROOT . "/" . $i . ".html", "w");
>                 fwrite($fp, $lines, strlen($lines));
>                 fclose($fp);
>         }
>?>
>
>Met vriendelijke groet / With kind regards,
>
>Simon de Kraa
>ICL Logistic Systems
>mailto:[EMAIL PROTECTED]





I am making a e-card page, and I am having a problem with with my message
box which is a <textarea> when I am previewing or saving/recalling the text
all the newline characters are gone. Any good ideas!
 
Thanks
Lars Stampe




At 13:10 03.05.01 +0200, you wrote:
>
>I am making a e-card page, and I am having a problem with with my message
>box which is a <textarea> when I am previewing or saving/recalling the text
>all the newline characters are gone. Any good ideas!
>
>Thanks
>Lars Stampe

Try
<textarea name="foo" rows="10" cols="50" wrap="physical"></textarea>
this make "hard" LF´s

Oliver






Thanks for the idea, it didn't work, let me just explain a bit further!

this is a simple version of the code


input.htm::

<form name="form" method="get" action="show.php">
  <textarea name="textfield" cols="45" rows="5" wrap="HARD"></textarea>
  <p>
  <input type="submit" name="Submit" value="Submit">
</form>

show.php::

<?php
echo $textfield;
?>



When I put in :

1
2
3
4

I get:

1 2 3 4

how do I fix this ( want it to appear like it was typed!)?

Regards
Lars Stampe




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2001 12:44
To: Stampe, Lars; [EMAIL PROTECTED]
Subject: Re: [PHP] textarea -- what happens to my new lines


At 13:10 03.05.01 +0200, you wrote:
>
>I am making a e-card page, and I am having a problem with with my message
>box which is a <textarea> when I am previewing or saving/recalling the text
>all the newline characters are gone. Any good ideas!
>
>Thanks
>Lars Stampe

Try
<textarea name="foo" rows="10" cols="50" wrap="physical"></textarea>
this make "hard" LF´s

Oliver



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




okay,...now that you showed some code...
basically, when you input via <textarea> all new lines are in the string
like \n
so to display them correctly in show.php do like:
<pre>
<?=$lines?>
</pre>
basically, in HTML the '\n' doesn't show you a new line,
or else you can replace all the '\n' with '<br>' tag!

-elias
www.eassoft.cjb.net

""Stampe, Lars"" <[EMAIL PROTECTED]> wrote in message
06D1C9FA1087D4119FC900508B95056E768ABF@eulexch1a">news:06D1C9FA1087D4119FC900508B95056E768ABF@eulexch1a...
Thanks for the idea, it didn't work, let me just explain a bit further!

this is a simple version of the code


input.htm::

<form name="form" method="get" action="show.php">
  <textarea name="textfield" cols="45" rows="5" wrap="HARD"></textarea>
  <p>
  <input type="submit" name="Submit" value="Submit">
</form>

show.php::

<?php
echo $textfield;
?>



When I put in :

1
2
3
4

I get:

1 2 3 4

how do I fix this ( want it to appear like it was typed!)?

Regards
Lars Stampe




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2001 12:44
To: Stampe, Lars; [EMAIL PROTECTED]
Subject: Re: [PHP] textarea -- what happens to my new lines


At 13:10 03.05.01 +0200, you wrote:
>
>I am making a e-card page, and I am having a problem with with my message
>box which is a <textarea> when I am previewing or saving/recalling the text
>all the newline characters are gone. Any good ideas!
>
>Thanks
>Lars Stampe

Try
<textarea name="foo" rows="10" cols="50" wrap="physical"></textarea>
this make "hard" LF´s

Oliver



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

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







Try this:

<?php
$textfield = nl2br($textfield);
echo $textfield;
?>

For more info, have a look at http://www.php.net/nl2br.

HTH
Jon


-----Original Message-----
From: Stampe, Lars [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2001 13:35
To: [EMAIL PROTECTED]
Subject: RE: [PHP] textarea -- what happens to my new lines


Thanks for the idea, it didn't work, let me just explain a bit further!

this is a simple version of the code


input.htm::

<form name="form" method="get" action="show.php">
  <textarea name="textfield" cols="45" rows="5" wrap="HARD"></textarea>
  <p>
  <input type="submit" name="Submit" value="Submit">
</form>

show.php::

<?php
echo $textfield;
?>



When I put in :

1
2
3
4

I get:

1 2 3 4

how do I fix this ( want it to appear like it was typed!)?

Regards
Lars Stampe


**********************************************************************
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**********************************************************************




At 14:34 03.05.01 +0200, you wrote:

change wrap !
<textarea name="textfield" cols="45" rows="5" wrap="physical"></textarea>
"physical means pyhsical" not HARD

echo nl2br($textfield); //turns your nl´s in <br>´s

That should work
Oliver





Hi everyone

I'm lookign through the manual but can'f find it right now. How do I check
if a variable has been created through a posted form?

TIA






you can try
if (isset($HTTP_POST_VARS['posted_variable_name'])){
  // do something
}

-----Message d'origine-----
De : Martin Cabrera Diaubalick [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 3 mai 2001 13:10
À : [EMAIL PROTECTED]
Objet : [PHP] Check if a variable has been posted-- HOW?


Hi everyone

I'm lookign through the manual but can'f find it right now. How do I check
if a variable has been created through a posted form?

TIA





Hi,

(PHP 4.0.3pl1 on Apache/1.3.14)

I hope somebody can help me. I'm at my wit's end with this one. I need to
use a shutdown function that does something only if it was called due to a
connection timeout. I register a shutdown fuction and provoke a timeout;
the function is called. But it sees connection_status() = 0 and
connection_timeout() as false. (If I click the "Stop" button on the
browser, my shutdown function sees connection_abort = true.)

The wierd thing is that the shutdown function is not called if there is no
timeout and no user abort. If I could rely on this behavior that would be
fine. But that is not how PHP is meant to work so I'm not willing to rely
on it.

I see on the screen: "Fatal error: Maximum execution time of 5 seconds
exceeded"
But inspecting connection_status() shows it is 0 and connection_timeout()
is false.

Here's my test code. I made it write to a file because using sqrt() and
sleep() it never timed out. 

<?php
set_time_limit(5);
ignore_user_abort(0);

function done() {
  global $i, $fp;
  $u=connection_status();
  fputs($fp,"i reached $i, connection status = $u \n");
  if(connection_timeout()) fputs($fp,"** the connection was timed out **\n");
  else fputs($fp,"** not timed out **\n");
  if(connection_aborted()) fputs($fp,"** the connection was aborted   **\n");
  else fputs($fp,"** not aborted **\n");
  fclose($fp);
}

register_shutdown_function("done");

$fp = fopen("logfile.txt","w");
$tempout = fopen("tempout","w");
$tfile="tester.zip";
for($i=0; $i<40; $i++) {
  $temp_aray=file($tfile);
  while (list($key, $val) = each($temp_aray)) {
    fwrite($tempout,$key);
    fwrite($tempout,$val);
  }
  fputs($fp,"i is $i\n");
  echo "------------ $i<br>\n";
}
fputs($fp," main: i finishes as $i\n");
fclose($tempout);
fclose($fp);
if(connection_timeout()) echo "main ** the connection was timed out
**<br>\n";
else echo "main ** not timed out **<br>\n";
$u=connection_status();
echo "connection_status = $u <br>\n";
unlink("tempout");
?>
John Clements
   . .
    |
   \_/

[EMAIL PROTECTED]
+44 (0) 20 8959-8213
29 Gibbs Green,  Edgware, Middx., UK  HA8 9RS





Hi,

(PHP 4.0.3pl1 on Apache/1.3.14)

I hope somebody can help me. I'm at my wit's end with this one. I need to
use a shutdown function that does something only if it was called due to a
connection timeout. I register a shutdown fuction and provoke a timeout;
the function is called. But it sees connection_status() = 0 and
connection_timeout() as false. (If I click the "Stop" button on the
browser, my shutdown function sees connection_abort = true.)

The wierd thing is that the shutdown function is not called if there is no
timeout and no user abort. If I could rely on this behavior that would be
fine. But that is not how PHP is meant to work so I'm not willing to rely
on it.

I see on the screen: "Fatal error: Maximum execution time of 5 seconds
exceeded"
But inspecting connection_status() shows it is 0 and connection_timeout()
is false.

Here's my test code. I made it write to a file because using sqrt() and
sleep() it never timed out. 

<?php
set_time_limit(5);
ignore_user_abort(0);

function done() {
  global $i, $fp;
  $u=connection_status();
  fputs($fp,"i reached $i, connection status = $u \n");
  if(connection_timeout()) fputs($fp,"** the connection was timed out **\n");
  else fputs($fp,"** not timed out **\n");
  if(connection_aborted()) fputs($fp,"** the connection was aborted   **\n");
  else fputs($fp,"** not aborted **\n");
  fclose($fp);
}

register_shutdown_function("done");

$fp = fopen("logfile.txt","w");
$tempout = fopen("tempout","w");
$tfile="tester.zip";
for($i=0; $i<40; $i++) {
  $temp_aray=file($tfile);
  while (list($key, $val) = each($temp_aray)) {
    fwrite($tempout,$key);
    fwrite($tempout,$val);
  }
  fputs($fp,"i is $i\n");
  echo "------------ $i<br>\n";
}
fputs($fp," main: i finishes as $i\n");
fclose($tempout);
fclose($fp);
if(connection_timeout()) echo "main ** the connection was timed out
**<br>\n";
else echo "main ** not timed out **<br>\n";
$u=connection_status();
echo "connection_status = $u <br>\n";
unlink("tempout");
?>
John Clements
   . .
    |
   \_/

[EMAIL PROTECTED]
+44 (0) 20 8959-8213
29 Gibbs Green,  Edgware, Middx., UK  HA8 9RS





Hi,

hope it is the right newsgroup.

I have a php application which uses odbc to connect to a informix
database. (NT4, Apache 1.3.x, PHP4.x)
Is it advisable to turn the odbc pooling on?
What else should i take care off when working with PHP and ODBC?

Thanks and Greetings
Claudia





Hi There,

According to the docu u should not require() files or external code in loops
or u must use curly Bracket when used in if conditions.

But everythink works fine. I require() successfully in for loops, I can use
it in if..elseif..else constucts without curly brackets. (only one line of
cause)

So where is the difference between require() and include().

Has anyone a working example to show me not the same results when i replace
require() with include() in his code?

if thus please send this tiny example @ [EMAIL PROTECTED]

Ronald






another template engines:

http://phpclasses.upperdesign.com  and browse for Templates!

or: 
http://va.php.net/~andrei/tpl-engine.html
http://www.phpinsider.com/php/code/Smarty/ Smarty


----- Original Message ----- 
From: "Henrik Hansen" <[EMAIL PROTECTED]>
To: "Daniel Guerrier" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: 2001. május 2. 22:52
Subject: Re: [PHP] Template programming


> Daniel Guerrier <[EMAIL PROTECTED]> wrote:
> 
>  > Where can I find detailed info on creating websites
>  > using php templates.  
>  > Hardcopy or online
> 
> I would reccommend fasttemplates, more information here:
> 
> http://www.thewebmasters.net/php/FastTemplate.phtml
> 
> -- 
> Henrik Hansen
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 






I'm looking for a full-featured PHP script for
log file analysis.  Can anyone recommend one?

Thanks in advance,
Paul N.




Hi all:
  I'm hoping someone can help me out with this array problem.  I'm 
trying to find the lowest number which is not in the array.
  For example:
Given this array :            return this:

(0, 0)                        1
(1,0)                        2
(1,2,0)                    3
(3,0)                        1
(1, 3)                        2

Does anyone have any code, or any hints on how to go about this?  I've 
worked on it for a few hours, and am really stuck.
Thanks,
Mike

Mike Potter
OEone Corp.
http://www.oeone.com






pseudo code:

for($i=-1; $i < count($my_array); $i++) {
if (!in_array($i,$my_array)){echo $i; exit;}
        }

should do it.....

____________________________ 
Matthew Luchak 
Webmaster
Kaydara Inc. 
[EMAIL PROTECTED]


-----Original Message-----
From: Mike Potter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 9:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Returning Lowest Number Not In Array


Hi all:
  I'm hoping someone can help me out with this array problem.  I'm 
trying to find the lowest number which is not in the array.
 




nope, that's not it. sorry

Nikhil

""Richard Lynch"" <[EMAIL PROTECTED]> wrote in message
051c01c0d2e1$2f9bfb40$7a24fea9@oemcomputer">news:051c01c0d2e1$2f9bfb40$7a24fea9@oemcomputer...
> > start sending email (this process would take many minutes). However
before
> > this script finished, another copy of the same script started, and this
> new
> > copy was sending emails to the same users again. The original script
> > continued. Result: duplicate emails
>
> Wild Guess:
>
> You are using cron and have the settings in your crontab incorrect.
>
> For example:
> * * * * * 0 /full/path/to/your/spam/script
>
> This would attempt to execute the script on Sundays.  EVERY MINUTE, during
> Sunday, however.
>
> Disclaimer: I probably got the *'s and 0 mixed up a bit.  I'm not a
crontab
> expert.
>
> --
> WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hello, I'm having a problem getting sessions to work with
register_globals=off.  The following 2 files work fine if reg_globals=on but
not when off.  When I look at the session file it reads like this:

!varA|!varB|

and not like it should:

varA|s:4:"funk";varB|s:4:"that";


//-----------------------------sess01.php

<?php
session_start();
session_register('varA');
session_register('varB');

?>

<form action="sess02.php">
first name:<input type="text" name="varA">
<br>
last name:<input type="text" name="varB">
<input type="submit" value="send">
</form>


//----------------------------sess02.php

<?php

session_start();
print("$varA $varB");

?>

What do I have to do to make this work with register_globals off?  Thank you
very much for help.  (If I get some time/answers I think I'm gonna design a
page that shows sample scripts that work with reg_globals=on and their
equivalents with reg_globals=off; this might be beneficial for some
newbies--such as myself.  If anybody would like to contribute, please email
me and you'll be duly credited if such a project comes to fruition. Thanx!)

--ahmad.





When reg_globals is off, you can't access session vars just with $varA and
$varB (thess variables are not set), you need to use
$HTTP_SESSION_VARS['varA'] and $HTTP_SESSION_VARS['varB'] to access these
variables !!

-----Message d'origine-----
De : ahmad varoqua [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 3 mai 2001 16:31
À : Php General List
Objet : [PHP] sessions and reg_globals=off


Hello, I'm having a problem getting sessions to work with
register_globals=off.  The following 2 files work fine if reg_globals=on but
not when off.  When I look at the session file it reads like this:

!varA|!varB|

and not like it should:

varA|s:4:"funk";varB|s:4:"that";


//-----------------------------sess01.php

<?php
session_start();
session_register('varA');
session_register('varB');

?>

<form action="sess02.php">
first name:<input type="text" name="varA">
<br>
last name:<input type="text" name="varB">
<input type="submit" value="send">
</form>


//----------------------------sess02.php

<?php

session_start();
print("$varA $varB");

?>

What do I have to do to make this work with register_globals off?  Thank you
very much for help.  (If I get some time/answers I think I'm gonna design a
page that shows sample scripts that work with reg_globals=on and their
equivalents with reg_globals=off; this might be beneficial for some
newbies--such as myself.  If anybody would like to contribute, please email
me and you'll be duly credited if such a project comes to fruition. Thanx!)

--ahmad.


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





Hello

I've got a problem using PHP under Win32 (PHP/4.0.4pl1). On my PC I use
Informix-Cli 32 (for Informix Online Server 7.22C1) + Apache/1.3.12. When I
want to load _php_ifx.dll_ library, it writes that it can't find such a module
(but i've got php_ifx.dll) + it can not find _isqlt09a.dll_ ! I don't know
where I can find this module and what it's for... All other modules work with
any problem.

 With best regards,
                   Oleg

P.S. Thank you for the answer.




We are working on a project that is hosted on Linux, but the development 
is being done on Windows using Homesite.  I have looked around but 
haven't found any real solutions with an IDE that can work directly with 
a remote CVS project like MacOS's Project Builder can for example. 

Are there any editors/IDEs or plugins for Homesite that will allow you 
to use CVS (or some other Unix/Linux based versioning system) directly 
through the editor without using WinCVS or some other manual system to 
check files in and out?  I have looked at Zeus SCC-CVS that supposedly 
will get and SCC compliant app (Homesite) to work with CVS, but I get an 
error early on in the process and haven't gotten it to work.

Any ideas?
Michael






As far as I know there's no such application. We are using WinCVS for the
same purpose. I would be interested if you come accross some application
that would this though.

oktay

-----Original Message-----
From: Michael Stearne [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 10:18 AM
To: php-general
Subject: [PHP] Homesite - Windows and CVS


We are working on a project that is hosted on Linux, but the development 
is being done on Windows using Homesite.  I have looked around but 
haven't found any real solutions with an IDE that can work directly with 
a remote CVS project like MacOS's Project Builder can for example. 

Are there any editors/IDEs or plugins for Homesite that will allow you 
to use CVS (or some other Unix/Linux based versioning system) directly 
through the editor without using WinCVS or some other manual system to 
check files in and out?  I have looked at Zeus SCC-CVS that supposedly 
will get and SCC compliant app (Homesite) to work with CVS, but I get an 
error early on in the process and haven't gotten it to work.

Any ideas?
Michael



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




***NEWBIE ALERT***  (I am only very new at this)

PHP and MySQL

OK - I have a table with data and one of the fields is a Date field.

Now I would like to SELECT all records where the date is less that 45 days
old.

Eh, How do I do that?

I have tried this:

#Declaring variables
$today=date("Y-m-d");
$lastmonth = $today-30

$query = "SELECT * FROM customers WHERE Site='egebjergnet' AND
DatoOprettet>'$lastmonth' ORDER BY FirmaNavn";


AND I get an error, of course.  hmmm
--
==================================
Regards from Denmark, Europe
Please cc your reply to [EMAIL PROTECTED]
==================================
I haven't lost my mind, I've got it backed up on TAPE somewhere.......






Take out the order by clause or chaqnge it.  You can't order by a column you
aren't selecting.


----- Original Message -----
From: "Dan Eskildsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 10:30 AM
Subject: [PHP] php/mySql SELECT where clause using dates.


> ***NEWBIE ALERT***  (I am only very new at this)
>
> PHP and MySQL
>
> OK - I have a table with data and one of the fields is a Date field.
>
> Now I would like to SELECT all records where the date is less that 45 days
> old.
>
> Eh, How do I do that?
>
> I have tried this:
>
> #Declaring variables
> $today=date("Y-m-d");
> $lastmonth = $today-30
>
> $query = "SELECT * FROM customers WHERE Site='egebjergnet' AND
> DatoOprettet>'$lastmonth' ORDER BY FirmaNavn";
>
>
> AND I get an error, of course.  hmmm
> --
> ==================================
> Regards from Denmark, Europe
> Please cc your reply to [EMAIL PROTECTED]
> ==================================
> I haven't lost my mind, I've got it backed up on TAPE somewhere.......
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hello,

maybe this could help,

WHERE TO_DAYS( NOW()) - TO_DAYS( your_date_field ) <= 45

py

At 04:30 PM 5/3/01 +0200, you wrote:
>***NEWBIE ALERT***  (I am only very new at this)
>
>PHP and MySQL
>
>OK - I have a table with data and one of the fields is a Date field.
>
>Now I would like to SELECT all records where the date is less that 45 days
>old.
>
>Eh, How do I do that?
>
>I have tried this:
>
>#Declaring variables
>$today=date("Y-m-d");
>$lastmonth = $today-30
>
>$query = "SELECT * FROM customers WHERE Site='egebjergnet' AND
>DatoOprettet>'$lastmonth' ORDER BY FirmaNavn";
>
>
>AND I get an error, of course.  hmmm
>--
>==================================
>Regards from Denmark, Europe
>Please cc your reply to [EMAIL PROTECTED]
>==================================
>I haven't lost my mind, I've got it backed up on TAPE somewhere.......
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ======================
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ======================





Hi NG,

my problem is following:

I've write some code like this:

$sFile = fsockopen($strHost,$intPort,$intErrNum,$strError,10);

 if (!empty($strError)) {
  echo ("Ein Fehler ist aufgetreten : $strError");
 }
 else {

  $strCommand = trim($strCommand);

  $strAnswer = fgets($sFile,128);
  fputs($sFile,$strCommand);

  while(!feof($sFile)) {
   $strAnswer  = $strAnswer."<BR>".fgets($sFile,128);
  }

  echo($strAnswer."<BR>");
  fclose($sFile);


The problem is that the while-loop never ends because feof() never be true.
But the manual tell me that i can use the feof()-function with fsockopen()
too.

Can somebody help??????

Thanks,

Thomas









i'm sorry, I looked at the wrong part.  You need to use the PHP functions to
convert your date to a timestamp, then subtract 30 days from it, then
reconvert to a MySQL date format.

Jon


----- Original Message -----
From: "Jon Rosenberg" <[EMAIL PROTECTED]>
To: "Dan Eskildsen" <[EMAIL PROTECTED]>
Cc: "PHP General List" <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 10:28 AM
Subject: Re: [PHP] php/mySql SELECT where clause using dates.


> Take out the order by clause or chaqnge it.  You can't order by a column
you
> aren't selecting.
>
>
> ----- Original Message -----
> From: "Dan Eskildsen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, May 03, 2001 10:30 AM
> Subject: [PHP] php/mySql SELECT where clause using dates.
>
>
> > ***NEWBIE ALERT***  (I am only very new at this)
> >
> > PHP and MySQL
> >
> > OK - I have a table with data and one of the fields is a Date field.
> >
> > Now I would like to SELECT all records where the date is less that 45
days
> > old.
> >
> > Eh, How do I do that?
> >
> > I have tried this:
> >
> > #Declaring variables
> > $today=date("Y-m-d");
> > $lastmonth = $today-30
> >
> > $query = "SELECT * FROM customers WHERE Site='egebjergnet' AND
> > DatoOprettet>'$lastmonth' ORDER BY FirmaNavn";
> >
> >
> > AND I get an error, of course.  hmmm
> > --
> > ==================================
> > Regards from Denmark, Europe
> > Please cc your reply to [EMAIL PROTECTED]
> > ==================================
> > I haven't lost my mind, I've got it backed up on TAPE somewhere.......
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Check  out      www.spaceports.com.  

Subodh Gupta
I have learned, Joy is not in things, it is in us.
You will ultimately be known by what you give and not what you get.

----- Original Message ----- 
From: "David Bruce" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 7:31 AM
Subject: [PHP] Hosts.


My host is Windows 98, Xitami and unstable MySQL and Perl/CGI.

I'm looking for a *free* host, with CGI, Perl 5+, MySQL access, SSI &
PHP.

Thanks,
Owen


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







Hello,

I am currently using image buttons for my submit buttons on a project I am
working on.  What I would like to use is regular text like a hyperlink.
Does anyone know of how I can use text as the submit button?

Thanks for any help
Brandon





<a href="javascript:document.forms[0].submit()">bleh</a>

Or something very similar. See the form.submit() function in your
favorite Javacsript manual. 


> -----Original Message-----
> From: Brandon Orther [mailto:[EMAIL PROTECTED]] 
> Sent: 3 May 2001 18:09
> To: PHP User Group
> Subject: [PHP] Make text a submit button?
> 
> 
> Hello,
> 
> I am currently using image buttons for my submit buttons on a 
> project I am working on.  What I would like to use is regular 
> text like a hyperlink. Does anyone know of how I can use text 
> as the submit button?
> 
> Thanks for any help
> Brandon
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED] To contact the list 
> administrators, e-mail: [EMAIL PROTECTED]
> 
> 





I have been searching for some time now for examples of code that uses =
satellite, but the best I can find is the README and the entries in the =
PHP manual.  Can anyone point me to code that uses satellite that I can =
learn from (or if you have code you don't want to post, feel free to =
send directly)?  I'm new to the specifics of CORBA, so seeing relevant =
PHP code while wading through other CORBA docs would be very helpful.

Thank you for any assistance!

Pete




Hello,

I am using PHP as my main language in my websites. I am planning to set 
up my own server to host all my domains. Is there a place, where I can 
see, how do I set up a server with PHP as the main language and what are 
the hardware/software requirements for this?
All I need is just a url or if anybody already did this, please let me know.

Thanks in advance.





Hi,

have a look at this article:
http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/
it describes the setup of Apache, PHP, SSL and MySQL.

Johannes

"Web master" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I am using PHP as my main language in my websites. I am planning to set
> up my own server to host all my domains. Is there a place, where I can
> see, how do I set up a server with PHP as the main language and what are
> the hardware/software requirements for this?
> All I need is just a url or if anybody already did this, please let me
know.
>
> Thanks in advance.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Web master <[EMAIL PROTECTED]> wrote:

 > Hello,
 > 
 > I am using PHP as my main language in my websites. I am planning to
 > set up my own server to host all my domains. Is there a place, where I
 > can see, how do I set up a server with PHP as the main language and
 > what are the hardware/software requirements for this?
 > All I need is just a url or if anybody already did this, please let me know.

the php manual has a good install guide:

http://www.php.net/manual/en/installation.php

hardware.. depends, apache and php can run ok from 486 and up.

software:
apache as webserver
mysql as database
php as language

-- 
Henrik Hansen






----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 2. 21:34
Subject: [PHP] Strange behaviour of mktime() in objects


> Hi folks,
> I have to make several conversions from / to  timestamp (seconds in the 
> UNIX-Epoche)
> here you see two snippets of my code
> File1 the testfile
> <? /* Testpage for Class timeStuff  named test_sts_timestuff.html */
>     include"sts_timestuff.html";
>     $STST = new timeStuff;
>     $wert="2001_04_20";
>     $STST -> setTimeStamp($wert);
> ?>
> 
> File2 the Classfile
> 
> <? /* Classfile named: sts_timestuff.html */
> class timeStuff
> {
>     var $TS;
>    
>     function setTimeStamp($wert) // $wert="2001_04_20";
>     {
>        (int)$pieces=explode("_",$wert); //even if I use (int) or not no 
> change in output
>        //show the input in pieces
>        for($i=0; $i < count($pieces) ; $i++)
>        {
>           echo "TIMESTAMP[$i] = $pieces[$i]<br>";
>        }
> 
>        $this -> TS = mktime(12,00,00,$pieces[1],$pieces[3],$pieces[0]);
you missed the indexing of the day element,
you'd  better write 2 instead of 3========================^

$this -> TS = mktime(12,00,00,$pieces[1],$pieces[2],$pieces[0]);

>        echo "TIMESTAMP in Object = ".date("H:i:s-Y-m-d",$this -> TS)."<br>";
> 
>     }/* end function */
> }/* end class */
> ?>
> 
> The output is :
> TIMESTAMP[0] = 2001
> TIMESTAMP[1] = 04
> TIMESTAMP[2] = 20
> TIMESTAMP in Object = 13:00:00-2001-03-31
> As you can see, the output of the pieces is correct, but the reassembling 
> to a date
> gives a wrong date and time, (I would understand, if time is incorrect, but 
> the date
> is absolutely out of tune)
> Any ideas what this could be??
> Thanks in advance Oliver
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





Just out of curiosity, what problems did
you have ?

Jerry Lake            - [EMAIL PROTECTED]
Interface Engineering Technician
Europa Communications - http://www.europa.com
Pacifier Online     - http://www.pacifier.com


-----Original Message-----
From: Chris Schneck [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 5:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] apache toolbox


This might be a useful link for some people who are having problems with the
combination of apache + ssl / php / mysql. I've used it and I had a couple
problems, but after I actually read the README, everything was smooth :)

www.apachetoolbox.com


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






Hello,

I am making a suite of php tolls that I want to have all incorporated in one
management website.  What I would like to have is a drop down menu in a
frame on the left.  A great example of what I want is the left drop down
menu on the new Cobalt XTR server admin section.  If anyone has a JavaScript
or a tutorial how to make a drop down menu please send me a link.

Thank you :)

Brandon





In a message dated 03/05/2001 18:07:18 GMT Daylight Time, 
[EMAIL PROTECTED] writes:

<< Hello,
 
 I am making a suite of php tolls that I want to have all incorporated in one
 management website.  What I would like to have is a drop down menu in a
 frame on the left.  A great example of what I want is the left drop down
 menu on the new Cobalt XTR server admin section.  If anyone has a JavaScript
 or a tutorial how to make a drop down menu please send me a link.
 
 Thank you :)
 
 Brandon >>

Hi not sure if this is exactly what your after but it may do the trick :-) It 
isn`t perfect coding but it does work so you should be able to model it to 
what you want.

<?
if ($loadpage==request_for_quote)
{
$FormType ="forms/request_for_quote.php3";
}elseif ($loadpage==general_enquiry)
{
$FormType ="forms/general_enquiry.php3";
}elseif ($loadpage==ask_a_question)
{
$FormType="forms/ask_a_question.php3";
}elseif (!$loadpage)
{
$loadpage="request_for_quote";
$FormType="forms/request_for_quote.php3";
}
?>

<SCRIPT LANGUAGE="JavaScript">
<!--
function displaypage() {
document.forms[0].submit();
}
-->
</SCRIPT>

<SELECT NAME="loadpage" onChange="displaypage()">
<OPTION VALUE="request_for_quote">Request for Quote</OPTION>
<OPTION VALUE="ask_a_question">Ask A Question</OPTION></SELECT>




I've an installation of PHP4pl1 running under Apache 1.3.19. Without output
buffering enabled, the error logging is fine (going to Apache's error_log as
expected) The problem is that when I turn on output buffering (to enable me
to send cookies when I feel like it ;) the error logging stops being
useful --- instead of handy error messages, I get a dump of the page in
which the error occured. Not good.

Does anyone have any suggestions about why this is happening, and how to get
useful error logging with output buffering enabled?

A reply off list (as well as to the group) would be wonderful since I don't
normally have usenet access.

TIA,

Simon Stewart






ok here is the problem.. im trying to create a php script that parses some
info throws it into a database.. simple enough.
now the program im getting the info from stores stuff in a flat file like so

$VictimNumber1 = "nickhere";
$VictimNamenickhere = 2;

now what i want to do is to do something like this
$victimname['$victimenumber1']  so it would return $victimnamenickhere

is this at all possible ??
oh yes if you cant tell already i am a newbie ;D






Reply via email to