Re: [PHP] Re: Think I found a PHP bug

2011-12-08 Thread Rasmus Lerdorf
s all environments. -Rasmus On 12/06/2011 04:46 PM, Patricia Dewald wrote: > > In OpenSuSE 12.1 i can reproduce this issue. > > My workaround is to check the correct timezone. > > On Tue, 15 Nov 2011 23:34:18 +0100, Geoff Shang > wrote: > >> Hi, >> >> A co

Re: [PHP] semaphores are broken

2011-05-08 Thread Rasmus Lerdorf
rg/bindings:php Or if you want something higher level you could have a look at Gearman. Your server could register itself as a Gearman worker and you could use the nice Gearman API to communicate with the server. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] multi thread work?

2010-08-04 Thread Rasmus Lerdorf
gt;> wait >> answer of the previous one >> >> i hope if u could understand me ^^ > > This question has been asked several times over the last week, have a look > over the archive ;). > > You need to be looking at something like process forking ( > http://php.net/

Re: [PHP] the state of the PHP community

2010-07-29 Thread Rasmus Lerdorf
get a lot of say into what the tool does and how it does it. People who are not capable of building the tool can shout suggestions from the sidelines and occasionally some of these will stick, but often they won't. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] socket multithreading problem

2010-07-29 Thread Rasmus Lerdorf
If you have multiple sockets you should be looking at http://php.net/socket_select and not threads. Threads and/or pcntl processes would be a very inefficient way to deal with something as simple as reading messages asynchronously from many sockets. -Rasmus -- PHP General Mailing List (http://www.

[PHP] Re: [PHP-INSTALL] Getting file pointer from file descriptor

2010-04-23 Thread Rasmus Lerdorf
just call file_get_contents()/file_put_contents(), but you can also use fopen()/fread()/fwrite() if you prefer that approach. -Rasmus On Fri, Apr 16, 2010 at 5:15 AM, Naga Kiran K wrote: > Hi Rasmus, > > Thanks for reply. > The requirement I was looking for is to read/wri

Re: [PHP] Best way to manage open slots for download

2006-12-31 Thread Rasmus Lerdorf
t secure and good way. > > What other ways can you recommend to me for the situtation? Read through this: http://www.php.net/manual/en/features.connection-handling.php -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php 5 and register_globals=off gives lotsa errors

2006-12-30 Thread Rasmus Lerdorf
['action']) ? $_GET['action'] : null; replace null in the above with whatever you want your default action to be there if it is not provided in the URL. -Rasmus Wikus Moller wrote: > Hi to all. > > I am having huge problems running my script, which worked fine

Re: [PHP] mime with php4.4.4 does not work anymore

2006-12-30 Thread Rasmus Lerdorf
PHP, what PHP functionality is IPB using? Perhaps they are using the deprecated mime_magic stuff? They should be using pecl/fileinfo functions if they need that stuff, but I think you will have to ask them. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] image commands (again)

2006-11-05 Thread Rasmus Lerdorf
Or you use a cookie-based mechanism like a PHP session and refer to that from the image.php script. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ChangeLog PHP 5.2.0 - Fileupload

2006-11-04 Thread Rasmus Lerdorf
be > talking about what I wanted to know. > > So, could anyone be so kind to explain me what is meant by that and what > its used for? Probably best explained with an example: http://progphp.com/upload.php Try uploading a 200-300k file. The source code is at: http://progphp.com/

Re: [PHP] Viruses

2006-11-02 Thread Rasmus Lerdorf
t a few do get through. Some spammer manually validate their addresses and then spam. It's very difficult to stop those. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Microsoft Partners With Zend

2006-11-01 Thread Rasmus Lerdorf
Rasmus Lerdorf wrote: > The only slight negative as far as you are concerned could be that they > may divert some Zend resources to work on Windows issues that aren't > interesting to you. But consider that there are 1133 people with PHP > cvs accounts. Only 11 work for Zend, an

Re: [PHP] Microsoft Partners With Zend

2006-11-01 Thread Rasmus Lerdorf
might be a bit low, but still. The point is that PHP is a large open source project with broad support from a number of companies and even more stubborn open source developers. No one company can "pervert PHP". -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP & Memory Allocation (checked via TOP)

2006-10-31 Thread Rasmus Lerdorf
$str is 10 bytes then you repeat it 200 times That gives you 2000 bytes. That's 20M not 10M -Rasmus Cabbar Duzayak wrote: > Hi, > > I have written a simple test program to see how php allocates memory. > Test code allocates ~10 Meg of RAM in an array within a loop till

Re: [PHP] Non-blocking sockets

2006-10-27 Thread Rasmus Lerdorf
uot;,119); >> socket_set_nonblock($socket); >> socket_recv($socket,$buf,1024,0); >> echo $buf; > > I *think* you need to be looking here: > > http://php.net/manual/en/function.socket-select.php I would actually suggest going a bit higher level and using stream_socket_client() instead. Using a stream is much more flexible. See the manual page for the function for some examples. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How does the Zend engine behave?

2006-10-26 Thread Rasmus Lerdorf
and made everything dynamic with autoload or weird conditional function and class declarations. If it becomes a runtime decision whether class or a function is declared, or heaven forbid, the same class takes on different signatures based on some runtime condition, then there isn't m

Re: [PHP] Parsing serialized PHP arrays in "C"

2006-10-21 Thread Rasmus Lerdorf
ation. And if you use the same re2c grammar that PHP uses, it will be correct. Using any other implementation likely wouldn't be. Of course, I also wouldn't suggest using serialized PHP for a target that wasn't PHP. Why don't you look at json or perhaps wddx instead

Re: [PHP] LAMP benchmarking tool

2006-09-27 Thread Rasmus Lerdorf
latency numbers use a profiler (http://valgrind.org/info/tools.html#callgrind) to figure out where you are spending your time in your request. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Yahoo! HackDay

2006-09-22 Thread Rasmus Lerdorf
edule/ http://nate.koechley.com/blog/2006/09/22/hookytime-yahoo-developer-day-hack-day-on-sept-29th-and-30th/ http://del.icio.us/chadd/yhackday -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Where to download APC for windows?

2006-08-23 Thread Rasmus Lerdorf
It's a pecl extension, so it is with all the other pecl extensions for Windows at http://pecl4win.php.net/ -Rasmus steve wrote: Yeah, sorry, it is missing from a test version of PHP 5.2. In the test version, it is not available, nor is it on snaps. Likely doesn't work. On 8/2

Re: [PHP] auto_globals_jit breaks $_SERVER var

2006-08-14 Thread Rasmus Lerdorf
what might be the problem? Do you have APC enabled? If so, upgrade to a more recent version. Preferably the CVS one. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Internet Explorer doesn't display UTF-8 page using UTF-8 encoding

2006-08-13 Thread Rasmus Lerdorf
tedd wrote: At 6:48 PM -0700 8/12/06, Rasmus Lerdorf wrote: By the way, everyone should be setting a charset. If you don't set it, IE will look at the first 4k of the body of the page and take a wild guess. -Rasmus -Rasmus: Ok, but why doesn't w3c use it? http://valida

Re: [PHP] Parsing RSS

2006-08-12 Thread Rasmus Lerdorf
scription} EOB; } ?> Very ugly HTML markup there, of course, but add a bit of CSS and make it prettier. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Internet Explorer doesn't display UTF-8 page using UTF-8 encoding

2006-08-12 Thread Rasmus Lerdorf
E will look at the first 4k of the body of the page and take a wild guess. If it guesses wrong, typically because someone injected UTF-7 into your page, then you have an XSS on your hands. -Rasmus Jonny Bergström wrote: It's me again. I might have solved it... in a way. Still quite puzzl

Re: [PHP] Multiple Includes vs. One Long Include (Functions)

2006-08-10 Thread Rasmus Lerdorf
it comes to performance. With file stats on, a single file would again be quicker because you would only need a single stat instead of multiple stats. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Stop process when user close window browser

2006-06-30 Thread Rasmus Lerdorf
appen until the query call returns and you try to write something. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] When is "z" != "z" ?

2006-06-06 Thread Rasmus Lerdorf
of them, doesn't necessarily end up with an ordered set. Rasmus chose to make ++ be useful for generating sensible sequential file names, not sensible ordered strings. Well, it does other sequences too and the first priority is always to try to convert to a number. For example, try incremen

Re: [PHP] Controlling DomDocument's load and loadHTMLFile Request

2006-06-06 Thread Rasmus Lerdorf
gic of PHP 5's stream contexts which is meant to solve this exact problem. The example in the documentation is even exactly the user-agent one. See: http://php.net/libxml_set_streams_context -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] When is "z" != "z" ?

2006-06-06 Thread Rasmus Lerdorf
7; would do a cross-product, for example, treating the two string operands as vectors and returning a vector orthogonal to both of these. But I got tired of trying to explain to people what a cross product was and how strings mapped to vectors in Euclidean space and removed that. You could als

Re: [PHP] When is "z" != "z" ?

2006-06-05 Thread Rasmus Lerdorf
support and we don't have LOCALE-aware operators. You will have to manually use strcoll() to get them, but that is going to change and you will have the ICU collation algorithms available and for Unicode strings it will be automatic. You can still have binary-strings if you don't wan

Re: [PHP] Garbage collection and strange session behaviour

2006-06-04 Thread Rasmus Lerdorf
Are you actually hitting this race condition in the real world? With a decently long maxlifetime setting I can't really see this being a realistic problem. Remember the timer is reset on every access. -Rasmus BNR - IT Department wrote: Hi, Here is a simple script: ".session_id()

Re: [PHP] When is "z" != "z" ?

2006-06-04 Thread Rasmus Lerdorf
finition is irrelevant. Right, and now bring Unicode into the picture and this becomes even more true. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] When is "z" != "z" ?

2006-06-04 Thread Rasmus Lerdorf
tedd wrote: At 1:09 PM -0700 6/4/06, Rasmus Lerdorf wrote: I agree with [1] and [2], but [3] is where we part company. You see, if you are right, then "aaa" would also be less than "z", but that doesn't appear so. Of course it is. php -r 'echo "aaa" &l

Re: [PHP] When is "z" != "z" ?

2006-06-04 Thread Rasmus Lerdorf
tedd wrote: At 12:27 PM -0700 6/4/06, Rasmus Lerdorf wrote: tedd wrote: But, what brothers me about the routine, is that is DOES print "z" where it is supposed to. In other words, the characters a-z are output before continuing with aa and so on. The operation doesn't end

Re: [PHP] When is "z" != "z" ?

2006-06-04 Thread Rasmus Lerdorf
hing like: echo "2"+"3"; In a strictly typed language that would spew an error. In a loosely typed language like PHP you get 5 And yes, I agree that ++ on strings is getting near the edge of that, but there has to be an edge somewhere and not everyone is going to agree

Re: [PHP] When is "z" != "z" ?

2006-06-04 Thread Rasmus Lerdorf
uot;file2" from this. Think about the amount of code you would need to write in C to make that work? Then change $filename to "fileA" and increment it. And you get "fileB". When we get to "fileZ" we don't want to go off into unprintable character land,

Re: [PHP] When is "z" != "z" ?

2006-06-04 Thread Rasmus Lerdorf
d be and we certainly don't want to change the default comparison mechanism to not compare strings alphabetically because that would screw up all sorts of stuff including usorts and peoples' expectations. It's just in this case where you have gotten it into your head that increment

Re: [PHP] When is "z" != "z" ?

2006-06-04 Thread Rasmus Lerdorf
Martin Alterisio wrote: 2006/6/4, Rasmus Lerdorf <[EMAIL PROTECTED]>: tedd wrote: > Hi gang: > > Here's your opportunity to pound me again for not knowing the basics of php. > > I vaguely remember something like this being discussed a while back, but can't

Re: [PHP] When is "z" != "z" ?

2006-06-04 Thread Rasmus Lerdorf
uot;aa" < "z". I would guess this would loop until until just before "za" which would be "yz". It's a bit like looping through the hexadecimal characters. You would have the same effect. However instead of being base-16 with 0-9-a-f you have base-26 using a-z. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OO purism sucks - sell me on PHP5?

2006-06-02 Thread Rasmus Lerdorf
tedd wrote: At 9:00 AM -0700 6/2/06, Rasmus Lerdorf wrote: [EMAIL PROTECTED] wrote: -snip- (a bunch of things over my head) I thought I kept the examples pretty simple actually. If you have specific questions on them I would be happy to explain them in more detail. -Rasmus -- PHP

Re: [PHP] OO purism sucks - sell me on PHP5?

2006-06-02 Thread Rasmus Lerdorf
locales if you choose to use the native mechanism. Beyond that the compiler produces smaller opcode arrays and the executor is faster. Not a directly visible thing, and this is still improving, but definitely a plus. Note that for all of this I am referring to PHP 5.1.x, not 5.0.x. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OO purism sucks - this is a rant for anyone who is allergic to that kind of thing...

2006-06-02 Thread Rasmus Lerdorf
XML and some of the other killer features of PHP 5. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OO purism sucks - this is a rant for anyone who is allergic to that kind of thing...

2006-06-01 Thread Rasmus Lerdorf
of a NOP in my code, it isn't that hard to force it by adding a dummy storage variable along with a comment explaining why you need to do that. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] triming a query

2006-05-14 Thread Rasmus Lerdorf
Ross wrote: Not so good with the string functions but I want to remove the last 15 characters from a query. Thought this would work. echo "the query is".rtrim($query, 15); echo "the query is".substr($query,0,-15); -Rasmus -- PHP General Mailing List (http://www.php.

[PHP] Re: Status report on mailing list?

2006-05-09 Thread Rasmus Lerdorf
f its utility if it's not fixed soon. Does anyone have any info on what happened and when it will be fixed? The lists have not been moved to a new server. The spam filtering mechanism just had an issue yesterday and was fixed a couple of hours ago. -Rasmus -- PHP General Mailing

Re: [PHP] Dates before 1970

2006-04-13 Thread Rasmus Lerdorf
being Unix, doesn't understand that the timestamp can be negative, although I think someone fixed that in PHP 5. In my 11+ years of PHP I have yet to run PHP on Windows, so I wouldn't know. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-11 Thread Rasmus Lerdorf
Richard Lynch wrote: On Mon, April 10, 2006 10:24 pm, Rasmus Lerdorf wrote: You could volunteer to help maintain the user notes. I've just spent five/ten minutes with Google and php.net trying to find the best way to volunteer to do just that... Admittedly not a LOT of effort, but...

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-11 Thread Rasmus Lerdorf
tedd wrote: Here is an example Wez wrote years ago: -snip code - Years ago? stream_socket_client() is php5. How long ago did php5 launch? The first beta was in June 2003. But the streams code was written well before that. -Rasmus -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
Robert Cummings wrote: On Mon, 2006-04-10 at 23:24, Rasmus Lerdorf wrote: Robert Cummings wrote: On Mon, 2006-04-10 at 23:11, Richard Lynch wrote: On Mon, April 10, 2006 9:59 pm, Rasmus Lerdorf wrote: Richard Lynch wrote: It would be REALLY NIFTY if fopen and friends which understand all

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
Robert Cummings wrote: On Mon, 2006-04-10 at 23:11, Richard Lynch wrote: On Mon, April 10, 2006 9:59 pm, Rasmus Lerdorf wrote: Richard Lynch wrote: It would be REALLY NIFTY if fopen and friends which understand all those protocols of HTTP FTP HTTPS and so on, allowed one to set a timeout for

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
Richard Lynch wrote: On Mon, April 10, 2006 4:46 pm, darren kirby wrote: quoth the Robert Cummings: Why do you do this on every request? Why not have a cron job retrieve an update every 20 minutes or whatnot and stuff it into a database table for your page to access? Then if the cron fails to r

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
it is already there and has been since Sept.23 2002 when it was added. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
Richard Lynch wrote: On Mon, April 10, 2006 6:17 pm, Rasmus Lerdorf wrote: Martin Alterisio wrote: Maybe you can read the contents of the feeds using fsockopen() and stream_set_timeout() to adjust the timeout, or stream_set_blocking() to read it asynchronously, and then load the xml with

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
ever suck the file into memory. You can then use a SAX parser like xmlreader on it and your memory usage will be minimal. You will need PHP 5.1.x for this to work. You could also use apc_store/fetch and skip the disk copy altogether. (untested and typed up during a long boring meeting, so

Re: [PHP] Date problems

2006-04-09 Thread Rasmus Lerdorf
('DAY_IN_SECONDS',86400); The problem with doing it this way is that it won't take leap seconds, leap years and daylight savings into account, so on any of these edge cases it will appear to be broken. That's why strtotime("+7 days") is the correct way to do this. -Rasmu

Re: [PHP] Date problems

2006-04-08 Thread Rasmus Lerdorf
Rasmus Lerdorf wrote: Mace Eliason wrote: Hi, I am having troubles adding 7 days to the current date. I have been reading through php.net date() and this is what I have come up with but it doesn't work $today = date('m/d/Y'); $nextweek = date('m/d/Y',mktime(date(&

Re: [PHP] Date problems

2006-04-08 Thread Rasmus Lerdorf
"d")+7, date("Y"))); if I echo the above variables they are the same? Shouldn't the $nextweek be different? You are thinking too much! ;) $nextweek = date("m/d/Y",strtotime("+7 days")); -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ajax please....

2006-04-08 Thread Rasmus Lerdorf
Rasmus Lerdorf wrote: $src = "http://api.local.yahoo.com/MapsService/V1/mapImage?appid=YahooDemo";; $src.= "&location=".urlencode($_GET['loc']). "&output=php&image_width=300&image_height=300&zoom=7"; header("C

Re: [PHP] Ajax please....

2006-04-07 Thread Rasmus Lerdorf
the examples) and it seems quite bulky. I have even tried the YAHOO one, which Rasmus suggested to another guy some time back (found it after looking in the archives) unfortunatly could not find much documentation that I could understand... It's really not hard. Remember my 30s AJAX post a

Re: [PHP] parsing malformed xml documents

2006-04-04 Thread Rasmus Lerdorf
$dom = @DOMDocument::loadHTML($xml); if(is_object($dom)) $xpath = new DOMXPath($dom); } } -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP AJAX Framework - Suggestions Please

2006-04-03 Thread Rasmus Lerdorf
It is a set of tiny standalone components that won't in any way interfere with any other Javascript code you might have and you can pick and choose just the things you need. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PDO, Persistent Connections

2006-03-28 Thread Rasmus Lerdorf
st means it is easier to shoot yourself in the foot since this is really a bad way to approach this. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why Should I Use Zend Optimizer?

2006-03-27 Thread Rasmus Lerdorf
executor. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Switching to UTF-8. Need help.

2006-03-23 Thread Rasmus Lerdorf
hich are full with german and french characters. Any of these aren't shower correctly. What is the workaround for this? In your php.ini file, use: default_charset = "utf-8" -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] no newline after "?>" in the resulting HTML

2006-03-18 Thread Rasmus Lerdorf
ded to the FAQ and to the official PHP tutorial? At least to the discussed part of the tutorial, so PHP beginners like me wouldn't be confused :-) I added it to the tutorial. It will show up the next time the manual is built. -Rasmus -- PHP General Mailing List (http://www.php.

Re: [PHP] no newline after "?>" in the resulting HTML

2006-03-18 Thread Rasmus Lerdorf
the PHP block. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] no newline after "?>" in the resulting HTML

2006-03-18 Thread Rasmus Lerdorf
Another reason is for include files. If you include a file that ends with ?> then you normally don't want that newline. Having a newline output for each file you include doesn't make much sense. So yes, technically the tutorial is wrong. -Rasmus -- PHP General Mailing List (http

Re: [PHP] Re: Possible hacker using php script to send e-mails?

2006-03-11 Thread Rasmus Lerdorf
ment to the mail function. That argument is specifically for doing free-form headers, so as long as you only use the to, subject and message arguments to the mail function you are safe. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: APC and PHP 5.1.2

2006-03-03 Thread Rasmus Lerdorf
because they need to be serialized and unserialized in and out of the cache and you can only cache the properties anyway, so pull the data you want to cache into an array and cache that. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] APC and PHP 5.1.2

2006-03-02 Thread Rasmus Lerdorf
he weird stuff always happen to me? Without APC it runs fine. I'm using Fastcgi version if that matters. It probably does. I have never tried it against the Fastcgi sapi. Try it with the Apache module version to rule this out. -Rasmus -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] APC and PHP 5.1.2

2006-03-02 Thread Rasmus Lerdorf
steve wrote: OK, will try. Does this work in the CVS version? $getter(); } } public function getTest() { return 'OK'; } } $result=''; $one = new A(); var_dump($one); echo "Test \$one->getTest(): "; echo $one->getTest(); echo "Test

Re: [PHP] APC and PHP 5.1.2

2006-03-02 Thread Rasmus Lerdorf
PROTECTED]:/repository login Password: phpfi cvs -d :pserver:[EMAIL PROTECTED]:/repository co pecl/apc cd pecl/apc phpize ./configure --enable-apc-mmap --with-apxs=/usr/local/bin/apxs \ --with-php-config=/usr/local/bin/php-config make make install (and restart your web server) -Rasm

Re: [PHP] Floored!

2006-02-24 Thread Rasmus Lerdorf
e floor operation, you will always get 10 as long as your fuzz factor is larger than the precision error of your machine. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can php.ini include another config file

2006-02-23 Thread Rasmus Lerdorf
can't chain ini files like that, but you can build your PHP using: --with-config-file-scan-dir=/etc/php Then any .ini file you put in /etc/php will be parsed in alphabetical order. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Does anyone here use the pecl extension APC?

2005-11-17 Thread Rasmus Lerdorf
Filing a bug against APC with a gdb backtrace from one of these crashes would be useful. See http://pecl.php.net/bugs/report.php?package=APC -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] serializing result sets or what?

2005-09-28 Thread Rasmus Lerdorf
ation, using > apc_store() and apc_fetch(). Everything except objects. That also means if you have a nested array containing objects, it will have problems. Right now you have to serialize the object yourself if you want to cache it, but I will add code soon to do that automatically internally. -

Re: [PHP] Re: cache xml objects in php5

2005-09-27 Thread Rasmus Lerdorf
Is there any documentation or > available sample extensions that I can start with? Every extension in the ext/ directory of the PHP sources is an example. Also look at pecl/* Al read README.EXT_SKEL and README.PARAMETER_PARSING_API in the PHP sources. -Rasmus -- PHP General Mailing List (http://w

Re: [PHP] cache xml objects in php5

2005-09-27 Thread Rasmus Lerdorf
Then you can cache just about any PHP > variable, including objects, in memory. He did say that serialization wasn't an option and you can't use memcached without serializing. You may not realize you are serializing, but the memcache extension serializes internally. There was also n

Re: [PHP] Problems with headers

2005-09-22 Thread Rasmus Lerdorf
this ? Tell your editor to not send a BOM. If it won't let you configure that, throw it away. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problems with headers

2005-09-22 Thread Rasmus Lerdorf
Graham Anderson wrote: > Thanks Rasmus :) > that is an incredibly cool tip: EOB > Surprised I did not see you at the Digital Rights [hollywood digital] > conference in LA early this week. > Upside: Free sushi and an ocean view. Downside: Lots of 'agency' types > and sa

Re: [PHP] Problems with headers

2005-09-22 Thread Rasmus Lerdorf
Graham Anderson wrote: > $quote = "\""; > $xml = ''; > $xml .= ''."\n"; > $xml .= ''."\n"; > $xml .= ''."\n"; > $xml .= ''."\n"; > $xml .= ''."\n"; > $xml .= ''."\n"; > $xml .= ''; > header('Content-Type: video/quicktime'); //took out a space > header ("Content-Length: ".strlen($xml)); // added a

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread Rasmus Lerdorf
[EMAIL PROTECTED] wrote: > You're telling me. That's why I think php or apache kills it. I didn't really follow this, but typically you can debug exec problems from the command line by switching to the web server user id and running the exact same command. -Rasmus -- PHP Ge

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
->prop++; echo $a->prop; This will of course output 2. Manipulating the object through any of its references will be reflected in all the others as there is just one object here. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
Robert Cummings wrote: > On Wed, 2005-09-21 at 00:58, Rasmus Lerdorf wrote: > >>And for PHP5 you can just drop all references related to objects and it >>will do the right thing. > > > Eeeek, that's not entirely true. Sometimes you want a real reference to >

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
function definition or do: $class =& new $classname(); return $class; And for PHP5 you can just drop all references related to objects and it will do the right thing. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
> $m = $n - $value; > if($m < 0) $m = 0; > $this->set($key, $m); // exptime? > } > $this->unlock($key); > return $m; > } Are you sure you have the right code snippet here? That's not a return line and I see no references there. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-20 Thread Rasmus Lerdorf
made to throw a fatal error in PHP 5.x, which was a mistake on our part. It now throws an E_STRICT instead because in some cases this may not actually be a bug. There are some cases where you don't care about the discarded reference. In PHP 4.3.x assigning references to temp_vars could cau

Re: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-20 Thread Rasmus Lerdorf
led by default but can be turned on to help you track down potential sources of errors such as doing: sort($this->getArray()); If you have forgotten to make the getArray() method return its array by reference, then that sort call will do absolutely nothing and it can often be really hard t

Re: [PHP] Quick Poll: PHP 4 / 5

2005-09-16 Thread Rasmus Lerdorf
Robert Cummings wrote: > On Fri, 2005-09-16 at 10:28, Rasmus Lerdorf wrote: > >>Stephen Leaf wrote: >> >>>$this->urlArr[0] = array_pop($arr = explode("&",$this->urlArr[0])); >>> >>>I still have to scratch my head as to why I *nee

Re: [PHP] Quick Poll: PHP 4 / 5

2005-09-16 Thread Rasmus Lerdorf
te having this as a fatal error is incorrect and something we will fix. We need to either make it an E_NOTICE or there has been talk about coming up with a smarter way of handling these impossible reference cases, but it is pretty tricky. We don't always get things right on the first try. Expect to see some tweaks to the current implementation to make it more compatible with existing code over the next couple of weeks. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: 302 Responses (Was: session cookies)

2005-09-06 Thread Rasmus Lerdorf
Chris Shiflett wrote: > Rasmus Lerdorf wrote: > >> This redirects right away for me. Try it: >> >> http://lerdorf.com/cs.php >> >> Code at: http://lerdorf.com/cs.phps > > > Thanks, that works. :-) > > For reference, here's mine (temporary

[PHP] Re: 302 Responses (Was: session cookies)

2005-09-06 Thread Rasmus Lerdorf
_repeat($str, 1000); > fputs($fp, $str); > sleep(1); > flush(); > } This redirects right away for me. Try it: http://lerdorf.com/cs.php Code at: http://lerdorf.com/cs.phps No idea what you are doing on your end to get a different result. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Generating images on the fly, linking via symlink?

2005-09-03 Thread Rasmus Lerdorf
re the actual request will go directly via Apache's path_translate hook to the image you want. The problem is that without any PHP involvement on the actual image request you don't any way of knowing when the request has come in for the image and thus you have no way to know when to delete the symlink. You could of course set up a cron job that goes through and deletes all symlinks older than 5 minutes or something like that, but that may not meet your requirements. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] FreeBSD php{4,5} w/ LDAP + SSL/TLS ldap_start_tls()

2005-09-03 Thread Rasmus Lerdorf
functions which it implements > | to always fail with ENOSYS. Some functions are actually named > | something starting with __ and the normal name is an alias. */ > | #if defined (__stub_ldap_start_tls_s) || defined > (__stub___ldap_start_tls_s) > | choke me > | #else > | char

Re: [PHP] How to get GD to handle different image formats?

2005-09-03 Thread Rasmus Lerdorf
Graham Anderson wrote: > I would like the gd library to handle the vector image format, PCT. > > GD is installed on my shared server and, unfortunately, ImageMagick is > not :( > ImageMagick CAN export PCT files. > > Can I get GD to do this too ? Not as far as I know,

Re: [PHP] Re: php 5 upgrade - undefined index errors EVERYWHERE

2005-09-03 Thread Rasmus Lerdorf
. Gmpf! These are not errors, they are notices. It happens on code like this: You get an error like: Notice: Undefined index: hello in /var/home/rasmus/ty on line 4 It is meant to be helpful since you probably want to fix your code. But if you don't care about these, simply

Re: [PHP] Re: apache (root) + php4

2005-09-03 Thread Rasmus Lerdorf
e salt, so you can pass the whole thing in. That is, when trying to match up a password, you can do this: I think you will find that if you echo out the result of crypt($passwd,$match) in the above, you will see: $1$.NV7oLhO$Gj/ztvspUcpcJ5iUJiXNo0 -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] FreeBSD php{4,5} w/ LDAP + SSL/TLS ldap_start_tls()

2005-09-02 Thread Rasmus Lerdorf
reason, the php4 and php5 from FreeBSD ports refuses to > properly configure SSL/TLS support for the LDAP module. Can't you just build from the PHP tarball instead? Seems like a messed up port to me. I use FreeBSD all day, every day and haven't seen this problem. But I also don't

Re: [PHP] session cookies

2005-09-02 Thread Rasmus Lerdorf
Rasmus Lerdorf wrote: > Chris Shiflett wrote: > >>Rasmus Lerdorf wrote: >> >> >>>Why modify my test? >> >> >>Because it has less delay. Thus, it's more difficult to tell if the >>browser is requesting the new URL before or after rece

  1   2   3   4   5   6   7   8   9   10   >