[PHP] Re: foreach and destroying variables for memory saving

2008-12-10 Thread Gal Gur-Arie
Tim | iHostNZ wrote: Hi All, Just to annoy the hell out of you, another thing that has been on my mind for a while: I love the foreach ($ar as $k = $v) { ... } construct and use it all the time. However, I read somewhere that foreach actually uses a copy of $ar instead of the array

[PHP] Re: how do i allow more than 2 threads of php to run?

2008-12-09 Thread Gal Gur-Arie
Rene Veerman wrote: i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? Any chance that you're using session and checking it from the same browser from different tabs (using same session

Re: [PHP] Timeout for fopen ?

2007-10-14 Thread Gal
You can use the CURL module, which has support for timeout. http://www.php.net/manual/en/ref.curl.php debussy007 wrote: Hello, I want to use fopen to open an URL, but is it possible to add a timeout ? This to avoid that fopen slows down my script ? Because if site I access takes 10 secs to

[PHP] Large amount of data over SOAP / MTOM

2007-05-16 Thread Gal
in advance, Gal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Any idea when 4.3.11 will be released?

2005-01-16 Thread Gal
of 4.3.11 ? Regards, Gal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Any idea when 4.3.11 will be released?

2005-01-16 Thread Gal
Hi Jeffery, Thanks for the info. I'm happy to read that the problem has been fixed. but i don't intend to use a CVS version on a production machine. This is the reason i asked for info on the official 4.3.11 release date. Do you have any idea when it is planned ? Thanks, Gal Jeffery Fernandez

[PHP] Merge 2 XML files using PHP 4

2004-04-07 Thread Gal
/ NODE name=ccc value=PHP_is_good / /XML expected merge result: === XML NODE name=aaa value=NEW_value / NODE name=bbb value=hello all / NODE name=ccc value=PHP_is_good / /XML Thanks, Gal -- PHP General Mailing List (http://www.php.net

Re: [PHP] Merge 2 XML files using PHP 4

2004-04-07 Thread Gal
Raditha Dissanayake wrote: Gal wrote: Hello all, Does anyone here add some good experience of writing PHP script which is merging 2 XML files. Looks like this should go into an algorithms mailing list :-) in the mean time you might want to start looking at sax parser functions

[PHP] Re: Error redirect function

2004-01-08 Thread Gal
if () // Ok { } else{ Header(Location: ./error.php?iErrorType=1); die(); } Doug Parker wrote: I have a message board script that requires certain parameters like message_id, thread_id, etc. The whole thing works fine, I'd like to have a generic error page to default to in the case that

[PHP] Re: 4.3.1 for Debian Woody?

2003-10-19 Thread Gal
as far as i know there are no DEB packages for 4.3.1 for Woody. I'm using the unstable (Debian SID) and i have PHP 4.3.3 Joel Konkle-Parker wrote: Does anyone have, or know where to get, a Debian Woody package for PHP 4.3.1? I've checked apt-get.org, but nobody seems to have that version. Thanks

[PHP] Re: exec command

2003-10-01 Thread Gal
How do you run this ? Which user ? if its done via Apache - you can't run useradd with the apache user name. if you run it from command line make sure you are root. Nabil wrote: hi all; I want to execute #useradd -d /home/all -g wahtever -s /bin/bash newuser how can I do it ... I used exec and

[PHP] Re: exec shell command from php

2003-10-01 Thread Gal
You are the apache user. you can run this to find which user are you. ?php passthru('whoami'); ? Nabil wrote: hi all; - When i run php.. what user am i using ? is it apache user (nobody) ?? - How can i execute useradd command from php ? should i write it in pearl/cgi ?? - I want to grant my

[PHP] Re: Variables not passed on localhost setup

2003-10-01 Thread Gal
The problem is that your php.ini has register_globals = Off change it to On. You can also do the following at the top of your script - (this is the correct way): ?php $TestVar = (!empty($_GET['TestVar'])) ? true : false; ? Greg Watson wrote: Hi Guys, I've Googled and RTFM'd, but I can't seem to

Re: [PHP] Variables not passed on localhost setup

2003-10-01 Thread Gal
Reply - this means your php is running on php defaults configuration. you need to copy the 'php.ini-dist' file as 'php.ini' to c:\windows. edit the the file 'C:\windows\php.ini' and change register_globals = Off to register_globals = On Greg Watson wrote: Thank you for that answer! That worked

[PHP] Re: Session data is lost

2003-09-30 Thread Gal
please paste an example of the 2 pages Harald Kürsten wrote: Hi. In my script I start a session, register certain variables and redirect to the next page. The session file is written to /tmp, but contains no data ! Any idea ? Thanx for help, Harald -- PHP General Mailing List

[PHP] Re: Users Online

2003-09-24 Thread Gal
You can use XML-HTTP - works both Mozilla 1.x and I.E. 5.x and write it to a DIV. Pete M wrote: I've dome this recently using a small iframe src=users_online.php in the top right corner. users_online.php has the meta refresh tag set. META HTTP-EQUIV=refresh content=2;URL=users_online.php

[PHP] Re: Users Online

2003-09-24 Thread Gal
yes. But it think that only since version 1.1 (latest mozilla version is 1.5rc1) Pete M wrote: Does xml_HTTP work with Mozilla ??? ! pete al wrote: You can use XML-HTTP - works both Mozilla 1.x and I.E. 5.x and write it to a DIV. Pete M wrote: I've dome this recently using a small iframe

[PHP] Re: Users Online

2003-09-24 Thread Gal
here you can find example of XML HTTP that will work both I.E Mozilla http://webfx.eae.net/dhtml/xmlextras/xmlextras.html Gal wrote: yes. But it think that only since version 1.1 (latest mozilla version is 1.5rc1) Pete M wrote: Does xml_HTTP work with Mozilla ??? ! pete al wrote: You can

[PHP] Re: Accepting data from URL Parameters

2003-09-24 Thread Gal
try this: ?php echo 'Value1 = '.$_GET['Value1']; echo br\n; echo 'Value2 = '.$_GET['Value2']; ? Jared Steckel wrote: I appologize for what may be a newbie-like request, but I have not been able to find this information in the PHP documentation. If I were to have a link on

Re: [PHP] PHP Editor - which to use?

2003-09-23 Thread Gal
The Best is the GTK verstion of the classic VI editor (latest VI 6.2 - uses GTK 2 on Linux) and there is also a Windows version. It's the best and you don't have to pay for licenses. http://www.vim.org/index.php Notepad - is very poor. you can not controle tabs spaces, see white space and

[PHP] XQL module ?

2003-09-23 Thread Gal
Does anyone know if PHP has module for XQL - XML Queary Language ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using system

2003-09-17 Thread Gal Gur-Arie
Hello, try this: ?php $sMyHostname = exec('uname -a 21'); echo \n.$sMyHostname.\n; ? Uros wrote: Hello Robert, I think not here is my code #!/usr/local/bin/php -q ?php $ret = `nslookup -timeout=3 www.myhost.com |grep Non-existent host/domain`; ? I always get automaticaly output. I also try to

[PHP] Re: Using system

2003-09-17 Thread Gal
try this: ?php $sMyHostname = exec('uname -a 21'); echo \n.$sMyHostname.\n; ? Uros wrote: Hello! I'm pulling my hair. What is the right syntax to set output of some system call to variable. I tried everything (system, shell_exec,exec) and always get output to screen. Please help. PHP version