Re: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-30 Thread Jim Giner
DON't get me started on the massacre of the English language on posting 
sites all over the internet!  It seems that people are so wrought up in 
their problem-of-the-moment that they don't realize that they are 
mis-spelling, mis-typing and mis-stating their problem(s) in their frantic 
posts.  :)

"Jasper Mulder"  wrote in message 
news:snt106-w65e964fcfdcf1ff338df0cf7...@phx.gbl...
Personally, I think that incorrect spelling is far more annoying than
the quoting; that is, if it does not originate from incapability due to 
English
(whether it be British or American) being not the native language, as
opposed to spelling errors because of vapidity.



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



RE: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-30 Thread Jasper Mulder

> To: php-general@lists.php.net
> From: jim.gi...@albanyhandball.com
> Date: Thu, 30 Jun 2011 09:12:45 -0400
> Subject: Re: [PHP] I want to use POST when redirect via PHP Header function.
> 
> Just as bottom posting (I know, it's in da rules) makes it rather difficult 
> for humans to read thru a topic, scrolling thru ever-longer messages to get 
> to the 'new' content.
> 
> Let's solve it for all by only posting your own content and let the sum of 
> all the messages equate to the topic.  :)

In fact, the posting rules state that one should only quote those parts of a 
message that are relevant for the post. Unfortunately, many people decide
that everything is relevant, even for a long thread. Still, this should not mean
we have to flee to the opposite of no quoting. You will agree that quoting 
your message above will be clearer than just replying without quote.

Personally, I think that incorrect spelling is far more annoying than
the quoting; that is, if it does not originate from incapability due to English
(whether it be British or American) being not the native language, as
opposed to spelling errors because of vapidity.

As for the readers of this list, I am sorry to go into this non-PHP subject, 
but I couldn't really let this pass.

Best regards,
Jasper
  

Re: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-30 Thread Jim Giner
Just as bottom posting (I know, it's in da rules) makes it rather difficult 
for humans to read thru a topic, scrolling thru ever-longer messages to get 
to the 'new' content.

Let's solve it for all by only posting your own content and let the sum of 
all the messages equate to the topic.  :)

"Ashley Sheridan"  wrote in message 
news:4ce7359b-95f0-4c51-8d23-078b4838f...@email.android.com...


Ps. Could people please avoid top posting, as it does make it rather 
difficult for the automated archive and some screen readers.
Thanks,
Ash
http://www.ashleysheridan.co.uk
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity. 



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



Re: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-30 Thread Ashley Sheridan


Md Ashickur Rahman Noor  wrote:

>>
>> On Thu, Jun 30, 2011 at 1:52 PM, Geoff Lane 
>wrote:
>>  On Thursday, June 30, 2011, Md Ashickur Rahman Noor wrote:
>>
>> > I want to use POST when redirect via PHP Header function. Is it
>> > possible?
>>
>> AFAICT, it isn't. You can use GET variables by passing them on the
>> querystring. These can then be accessed via $_REQUEST, which is an
>> amalgamation of $_POST, $_GET, and $_COOKIE. So if you have a script
>> that might take input from either $_POST or $_GET, you can usually
>> code fairly transparently by replacing both by $_REQUEST.
>>
>> Alternatively, you can create a form on the page and use client-side
>> javascript to 'auto-submit' via the body onLoad event. However, this
>> does require JS on the client and so cannot be guaranteed.
>>
>> HTH,
>>
>> --
>> Geoff
>>
>
>Thank you every one. If I use GET then the value will be shown in the
>address bar, Which I don't want to do.
>
>Can any one describe me the $_REQUEST and $_COOKIE, if you can give
>example
>it will be helpful for me.
>--
>Dedicated Linux Forum in
>Bangladesh
>Follow Me Twiter 
>Thank you
>Md Ashickur Rahman


If you issue a header("Location:") call then you can't use post.

If you have to send back values that you don't want a user to see, why don't 
you build the page you are outputting and echo it out instead of issuing a 
whole redirect? That way, you can use hidden form elements to hold these values.

If you just need values to be persistent, have a look at the $_SESSION array 
and session_start() which you can use for this.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

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



Re: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-30 Thread Arthur Moczulski
that's quite basic thing which you can definitely find in the manual

On 30 June 2011 10:48, Md Ashickur Rahman Noor wrote:

> >
> > On Thu, Jun 30, 2011 at 1:52 PM, Geoff Lane  wrote:
> >  On Thursday, June 30, 2011, Md Ashickur Rahman Noor wrote:
> >
> > > I want to use POST when redirect via PHP Header function. Is it
> > > possible?
> >
> > AFAICT, it isn't. You can use GET variables by passing them on the
> > querystring. These can then be accessed via $_REQUEST, which is an
> > amalgamation of $_POST, $_GET, and $_COOKIE. So if you have a script
> > that might take input from either $_POST or $_GET, you can usually
> > code fairly transparently by replacing both by $_REQUEST.
> >
> > Alternatively, you can create a form on the page and use client-side
> > javascript to 'auto-submit' via the body onLoad event. However, this
> > does require JS on the client and so cannot be guaranteed.
> >
> > HTH,
> >
> > --
> > Geoff
> >
>
> Thank you every one. If I use GET then the value will be shown in the
> address bar, Which I don't want to do.
>
> Can any one describe me the $_REQUEST and $_COOKIE, if you can give example
> it will be helpful for me.
> --
> Dedicated Linux Forum in
> Bangladesh<
> http://forums.linuxdesh.com/member.php?action=register&referrer=3%20>
> Follow Me Twiter 
> Thank you
> Md Ashickur Rahman
>


Re: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-30 Thread Md Ashickur Rahman Noor
>
> On Thu, Jun 30, 2011 at 1:52 PM, Geoff Lane  wrote:
>  On Thursday, June 30, 2011, Md Ashickur Rahman Noor wrote:
>
> > I want to use POST when redirect via PHP Header function. Is it
> > possible?
>
> AFAICT, it isn't. You can use GET variables by passing them on the
> querystring. These can then be accessed via $_REQUEST, which is an
> amalgamation of $_POST, $_GET, and $_COOKIE. So if you have a script
> that might take input from either $_POST or $_GET, you can usually
> code fairly transparently by replacing both by $_REQUEST.
>
> Alternatively, you can create a form on the page and use client-side
> javascript to 'auto-submit' via the body onLoad event. However, this
> does require JS on the client and so cannot be guaranteed.
>
> HTH,
>
> --
> Geoff
>

Thank you every one. If I use GET then the value will be shown in the
address bar, Which I don't want to do.

Can any one describe me the $_REQUEST and $_COOKIE, if you can give example
it will be helpful for me.
--
Dedicated Linux Forum in
Bangladesh
Follow Me Twiter 
Thank you
Md Ashickur Rahman


Re: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-30 Thread Geoff Lane
 On Thursday, June 30, 2011, Md Ashickur Rahman Noor wrote:

> I want to use POST when redirect via PHP Header function. Is it
> possible?

AFAICT, it isn't. You can use GET variables by passing them on the
querystring. These can then be accessed via $_REQUEST, which is an
amalgamation of $_POST, $_GET, and $_COOKIE. So if you have a script
that might take input from either $_POST or $_GET, you can usually
code fairly transparently by replacing both by $_REQUEST.

Alternatively, you can create a form on the page and use client-side
javascript to 'auto-submit' via the body onLoad event. However, this
does require JS on the client and so cannot be guaranteed.

HTH,

-- 
Geoff


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



RE: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-30 Thread Ashley Sheridan


ad...@buskirkgraphics.com wrote:

>I could be wrong on this but,
>I am pretty sure you can use GET variables but not POST in a header
>redirect.
>
>Example
>header('Location:http://www.yourmom.com/?large=incharge&hasorbit=yes');
>
>
>
>
>
>Richard L. Buskirk
>
>-Original Message-
>From: Md Ashickur Rahman Noor [mailto:ashickur.n...@gmail.com]
>Sent: Thursday, June 30, 2011 2:36 AM
>To: Ashley Sheridan
>Cc: php-general@lists.php.net
>Subject: Re: [PHP] I want to use POST when redirect via PHP Header
>function.
>
>For passing value to other page.
>--
>Dedicated Linux Forum in
>Bangladesh<http://forums.linuxdesh.com/member.php?action=register&referrer=3
>%20>
>Follow Me Twiter <https://twitter.com/#%21/AshickunNoor>
>Thank you
>Md Ashickur Rahman
>
>
>
>
>On Thu, Jun 30, 2011 at 12:34 PM, Ashley Sheridan
>wrote:
>
>>
>>
>> Md Ashickur Rahman Noor  wrote:
>>
>> >I want to use POST when redirect via PHP Header function. Is it
>> >possible?
>> >--
>> >Dedicated Linux Forum in
>> >Bangladesh<
>> http://forums.linuxdesh.com/member.php?action=register&referrer=3%20>
>> >Follow Me Twiter <https://twitter.com/#%21/AshickunNoor>
>> >Thank you
>> >Md Ashickur Rahman
>>
>> Erm, a bit vague. Use POST for *what* during the redirect?
>>
>> Thanks,
>> Ash
>> http://www.ashleysheridan.co.uk
>> --
>> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


Following on from what Richard said, the post data is part of a request made by 
a browser, not the response made by the server, which is what a header is, a 
response.

Maybe you need to look into cURL, which make a request and forward the response 
on to the browser.

Ps. Could people please avoid top posting, as it does make it rather difficult 
for the automated archive and some screen readers.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

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



RE: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-30 Thread admin
I could be wrong on this but,
I am pretty sure you can use GET variables but not POST in a header
redirect.

Example 
header('Location:http://www.yourmom.com/?large=incharge&hasorbit=yes');





Richard L. Buskirk

-Original Message-
From: Md Ashickur Rahman Noor [mailto:ashickur.n...@gmail.com] 
Sent: Thursday, June 30, 2011 2:36 AM
To: Ashley Sheridan
Cc: php-general@lists.php.net
Subject: Re: [PHP] I want to use POST when redirect via PHP Header function.

For passing value to other page.
--
Dedicated Linux Forum in
Bangladesh<http://forums.linuxdesh.com/member.php?action=register&referrer=3
%20>
Follow Me Twiter <https://twitter.com/#%21/AshickunNoor>
Thank you
Md Ashickur Rahman




On Thu, Jun 30, 2011 at 12:34 PM, Ashley Sheridan
wrote:

>
>
> Md Ashickur Rahman Noor  wrote:
>
> >I want to use POST when redirect via PHP Header function. Is it
> >possible?
> >--
> >Dedicated Linux Forum in
> >Bangladesh<
> http://forums.linuxdesh.com/member.php?action=register&referrer=3%20>
> >Follow Me Twiter <https://twitter.com/#%21/AshickunNoor>
> >Thank you
> >Md Ashickur Rahman
>
> Erm, a bit vague. Use POST for *what* during the redirect?
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>


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



Re: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-29 Thread Md Ashickur Rahman Noor
For passing value to other page.
--
Dedicated Linux Forum in
Bangladesh
Follow Me Twiter 
Thank you
Md Ashickur Rahman




On Thu, Jun 30, 2011 at 12:34 PM, Ashley Sheridan
wrote:

>
>
> Md Ashickur Rahman Noor  wrote:
>
> >I want to use POST when redirect via PHP Header function. Is it
> >possible?
> >--
> >Dedicated Linux Forum in
> >Bangladesh<
> http://forums.linuxdesh.com/member.php?action=register&referrer=3%20>
> >Follow Me Twiter 
> >Thank you
> >Md Ashickur Rahman
>
> Erm, a bit vague. Use POST for *what* during the redirect?
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>


Re: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-29 Thread Ashley Sheridan


Md Ashickur Rahman Noor  wrote:

>I want to use POST when redirect via PHP Header function. Is it
>possible?
>--
>Dedicated Linux Forum in
>Bangladesh
>Follow Me Twiter 
>Thank you
>Md Ashickur Rahman

Erm, a bit vague. Use POST for *what* during the redirect?

Thanks,
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

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



[PHP] I want to use POST when redirect via PHP Header function.

2011-06-29 Thread Md Ashickur Rahman Noor
I want to use POST when redirect via PHP Header function. Is it possible?
--
Dedicated Linux Forum in
Bangladesh
Follow Me Twiter 
Thank you
Md Ashickur Rahman


[PHP] I want to pass Sub Window the value with PHP and JavaScript.

2007-04-05 Thread Napura
Hello I say Napura. 

In the code shown below
"no" with PHP&JavaScript
Hajime.php passes it to kekka.php. 
For "" though the data of "no" 
extends without trouble

"_ blank target =" is added. 
Data cannot be received though new Sabwindow opens when assuming "". 

The method doesn't hit on easily though it wants to open a sub-window 
by all means and to display it. 

"_ blank target =" is stopped. 
In JavaScript
window.open("kekka.php","SUBF")
The value doesn't extend still though it made. 

It would be greatly appreciated if it could advise. 
My best regards. 

In the server environment, it is LINUX and PHP is PHP 4.3.9. 

The experimented client environment is peel WindowsXPSP2, and IE6. 


hajime.php


Re: [PHP] I want to send data with JavaScript.

2007-01-12 Thread Napura
N駑eth Zolt疣 ,

Thank you. 

It safely solved it. 
It survived. 
Moreover, my best regards. 

> 2007. 01. 12, p辿ntek keltez辿ssel 23.15-kor Napura ezt 鱈rta:
> > It questions the mailing list for the first time. 
> > 
> > To other forms by using JavaScript in PHP
> > Can data able to be passed, and passed only one data that can be passed in 
> > the 
> > following codes?
> > Please tell me. 
> > 
> > function p_submit(bb) {
> > sform=top.window.document.S_form;
> > sform.param.value = bb;
> > sform.action = "pform.php"; 
> > sform.submit(); 
> >}
> > 
> > Only "param"1 piece can be sent in this code. 
> 
> might be stupid idea but what if you add another lines like
> 
> sform.param1.value = 1;
> sform.param2.value = 2;
> 
> as I think param/param1/param2 should be the name of the element of
> $_POST/$_GET in your php script
> 
> hope that helps
> Zolt叩n N辿meth
> 
> > 
> > Please help.
> > 
> > Napura<[EMAIL PROTECTED]>
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 

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



Re: [PHP] I want to send data with JavaScript.

2007-01-12 Thread Németh Zoltán
2007. 01. 12, péntek keltezéssel 23.15-kor Napura ezt írta:
> It questions the mailing list for the first time. 
> 
> To other forms by using JavaScript in PHP
> Can data able to be passed, and passed only one data that can be passed in 
> the 
> following codes?
> Please tell me. 
> 
> function p_submit(bb) {
> sform=top.window.document.S_form;
> sform.param.value = bb;
> sform.action = "pform.php"; 
> sform.submit(); 
>}
> 
> Only "param"1 piece can be sent in this code. 

might be stupid idea but what if you add another lines like

sform.param1.value = 1;
sform.param2.value = 2;

as I think param/param1/param2 should be the name of the element of
$_POST/$_GET in your php script

hope that helps
Zoltán Németh

> 
> Please help.
> 
> Napura<[EMAIL PROTECTED]>
> 

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



[PHP] I want to send data with JavaScript.

2007-01-12 Thread Napura
It questions the mailing list for the first time. 

To other forms by using JavaScript in PHP
Can data able to be passed, and passed only one data that can be passed in the 
following codes?
Please tell me. 

function p_submit(bb) {
sform=top.window.document.S_form;
sform.param.value = bb;
sform.action = "pform.php"; 
sform.submit(); 
   }

Only "param"1 piece can be sent in this code. 

Please help.

Napura<[EMAIL PROTECTED]>

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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread Gonzalo Monzón

D. Dante Lorenso escribió:


Gonzalo Monzón wrote:

I've been developing desktop applications with PHP-GTK since 2002, 
far beyond the web script context, and in the more complex projects I 
did, was a must to implement multi-process and IPC communication due 
to the lack of threading in PHP, as to deal with some issues like 
multiple tcp clients, multiple tcp server with a proxy to the 
application data, webservices, handling UI, and a lot more stuff, 
while doing "realtime" (the more realtime I was able of) processing 
of all incoming and outgoing data, for more than 24 hours long 
running time. Yes, I was able to be successful with such a 
developement after a lot of pain, but it is not likely the most 
common usage for PHP.  I finally had to implement several parts in C, 
embedding PHP, and really, I was not happy of to cope with that, but 
I did not have the time to switch to another language as I had to 
re-use a lot of existing code that worked smooth with a multi-process 
approach, but without the need of so long running time, so many tcp 
clients, and so many data... I had to implement data containers in 
using C structures, as handling all that data from PHP taken more 
than 500Mb of RAM in no more than 8 hours of processing, interprocess 
syncronization mechanisms, and a lot more stuff.



Sounds to me like you are in my boat!  I have done some similar work 
to create a multi-process beast.  Here is an OO.o Presenter 
presentation I did for the Dallas PHP User's Group back in December of 
2005:


   http://dantescode.com/docs/DPUG%20-%20PHP%20Server%20Applications.odp

Perhaps this will shed a little light on my very similar solution.  
Seems to me we could benefit from having some kind of threading 
support in the language to avoid all the headache of each of us 
building the same code to solve a similar problem.  I'm sure there are 
others like yourself.


Dante

Yeah, but I'm pretty sure of that each of us have our unique needs, and 
only a complete threading support and safety for PHP and all the 
extensions would avoid our headaches... and that's not likely to happen 
soon.


Sorry but I don't have a Linux box at hand where to install OO 
presenter, perhaps you could send me a pdf so us, poor Windows users, 
could have a look at it?


I will tell you more about my story... Sorry for the length but... I 
haven't got the time right now to make it shorter. :-)


The application I was talking about is not web-based but a PHP-GTK one, 
no server side scripting, only cli, so I guess we are in the same boat, 
yes, we are, but with very different needs and approaches.


I'll say in advance that I was not able to use any SQL database server 
or web based processing for this application, due to project requirements...


My application was mostly based on GTK timers and UI event callbacks. 
For inter-process comunication, I had to implement a lot of different 
approaches to ensure the best reliability. Some kind of processing 
requiered to use syncronized shared memory, other kind used simple 
win32api IPC calls... etc.


Each kind of task requiered different approaches, for little data size 
overhead, for fast or low response times, and most of these are lot 
easier to implement using multi-threading and simple syncronization 
mechanisms, as I do now in my new developement environment, once 
switched language for almost all the system, with no more headaches or 
over complexities due to not be using the right tool for the job.


I really had to switch language as I was not likely to improve more the 
system performance as to be able to evolve in the right way for the 
future -and i don't want to thought anymore about memory leaks issues I 
had to workaround-. I never thought I would need to evolve my system 
like to develop such a "beast": once I finished that development and 
start to grasp and worry about what would be the next requirements for 
the system, I was afraid of: What will I do if do I must handle not 15 
clients but 25? how many tcp servers? and perhaps not 150.000 registers 
but 300.000 per hour? yes, these requirements now are real.


Before all these troubles, when my system "only" needed to handle 5 
clients, 3 servers, no more than 10 processes, and about 65.000 
registers per hour, for no more than 3 hours long, I had almost no 
headaches... and was quite happy using PHP... :-)


I thought you people must say I'm a fool trying to use PHP for such a 
system... I never thought of developing such a system with PHP-GTK... 
until I had to do it for "yesterday" and haven't got the opportunity to 
say "NO"... lets do it the right way: use a language not designed for 
web scripting... we need multithreading and the speed of compiled code 
!! don't care if we need 6 months more for development !!! :-)


Only real support for thread safety can avoid such a nightmare, but that 
dont seems to happen until... who knows? PHP 8? :-) I think threading is 
really a very hard thing to add to a lan

Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread D. Dante Lorenso

Gonzalo Monzón wrote:
I've been developing desktop applications with PHP-GTK since 2002, far 
beyond the web script context, and in the more complex projects I did, 
was a must to implement multi-process and IPC communication due to the 
lack of threading in PHP, as to deal with some issues like multiple 
tcp clients, multiple tcp server with a proxy to the application data, 
webservices, handling UI, and a lot more stuff, while doing "realtime" 
(the more realtime I was able of) processing of all incoming and 
outgoing data, for more than 24 hours long running time. Yes, I was 
able to be successful with such a developement after a lot of pain, 
but it is not likely the most common usage for PHP.  I finally had to 
implement several parts in C, embedding PHP, and really, I was not 
happy of to cope with that, but I did not have the time to switch to 
another language as I had to re-use a lot of existing code that worked 
smooth with a multi-process approach, but without the need of so long 
running time, so many tcp clients, and so many data... I had to 
implement data containers in using C structures, as handling all that 
data from PHP taken more than 500Mb of RAM in no more than 8 hours of 
processing, interprocess syncronization mechanisms, and a lot more stuff.


Sounds to me like you are in my boat!  I have done some similar work to 
create a multi-process beast.  Here is an OO.o Presenter presentation I 
did for the Dallas PHP User's Group back in December of 2005:


   http://dantescode.com/docs/DPUG%20-%20PHP%20Server%20Applications.odp

Perhaps this will shed a little light on my very similar solution.  
Seems to me we could benefit from having some kind of threading support 
in the language to avoid all the headache of each of us building the 
same code to solve a similar problem.  I'm sure there are others like 
yourself.


Dante

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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread Barry

Gonzalo Monzón schrieb:

I forgot to put some final note into my last message.

PHP can be good for a lot of things, but not really for other. 

Yeah true (o_O)

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread D. Dante Lorenso

Stut wrote:

D. Dante Lorenso wrote:

IMHO, if your main goal is to allow your threaded app to reuse 
existing PHP classes then your best bet is to investigate embedding 
PHP into something written in C or C++.


This is a very good point.  I have also been looking into the idea 
pitched a few years ago about SRM -- Script Running Machine.  There was 
a site set up here that held some promise:


   http://www.vl-srm.net/

The last post I can see here is dated 2004 and is one of those 
statements which claim that the project is not yet dead.  Usually 
statements like that tend to forecast the eminent demise of the 
project.  Since there have been no updates to the site in 1.5 years, I 
conclude that it is in fact dead.


SRM sold promise of creating an application server for PHP.  This smells 
a little bit like Tomcat or JBoss and so was very much of interest.  The 
current beta of SRM is designed for PHP 4, though and I want to be at 
bleading edge PHP 5 with XMLWriter and PDO etc.  As I investigate my 
options, SRM is on the list as a potential area to explore further or 
somehow to revive as a project.


Dante

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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread Gonzalo Monzón

I forgot to put some final note into my last message.

PHP can be good for a lot of things, but not really for other. Wonder 
when requirements grow long in some ways you could not ever expect in a 
project like your's:  A simple example: need 5 concurrent connections in 
your "hacked" multi-process server, that could be easily done in PHP, 
and, you could probably live with it in some circumstances. 

But do you wonder what could happen with your system  if tomorrow you 
need to handle, let's say, 500 or 1000 concurrent connections? yeah, you 
will tell me that your software was not designed for that, or because 
PHP has no threading...


Having that in mind, you must think seriously about the future of your 
application, because switching today can save you a lot of time waste 
tomorrow, like happened to me with one project.


PHP was great for lots of projects I did, but if in the past I could 
only realize a bit of what I should have to do later, I definitely had 
switched immediatly before starting that developement, as I have done 
anyway later... the requirements for my applications grown more and gone 
far beyond what I ever expected... :-)  but who knows that in advance?


I continue using PHP for a lot of tasks, tasks I know in the future 
won't requiere me to climb a mountain, being over its limits... because 
it was not the right tool to use for the job.


Hope my comments can help you in your thoughts of  standarizing on a 
single codebase and language... :-)


Gonzalo


Gonzalo Monzón escribió:


D. Dante Lorenso escribió:


Gonzalo Monzón wrote:


Use Python, it is the way to go if you're willing to use mt  :-)




I've already written the multi-threaded server using Java.  I want to 
do this in PHP, however, because the PHP "threads" can re-use PHP 
classes I've already written and hence standardize on a single 
codebase and language.  Many other languages have threads (Java, C#, 
Python, Ruby, etc) ... which is why I'm so amazed PHP does not even 
list Threads as a priority.  You simply can't be an enterprise 
language without these basic features.  Of course, don't get me 
started on namespaces too ;-)


No, choosing a different language has been considered and I'd rather 
continue with my hacked multi-process PHP server solution before I am 
ready to change to a different language.


Dante


Sorry, but no PHP "threads" can re-use any PHP classes, as threads are 
not implemented yet... maybe until PHP 8 :-)


Threading isn't a trivial task, and if you MUST use it (I don't think 
so) you should develop some extension or take other approaches like 
embedding, and code all your threading needs apart from PHP, in C. But 
be careful interacting from that code to PHP. Or, perhaps switch to 
another language, if you can't cope with that.


I've been developing desktop applications with PHP-GTK since 2002, far 
beyond the web script context, and in the more complex projects I did, 
was a must to implement multi-process and IPC communication due to the 
lack of threading in PHP, as to deal with some issues like multiple 
tcp clients, multiple tcp server with a proxy to the application data, 
webservices, handling UI, and a lot more stuff, while doing "realtime" 
(the more realtime I was able of) processing of all incoming and 
outgoing data, for more than 24 hours long running time. Yes, I was 
able to be successful with such a developement after a lot of pain, 
but it is not likely the most common usage for PHP.  I finally had to 
implement several parts in C, embedding PHP, and really, I was not 
happy of to cope with that, but I did not have the time to switch to 
another language as I had to re-use a lot of existing code that worked 
smooth with a multi-process approach, but without the need of so long 
running time, so many tcp clients, and so many data... I had to 
implement data containers in using C structures, as handling all that 
data from PHP taken more than 500Mb of RAM in no more than 8 hours of 
processing, interprocess syncronization mechanisms, and a lot more stuff.


In my case, multi threading was a real need I had to workaround. I 
think this is a real life example of PHP being expanded far beyond web 
paradigms or simple shell scripts, without any multi-threading 
support.  But PHP is not thought in any case to be used for such 
applications... (I'm talking about desktop applications, not web 
script applications), with or without multithreading.


If you'd like to use mt in your applications or web scripts, better 
switch to some other language, or search for alternative ways of 
implementation as you did with a multi-process approach.


PHP its a great language, but it isn't the right tool for anything.

Gonzalo.



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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread Stut

D. Dante Lorenso wrote:
I've already written the multi-threaded server using Java.  I want to do 
this in PHP, however, because the PHP "threads" can re-use PHP classes 
I've already written and hence standardize on a single codebase and 
language.  Many other languages have threads (Java, C#, Python, Ruby, 
etc) ... which is why I'm so amazed PHP does not even list Threads as a 
priority.  You simply can't be an enterprise language without these 
basic features.  Of course, don't get me started on namespaces too ;-)


No, choosing a different language has been considered and I'd rather 
continue with my hacked multi-process PHP server solution before I am 
ready to change to a different language.


As many other posters have pointed out, PHP does not support threads, 
and is not likely to in the near future. It's not a 'basic' feature when 
the language background is web-based scripting. None of the languages 
you mention that do support threading were designed for web-based usage.


IMHO, if your main goal is to allow your threaded app to reuse existing 
PHP classes then your best bet is to investigate embedding PHP into 
something written in C or C++.



As far as your "hacked multi-process PHP server solution" goes, I would 
suggest that you think about what is important to you for this project. 
If your existing solution is good enough for your purposes then live 
with it. If the only reason you're not willing to replace it with a 
solution that would undoubtedly be faster, more stable and more 
efficient is because you don't want to re-implement some existing code 
that only exists in the wrong language, that's your choice. If it were 
me, the goal of code reuse would never prevent me from using the right 
tool for the job, but that's just me.



-Stut

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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread Gonzalo Monzón

D. Dante Lorenso escribió:


Gonzalo Monzón wrote:


Use Python, it is the way to go if you're willing to use mt  :-)



I've already written the multi-threaded server using Java.  I want to 
do this in PHP, however, because the PHP "threads" can re-use PHP 
classes I've already written and hence standardize on a single 
codebase and language.  Many other languages have threads (Java, C#, 
Python, Ruby, etc) ... which is why I'm so amazed PHP does not even 
list Threads as a priority.  You simply can't be an enterprise 
language without these basic features.  Of course, don't get me 
started on namespaces too ;-)


No, choosing a different language has been considered and I'd rather 
continue with my hacked multi-process PHP server solution before I am 
ready to change to a different language.


Dante


Sorry, but no PHP "threads" can re-use any PHP classes, as threads are 
not implemented yet... maybe until PHP 8 :-)


Threading isn't a trivial task, and if you MUST use it (I don't think 
so) you should develop some extension or take other approaches like 
embedding, and code all your threading needs apart from PHP, in C. But 
be careful interacting from that code to PHP. Or, perhaps switch to 
another language, if you can't cope with that.


I've been developing desktop applications with PHP-GTK since 2002, far 
beyond the web script context, and in the more complex projects I did, 
was a must to implement multi-process and IPC communication due to the 
lack of threading in PHP, as to deal with some issues like multiple tcp 
clients, multiple tcp server with a proxy to the application data, 
webservices, handling UI, and a lot more stuff, while doing "realtime" 
(the more realtime I was able of) processing of all incoming and 
outgoing data, for more than 24 hours long running time. Yes, I was able 
to be successful with such a developement after a lot of pain, but it is 
not likely the most common usage for PHP.  I finally had to implement 
several parts in C, embedding PHP, and really, I was not happy of to 
cope with that, but I did not have the time to switch to another 
language as I had to re-use a lot of existing code that worked smooth 
with a multi-process approach, but without the need of so long running 
time, so many tcp clients, and so many data... I had to implement data 
containers in using C structures, as handling all that data from PHP 
taken more than 500Mb of RAM in no more than 8 hours of processing, 
interprocess syncronization mechanisms, and a lot more stuff.


In my case, multi threading was a real need I had to workaround. I think 
this is a real life example of PHP being expanded far beyond web 
paradigms or simple shell scripts, without any multi-threading support.  
But PHP is not thought in any case to be used for such applications... 
(I'm talking about desktop applications, not web script applications), 
with or without multithreading.


If you'd like to use mt in your applications or web scripts, better 
switch to some other language, or search for alternative ways of 
implementation as you did with a multi-process approach.


PHP its a great language, but it isn't the right tool for anything.

Gonzalo.

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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread Richard Lynch
On Thu, April 27, 2006 4:18 am, D. Dante Lorenso wrote:
> Evolution of the language is a must.  I AM working on trying to spec
> out
> an extension for PHP which would implement what I want with threading
> without having to hack zend and the core.  I might think that some
> other
> C developers would be more suited for the job, however, considering
> they
> have already done the work for such a beast in just about every other
> popular language created so far.

Take a look at the TSRM files in PHP source.

They handle the threads for Zend internally.

Maybe you can just "promote" them into PHP User Land...

I've only glanced at it, really, so have no idea if that's even
possible or not.

> Obviously PHP General list is probably not the place where I can sway
> any opinions with any internals members, so I'll end this message

Actually, this is probably the BEST place to at least hash out the
initial response and test the waters and get ground-swell support.

I suspect MOST readers of 'internals' will keep an eye on threads (no
pun intended) of interest here.

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

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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread Richard Lynch
On Thu, April 27, 2006 3:24 am, D. Dante Lorenso wrote:
> priority.  You simply can't be an enterprise language without these
> basic features.

You simply can't put Threads in the same sentence with "basic
features", not even by implication. :-)

There is NOTHING "basic" about threads, no matter how you look at it.

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

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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread Jochem Maas

D. Dante Lorenso wrote:

Jochem Maas wrote:

I've already written the multi-threaded server using Java.  I want to 
do this in PHP, however, because the PHP "threads" can re-use PHP 
classes I've already written and hence standardize on a single 
codebase and language.  Many other languages have threads (Java, C#, 
Python, Ruby, etc) ... which is why I'm so amazed PHP does not even 
list Threads as a priority.  You simply can't be an enterprise 
language without these basic features.  Of course, don't get me 
started on namespaces too ;-)


oh yeah - threads really are basic. simple and easy to use, every
VB-scripter should be using them. btw Yahoo! seems to cope quite well 
without
threads in php - fairly 'enterprise' infrastructure and load they deal 
with no?



Every time I try to use PHP in a web server to solve a problem like 
build a file upload progress meter, somebody screams that PHP is meant 
for far more than web scripting.  Yet as soon as I try to use PHP in a 
context other than a web script, someone like yourself jumps up and 
complains that PHP needs to remain in the web scripting programming 
world only.


thats not what I said - not having threading doesn't mean you can't expand
php beyond the web paradigm, there are plenty of people who use php in the
shell (me for instance), and there's the php-gtk crowd too (not that I have
been there myself)



then again if threads are so basic for you - submit a patch that 
implements
them (and obviously fix any/all thread-safety issues in all extensions 
etc),

from what I gather that's a mammoth undertaking - given the limited
core developer resources, that is one of the reasons it's low 
priority, and then

ofcourse there is the php 'philosophy' about threads in general (of which
the php-internals mailing archive should be able to shed some light)



Evolution of the language is a must.  I AM working on trying to spec out 


I guess your not looking for the food, water, shelter and clean air argument
- speaking of things that are a 'must' ;-)

an extension for PHP which would implement what I want with threading 
without having to hack zend and the core.  I might think that some other 
C developers would be more suited for the job, however, considering they 
have already done the work for such a beast in just about every other 
popular language created so far.


I wish you luck, hope something comes of it - I'd gladly be a guinea pig
to test something like that, if nothing else i might learn something :-).



Obviously PHP General list is probably not the place where I can sway 
any opinions with any internals members, so I'll end this message simply 
saying that I am first seeking what already exists, what might already 
be in progress, and what still needs to be created.  At the same time, I 
like to find others would may be trying to do something similar.  I can 
not be alone in wanting to use PHP beyond what it is currently capable 
of.  I trust there must be other PHP developers who wish to see the 
language take on some of the aspects we like about other languages while 
at the same time retaining all the elements we already enjoy with the 
existing feature set.


There is no better language for web development.  Once outside it's 
niche of web scripting, tho PHP lacks severely.  Seeing how developers 


I think 'severely' is rather overstated. jmho.

have created CLI in order to compete with PERL for cron scripting and OO 
features of PHP5 to compete with other modern OO languages, I imagine 
PHP IS trying to be more.  A Framework, Unicode, Namespaces, and Threads 
are the logical next step.  Zend Framework and Unicode have made the 
todo list, Namespaces is fighting to get on, and Threads is nowhere to 
be seen.


time shall tell which way the wind blows us :-)

btw individual threads are very small & thin - hardly percepatable to
the human eye unless one is concentrating on looking for them ;->



Dante




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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread D. Dante Lorenso

Jochem Maas wrote:
I've already written the multi-threaded server using Java.  I want to 
do this in PHP, however, because the PHP "threads" can re-use PHP 
classes I've already written and hence standardize on a single 
codebase and language.  Many other languages have threads (Java, C#, 
Python, Ruby, etc) ... which is why I'm so amazed PHP does not even 
list Threads as a priority.  You simply can't be an enterprise 
language without these basic features.  Of course, don't get me 
started on namespaces too ;-)

oh yeah - threads really are basic. simple and easy to use, every
VB-scripter should be using them. btw Yahoo! seems to cope quite well 
without
threads in php - fairly 'enterprise' infrastructure and load they deal 
with no?


Every time I try to use PHP in a web server to solve a problem like 
build a file upload progress meter, somebody screams that PHP is meant 
for far more than web scripting.  Yet as soon as I try to use PHP in a 
context other than a web script, someone like yourself jumps up and 
complains that PHP needs to remain in the web scripting programming 
world only.


then again if threads are so basic for you - submit a patch that 
implements
them (and obviously fix any/all thread-safety issues in all extensions 
etc),

from what I gather that's a mammoth undertaking - given the limited
core developer resources, that is one of the reasons it's low 
priority, and then

ofcourse there is the php 'philosophy' about threads in general (of which
the php-internals mailing archive should be able to shed some light)


Evolution of the language is a must.  I AM working on trying to spec out 
an extension for PHP which would implement what I want with threading 
without having to hack zend and the core.  I might think that some other 
C developers would be more suited for the job, however, considering they 
have already done the work for such a beast in just about every other 
popular language created so far.


Obviously PHP General list is probably not the place where I can sway 
any opinions with any internals members, so I'll end this message simply 
saying that I am first seeking what already exists, what might already 
be in progress, and what still needs to be created.  At the same time, I 
like to find others would may be trying to do something similar.  I can 
not be alone in wanting to use PHP beyond what it is currently capable 
of.  I trust there must be other PHP developers who wish to see the 
language take on some of the aspects we like about other languages while 
at the same time retaining all the elements we already enjoy with the 
existing feature set.


There is no better language for web development.  Once outside it's 
niche of web scripting, tho PHP lacks severely.  Seeing how developers 
have created CLI in order to compete with PERL for cron scripting and OO 
features of PHP5 to compete with other modern OO languages, I imagine 
PHP IS trying to be more.  A Framework, Unicode, Namespaces, and Threads 
are the logical next step.  Zend Framework and Unicode have made the 
todo list, Namespaces is fighting to get on, and Threads is nowhere to 
be seen.


Dante

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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread Jochem Maas

D. Dante Lorenso wrote:

Gonzalo Monzón wrote:


Use Python, it is the way to go if you're willing to use mt  :-)



I've already written the multi-threaded server using Java.  I want to do 
this in PHP, however, because the PHP "threads" can re-use PHP classes 
I've already written and hence standardize on a single codebase and 
language.  Many other languages have threads (Java, C#, Python, Ruby, 
etc) ... which is why I'm so amazed PHP does not even list Threads as a 
priority.  You simply can't be an enterprise language without these 
basic features.  Of course, don't get me started on namespaces too ;-)


oh yeah - threads really are basic. simple and easy to use, every
VB-scripter should be using them. btw Yahoo! seems to cope quite well without
threads in php - fairly 'enterprise' infrastructure and load they deal with no?

then again if threads are so basic for you - submit a patch that implements
them (and obviously fix any/all thread-safety issues in all extensions etc),
from what I gather that's a mammoth undertaking - given the limited
core developer resources, that is one of the reasons it's low priority, and then
ofcourse there is the php 'philosophy' about threads in general (of which
the php-internals mailing archive should be able to shed some light)



No, choosing a different language has been considered and I'd rather 
continue with my hacked multi-process PHP server solution before I am 
ready to change to a different language.


the beauty of choice. :-)



Dante




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



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread D. Dante Lorenso

Gonzalo Monzón wrote:

Use Python, it is the way to go if you're willing to use mt  :-)


I've already written the multi-threaded server using Java.  I want to do 
this in PHP, however, because the PHP "threads" can re-use PHP classes 
I've already written and hence standardize on a single codebase and 
language.  Many other languages have threads (Java, C#, Python, Ruby, 
etc) ... which is why I'm so amazed PHP does not even list Threads as a 
priority.  You simply can't be an enterprise language without these 
basic features.  Of course, don't get me started on namespaces too ;-)


No, choosing a different language has been considered and I'd rather 
continue with my hacked multi-process PHP server solution before I am 
ready to change to a different language.


Dante


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



RE: [PHP] I want to write a Multi-threaded PHP Application

2006-04-26 Thread Richard Lynch
On Wed, April 26, 2006 6:05 pm, Warren Vail wrote:
> "not likely" until at least PHP 8.0.  However, my needs for a thread
> are
> very simple and might be able to avoid the complexities of shared

One thing you could consider...

If you had one "main" script that did a stream_select on multiple URLs
and polled them to get their output as it came about, you'd
essentially be using Apache's multi-process model instead...

Or you could just figure out what was wrong that was causing your
zombies and fix it... :-v

Another nifty hack is:

//An atomic way to claim these tasks as MINE
$process_id = getmypid();
$query = "UPDATE tasks set process_id = $process_id WHERE process_id
is NULL LIMIT 10";

You can then do the 10 tasks needed and die off.

Alter 10 to suit your needs, and have not as many php processes
running in parallel.

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

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



RE: [PHP] I want to write a Multi-threaded PHP Application

2006-04-26 Thread Warren Vail
I did one (well sort of) once.  

I created a php script which was started by cron every minute.  It read a
mysql table looking for items to process, and on finding one, would stamp
the entry in the table as being processed and it would then proceed with
what it needed to do, which sometimes took about half an hour.  What it did
was a DB2 "select count(*)" on every table in a DB2 mainframe database, and
the task was identified in my mysql table as a list of DB2 databases.  The
script would only start processing if it found one that was not running and
there were less than 5 being currently processed (limiting my DB2
connections to 5 at a time).  The byproduct of all this was that it
prevented the mainframe disk management system from archiving critical
database files which were guaranteed to cause errors when the main corporate
application went live, improving reliability and giving us some numbers to
manage disk space utilization with.

Probably not what you had in mind, but the whole process handled 5
concurrent processes running against 30 databases, once every evening.

Warren Vail

-Original Message-
From: D. Dante Lorenso [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 26, 2006 3:43 PM
To: php-general@lists.php.net
Subject: [PHP] I want to write a Multi-threaded PHP Application

All,

For years I have wanted to have the ability to create a new Thread in PHP
similar to how it is done in the Java language.  I understand the
complexities this would involve and have mentioned the idea to the PHP
internals list once and subsequently had the idea shot down and declared
"not likely" until at least PHP 8.0.  However, my needs for a thread are
very simple and might be able to avoid the complexities of shared memory and
synchronization if I could somehow implement even a smaller extension which
does what I want.  Can you entertain this concept and let me know if you
think it is plausible?

I want to write PHP code which looks as follows:

interface Runner {
public static function run() {}
}
class A_Runner implements Runner {
...
public static function run() {
echo ("a runner\n");
sleep(10);
}
}
class B_Runner implements Runner {
...
public static function run() {
echo ("b runner\n");
sleep(10);
}
}

$A = thread_create(new A_Runner());
$B = thread_create(new B_Runner());

thread_start($A);
thread_start($B);

while (true) {
...
echo ("main\n");
sleep(10);
}

And the output of this process should display echo statements from all 3
running process simultaneously.  For example:

...
a runner
main
b runner
a runner
b runner
main
...

It would be nice if the main script could invoke methods on the $A and $B
runner objects in this format:

$A->my_function(...);
$B->my_function(...);

But if that wasn't possible because of shared memory issues or
synchronization problems, maybe the thread extension could handle marshaling
the data on the objects behalf with a function call like:

thread_call($A,  'my_function',  [param 1, param 2, ... param N]);
thread_call($B,  'my_function',  [param 1, param 2, ... param N]);

I would want this functionality in order to build stand-alone PHP server
applications which continually loop in order to execute system processes
like: email notifications, billing, data transfer, transcoding, cron
replacements, or even game servers, etc.  I currently have a solution in
place which does something similar, but it involves IPC and PCNTL and
litters my server's 'ps' listing with many child processes.  Also, some of
the PCNTL child process can become zombies and the whole multi-process model
is not as attractive to me as a developer as the multi-threaded one.

Can anyone tell me whether my idea is possible, whether there exists an
attempt at a PHP thread-like extension (failed or succeeded), and where I
might go to pursue this idea further?

I have already seen the Net_Server PEAR package and am familiar with the
'forking' model used in there.  It's not quite what I want.  I think Threads
are the way to go and am exploring how I can accomplish that.

Dante

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

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



[PHP] I want to write a Multi-threaded PHP Application

2006-04-26 Thread D. Dante Lorenso

All,

For years I have wanted to have the ability to create a new Thread in 
PHP similar to how it is done in the Java language.  I understand the 
complexities this would involve and have mentioned the idea to the PHP 
internals list once and subsequently had the idea shot down and declared 
"not likely" until at least PHP 8.0.  However, my needs for a thread are 
very simple and might be able to avoid the complexities of shared memory 
and synchronization if I could somehow implement even a smaller 
extension which does what I want.  Can you entertain this concept and 
let me know if you think it is plausible?


I want to write PHP code which looks as follows:

interface Runner {
   public static function run() {}
}
class A_Runner implements Runner {
   ...
   public static function run() {
   echo ("a runner\n");
   sleep(10);
   }
}
class B_Runner implements Runner {
   ...
   public static function run() {
   echo ("b runner\n");
   sleep(10);
   }
}

$A = thread_create(new A_Runner());
$B = thread_create(new B_Runner());

thread_start($A);
thread_start($B);

while (true) {
   ...
   echo ("main\n");
   sleep(10);
}

And the output of this process should display echo statements from all 3 
running process simultaneously.  For example:


...
a runner
main
b runner
a runner
b runner
main
...

It would be nice if the main script could invoke methods on the $A and 
$B runner objects in this format:


   $A->my_function(...);
   $B->my_function(...);

But if that wasn't possible because of shared memory issues or 
synchronization problems, maybe the thread extension could handle 
marshaling the data on the objects behalf with a function call like:


   thread_call($A,  'my_function',  [param 1, param 2, ... param N]);
   thread_call($B,  'my_function',  [param 1, param 2, ... param N]);

I would want this functionality in order to build stand-alone PHP server 
applications which continually loop in order to execute system processes 
like: email notifications, billing, data transfer, transcoding, cron 
replacements, or even game servers, etc.  I currently have a solution in 
place which does something similar, but it involves IPC and PCNTL and 
litters my server's 'ps' listing with many child processes.  Also, some 
of the PCNTL child process can become zombies and the whole 
multi-process model is not as attractive to me as a developer as the 
multi-threaded one.


Can anyone tell me whether my idea is possible, whether there exists an 
attempt at a PHP thread-like extension (failed or succeeded), and where 
I might go to pursue this idea further?


I have already seen the Net_Server PEAR package and am familiar with the 
'forking' model used in there.  It's not quite what I want.  I think 
Threads are the way to go and am exploring how I can accomplish that.


Dante

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



Re: [PHP] I want to know if some link is online

2005-10-09 Thread Jasper Bryant-Greene

Jesús Alain Rodríguez Santos wrote:

I would like to know if a web is online, a have this code:

enlace.php



Why not use file_exists()? Also, you probably want to use 
$_GET['enlance'] rather than $enlance.



 if (!$enlinea){
header("Location: $muerto");
}


You need to specify an absolute URI here 
(http://www.example.com/myimage.gif for example).


--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

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



[PHP] I want to know if some link is online

2005-10-09 Thread Jesús Alain Rodríguez Santos
I would like to know if a web is online, a have this code:

enlace.php



In other page  I hve this:

page.php

http://www.cfg.jovenclub.cu";>

Somebody can tell me what it's wrong, because the image did not
show, of course that the pages and bouth image are in the same
dorectory.
Please any suggestion


-- 
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.

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



Re: [PHP] I want to get count rows with the pear packet

2005-05-12 Thread Richard Lynch
On Thu, May 12, 2005 7:14 pm, Tomás Rodriguez Orta said:
> Hello hard people!!!
> I want to get count rows at the query using odbc over windows.
> but I can't get any value of this, I doing this.
>
> $sql="SELECT * FROM id Like '$id'";
> $res=$db->query($sql);
> $numRecords=$res->numRows();
> echo $numRecords;
>
> but when I the page print $numRecords I saw this Object id #5

As I recall, some ODBC drivers simply don't support a numRows call -- and
they return -1 when they get used...

At a minimum, if you want a good answer, you really need to tell the list
*WHICH* odbc driver you are using, as well as *which* object-oriented
database abstraction layer you are using in your $db variable.

And, finally, what kind of database you are connecting to -- ODBC works
with virtually every database on the planet.  Some databases won't support
a numRows() function, or at least not in some circumstances.

Of course, it's also possible that your db abstraction layer in $db
doesn't return an integer of the number of rows from numRows() method, but
returns some kind of object instead, and you need to call a method on that
object to find out the actual number of rows.  That would be a pretty
goofy thing to do, but it's possible.

As it stands now, we have nowhere near enough info to help you!

You should also try using var_dump() and printr() on your $numRecords
object to see what structure it has.  That alone could tell you what is
going on.

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

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



[PHP] I want to get count rows with the pear packet

2005-05-12 Thread =?iso-8859-1?Q?Tom=E1s_Rodriguez_Orta?=
Hello hard people!!!
I want to get count rows at the query using odbc over windows.
but I can't get any value of this, I doing this.

$sql="SELECT * FROM id Like '$id'";
$res=$db->query($sql);
$numRecords=$res->numRows();
echo $numRecords;

but when I the page print $numRecords I saw this Object id #5 

somebody can Help me?

I need an small help. please

regrads TOMAS
 



-
Este correo fue escaneado en busca de virus con el MDaemon Antivirus 2.27
en el dominio de correo angerona.cult.cu  y no se encontro ninguna coincidencia.

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



[PHP] i want help,thanks

2003-12-03 Thread 乌有 无
Hello:
 I want your help!
 The session sometime works well,sometime works badly!
It creates new empty file in /tmp.I also find this problem
with apache1.3.12&php4.1.1&sybase11.9.2&linux
My php.ini is fault
my server config:
   php4.3.3
   httpd2.0.44
   linux 9
   sybase-11.9.2
tar-vzxf php-4.3.3.tar.gz
./configure ?with-apxs2=/home/apache/bin/apxs
?with-sybase-ct=/opt/Sybase-11.9.2 ?enable-ftp ?enable-track-vars
?disable-cli
make
make install
cp php.ini-dist /usr/local/lib/php.ini

   
 Thanks a lot

Reproduce code:
---
login.php:
$user_array=sybase_fetch_row($result);
session_start(); 
session_register("user_array");
...
index.php:
session_start();
$user_name=$user_array[1];


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [PHP] i want to send 2 variables????

2003-01-09 Thread rw
Quoting Ysrael Guzmán <[EMAIL PROTECTED]>:

###  
### i like send two variables using:
###  
### href="mi page.php?http://www.php.net/)
### To unsubscribe, visit: http://www.php.net/unsub.php
### 
### 

Here's one idea!


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




Re: [PHP] i want to send 2 variables????

2003-01-09 Thread Joshua Pierre
On Thu, Jan 09, 2003 at 09:14:21AM -0500, Ysrael Guzm?n wrote:
>  
> i like send two variables using:
>  
> href="mi page.php?  

http://blah.com/page.php?var1=contents&var2=contents

That should do it for you.

Cheers,

Josh

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




[PHP] i want to send 2 variables????

2003-01-09 Thread Ysrael Guzmán
 
i like send two variables using:
 
href="mi page.php?http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] I want a script to run after a page already loads.

2002-05-30 Thread Ed Gorski

well what does the script do?  Is it integral to the page?

ed

At 02:42 PM 5/30/2002 -0400, Phil Schwarzmann wrote:
>I have a script that takes a VERY long time to run.  So the page just
>kinda hangs for a minute if not longer before the script is complete.
>
>I want a page to fully load, then I want this script to run.  Is this
>possible?


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




Re: [PHP] I want to use a mailer other than sendmail

2002-05-03 Thread Alex Shi

Thank you, Rasmus. I am going to try your way right away..

Alex

> Alex, the real answer is to just turn your sendmail into a SMTP
> passthrough.  It is dead simple to do.  Locate your sendmail.cf file.
> (Yeah, I can already hear the screams of anguish, but this file isn't
> actually all that bad)
> 
> Now find the line that starts with "DS" and change it so it says:
> 
> DSmail.mindspring.com
> 
> for example.
> 
> Then restart your sendmail.  And now hocus-pocus-presto-shazzam, your
> sendmail suddenly works great for all your apps, not just PHP.
> 
> -Rasmus
> 
> On Fri, 3 May 2002, John Holmes wrote:
> 
> > >From php.ini:
> >
> > [mail function]
> > SMTP = localhost ;for
> > win32 only
> > sendmail_from = [EMAIL PROTECTED] ;for win32 only
> > ;sendmail_path =
> >
> > Enter the name of your SMTP server on the first line, instead of
> > localhost. If you use mindspring, for example, you would put
> > mail.mindspring.com instead of localhost.
> >
> > ---John Holmes...
> >
> > > -----Original Message-
> > > From: Alex Shi [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, May 03, 2002 6:52 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] I want to use a mailer other than sendmail
> > >
> > > Hi,
> > >
> > > I am using PHP 4.0.4pl1 on RH 7.0. I know PHP uses sendmail
> > > as it's default mailer. However on my system sendmail has never
> > > been working well. So I am thinking that if it is possible to
> > > configure php to use my ISP's SMTP server instead of using
> > > the sendmail. Any one can help me out how to do this?
> > >
> > > Thanks in advance!
> > >
> > > Alex
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> 


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




RE: [PHP] I want to use a mailer other than sendmail

2002-05-03 Thread Rasmus Lerdorf

Uh, John, note the "for win32 only" in your reply, then note the "RH7.0"
in the question.

Alex, the real answer is to just turn your sendmail into a SMTP
passthrough.  It is dead simple to do.  Locate your sendmail.cf file.
(Yeah, I can already hear the screams of anguish, but this file isn't
actually all that bad)

Now find the line that starts with "DS" and change it so it says:

DSmail.mindspring.com

for example.

Then restart your sendmail.  And now hocus-pocus-presto-shazzam, your
sendmail suddenly works great for all your apps, not just PHP.

-Rasmus

On Fri, 3 May 2002, John Holmes wrote:

> >From php.ini:
>
> [mail function]
> SMTP  =   localhost   ;for
> win32 only
> sendmail_from =   [EMAIL PROTECTED];for win32 only
> ;sendmail_path=
>
> Enter the name of your SMTP server on the first line, instead of
> localhost. If you use mindspring, for example, you would put
> mail.mindspring.com instead of localhost.
>
> ---John Holmes...
>
> > -Original Message-
> > From: Alex Shi [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, May 03, 2002 6:52 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] I want to use a mailer other than sendmail
> >
> > Hi,
> >
> > I am using PHP 4.0.4pl1 on RH 7.0. I know PHP uses sendmail
> > as it's default mailer. However on my system sendmail has never
> > been working well. So I am thinking that if it is possible to
> > configure php to use my ISP's SMTP server instead of using
> > the sendmail. Any one can help me out how to do this?
> >
> > Thanks in advance!
> >
> > Alex
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




RE: [PHP] I want to use a mailer other than sendmail

2002-05-03 Thread John Holmes

>From php.ini:

[mail function]
SMTP=   localhost   ;for
win32 only
sendmail_from   =   [EMAIL PROTECTED];for win32 only
;sendmail_path  =

Enter the name of your SMTP server on the first line, instead of
localhost. If you use mindspring, for example, you would put
mail.mindspring.com instead of localhost.

---John Holmes...

> -Original Message-
> From: Alex Shi [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 03, 2002 6:52 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] I want to use a mailer other than sendmail
> 
> Hi,
> 
> I am using PHP 4.0.4pl1 on RH 7.0. I know PHP uses sendmail
> as it's default mailer. However on my system sendmail has never
> been working well. So I am thinking that if it is possible to
> configure php to use my ISP's SMTP server instead of using
> the sendmail. Any one can help me out how to do this?
> 
> Thanks in advance!
> 
> Alex
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] I want to use a mailer other than sendmail

2002-05-03 Thread Alex Shi

Hi,

I am using PHP 4.0.4pl1 on RH 7.0. I know PHP uses sendmail 
as it's default mailer. However on my system sendmail has never 
been working well. So I am thinking that if it is possible to
configure php to use my ISP's SMTP server instead of using
the sendmail. Any one can help me out how to do this?

Thanks in advance!

Alex



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




Re: [PHP] *** I want a swanky icon in the address bar, like major sites (e.g. php.net, google.com)...

2001-10-22 Thread Kurt Lieber

Um...this isn't php related and I already get a ton of emailcould we keep 
things on-topic?

that said, check out www.favicon.com -- it should have the info you need.

--kurt

On Monday 22 October 2001 11:37, you wrote:
> Anyone out there know how to set the icon that is shown in the address bar,
> to the left of the URL?
>

-- 
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] *** I want a swanky icon in the address bar, like major sites (e.g. php.net, google.com)...

2001-10-22 Thread Robin McKenzie



Anyone out there know how to set the icon that is shown in the address bar,
to the left of the URL?

It's also used in the favourites pane.

I know this isn't really the right place to make this post, but I figured
that there are so many experienced programmers out there writing websites,
that someone would have come across this before...

Regards,
Robin



-- 
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]




RE: [PHP] I Want

2001-08-06 Thread Jason Murray

> i want to make a function that read my file line by
> line and word by word to find a certain word , if the
> function return this word it is return true , if not 
> it return false .

if (strstr(implode("", file("filename.txt")), "myword")
{
  echo "File conatined 'myword'\n";
}
else
{
  echo "File didn't conatin 'myword'\n";
}

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"Work now, freak later!"

-- 
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] I Want

2001-08-06 Thread Alawi Albaity

i want to make a function that read my file line by
line and word by word to find a certain word , if the
function return this word it is return true , if not 
it return false .
Thabks 

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.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]




Re: [PHP] I want to AUTO_INCREMENT fields

2001-07-26 Thread elias

yes, sort of...
both have same number.

"Alexander Skwar" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
So sprach »elias« am 2001-07-26 um 11:23:56 +0200 :
> first field is the primary key and is called 'id' and is an integer,
> and i want another field of type integer to be also autoincremented...

Pardon me - but what would be the use??   Both columns would contain the
same numbers, no?

Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 18 hours 13 minutes



-- 
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]




Re: [PHP] I want to AUTO_INCREMENT fields

2001-07-26 Thread Alexander Skwar

So sprach »elias« am 2001-07-26 um 11:23:56 +0200 :
> first field is the primary key and is called 'id' and is an integer,
> and i want another field of type integer to be also autoincremented...

Pardon me - but what would be the use??   Both columns would contain the
same numbers, no?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 18 hours 13 minutes

--
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]




Re: [PHP] I want to AUTO_INCREMENT fields

2001-07-26 Thread David Robley

On Thu, 26 Jul 2001 18:53, elias wrote:
> Hi!
>
> I want to have to fields,
> first field is the primary key and is called 'id' and is an integer,
> and i want another field of type integer to be also autoincremented...

If you are using mysql, this snippet from the manual answers your 
question:

NOTE: There can be only one AUTO_INCREMENT column per table, and it must 
be indexed.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Don't play stupid with me! I'm better at it.

-- 
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] I want to AUTO_INCREMENT fields

2001-07-26 Thread elias

Hi!

I want to have to fields,
first field is the primary key and is called 'id' and is an integer,
and i want another field of type integer to be also autoincremented...



-- 
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]




Re: [PHP] I want to learn this!

2001-07-15 Thread [EMAIL PROTECTED]

on 7/15/01 4:39 PM, Minardi boy at [EMAIL PROTECTED] wrote:


> Are there any books you guys/gals could recommend? Are there (non
> university/school) classes (satisfactory)?

Try: the Oreilly PHP pocket reference. It shows you how to make forms.

Also "MySQL" from the New Riders has a good chapter on PHP and mySQL

www.webmonkey.com has some good tutorials.

hope this helps!




-- 
[EMAIL PROTECTED]
http://futurebird.diaryland.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]




Re: [PHP] I want to learn this!

2001-07-15 Thread Aral Balkan

If you're running Windows, try the .chm (windows helpfile?) version of the
manual -- IMHO it's much easier to navigate then the HTML version. I find it
indispensable.

Aral :)
__
([EMAIL PROTECTED])
New Media Producer, Kismia, Inc.
([EMAIL PROTECTED])
Adj. Prof., American University
¯¯



-- 
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] I want to learn this!

2001-07-15 Thread Minardi boy

Hello

My name is Robert-Jan and I've been webdesigning since 97 (very basic HTML
sites, little Java and Flash).
I got a job on the web in 99 and this was mainly providing content and other
guys did the asp stuff for me.

This is why I kindo overslept the database hype. And heck I want to learn
it!
The question is where can I learn this. I've downloaded the manual at
php.net but this wasn't very satisfying as I really don't like reading lots
of complicated stuff on the screen of my laptop.
Are there any books you guys/gals could recommend? Are there (non
university/school) classes (satisfactory)?

Please tell me cause I really want to automate the sites I run now.

Cheers and thanks for your help

Robert-Jan
www.forzaminardi.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]




RE: [PHP] I want to get the input of keyboard

2001-06-30 Thread scott [gts]

php://stdin
php://stdout
php://stderr

are also for console input/output...

> -Original Message-
> From: Richard Lynch [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] I want to get the input of keyboard
> 
> $file = fopen('php://input', 'r');
> $char = fread($file, 1);
> 


-- 
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]




Re: [PHP] I want to get the input of keyboard

2001-06-28 Thread Richard Lynch

> I want to  get the  input of keyboard from php files,but i can't know how
to
> do.
>
> Who can tell me any advace about that?

If you want the input from the keyboard on the web-server machine (not the
client) you can use:

$file = fopen('php://input', 'r');
$char = fread($file, 1);

If you want keyboard input from a web browser client, you'll have to either:

Use JavaScript to capture the input, and then open up another HTTP
connection to a totally different PHP script to do something with it, or

Create a Java applet and Java servelet to have a keep-alive connection that
captures the browsers keystrokes and sends them back (via the Java servlet)
to PHP.

The first option will be dog-slow and completely un-usable for all but a
very limited class of solutions...

Keep in mind that PHP runs on the *SERVER*, and, in fact, your PHP script is
completely finished, dead, and gone by the time the user types a key.

If these options are unhelpful, tell us what you are actually trying to do
at a higher level.

Oh yeah:  For purely server-side shell-scripting keyboard cool-ness, I would
imagine that the new GTK-PHP combination would have some nifty stuff in
it...  Haven't even looked at it myself, and I don't even know GTK, so it
will be awhile before I can say anything more intelligent about it...  Not
that that always stops me :-)

--
WARNING [EMAIL PROTECTED] address is an endangered species -- 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]




Re: [PHP] I want to get the input of keyboard

2001-06-26 Thread elias


something like that


""little boy"" <[EMAIL PROTECTED]> wrote in message
9h90pi$3ag$[EMAIL PROTECTED]">news:9h90pi$3ag$[EMAIL PROTECTED]...
> hi,all
> I want to  get the  input of keyboard from php files,but i can't know how
to
> do.
>
> Who can tell me any advace about that?
> Thx.
>
>
>
> --
> 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]




Re: [PHP] I want to get the input of keyboard

2001-06-26 Thread Hugh Bothwell

""little boy"" <[EMAIL PROTECTED]> wrote in message
9h90pi$3ag$[EMAIL PROTECTED]">news:9h90pi$3ag$[EMAIL PROTECTED]...
> hi,all
> I want to  get the  input of keyboard from php files,but i can't know how
to
> do.
>
> Who can tell me any advace about that?
> Thx.

If you're running PHP as a server-side web scripting language, you can
forget it.  What you have to do is write an HTML form and process the
returned data.  If you need more interaction than that, look at JavaScript
or Flash/ActionScript.



-- 
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] I want to get the input of keyboard

2001-06-26 Thread little boy

hi,all
I want to  get the  input of keyboard from php files,but i can't know how to
do.

Who can tell me any advace about that?
Thx.



-- 
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]




Re: [PHP] I want to execute a cgi

2001-03-25 Thread David Robley

On Sat, 24 Mar 2001 14:58, Brandon Orther wrote:
> Hello,
>
> I have a cgi that I run in telnet by doing this:
>
> perl /script/cgi-script.cgi name=cgi+script purpose=test
>
> is there a way I can run a cgi script and pass it variables?
>
> Thanks
> Brandon

Check the Program execution functions; exec, system or the backtick 
operator should do what you want.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
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] I want to execute a cgi

2001-03-23 Thread Brandon Orther

Hello,

I have a cgi that I run in telnet by doing this:

perl /script/cgi-script.cgi name=cgi+script purpose=test

is there a way I can run a cgi script and pass it variables?

Thanks
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]




Re: [PHP] I want this magic directory

2001-03-14 Thread Joe Stump

Read up on forcetype'ing on phpbuilder.com - it will do just what you want it
to do.

--Joe

On Wed, Mar 14, 2001 at 06:08:18PM +0800, Alex wrote:
> I just want every customer on my site get his own unique id as his directory
> name but the pages requested are all processed by the root.
> Such as: customer1's url is http://www.mysite.com/2000123/
>  customer2's url is http://www.mysite.com/2000124/
>   ^^^UID
> and the pages requested are actually processed by http://www.mysite.com/
> 
> I want it to implement security and personalization. I don't want to use
> .php?uid=XXX because of lazy. :)
> thanks.
> 
> 
> 
> 
> 
> 
> 
> -- 
> 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]

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.geekshare.com http://www.care2.com http://www.miester.org/\\
"Those who can, create. Those who can't, complain."_\_V
---


-- 
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] I want this magic directory

2001-03-14 Thread Alex

I just want every customer on my site get his own unique id as his directory
name but the pages requested are all processed by the root.
Such as: customer1's url is http://www.mysite.com/2000123/
 customer2's url is http://www.mysite.com/2000124/
  ^^^UID
and the pages requested are actually processed by http://www.mysite.com/

I want it to implement security and personalization. I don't want to use
.php?uid=XXX because of lazy. :)
thanks.







-- 
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]




Re: [PHP] i want permanently connect in imap_open()

2001-02-03 Thread Richard Lynch

> i open mailbox with imap_open
> when i move next page, mailbox close.
> and i must open mailbox again.
> i want connection contiue, even if i move next page

Don't think you can.

HTTP is inherently stateless...

Even if you could, when would the mailbox close?  You can't rely on your
web-surfers to always hit a close button.

There *might* be an imap_popen() that would reduce the overhead of
subsequent mailbox openings, because PHP and IMAP would agree in advance to
keep the connection around for awhile in case it needs to be re-used...  (I
say this only cuz I know there's a mysql_pconnect().  I have no clue how to
work IMAP)

But you still need to call imap_popen() on each page then, it will just work
faster.

--
Visit the Zend Store at http://www.zend.com/store/
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]




[PHP] i want permanently connect in imap_open()

2001-02-03 Thread 정희철

i open mailbox with imap_open
when i move next page, mailbox close.
and i must open mailbox again. 
i want connection contiue, even if i move next page