php-general Digest 28 Mar 2004 22:22:13 -0000 Issue 2673

Topics (messages 181626 through 181638):

Error: `phpize' failed?
        181626 by: Johannes Tyra

Re: slow script
        181627 by: Marek Kilimajer

PHP 4.2.3 || Can't unset $_SESSION!
        181628 by: CF High
        181634 by: DvDmanDT

plz help
        181629 by: CurlyBraces Technologies \( Pvt \) Ltd

Re: PHP5RC1 Windows problem
        181630 by: Hemp Cluster

Newbie question on arrays
        181631 by: Willem van der Scheun
        181632 by: ma.siebeneicher.gmx.de

$$$wanna make real money$$$..you will no longer need student loans
        181633 by: theeb

Newbie question on  Array
        181635 by: carlson.ngwa.ch
        181636 by: DvDmanDT
        181638 by: Jason Wong

proc_open child pipes ignoring stream_set_blocking()
        181637 by: Jason Donald

Administrivia:

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

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

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


----------------------------------------------------------------------
--- Begin Message ---
Hi...
while installing the PEAR Package SQLite the following Error accours:

www:~ # pear install SQLite
downloading SQLite-1.0.2.tgz ...
...done: 362,412 bytes
51 source files, building
running: phpize
`phpize' failed

Anyone who could help??

--
Mit freundlichem Gruß, Greetz...

| Johannes Tyra

--- End Message ---
--- Begin Message --- Luis Gustavo Faccioni Barcellos wrote:
We notice that while the php is running, anything happens and suddenly(after ~70 seconds) the page arises.

Do you have gzcompression enabled in apache or php? If so, disable it, it is useless for localhost requests.

--- End Message ---
--- Begin Message ---
Hey all.

Strange problem here.

I'm running on apache 1.3.26 & php 4.2.3.

In a test page, test1.php, I set $_SESSION['checker'] = 1;

In another test page, test2.php, I unset($_SESSION['checker']);

When I print_r($_SESSION) in test1.php, $_SESSION['checker'] is still set &
still equals 1!

I've tried session_unregister($checker),
session_unregister($_SESSION['checker']), unset($checker), etc. -- none of
them unset this particular session var.  Very strange behavior.
Interestingly, I can set $_SESSION['checker'] = 0 (instead of 1) in
test2.php & that works fine when I print_r($_SESSION) in test1.php.

Any clues as to why this might be happening?

FYI, register globals is set to ON.

Let me know if you need further details.....

TIA,

--Noah



--

--- End Message ---
--- Begin Message ---
It should be
unset($_SESSION['checker']);

try to use var_dump($_SESSSION); on another page, called test3.php, and let
us know what happends..

also, I hope you remember to use session_start(); and no
session_write_close(); on test2.php..

Otherwise, please mail me the files: dvdmandt at telia dot com...
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
"Cf High" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Hey all.
>
> Strange problem here.
>
> I'm running on apache 1.3.26 & php 4.2.3.
>
> In a test page, test1.php, I set $_SESSION['checker'] = 1;
>
> In another test page, test2.php, I unset($_SESSION['checker']);
>
> When I print_r($_SESSION) in test1.php, $_SESSION['checker'] is still set
&
> still equals 1!
>
> I've tried session_unregister($checker),
> session_unregister($_SESSION['checker']), unset($checker), etc. -- none of
> them unset this particular session var.  Very strange behavior.
> Interestingly, I can set $_SESSION['checker'] = 0 (instead of 1) in
> test2.php & that works fine when I print_r($_SESSION) in test1.php.
>
> Any clues as to why this might be happening?
>
> FYI, register globals is set to ON.
>
> Let me know if you need further details.....
>
> TIA,
>
> --Noah
>
>
>
> --

--- End Message ---
--- Begin Message ---
hi ,
 
i have an apache web server in linux . Those php scripts runs in that pc. Mean while another perl scrips runs associate with that php scripts . altogether they develop a out put and store in the mysql database.That process perfectly running.There is no any dout.
Once this web server started , no body can access this machine directly . This machnie is behind the firewall . This machnie assingned as a web server . That's mean all the ports has been blocked by the firewall except port 80 ( this web server running under port 80 ). ping also has been blocked.
That certain url can access from any other out side pcs.
Some request handling purpose i want to stop that perl script where it is runing in the web server . But from the web server we do it ctrl+c perl.pl
I want to do this through the web browser.
when pressing a stop button , it should effect to the perl script in the web server and also when pressing start button it should start again . .............................
 
i think u all can understand my problem , ..................plz help ,
 
can some body help me to coverup the php scripting part,
 
thanx in advance
 
curlys

--- End Message ---
--- Begin Message ---
> Hi,
> 
> Trying to run PHP5RC1 on Apache1.3 I get the following error in my syslog:
> 
> Faulting application Apache.exe, version 0.0.0.0, faulting module
> php5ts.dll, version 5.0.0.0, fault address 0x0003c773.
> 
> 
> 
> ... and Apache terminates.
> 
> 
> 
> Anyone have a solution?
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Hy...

i have the same problem too with cli version

if i try to run this script i got "unkown software exception"(0xc00000fd)
in program at place 0x7800f497

and php5 terminates........

have a look at logging function in email.class.php5

cya Jointy

--- End Message ---
--- Begin Message ---
Hi,

I've written the piece of code below and I do not get any output out of the 2 
dimensional array. I do not see what's wrong. Must be something obvious I guess.

<?php

$monthname["NL"][1] = "Januari";
$monthname["NL"][2] = "Februari";
$monthname["NL"][3] = "Maart";
$monthname["NL"][4] = "April";
$monthname["NL"][5] = "Mei";
$monthname["NL"][6] = "Juni";
$monthname["NL"][7] = "Juli";
$monthname["NL"][8] = "Augustus";
$monthname["NL"][9] = "September";
$monthname["NL"][10] = "Oktober";
$monthname["NL"][11] = "November";
$monthname["NL"][12] = "December";

$monthname["BR"][1] = "Janeiro";
$monthname["BR"][2] = "Fevreiro";
$monthname["BR"][3] = "Março";
$monthname["BR"][4] = "Abril";
$monthname["BR"][5] = "Maio";
$monthname["BR"][6] = "Junho";
$monthname["BR"][7] = "Julho";
$monthname["BR"][8] = "Augosto";
$monthname["BR"][9] = "Setembro";
$monthname["BR"][10] = "Outobro";
$monthname["BR"][11] = "Novembro";
$monthname["BR"][12] = "Decembro";

$monthname["EN"][1] = "January";
$monthname["EN"][2] = "February";
$monthname["EN"][3] = "March";
$monthname["EN"][4] = "April";
$monthname["EN"][5] = "May";
$monthname["EN"][6] = "June";
$monthname["EN"][7] = "July";
$monthname["EN"][8] = "August";
$monthname["EN"][9] = "September";
$monthname["EN"][10] = "October";
$monthname["EN"][11] = "November";
$monthname["EN"][12] = "December";

function show_lang_date($timestamp, $country)
{
  $date = getdate($timestamp);
  echo "mday = ". $date['mday'] . " ";
  echo "country = $country ";
  $mon = $date["mon"];
  echo "mon = ". $mon . " ";
  echo $monthname[$country][$mon];
  echo "\n";
}

$timestamp = time();
show_lang_date($timestamp, "NL");
show_lang_date($timestamp, "BR");
show_lang_date($timestamp, "EN");

?>

When I run this I get the following output

Content-type: text/html
X-Powered-By: PHP/4.3.3

mday = 28 country = NL mon = 3
mday = 28 country = BR mon = 3
mday = 28 country = EN mon = 3

so no monthname!

--- End Message ---
--- Begin Message ---
you need to declare your $monthname var as global, now you can use it!

function show_lang_date($timestamp, $country)
{
  GLOBAL $monthname;

  $date = getdate($timestamp);
  echo "mday = ". $date['mday'] . " ";
  echo "country = $country ";
  $mon = $date["mon"];
  echo "mon = ". $mon . " ";
  echo $monthname[$country][$mon];
  echo "\n";
}



"Willem Van Der Scheun" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Hi,

I've written the piece of code below and I do not get any output out of the
2 dimensional array. I do not see what's wrong. Must be something obvious I
guess.

<?php

$monthname["NL"][1] = "Januari";
$monthname["NL"][2] = "Februari";
$monthname["NL"][3] = "Maart";
$monthname["NL"][4] = "April";
$monthname["NL"][5] = "Mei";
$monthname["NL"][6] = "Juni";
$monthname["NL"][7] = "Juli";
$monthname["NL"][8] = "Augustus";
$monthname["NL"][9] = "September";
$monthname["NL"][10] = "Oktober";
$monthname["NL"][11] = "November";
$monthname["NL"][12] = "December";

$monthname["BR"][1] = "Janeiro";
$monthname["BR"][2] = "Fevreiro";
$monthname["BR"][3] = "Março";
$monthname["BR"][4] = "Abril";
$monthname["BR"][5] = "Maio";
$monthname["BR"][6] = "Junho";
$monthname["BR"][7] = "Julho";
$monthname["BR"][8] = "Augosto";
$monthname["BR"][9] = "Setembro";
$monthname["BR"][10] = "Outobro";
$monthname["BR"][11] = "Novembro";
$monthname["BR"][12] = "Decembro";

$monthname["EN"][1] = "January";
$monthname["EN"][2] = "February";
$monthname["EN"][3] = "March";
$monthname["EN"][4] = "April";
$monthname["EN"][5] = "May";
$monthname["EN"][6] = "June";
$monthname["EN"][7] = "July";
$monthname["EN"][8] = "August";
$monthname["EN"][9] = "September";
$monthname["EN"][10] = "October";
$monthname["EN"][11] = "November";
$monthname["EN"][12] = "December";

function show_lang_date($timestamp, $country)
{
  $date = getdate($timestamp);
  echo "mday = ". $date['mday'] . " ";
  echo "country = $country ";
  $mon = $date["mon"];
  echo "mon = ". $mon . " ";
  echo $monthname[$country][$mon];
  echo "\n";
}

$timestamp = time();
show_lang_date($timestamp, "NL");
show_lang_date($timestamp, "BR");
show_lang_date($timestamp, "EN");

?>

When I run this I get the following output

Content-type: text/html
X-Powered-By: PHP/4.3.3

mday = 28 country = NL mon = 3
mday = 28 country = BR mon = 3
mday = 28 country = EN mon = 3

so no monthname!

--- End Message ---
--- Begin Message ---
EXCELLENT CASH INCOME
I started out with $6. Now, I am making thousands.
I found this on a bulletin board and decided to try it. A little
while back, I was browsing through newsgroups, just like you are now,
and came across an article similar to this that said you could make
thousands of dollars within weeks with only an initial investment of
$6.00! So I thought, "Yeah right, this must be a scam", but
like most of us, I was curious, so I kept reading. Anyway, it said
that you send $1.00 to each of the 6 names and addresses stated in the
article. You then place your own name and address in the bottom of
the list at #6, and post the article in at least 200 newsgroups.
(There are thousands) No catch, that was it. So after thinking it
over, and talking to a few people first, I thought about trying it. I
figured: "what have I got to lose except 6 stamps and $6.00,
right?" Then I invested the measly $6.00. Well GUESS WHAT!?...
within 7 days, I started getting money in the mail! I was shocked! I
figured it would end soon, but the money just kept coming in. In my
first week, I made about $25.00. By the end of the second week I had
made a total of over $1,000.00! In the third week I had over
$10,000.00 and it's still growing. This is now my fourth week and I
have made a total of just over $42,000.00 and it's still coming in
rapidly. It's certainly worth $6.00, and 6 stamps, I have spent more
than that on the lottery!! Let me tell you how this works and most
importantly, WHY it works... Also, make sure you print a copy of this
article NOW, so you can get the information off of it as you need it.
I promise you that if you follow the directions exactly, that you
will start making more money than you thought possible by doing
something so easy!
Suggestion: Read this entire message carefully! (print it out or
download it.) Follow the simple directions and watch the money come
in!
It's easy. It's legal. And your investment is only $6.00 (Plus
postage)
IMPORTANT: This is not a rip-off; it is not indecent; it is not
illegal; and it is 99% no risk - it really works!
If all of the following instructions are adhered to, you will receive
extraordinary dividends.
PLEASE NOTE:
Follow these directions EXACTLY, and $50,000.00 or more can be
yours in 20 to 60 days. This program remains successful because of
the honesty and integrity of the participants. Please continue its
success by carefully adhering to the instructions.
You will now become part of the Mail Order business. In this business
your product is not solid and tangible, it's a service. You are in
the business of developing Mailing Lists. Many large corporations are
happy to pay big bucks for quality lists. However, the money made
from the mailing lists is secondary to the income which is made from
people like you and me asking to be included in that list.
Here are the 4 easy steps to success:
STEP 1:
Get 6 separate pieces of paper and write down your name and address
followed by the words "PLEASE ADD ME TO YOUR MAILING LIST" on each
of them. Now get 6 US $1.00 bills and place ONE inside EACH of the
6 pieces of paper so the bill will not be visible through the envelope
(to prevent thievery). Next, place one paper in each of the 6 envelopes
and seal them. You should now have 6 sealed envelopes, each with a piece of
paper stating the above phrase, your name and address, and a $1.00
bill. What you are doing is creating a service. THIS IS ABSOLUTELY
LEGAL! You are requesting a legitimate service and you are paying for
it! Like most of us I was a little skeptical and a little worried
about the legal aspects of it all. So I checked it out with the U.S.
Post Office (1-800-725-2161) and they confirmed that it is indeed
legal. Mail the 6 envelopes to the following addresses:
1) Jay foresman
1925 Elmeda
Muskogee Ok, 74403
2) John Visser
11140 Streets Ridge
RR#2 Oxford, NS Canada, B0M 1P0
3) C. Warren
721 W. 1500 S.
Provo, UT 84601
4) justin s
12 bense ct
Washington, NJ 07882
5) Rueben Hernandez
709 3rd ave apt B
Bradley Beach, NJ 07720
6)    Salameh basheer
          9331
    Sakhnin, Israel 20173
STEP 2:
Now take the #1 name off the list that you see above, move
the other names up (6 becomes 5, 5 becomes 4, etc...) and add YOUR
Name as number 6 on the list.
STEP 3:
Change anything you need to, but try to keep this article as
close to original as possible. Now, post your amended article to at
least 200 newsgroups. (I think there are close to 24,000 groups) All
you need is 200, but remember, the more you post, the more money you
make! You won't get very much unless you post like crazy.
This is perfectly legal! If you have any doubts, refer to Title 18
Sec. 1302 & 1341 of the Postal lottery laws.
Keep a copy of these steps for yourself and, whenever you need money,
you can use it again, and again.
PLEASE REMEMBER that this program remains successful because of the
honesty and integrity of the participants and by their carefully
adhering to the directions. Look at it this way. If you are of
integrity, the program will continue and the money that so many
others have received will come your way.
NOTE: You may want to retain every name and address sent to you,
either on a computer or hard copy and keep the notes people send you.
This VERIFIES that you are truly providing a service. (Also, it might
be a good idea to wrap the $1 bill in dark paper to reduce the risk
of mail theft.)
So, as each post is downloaded and the directions carefully followed,
six members will be reimbursed for their participation as a List
Developer with one dollar each. Your name will move up the list
geometrically so that when your name reaches the #1 position you will
be receiving thousands of dollars in CASH!!! What an opportunity for
only $6.00 ($1.00 for each of the first six people listed above) Send
it now, add your own name to the list and you're in business!
---DIRECTIONS ----- FOR HOW TO POST TO NEWSGROUPS------------
Step 1) You do not need to re-type this entire letter to do your own
posting. Simply put your cursor at the beginning of this letter and
drag your cursor to the bottom of this document, and select 'copy'
from the edit menu. This will copy the entire letter into the
computer's memory.
Step 2) Open a blank 'notepad' file and place your cursor at the top
of the blank page. From the 'edit' menu select 'paste'. This will
paste a copy of the letter into notepad so that you can add your name
to the list.
Step 3) Save your new notepad file as a .txt file. If
you want to do your postings in different settings, you'll always
have this file to go back to.
Step 4) Use Netscape or Internet explorer and try searching for
various newsgroups (on-line forums, message boards, chat sites,
discussions.)
Step 5) Visit these message boards and post this article as a new
message by highlighting the text of this letter and selecting paste
from the edit menu. Fill in the Subject, this will be the header that
everyone sees as they scroll through the list of postings in a
particular group, click the post message button. You're done with
your first one! Congratulations...THAT'S IT! All you have to do is
jump to different newsgroups and post away, after you get the hang of
it, it will take about 30 seconds for each newsgroup!
 **REMEMBER, THE MORE NEWSGROUPS YOU POST IN, THE MORE MONEY YOU WILL MAKE! BUT :
YOU HAVE TO POST A MINIMUM OF 200**
That's it! You will begin receiving money from around the world within days! You may 
eventually want to
rent a P.O.Box due to the large amount of mail you will receive. If
you wish to stay anonymous, you can invent a name to use, as long as
the postman will deliver it.
 **JUST MAKE SURE ALL THE ADDRESSES ARE CORRECT.**
Now,
each of the 5 persons who just sent me $1.00 make the MINIMUM 200
postings, each with my name at #5 and only 5 persons respond to each
of the original 5, that is another $25.00 for me, now those 25 each
make 200 MINIMUM posts with my name at #4 and only 5 replies each, I
will bring in an additional $125.00! Now, those 125 persons turn
around and post the MINIMUM 200 with my name at #3 and only receive 5
replies each, I will make an additional $625.00! OK, now here is the
fun part, each of those 625 persons post a MINIMUM 200 letters with
my name at #2 and they each only receive 5 replies, that just made me
$3,125.00!!! Those 3,125 persons will all deliver this message to 200
newsgroups with my name at #1 and if still 5 persons per 200
newsgroups react I will receive $15,625,00! With an original
investment of only $6.00! AMAZING! When your name is no longer on the
list, you just take the latest posting in the newsgroups, and send
out another $6.00 to names on the list, putting your name at number 6
again. And start posting again. The thing to remember is: do you
realize that thousands of people all over the world are joining the
internet and reading these articles everyday?, JUST LIKE YOU are
now!! So, can you afford $6.00 and see if it really works?? I think
so... People have said, "what if the plan is played out and no
one sends you the money? So what! What are the chances of that
happening when there are tons of new honest users and new honest
people who are joining the internet and newsgroups everyday and are
willing to give it a try? Estimates are at 20,000 to 50,000 new
users, every day, with thousands of those joining the actual
internet. Remember, play FAIRLY and HONESTLY and this will really
work!
ALSO REMEMBER*** : : SEND YOUR $1 OUT
TO EVERYONE ON THE LIST, : : EVEN
IF THEY ARE NOT FROM THE U.S. : : WHAT ARE YOU WAITING FOR??? : : : :
GOOD LUCK!!

--- End Message ---
--- Begin Message ---
Sorry, I am new and could not supply the correct search strings on search 
sites to answer by question.


I am trying to construct an array with key-value from a resultSet which will 
be used often within the page or between pages.

Which looks like this:

 $optionBox="select used_1, rub from rub_table order by rub asc";
                $rs_box=mysql_query($optionBox,$con);
                $arr=Array(
                while($row=mysql_fetch_array($rs_box))
                {
                 '$row["used_1"]' => '$row["rub"]'  ,
                });
 
 ,---> This does not need to appear in the last loop.

Is this possible?, if yes what is wrong with my code?.

many thanks for your help..

(._.)--->Carlson

--- End Message ---
--- Begin Message ---
You can't do it that way.. You'll probably get parse error..
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
<[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
>
> Sorry, I am new and could not supply the correct search strings on search
> sites to answer by question.
>
>
> I am trying to construct an array with key-value from a resultSet which
will
> be used often within the page or between pages.
>
> Which looks like this:
>
>  $optionBox="select used_1, rub from rub_table order by rub asc";
> $rs_box=mysql_query($optionBox,$con);
> $arr=Array(
> while($row=mysql_fetch_array($rs_box))
> {
>        '$row["used_1"]' => '$row["rub"]'  ,
> });
>
>  ,---> This does not need to appear in the last loop.
>
> Is this possible?, if yes what is wrong with my code?.
>
> many thanks for your help..
>
> (._.)--->Carlson

--- End Message ---
--- Begin Message ---
On Monday 29 March 2004 03:27, [EMAIL PROTECTED] wrote:

> I am trying to construct an array with key-value from a resultSet which
> will be used often within the page or between pages.
>
> Which looks like this:
>
>  $optionBox="select used_1, rub from rub_table order by rub asc";
>               $rs_box=mysql_query($optionBox,$con);
>               $arr=Array(
>               while($row=mysql_fetch_array($rs_box))
>               {
>                        '$row["used_1"]' => '$row["rub"]'  ,
>               });
>
>  ,---> This does not need to appear in the last loop.
>
> Is this possible?

No. Try:

  $optionBox="select used_1, rub from rub_table order by rub asc";
  $rs_box=mysql_query($optionBox,$con);
  while($row=mysql_fetch_array($rs_box)) {
    $my_array[$row['used_1']] => $row['rub'];
  }
  print_r($my_array);


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
It is impossible for an optimist to be pleasantly surprised.
*/

--- End Message ---
--- Begin Message ---
Hi!

I have a problem!

stream_select() is always returning *all* the streams.
I only want it to tell me which streams have data
waiting on them, or even better, which streams are
'finished' and have an EOF at the end of them (I
wish??  Is this possible??).  I think it is because
the STDOUT pipe/stream is blocking, and it refuses to
change to nonblocking when asked (If I add 'or die()'
after stream_set_blocking it dies).

Am I doing something wrong?  The below example should
just output "QUICK PROCESS" and finish, because the
'slow process' has not even started to output data to
the stream.  When I run it it outputs "SLOW PROCESS"
then "QUICK PROCESS".

I am using PHP5B4 and have also tried PHP5RC2-CVS, on
Windows 2000.

Warm regards,

jase303.



<?php
        $descriptorspec = array(1 => array("pipe", "w"));
        
        $fast_response  = proc_open('c:\web\php5\php.exe -r
"sleep(0); echo \'QUICK PROCESS \';"',
$descriptorspec, $pipes_fast) or die ("Couldn't open
proc"); 
        $slow_response  = proc_open('c:\web\php5\php.exe -r
"sleep(5); echo \'SLOW PROCESS \';"', $descriptorspec,
$pipes_slow) or die ("Couldn't open proc"); 
        
        stream_set_blocking($pipes_fast[1], FALSE);
        stream_set_blocking($pipes_slow[1], FALSE);
        
        print_r(stream_get_meta_data($pipes_fast[1]));
        print_r(stream_get_meta_data($pipes_slow[1]));
        
        $ready_for_reading = array($pipes_slow[1],
$pipes_fast[1]);
        $number_ready = stream_select($ready_for_reading, $a
= NULL, $b = NULL, 0, 0); // I would like this to
return only the proc that has done something!
        foreach ($ready_for_reading as $stream) {
                echo fread($stream, 4096);
        }
?>      




__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

--- End Message ---

Reply via email to