php-general Digest 14 Aug 2003 06:08:41 -0000 Issue 2235
Topics (messages 159463 through 159526):
Re: global scope issue
159463 by: Rob Adams
159464 by: Rob Adams
159511 by: Ray Hunter
strtotime()
159465 by: Chris Boget
159468 by: Jennifer Goodie
159473 by: Chris Boget
159478 by: Jennifer Goodie
159481 by: Rob Adams
Re: Parsing problem with character '>'
159466 by: CPT John W. Holmes
Test Please Delete
159467 by: Roger Spears
Commands out of sync; You can't run this command now
159469 by: Boaz Yahav
159471 by: Jennifer Goodie
Validate The Last Day of Month with server's clock????
159470 by: Scott Fletcher
159472 by: Nicholas Robinson
159474 by: Scott Fletcher
159477 by: Mike Migurski
159479 by: Scott Fletcher
159480 by: CPT John W. Holmes
159485 by: Scott Fletcher
Background process
159475 by: Jackson Miller
159476 by: Chris W. Parker
159526 by: Nicholas Robinson
cookies and redirection
159482 by: Joaco
159483 by: Chris Boget
159484 by: Chris Shiflett
159486 by: Chris Boget
159488 by: Chris Shiflett
cookie not setting in IE
159487 by: Chris W. Parker
159489 by: Chris Shiflett
159490 by: Chris W. Parker
159491 by: Chris W. Parker
Re: fsockopen/ssl
159492 by: Wendy Reetz
UPS Address Validation PHP Class
159493 by: Richard Baskett
159506 by: Manuel Lemos
159508 by: Richard Baskett
OPINIONS wanted - xml-DOM-xsl + php
159494 by: Thomas Hochstetter
159514 by: Analysis & Solutions
159520 by: jabber.raditha.com
install problem with 4.3.2
159495 by: Boulytchev, Vasiliy
PHP- accessing session var
159496 by: Mignon Hunter
159497 by: Chris Shiflett
159500 by: Michael A Smith
Re: Server-side script identified as IE
159498 by: Vchat20
Object method overloading
159499 by: Dan Phiffer
159503 by: daniel.electroteque.org
159504 by: Dan Phiffer
PHP - MySQL Query...
159501 by: Steven Kallstrom
159502 by: Michael A Smith
Re: Cannot add header information - headers already sent
159505 by: Justin French
Large PHP Project... Need Project Manager
159507 by: Michael A Smith
project management php system
159509 by: daniel.electroteque.org
Re: Config files
159510 by: Ray Hunter
Re: counting files, choosing at random
159512 by: Peng Cheng
php conditional loop question
159513 by: Randy L Johnson Jr
159515 by: Analysis & Solutions
159516 by: Randy L Johnson Jr
159517 by: Curt Zirzow
159518 by: Curt Zirzow
159519 by: Randy L Johnson Jr
error problem
159521 by: Kris Reid
159522 by: Kris Reid
159523 by: Randy L Johnson Jr
Clone of Hotmail,yahoo
159524 by: Balaji Nallathambi
159525 by: murugesan
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
"Shawn McKenzie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm having problems using global vars. I have read the docs and all of
the
> notes but it's not helping. Simplified example:
Simplified? So maybe what you're giving us doesn't include the problem?
The scripts below work for me.
>
> /dir1/script2.php
> <?php
> $test = array ( 'a' => '1', 'b' => '2');
> ?>
>
> /dir1/script1.php
> <?php
> include("/dir1/script2.php");
> print_r($test); //works great
> print_r($GLOBALS['test']); //does not work
> ?>
>
When I've had similar problems it has almost always been because I'm trying
to access the variable inside a function without declaring it as global.
> This is a local include so the vars should be in the global scope right?
> Any help please?
>
> TIA
> -Shawn
>
>
>
>
--- End Message ---
--- Begin Message ---
Don't you just hate it when the thread your replying to has gone on to some
other thread that you didn't notice?
-- Rob
"Rob Adams" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Shawn McKenzie" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I'm having problems using global vars. I have read the docs and all of
> the
> > notes but it's not helping. Simplified example:
>
> Simplified? So maybe what you're giving us doesn't include the problem?
> The scripts below work for me.
>
> >
> > /dir1/script2.php
> > <?php
> > $test = array ( 'a' => '1', 'b' => '2');
> > ?>
> >
> > /dir1/script1.php
> > <?php
> > include("/dir1/script2.php");
> > print_r($test); //works great
> > print_r($GLOBALS['test']); //does not work
> > ?>
> >
>
> When I've had similar problems it has almost always been because I'm
trying
> to access the variable inside a function without declaring it as global.
>
> > This is a local include so the vars should be in the global scope right?
> > Any help please?
> >
> > TIA
> > -Shawn
> >
> >
> >
> >
>
>
--- End Message ---
--- Begin Message ---
> /dir1/script1.php
> <?php
> include("/dir1/script2.php");
> print_r($test); //works great
> print_r($GLOBALS['test']); //does not work
> ?>
Works fine for me when I have the include as
include( 'script2.php' );
Make sure that the include is correct...I figure that you dont have dir1
off of the root directory.
--
BigDog
--- End Message ---
--- Begin Message ---
I'm curious why this function uses a static value of 30
days to represent a month. If I do:
strtotime( '+1 month', mktime( 0, 0, 0, 1, 1, 2003 ));
I get back the timestamp for 1/31/2003 and not 2/1/2003.
30 days != 1 month necessarily and I'm curious why it
does in strtotime();.
Chris
--- End Message ---
--- Begin Message ---
> strtotime( '+1 month', mktime( 0, 0, 0, 1, 1, 2003 ));
>
> I get back the timestamp for 1/31/2003 and not 2/1/2003.
>
Are you sure?
I tried it on my system (php 4.2.3 freeBSD 4.6.2) and this is the output I
got...
# php
<?php
echo date("Y-m-d", mktime( 0, 0, 0, 1, 1, 2003 ))."\n";
echo date("Y-m-d",strtotime( '+1 month', mktime( 0, 0, 0, 1, 1,
2003 )))."\n";
?>
X-Powered-By: PHP/4.2.3
Content-type: text/html
2003-01-01
2003-02-01
What are you doing with the timestamp strtotime gives you? Could that be
where the error is?
--- End Message ---
--- Begin Message ---
> > strtotime( '+1 month', mktime( 0, 0, 0, 1, 1, 2003 ));
> > I get back the timestamp for 1/31/2003 and not 2/1/2003.
> Are you sure?
Yeah, but I missed something in my above example. If I did this:
strtotime( '+1 month GMT', mktime( 0, 0, 0, 1, 1, 2003 ));
It came back with 1/31/2003 and not 2/1/2003. Removing the GMT
made it work. Your example works as well. In any case, the whole
reason I'm delving into this is because strtotime() is exhibiting some
odd behavior. Consider the following:
(Note: you can see the values of all the variables in the output below)
echo 'StatementDueDate: ' .
$tmpPremiumArray[($curLayoutArray['Settlement Due Date'])] . ' -- ' .
date( "Y-m-{$settlement_day_due} H:i:s",
$tmpPremiumArray[($curLayoutArray['Settlement Due Date'])] ) .
'<br>';
$tmpSettlementDate = strtotime( '+1 month',
$tmpPremiumArray[($curLayoutArray['Settlement Due Date'])] );
echo "tmpSettlementDate: $tmpSettlementDate -- " .
date( 'Y-m-d H:i:s', $tmpSettlementDate ) . "<br>\n";
Yelds the following output
StatementDueDate: 1053360326 -- 2003-05-20 11:05:26
tmpSettlementDate: 1056038726 -- 2003-06-19 11:05:26
As you can see here, strtotime( '+1 month' ) is adding only 30 days. I
am at a total loss to explain why this is the case, especially in light of
the working example you provided.
Chris
--- End Message ---
--- Begin Message ---
> > > strtotime( '+1 month', mktime( 0, 0, 0, 1, 1, 2003 ));
> > > I get back the timestamp for 1/31/2003 and not 2/1/2003.
> > Are you sure?
>
> Yeah, but I missed something in my above example. If I did this:
>
> strtotime( '+1 month GMT', mktime( 0, 0, 0, 1, 1, 2003 ));
>
> It came back with 1/31/2003 and not 2/1/2003. Removing the GMT
> made it work.
Are you somewhere behind GMT? I get an hour shift when using GMT that puts
me in the previous day. I'm GMT -8. I can't think right now, but for some
reason it seems like it's shifting in the wrong direction or at least the
opposite of what I'd expect. I guess it is subtracting my 8 hours and then
shifting, making it 16:00 of the previous day. It seems like it should add
8 hours since GMT is 8 ahead of me. This is making my head hurt, maybe
someone else can make it make sense.
# php
<?php
$ts = mktime( 0, 0, 0, 1, 1, 2003 );
echo date ("Y-m-d H:i:s",$ts)."\n";
$ts2 = strtotime('+1 month GMT', $ts);
echo date ("Y-m-d H:i:s",$ts2)."\n";
$ts3 = strtotime('+1 month', $ts);
echo date ("Y-m-d H:i:s",$ts3)."\n";
?>
X-Powered-By: PHP/4.2.3
Content-type: text/html
2003-01-01 00:00:00
2003-01-31 16:00:00
2003-02-01 00:00:00
--- End Message ---
--- Begin Message ---
"Jennifer Goodie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > > > strtotime( '+1 month', mktime( 0, 0, 0, 1, 1, 2003 ));
> > > > I get back the timestamp for 1/31/2003 and not 2/1/2003.
> > > Are you sure?
> >
> > Yeah, but I missed something in my above example. If I did this:
> >
> > strtotime( '+1 month GMT', mktime( 0, 0, 0, 1, 1, 2003 ));
> >
> > It came back with 1/31/2003 and not 2/1/2003. Removing the GMT
> > made it work.
>
> Are you somewhere behind GMT? I get an hour shift when using GMT that
puts
> me in the previous day. I'm GMT -8. I can't think right now, but for
some
> reason it seems like it's shifting in the wrong direction or at least the
> opposite of what I'd expect. I guess it is subtracting my 8 hours and
then
> shifting, making it 16:00 of the previous day. It seems like it should
add
> 8 hours since GMT is 8 ahead of me. This is making my head hurt, maybe
> someone else can make it make sense.
>
> # php
> <?php
> $ts = mktime( 0, 0, 0, 1, 1, 2003 );
> echo date ("Y-m-d H:i:s",$ts)."\n";
> $ts2 = strtotime('+1 month GMT', $ts);
> echo date ("Y-m-d H:i:s",$ts2)."\n";
> $ts3 = strtotime('+1 month', $ts);
> echo date ("Y-m-d H:i:s",$ts3)."\n";
> ?>
> X-Powered-By: PHP/4.2.3
> Content-type: text/html
>
> 2003-01-01 00:00:00
> 2003-01-31 16:00:00
> 2003-02-01 00:00:00
>
It is adjusting for your 8 hour differences.
Your server is -8 from GMT.
So when you set it to '+ 1 month GMT' it will set the date to one month from
the given date, but in GMT time. So to convert back from GMT time to your
time, it needs to minus the 8 hours, and you get 4 PM the day before.
-- Rob
--- End Message ---
--- Begin Message ---
From: "FMM Schillemans" <[EMAIL PROTECTED]>
> I've installed a Win32 package with in it Apache, PHP en MySQL version.
>
> the problem is that the moment the '>' character is placed within the PHP
> code (lets say withing a print-command), then the PHP mode is immideatly
> ends. Making it impossible to create HTML code run-time
>
> Do you know what a need to change in the configuration files?
Your server is not parsing PHP files correctly or you are not loading them
into your browser correctly. For example:
<?php
echo "This has a > character in it";
?>
If your server does not process PHP correctly, or you load that file into
your browser using File->Open, you'll see:
character in it";
?>
because HTML will see the <?php as the beginning of a tag (unknown tag,
though) and will end the tag with the > character in your string. If you
view the source of the page, though, you'll see all of your PHP code.
---John Holmes...
--- End Message ---
--- Begin Message ---
test, please delete
--- End Message ---
--- Begin Message ---
Hi
For a few days or maybe even a week or two I'm getting this error
message in my site.
This happens when i do : mysql_select_db()
This doesn't happen all the time and there are pages that it happens
more than others
so it seems.
I looked in the manual and the explanation there doesn't apply to me.
Any ideas?
http://mickey.lcsc.edu/manual.html#Commands_out_of_sync
Sincerely
berber
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
--- End Message ---
--- Begin Message ---
> Hi
>
> For a few days or maybe even a week or two I'm getting this error
> message in my site.
> This happens when i do : mysql_select_db()
>
> This doesn't happen all the time and there are pages that it happens
> more than others
> so it seems.
>
> I looked in the manual and the explanation there doesn't apply to me.
> Any ideas?
>
> http://mickey.lcsc.edu/manual.html#Commands_out_of_sync
>
> Sincerely
>
> berber
1.) This has been asked on the mysql list and the this list a lot of times,
search the archives
http://marc.theaimsgroup.com/?l=mysql&w=2&r=1&s=commands+out+of+sync&q=b or
http://marc.theaimsgroup.com/?l=php-general&w=2&r=1&s=commands+out+of+sync&q
=b . From a brief search it appears it is a known bug in PHP 4.2.3, what
version of PHP are you running?
2.) Are you using mysql 3.22.14-gamma? If not check the current manual at
http://www.mysql.com as I'd imagine a lot has changed since the 3.22.14
gamma manula you are refrencing. If you are using 3.22 you should upgrade
to at least 3.23.55 as there have been huge security patches and I don't
think the 3.22 tree is still supported.
--- End Message ---
--- Begin Message ---
Hi!
Here's a trick script. We know that some months have the last day which
is 30 while other is 31. As for February, it can be either 28 or 29. So,
what's the trick in using the php to find out what is the last day of the
month if you want to checked it against the server's clock to find out the
last day of the month. Suppose it is this month or 3 months ago or 3 months
from now. Anyone know?
Thanks!
--- End Message ---
--- Begin Message ---
The 'usual' trick is to set the date to the first day of the month after the
one you want and then subtract one day.
HTH
Nick
On Wednesday 13 Aug 2003 8:00 pm, Scott Fletcher wrote:
> Hi!
>
> Here's a trick script. We know that some months have the last day
> which is 30 while other is 31. As for February, it can be either 28 or 29.
> So, what's the trick in using the php to find out what is the last day of
> the month if you want to checked it against the server's clock to find out
> the last day of the month. Suppose it is this month or 3 months ago or 3
> months from now. Anyone know?
>
> Thanks!
--- End Message ---
--- Begin Message ---
Alright, interesting thought, never thought it would be possible. So, what
would the PHP script be when matching it against the clock or something?
Perhap mktime(). Anyone know?
Scott F.
"Nicholas Robinson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
The 'usual' trick is to set the date to the first day of the month after the
one you want and then subtract one day.
HTH
Nick
On Wednesday 13 Aug 2003 8:00 pm, Scott Fletcher wrote:
> Hi!
>
> Here's a trick script. We know that some months have the last day
> which is 30 while other is 31. As for February, it can be either 28 or
29.
> So, what's the trick in using the php to find out what is the last day of
> the month if you want to checked it against the server's clock to find out
> the last day of the month. Suppose it is this month or 3 months ago or 3
> months from now. Anyone know?
>
> Thanks!
--- End Message ---
--- Begin Message ---
> Here's a trick script. We know that some months have the last day
>which is 30 while other is 31. As for February, it can be either 28 or
>29. So, what's the trick in using the php to find out what is the last
>day of the month if you want to checked it against the server's clock to
>find out the last day of the month. Suppose it is this month or 3 months
>ago or 3 months from now. Anyone know?
If you're in unix, pull the last token from the default output of `cal`:
August 2003
S M Tu W Th F S
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html
--- End Message ---
--- Begin Message ---
Did a lot of searching on the internet and found a simple PHP code that does
the trick. How the code work is when you pick a month where you want the
last day to be in, then use the next month into the PHP script to get the
last day of the month you're looking for.
--snip--
//Want to see the last day of Febraury (Then insert the next
month to find out).
echo strftime("%d", mktime(0,0,0,3,0,2004));
--snip--
"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Alright, interesting thought, never thought it would be possible. So,
what
> would the PHP script be when matching it against the clock or something?
> Perhap mktime(). Anyone know?
>
> Scott F.
>
> "Nicholas Robinson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> The 'usual' trick is to set the date to the first day of the month after
the
> one you want and then subtract one day.
>
> HTH
>
> Nick
>
> On Wednesday 13 Aug 2003 8:00 pm, Scott Fletcher wrote:
> > Hi!
> >
> > Here's a trick script. We know that some months have the last day
> > which is 30 while other is 31. As for February, it can be either 28 or
> 29.
> > So, what's the trick in using the php to find out what is the last day
of
> > the month if you want to checked it against the server's clock to find
out
> > the last day of the month. Suppose it is this month or 3 months ago or
3
> > months from now. Anyone know?
> >
> > Thanks!
>
>
--- End Message ---
--- Begin Message ---
From: "Nicholas Robinson" <[EMAIL PROTECTED]>
> The 'usual' trick is to set the date to the first day of the month after
the
> one you want and then subtract one day.
Along those same lines, this works:
<?php
$month = 12;
$year = 2003;
$last_day_of_month = mktime(12,0,0,$month+1,0,$year);
echo date('m/d/Y',$last_day_of_month);
?>
---John Holmes...
--- End Message ---
--- Begin Message ---
Ah! that seem nicer when just using the script ($month+1)...
"Cpt John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> From: "Nicholas Robinson" <[EMAIL PROTECTED]>
>
> > The 'usual' trick is to set the date to the first day of the month after
> the
> > one you want and then subtract one day.
>
> Along those same lines, this works:
>
>
> <?php
>
> $month = 12;
> $year = 2003;
>
> $last_day_of_month = mktime(12,0,0,$month+1,0,$year);
>
> echo date('m/d/Y',$last_day_of_month);
>
> ?>
>
> ---John Holmes...
>
--- End Message ---
--- Begin Message ---
I have a script that starts a background process and redirects. The
background process is a PHP script that is started with an exec() call.
The problem is that it is taking a while for the background process to start.
The redirect starts working in the browser, but doesn't seem to go until the
process starts.
Is there a faster way to start a background process?
-Jackson
--
jackson miller
cold feet creative
615.321.3300 / 800.595.4401
[EMAIL PROTECTED]
cold feet presents Emma
the world's easiest email marketing
Learn more @ http://www.myemma.com
--- End Message ---
--- Begin Message ---
Jackson Miller <mailto:[EMAIL PROTECTED]>
on Wednesday, August 13, 2003 12:21 PM said:
> Is there a faster way to start a background process?
Maybe you can pause your script somehow before you execute the redirect?
Also, are you sure that it's not redirecting until the script starts?
Maybe it's actually not redirecting until after the script has finished?
Chris.
--- End Message ---
--- Begin Message ---
Are you sending a <HTML></HTML> after the re-direct to ensure your browser
loads the page as soon as possible rather than delaying? If not, this could
appear that it isn't re-directing until the script starts.
On Wednesday 13 Aug 2003 8:21 pm, Jackson Miller wrote:
> I have a script that starts a background process and redirects. The
> background process is a PHP script that is started with an exec() call.
>
> The problem is that it is taking a while for the background process to
> start. The redirect starts working in the browser, but doesn't seem to go
> until the process starts.
>
> Is there a faster way to start a background process?
>
> -Jackson
--- End Message ---
--- Begin Message ---
I have a small problem was wondering if anyone out there knew anyhting about
this. I set a cookie in my code and then redirect the user using a header
function. When I do this, my cookie is not created. If i remove the header
function, then it is. Is there a way around this?
--- End Message ---
--- Begin Message ---
> I have a small problem was wondering if anyone out there knew anyhting about
> this. I set a cookie in my code and then redirect the user using a header
> function. When I do this, my cookie is not created. If i remove the header
> function, then it is. Is there a way around this?
Yeah, set the cookie as normal using the header() function (or however you are
doing it) then use the following HTML:
<head>
<META http-equiv="REFRESH" content="0; URL=$redirectPage">
</head>
Chris
--- End Message ---
--- Begin Message ---
--- Joaco <[EMAIL PROTECTED]> wrote:
> I set a cookie in my code and then redirect the user using a
> header function. When I do this, my cookie is not created. If i
> remove the header function, then it is. Is there a way around
> this?
If you are using IIS, read this:
http://marc.theaimsgroup.com/?l=php-general&m=102929828515647&w=2
If you are not, please post your code, because it should work fine.
Hope that helps.
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
--- End Message ---
--- Begin Message ---
> --- Joaco <[EMAIL PROTECTED]> wrote:
> > I set a cookie in my code and then redirect the user using a
> > header function. When I do this, my cookie is not created. If i
> > remove the header function, then it is. Is there a way around
> > this?
> If you are using IIS, read this:
> http://marc.theaimsgroup.com/?l=php-general&m=102929828515647&w=2
> If you are not, please post your code, because it should work fine.
You can't use any functions that send headers to the browser (and
that includes setcookie()) before you use:
header( 'location: http://blah' );
The browser will choke.
Chris
--- End Message ---
--- Begin Message ---
--- Chris Boget <[EMAIL PROTECTED]> wrote:
> You can't use any functions that send headers to the browser (and
> that includes setcookie()) before you use:
>
> header( 'location: http://blah' );
>
> The browser will choke.
I'm not sure what gave you this idea, but this is false. What browser were you
using that "choked", and what does that mean exactly?
Use this sample code:
header('Foo: Bar');
header('Location: http://www.google.com/');
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
--- End Message ---
--- Begin Message ---
Hello,
I'm just testing out some cookie stuff right now and I've created a VERY
basic cookie setting and reading page.
It works in Mozilla Firebird and it even works in a friends IE. For some
reason my computer won't accept the cookie.
Anyone have any ideas?
Chris.
p.s. Both computers are using win2k ie 6 sp1.
--- End Message ---
--- Begin Message ---
--- "Chris W. Parker" <[EMAIL PROTECTED]> wrote:
> It works in Mozilla Firebird and it even works in a friends IE.
> For some reason my computer won't accept the cookie.
Can you show us the HTTP transaction using ethereal or something?
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
--- End Message ---
--- Begin Message ---
Chris Shiflett <mailto:[EMAIL PROTECTED]>
on Wednesday, August 13, 2003 1:33 PM said:
>> It works in Mozilla Firebird and it even works in a friends IE.
>> For some reason my computer won't accept the cookie.
>
> Can you show us the HTTP transaction using ethereal or something?
Unfortunately, no. Don't have that installed and don't know how to use
it.
Chris.
--- End Message ---
--- Begin Message ---
Michael A Smith <mailto:[EMAIL PROTECTED]>
on Wednesday, August 13, 2003 1:36 PM said:
> In the status bar, at the bottom, are you getting a little red eye or
> something of the sort?
> If you are IE is blocking the cookie for you.
Gosh don't I sound like a moron (I'm not I promise!!!). Sure enough that
was the problem.
I removed the ip address and the domain of the website from the privacy
section in IE with the idea that IE would ASK ME FIRST before it
defaulted to either accepting or rejecting the cookie. For some reason
it defaulted to rejecting it because I never got the cookie popup.
Thanks for forcing my eyes to notice the icon!
Chris.
--- End Message ---
--- Begin Message ---
AHAH! Thank you for your help. You mentioned that the private key was missing. I
didn't realize I was generating a private key! (ok, I'm not new to php, but definitely
new to the whole system configuration, apache, ssl side of things). So, in looking
into that I found that I hadn't restarted apache in ssl mode, when I tried I found
that failed with the same error. added some missing directives to the conf file & it
started right up & is working great!
Thank you for the point in the right direction!
Wendy
"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Try "https://" instead of "ssl://", this is what is normally done.
>
> As for your problem. It look like the private key when generated was too
> short, this can be overcomed by entering more characters at the time of the
> generation of hte key. But from your comments, you mentioned that from the
> article at OpenSSL that it either not exist or is too short and that you
> mentioned that you have both. So, if this is the case, then it seem that it
> had nothing to do with being too short. Just that there is no key, so that
> in turn is too short because it isn't there.
>
> I don't have an idea of what is going on.
>
> "Wendy Reetz" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> Using php 4.3.2, apache 1.3.27, openssl .9.7b
>
> I'm trying to open a secure connection using fsockopen("ssl://"...,443...)
> as described in http://us4.php.net/manual/en/function.fsockopen.php.
>
> I keep getting an error: PRNG not seeded.
> OpenSSL says http://www.openssl.org/support/faq.html#USER1 says:
> If the default seeding file [/dev/random or /dev/urandom] does not exist or
> is too short, the "PRNG not seeded" error message may occur.
> Now, both of these exist, but I'm not sure how to tell if they are too
> short...
>
> has anyone used fsockopen("ssl://"...) successfully? I've read through the
> php site, apache, and openssl...but I'm not finding a solution. Is there
> something that may have been overlooked when the 3 were compiled? Do you
> need to create a certificate?
>
> The answer may be staring me right in the face & I'm just not seeing it.Any
> point in the right direction would be appreciated.
>
> Thanks,
>
> Wendy
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Do any of you know of a PHP Class that will interact with the UPS address
validation routine? I am completely confused when it comes to UPS and how
they integrate things.. and have been saved by someone's UPS Rate Class, but
now I need an Address Validator.
Please please please help!
Thanks!
Rick
"The greater danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it." - Michelangelo
--- End Message ---
--- Begin Message ---
Hello,
On 08/13/2003 06:35 PM, Richard Baskett wrote:
Do any of you know of a PHP Class that will interact with the UPS address
validation routine? I am completely confused when it comes to UPS and how
they integrate things.. and have been saved by someone's UPS Rate Class, but
now I need an Address Validator.
Doesn't this class do what you want?
Class: ShipTrack
http://www.phpclasses.org/shiptrack
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--- End Message ---
--- Begin Message ---
No actually what that does is track a shipment. When what I was doing was
needing to do an address validation, to make sure that the City, State, Zip
code that was entered was correct. UPS has that as part of their XML tools,
but alas.. I am not very versed on XML and php. I did know enough though to
get a UPS Rate class to work with Address Validation so I don't need a class
now, but wouldnąt mind seeing if there was something better out there then
my hack :)
Cheers!
Rick
Once my heart was captured, reason was shown the door, deliberately and with
a sort of frantic joy. I accepted everything, I believed everything, without
struggle, without suffering, without regret, without false shame. How can
one blush for what one adores? - George Sand
> From: Manuel Lemos <[EMAIL PROTECTED]>
> Date: Wed, 13 Aug 2003 21:41:13 -0300
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: UPS Address Validation PHP Class
>
> Hello,
>
> On 08/13/2003 06:35 PM, Richard Baskett wrote:
>> Do any of you know of a PHP Class that will interact with the UPS address
>> validation routine? I am completely confused when it comes to UPS and how
>> they integrate things.. and have been saved by someone's UPS Rate Class, but
>> now I need an Address Validator.
>
> Doesn't this class do what you want?
>
> Class: ShipTrack
> http://www.phpclasses.org/shiptrack
>
>
> --
>
> Regards,
> Manuel Lemos
>
> Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hey guys.
There is question that has been bothering me for a while now ... and i
wonder whether there are any takes/ insights on that.
I would really like to integrate xml, DOM and XSL more in my projects. What
has kept me from doing this, so far, is just that the live servers often did
not make the dom and xsl functions available (i.e did not include the libxml
etc with php).
I guess many server admins just don't bother about that and because it is
not part of the standard php install (unlike xml functionality) it remains
unsupported.
Are there plans to make the xml-DOM-xsl combination standard in future
releases of php (version 5)? The .dlls are there.
In terms of creating generic and flexible systems it would make sense to
make these part of the standard setup, just because it is possible to move the
system now to any server without having to bother the poor Admins.
I must appologize if i have not spend too much time online to find out
myself now ... don't have the luxuary of going online for long (still a student -
no money and torterously slow connections). I hope that someone can enlighten
me, otherwise, it will spark a discussion about that (i hope that this is
also aprt of a list - don't want to rekindle any more discussions about the
(mis)use of this exellent mailing list.
Thanks.
Thomas
--
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post
--- End Message ---
--- Begin Message ---
On Wed, Aug 13, 2003 at 11:44:18PM +0200, Thomas Hochstetter wrote:
>
> Are there plans to make the xml-DOM-xsl combination standard in future
> releases of php (version 5)? The .dlls are there.
A person involved with the development recently said that in PHP 5
"The DOM, SAX, XPath, Schema and any other extensions that can work with
standard libxml2 will be enabled by default, and stable."
Enjoy,
--Dan
--
FREE scripts that make web and database programming easier
http://www.analysisandsolutions.com/software/
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--- End Message ---
--- Begin Message ---
Hello,
The reluctance to install DOM and XSL might be due to the fact that they
tend to use a little bit more of processor and memory than other
modules. But then again you can say the same about a join on a really
big mysql table. :-)
SAX on the other hand tends to be leaner and meaner so you do find that
SAX is included by default on most 4.xx installs. Finaly fact
installing PHP with XSL support tends to be a wee bit complicated as
well, so i guess most admins keep away from it.
Thomas Hochstetter wrote:
Hey guys.
There is question that has been bothering me for a while now ... and i
wonder whether there are any takes/ insights on that.
I would really like to integrate xml, DOM and XSL more in my projects. What
has kept me from doing this, so far, is just that the live servers often did
not make the dom and xsl functions available (i.e did not include the libxml
etc with php).
I guess many server admins just don't bother about that and because it is
not part of the standard php install (unlike xml functionality) it remains
unsupported.
Are there plans to make the xml-DOM-xsl combination standard in future
releases of php (version 5)? The .dlls are there.
In terms of creating generic and flexible systems it would make sense to
make these part of the standard setup, just because it is possible to move the
system now to any server without having to bother the poor Admins.
I must appologize if i have not spend too much time online to find out
myself now ... don't have the luxuary of going online for long (still a student -
no money and torterously slow connections). I hope that someone can enlighten
me, otherwise, it will spark a discussion about that (i hope that this is
also aprt of a list - don't want to rekindle any more discussions about the
(mis)use of this exellent mailing list.
Thanks.
Thomas
--
Raditha Dissanayake
-------------------------------------------------------------
http://www.radinks.com/sftp/
Lean and mean Secure FTP applet with Graphical User Inteface.
just 150 Kilo Bytes
--- End Message ---
--- Begin Message ---
Ladies and Gents,
I am having the same problem as reported here,
http://www.phpbuilder.com/mail/php-install/2003061/0025.php
gd -lz -lresolv -lm -ldl -lnsl -lcrypt -lcrypt -o sapi/cli/php
ext/gd/gd.lo: In function `zm_deactivate_gd':
/usr/src/php/ext/gd/gd.c:382: undefined reference to `gdFreeFontCache'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
[EMAIL PROTECTED] php]# vi conf.sh
./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--prefix=/usr/local/apache/php \
--with-config-file-path=/usr/local/apache/php \
--enable-track-vars \
--enable-force-cgi-redirect \
--enable-cgi \
--with-zlib \
--enable-magic-quotes \
--with-gd=../gd \
--with-cybercash=/usr/src/php/ext/cybercash
PLEASE HELP!
Vasiliy Boulytchev
Colorado Information Technologies Inc.
(719) 473-2800 x15
<http://coinfotech.com/>
--- End Message ---
--- Begin Message ---
Hi
This will be real simple for you guys. When I print_r my session vars
part of what get is:
[_SESSION] => Array
(
[cart] => shoppingcart Object
(
[contents] => Array
(
[37] => Array
(
[qty] => 1
)
)
[total] => 70
[weight] => 0
[cartID] =>
[content_type] => physical
)
SO I'm trying to capture the total(70). I'm trying
$_SESSION['cart']['total']
But I'm not getting it. This is a multidimensional array isnt it ?
--
Thx
Mignon
--- End Message ---
--- Begin Message ---
--- Mignon Hunter <[EMAIL PROTECTED]> wrote:
> When I print_r my session vars> part of what get is:
Do this:
print_r($_SESSION);
Show us what that outputs.
Your output seemed to infer that you are doing something else when you "print_r
your session vars", as _SESSION was listed as a key within another array. I'm
not sure what you're doing there.
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
--- End Message ---
--- Begin Message ---
That's what he was doing and he gave us the output. You can have an
object stored in $_SESSION as long as the class and object were defined
_before_ you stared the session.
You would therefore access it like this:
$some_var = $_SESSION['object_name']->varname;
Cheers!
-Michael
Chris Shiflett wrote:
--- Mignon Hunter <[EMAIL PROTECTED]> wrote:
When I print_r my session vars> part of what get is:
Do this:
print_r($_SESSION);
Show us what that outputs.
Your output seemed to infer that you are doing something else when you "print_r
your session vars", as _SESSION was listed as a key within another array. I'm
not sure what you're doing there.
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
--- End Message ---
--- Begin Message ---
you dont have to be so rude about it. if you dont believe me check out both
sites. mine and the one I want to pull news from.
mine: www.pokeradio.com
other site: http://pio.dalegend.com/
do some research and youll find that im legit.
"Joel Rees" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> (Quoting fixed)
>
> "Vchat20" <[EMAIL PROTECTED]> said
> > "Roger B.A. Klorese" <[EMAIL PROTECTED]> wrote in message
> >
news:[EMAIL PROTECTED]
> > > > umm. yes. I know that. the problem is the 1 site I want to pull news
> > > from
> > > > has a robots.txt file which is preventing the script from working
and
> > > I
> > > > wanna get past that.
> > >
> > > Umm, yes, they put that there because they don't want you to, didn't
> > > they?
> >
> > I asked the owner and he says its ok if I do this as our sites are
> > affiliated with each other. but he cannot remove the file due to
hackers.
>
> Yeah, that's what they all say. ;-/
>
> I think most of the people who know how aren't interested in taking the
> risk of helping yet another mail address harvester. If you're legit,
> please take the time to learn to do it right.
>
> Doing it right involves teaching your buddy how to publish an interface
> to the parts of his site that he is willing to share, etc.
>
> If you're not legit, find something more constructive to do with your
> time.
>
> --
> Joel Rees, programmer, Systems Group
> Altech Corporation (Alpsgiken), Osaka, Japan
> http://www.alpsgiken.co.jp
>
--- End Message ---
--- Begin Message ---
Hello,
I realize this stuff isn't set in stone yet, but might I eventually expect
the following to make two assignments rather than one?
<?php
class overload_test
{
function __set($name, $value) {
echo "__set($name, $value)\n";
$this->$name = $value;
return true;
}
}
overload('overload_test');
$t = new overload_test;
$t->a = 'Foo';
$t->b[0] = 'Bar';
print_r($t);
?>
Output:
__set(a, Foo)
overload_test Object
(
[a] => Foo
)
Thanks,
-Dan
--- End Message ---
--- Begin Message ---
What is the point of overloading an object again?
> Hello,
>
> I realize this stuff isn't set in stone yet, but might I eventually
> expect the following to make two assignments rather than one?
>
> <?php
>
> class overload_test
> {
> function __set($name, $value) {
> echo "__set($name, $value)\n";
> $this->$name = $value;
> return true;
> }
> }
>
> overload('overload_test');
>
> $t = new overload_test;
> $t->a = 'Foo';
> $t->b[0] = 'Bar';
> print_r($t);
>
> ?>
>
> Output:
> __set(a, Foo)
> overload_test Object
> (
> [a] => Foo
> )
>
> Thanks,
> -Dan
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Well, for instance, you could have the __get and __set functions execute a
SQL query or go to a file or whatever. The point, as it seems to me anyway,
is to enable a potentially complex internal implementation be exposed with a
simple interface. Now as for the implications of that, it's debatable. If
nobody is ever going to look at or reuse your code, it's arguable such a
feature merits a second glance. Personally, I appreciate these kinds of
language features, but perhaps that's because I learned most of what I know
about programming in C++.
Thanks,
-Dan
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What is the point of overloading an object again?
>
> > Hello,
> >
> > I realize this stuff isn't set in stone yet, but might I eventually
> > expect the following to make two assignments rather than one?
> >
> > <?php
> >
> > class overload_test
> > {
> > function __set($name, $value) {
> > echo "__set($name, $value)\n";
> > $this->$name = $value;
> > return true;
> > }
> > }
> >
> > overload('overload_test');
> >
> > $t = new overload_test;
> > $t->a = 'Foo';
> > $t->b[0] = 'Bar';
> > print_r($t);
> >
> > ?>
> >
> > Output:
> > __set(a, Foo)
> > overload_test Object
> > (
> > [a] => Foo
> > )
> >
> > Thanks,
> > -Dan
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
Hello all...
I'm embarrassed by this one... I think it should work but it isn't...
$dbh = mysql_connect("localhost", "login", "password") or
die('cannot connect to the database because: ' . mysql_error());
mysql_select_db("database");
$query = 'SELECT * FROM cities';
$result = mysql_query($query);
while ($row = mysql_fetch_row($result)) {
echo ('<tr> <td class="city">' . $row[0] . ', ' . $row[1] . '</td>
<td>' . $row[2] . '</td> <td>' . $row[3] . "</td> </tr>\n"); }
getting this error:
*Warning*: mysql_fetch_row(): supplied argument is not a valid MySQL
result resource in...
so... is the problem with the $query?
I don't see anything wrong (assuming my login and database selection is
correct)
what are the common errors here?
Thanks,
SJK
**
--- End Message ---
--- Begin Message ---
Steven Kallstrom wrote:
Hello all...
I'm embarrassed by this one... I think it should work but it isn't...
$dbh = mysql_connect("localhost", "login", "password") or
die('cannot connect to the database because: ' . mysql_error());
mysql_select_db("database");
$query = 'SELECT * FROM cities';
$result = mysql_query($query);
Try this instead;
$result = mysql_query($query) or die("Query died: " . mysql_error());
Cheers!
-Michael
while ($row = mysql_fetch_row($result)) {
echo ('<tr> <td class="city">' . $row[0] . ', ' . $row[1] . '</td>
<td>' . $row[2] . '</td> <td>' . $row[3] . "</td> </tr>\n"); }
getting this error:
*Warning*: mysql_fetch_row(): supplied argument is not a valid MySQL
result resource in...
so... is the problem with the $query?
I don't see anything wrong (assuming my login and database selection
is correct)
what are the common errors here?
Thanks,
SJK
**
--- End Message ---
--- Begin Message ---
To be more descriptive than Marek, some text (in this case the TITLE)
has been sent to the browser around line 95 of header_aurelis.php. The
reason you are getting this warning is because PHP is trying to send a
header (redirect in this case) to the browser, but it cannot, because
the output has already started.
Clean up header_aurelis.php and make sure there's no browser output
before the redirect.
Yes, this means you might have to re-structure your script, or as a
last result, you may consider using the OB (out buffering) functions.
Justin
On Wednesday, August 13, 2003, at 06:52 PM, frederik feys wrote:
What do you mean by "says it all"? On that line the page title is
outputted.
I suspect something is wrong with the handler file:
http://www.aurelis.org/store/checkout_form_handler.txt
When i call http://www.aurelis.org/store/checkout_form.txt
for step 1 (i.e. client personal register form) checkout_form gives no
"
headers already sent". When the client proceeds to step 2 (i.e. an
overview of purchase) the checkout_form_handler file is called.
This does some calculations, etc.. and then redirects user to proper
page using an header(location:) call.
I suspect this step gives the "header already sent".
-----Original Message-----
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
Sent: dinsdag 12 augustus 2003 12:15
To: frederik feys
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Cannot add header information - headers already sent
output started at
/usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95
says it all. Look into the file at line 95.
--- End Message ---
--- Begin Message ---
Hey,
I've got a nice CMS (in quite stable 2.0 form) that I need a Project
Manager who can just deal with some bugs/answer questions for the next 9
months while I'm away at school... anyone interested? It would simply
mean watching bug reports on SourceForge and answering things. Also, if
you would compile a list of feature requests that people seem to want
I'll work on them next summer. You can (starting next summer) remain as
a developer, or just hand the project over to me.
The project is: http://prattcms.sourceforge.net/, which isn't really
updated for version 2.0 yet. It's licensed under the GPL.
-Michael
--- End Message ---
--- Begin Message ---
Hi guys ok i am doing it now, but i'm not asking for you to code something
for me, i'm looking for a classy project management system possibly in an
open source format in PHP and Mysql.
I was wondering who has implemented such a system they could recommend, i
am investigation to look into customising an already developed system or we
have to develop one from scratch to suit our needs.
Let me know.
Thanks
Dan
--- End Message ---
--- Begin Message ---
I tend do do something similar here:
I usually set up my arrays and then access them later using the GLOBALS
superglobal array. For some projects I tend to use multidimensional
arrays because I can do something like.
$config['db']['name'] = 'something';
$config['db']['user'] = 'someone';
$config['db']['pass'] = 'password';
...
This can sometimes be an over kill, however that could work for you.
--
BigDog
On Wed, 2003-08-13 at 08:19, CPT John W. Holmes wrote:
> From: "Hardik Doshi" <[EMAIL PROTECTED]>
> > I have following options for working with the
> > configuration files with the relatively large web
> > application.
> >
> > 1. Configuration variables using the DEFINE.
> >
> > 2. Array - Each configuration variable as an array
> > element.
> >
> > 3. PHP.INI like config files.
>
> A combination of #3 and #2. Store the data in a php.ini-style config file
> and use parse_ini_file() to read it into an array.
>
> You could even merge the array into the $_SERVER (or any other superglobal)
> array so that your config vars are available in functions without having to
> make anything global.
>
> ---John Holmes...
>
--- End Message ---
--- Begin Message ---
i think the problem is there is a newline between
the
"<img src="/szukaj/images/i" and
"<? ".
try write them in the same line may be a solution.
"Adam I Agnieszka Gasiorowski Fnord" <[EMAIL PROTECTED]>
??????:[EMAIL PROTECTED]
>
> I want to choose a file at random from a
> directory which adheres to certain naming scheme.
> I can't get it to work. It's probably something
> simple...Here is a relevant snippet:
>
> <img src="/szukaj/images/i
> <?
> chdir('./szukaj/images/');
> echo mt_rand(0, count(glob('i*.gif', GLOB_NOSORT)) - 1);
> ?>
> .gif" width="120" height="151" alt=""
> title="PropaGanda" border="0" />
>
> (the files are all called i??.gif and
> located in a directory /images/, which is a
> subdirectory of directory where the script
> is located (/szukaj/)).
>
> Can you help?
>
> --
> Seks, seksić, seksolatki... news:pl.soc.seks.moderowana
> http://hyperreal.info / ALinkA / bOrk! * WiNoNa ) (
> http://szatanowskie-ladacznice.0-700.pl foReVeR( * )
> Poznaj jej zwiewne kształty... http://www.opera.com 007
>
--- End Message ---
--- Begin Message ---
ok. This is probably simple but I am not thinking straight. Here is what
I want to do
I have a function that makes a connection to a live datafeed website and
downloads data via a pfsockopen() statement. After awhile the data stops
feeding but the connection stays open. when the data stops I want to exit
out of the function and have the function run again
basically i don't know how to exit out of the function and have the program
run the function again
I have the program downloading the data and all that so I don't need help
with that. I just want to be able to reun the function if the data stops
or in more general a certain condition is met.
any ideas and comments would be greatly appreciated.
Randy
--- End Message ---
--- Begin Message ---
On Wed, Aug 13, 2003 at 09:51:39PM -0400, Randy L Johnson Jr wrote:
>
> I have a function that makes a connection to a live datafeed website and
> downloads data via a pfsockopen() statement. After awhile the data stops
> feeding but the connection stays open. when the data stops I want to exit
> out of the function and have the function run again
Pseudo code...
while (1) {
pfsockopen(... blah blah ...);
while (not end of file) {
get the line and do what you want with it...
}
}
--Dan
--
FREE scripts that make web and database programming easier
http://www.analysisandsolutions.com/software/
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--- End Message ---
--- Begin Message ---
I have done this but it does not seem to ever get to the end of file, I have it inserting the values into the database, it goes for awhile around 12 to 24 hours and then stops inserting the values into the database and I have to restart the script...
Randy
-------Original Message-------
Date: Wednesday, August 13, 2003 10:02:15 PM
Subject: Re: [PHP] php conditional loop question
On Wed, Aug 13, 2003 at 09:51:39PM -0400, Randy L Johnson Jr wrote:
>
> I have a function that makes a connection to a live datafeed website and
> downloads data via a pfsockopen() statement. After awhile the data stops
> feeding but the connection stays open. when the data stops I want to exit
> out of the function and have the function run again
Pseudo code...
while (1) {
pfsockopen(... blah blah ...);
while (not end of file) {
get the line and do what you want with it...
}
}
--Dan
--
FREE scripts that make web and database programming easier
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--
. |
____________________________________________________
IncrediMail - Email has finally evolved - Click Here |
--- End Message ---
--- Begin Message ---
* Thus wrote Randy L Johnson Jr ([EMAIL PROTECTED]):
>
> I have the program downloading the data and all that so I don't need help
> with that. I just want to be able to reun the function if the data stops
> or in more general a certain condition is met.
I'm not entirely sure how you are reading the data in from the
socket but your condition is when there is no data that came back
from the socket.
This function might be usefull:
http://php.net/stream_set_timeout
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
* Thus wrote Randy L Johnson Jr ([EMAIL PROTECTED]):
> I have done this but it does not seem to ever get to the end of file, I have
> it inserting the values into the database, it goes for awhile around 12 to
> 24 hours and then stops inserting the values into the database and I have to
> restart the script...
ah.. so it sound like the connection is dropping at some point thus
your socket becomes not usuable.
>From my previous post you can use
http://php.net/stream_set_timeout
so if your fread comes back with no data you should exit the
function.
btw, any reason why your using pfsocketopen vs. just fsocketopen?
the pfsocketopen would be only needed if you plan on using that
socket on a different page request.
Come to think of it the pfsocketopen might even give you problems
even if you use the stream_set_timeout function.
HTH,
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
>>>>
I am running php as a client and I have the script running 24/7 to download the data from the connection. Is there a function to see if the connection drops. ??
is there a way to keep restart the function in the script. perhaps use a while and exit the function with a number exit(3) and use that value as the condition in the while?
Randy
> I have done this but it does not seem to ever get to the end of file, I have
> it inserting the values into the database, it goes for awhile around 12 to
> 24 hours and then stops inserting the values into the database and I have to
> restart the script...
ah.. so it sound like the connection is dropping at some point thus
your socket becomes not usuable.
>From my previous post you can use
btw, any reason why your using pfsocketopen vs. just fsocketopen?
the pfsocketopen would be only needed if you plan on using that
socket on a different page request.
Come to think of it the pfsocketopen might even give you problems
even if you use the stream_set_timeout function.
HTH,
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--
. |
____________________________________________________
IncrediMail - Email has finally evolved - Click Here |
--- End Message ---
--- Begin Message ---
When I have an error in my code nothing gets written to the screen.
If I have
<?
echo "Hello world";
?>
It will works normal.
but if I have
<?
echo "Hello world";
?>
Nothing gets written to the browser. Not even the error message.
When I run php on the command line I get error messages just not when running through
a browser.
Where should I start looking for the problem?
Thanks
Kris
--- End Message ---
--- Begin Message ---
Sorry the second "echo "Hello world";" was meant to have no semi colon
----- Original Message -----
From: "Kris Reid" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Thursday, August 14, 2003 12:37 PM
Subject: [PHP] error problem
When I have an error in my code nothing gets written to the screen.
If I have
<?
echo "Hello world";
?>
It will works normal.
but if I have
<?
echo "Hello world";
?>
Nothing gets written to the browser. Not even the error message.
When I run php on the command line I get error messages just not when
running through a browser.
Where should I start looking for the problem?
Thanks
Kris
--- End Message ---
--- Begin Message ---
there is something in the php.ini file that turns the display errors in browser on and off...
Randy
-------Original Message-------
Date: Wednesday, August 13, 2003 10:36:59 PM
Subject: Re: [PHP] error problem
Sorry the second "echo "Hello world";" was meant to have no semi colon
----- Original Message -----
Sent: Thursday, August 14, 2003 12:37 PM
Subject: [PHP] error problem
When I have an error in my code nothing gets written to the screen.
If I have
<?
echo "Hello world";
?>
It will works normal.
but if I have
<?
echo "Hello world";
?>
Nothing gets written to the browser. Not even the error message.
When I run php on the command line I get error messages just not when
running through a browser.
Where should I start looking for the problem?
Thanks
Kris
--
. |
____________________________________________________
IncrediMail - Email has finally evolved - Click Here |
--- End Message ---
--- Begin Message ---
Hi all
I want to implement the same functionality of how yahoo and hotmail had done.
In the yahoo or Hotmail after siginin
When click Compose a new window will be opened for compose.
In the Compose Page they are links like (TO,CC, Bcc)
on clicking these links a small window will open nothing but the address book. IF any
any mail Id is selected there and clicked OK then the corresponding EditBox will be
filled.
I don;t have any idea of how to implement it. i.e the TextBox so a present Page shoulg
get the value from the other independent form.
Any Ideas or Src Code is there. How to implement it wheather to use JavaScript or PHP
Advance Thanks
Balaji.N
---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
--- End Message ---
--- Begin Message ---
The page with TO CC BCC is in a frame (say frame1)
Upon clicking the link TO we open a new window. After that u can fetch the
users input and can open the frame1 with the users input as argument to the
previous window.
murugesan.
----- Original Message -----
From: "Balaji Nallathambi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 14, 2003 11:17 AM
Subject: [PHP] Clone of Hotmail,yahoo
> Hi all
> I want to implement the same functionality of how yahoo and hotmail had
done.
>
> In the yahoo or Hotmail after siginin
> When click Compose a new window will be opened for compose.
> In the Compose Page they are links like (TO,CC, Bcc)
> on clicking these links a small window will open nothing but the address
book. IF any any mail Id is selected there and clicked OK then the
corresponding EditBox will be filled.
>
> I don;t have any idea of how to implement it. i.e the TextBox so a present
Page shoulg get the value from the other independent form.
>
> Any Ideas or Src Code is there. How to implement it wheather to use
JavaScript or PHP
>
> Advance Thanks
> Balaji.N
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
--- End Message ---