php-general Digest 20 Aug 2010 09:49:43 -0000 Issue 6903

2010-08-20 Thread php-general-digest-help
php-general Digest 20 Aug 2010 09:49:43 - Issue 6903 Topics (messages 307582 through 307596): Re: imagettftext Angle Problem 307582 by: Bborie Park [OUTPUT BUFFER] - problems with redirects 307583 by: Tristan 307585 by: Adam Richardson 307587 by: Nathan

[PHP] Re: [OUTPUT BUFFER] - problems with redirects

2010-08-20 Thread Nisse Engström
On Thu, 19 Aug 2010 17:47:01 -0600, Tristan wrote: A rewrite of the entire site would be needed in order to fix. So, I guess you are saying as best options for workaround are - use the ob_ functions to work around. - stick output buffer on or high so best case scenario using ob_

[PHP] Re: tutorial failure

2010-08-20 Thread Colin Guthrie
'Twas brillig, and Ashley Sheridan at 19/08/10 23:16 did gyre and gimble: I used the GUI: K-Menu-Configure your Computer-Install Remove Software Then searched for 'php', and the first package listed was apache-mod_php, which I installed along with the other php modules that I normally

Re: [PHP] tutorial failure

2010-08-20 Thread e-letter
On 19/08/2010, Ashley Sheridan a...@ashleysheridan.co.uk wrote: No, because Apache doesn't need to process HTML in the same way it needs to process PHP. The tag ?php in your code is being sent down to your browser as HTML (view the source on the page you're browsing to) and interpreted as a

[PHP] Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
Hi, OK, this is really just a sounding board for a couple ideas I'm mulling over regarding a pseudo-randomisation system for some websites I'm doing. Any thoughts on the subject greatly appreciated! Back Story: We have a system that lists things. The things are broken down by category, but you

Re: [PHP] tutorial failure

2010-08-20 Thread Ashley Sheridan
On Fri, 2010-08-20 at 10:00 +0100, e-letter wrote: On 19/08/2010, Ashley Sheridan a...@ashleysheridan.co.uk wrote: No, because Apache doesn't need to process HTML in the same way it needs to process PHP. The tag ?php in your code is being sent down to your browser as HTML (view the source

RE: [PHP] Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Jon Haworth
Hi Col, Interesting problem. Are there any other approaches I've missed? Off the top of my head, how about this: 1. Add a new unsigned int column called SortOrder to the table of widgets or whatever it is you're listing 2. Fill this column with randomly-generated numbers between 0 and

[PHP] Re: [OUTPUT BUFFER] - problems with redirects

2010-08-20 Thread Nathan Rixham
Nisse Engström wrote: On Thu, 19 Aug 2010 17:47:01 -0600, Tristan wrote: A rewrite of the entire site would be needed in order to fix. So, I guess you are saying as best options for workaround are - use the ob_ functions to work around. - stick output buffer on or high so best case scenario

[PHP] mod_php

2010-08-20 Thread Stanisław Findeisen
Hi Could anyone please explain to me the basic architecture of PHP module when running in process within Apache HTTP server? I guess this is called mod_php. As far as I understand the shared library (e.g., libphp5.so) is being dynamically loaded by an Apache working process and then, whenever a

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Nathan Rixham
Colin Guthrie wrote: Hi, OK, this is really just a sounding board for a couple ideas I'm mulling over regarding a pseudo-randomisation system for some websites I'm doing. Any thoughts on the subject greatly appreciated! Back Story: We have a system that lists things. The things are broken

Re: [PHP] Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread tedd
At 10:00 AM +0100 8/20/10, Colin Guthrie wrote: Are there any other approaches I've missed? Is there some cunning, cleverness that eludes me? Col Col: I don't know about being clever, but the problem reminds me of selling ad space on web sites. I read a book about it, namely OpenX Ad

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
Thanks everyone for responses. 'Twas brillig, and Nathan Rixham at 20/08/10 13:17 did gyre and gimble: if you use mysql you can seed rand() with a number to get the same random results out each time (for that seed number) SELECT * from table ORDER BY RAND(234) Then just use limit and

Re: [PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Andrew Ballard
On Fri, Aug 20, 2010 at 9:05 AM, Colin Guthrie gm...@colin.guthr.ie wrote: Thanks everyone for responses. 'Twas brillig, and Nathan Rixham at 20/08/10 13:17 did gyre and gimble: if you use mysql you can seed rand() with a number to get the same random results out each time (for that seed

[PHP] Re: [OUTPUT BUFFER] - problems with redirects

2010-08-20 Thread Nisse Engström
On Fri, 20 Aug 2010 13:11:05 +0100, Nathan Rixham wrote: Nisse Engström wrote: Actually, the HTTP spec. allows most headers to be sent after the content. The feature just wasn't implemented by too many HTTP agents (W3's HTML validator and link checker, and Opera). can you send a link to

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
'Twas brillig, and Andrew Ballard at 20/08/10 14:24 did gyre and gimble: Would it work to return a list of some limited number of randomly ordered featured listings/items on the page, while leaving the full list ordered by whatever natural ordering (by date, order entered, alphabetical, etc.)?

Re: [PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Andrew Ballard
On Fri, Aug 20, 2010 at 9:31 AM, Colin Guthrie gm...@colin.guthr.ie wrote: 'Twas brillig, and Andrew Ballard at 20/08/10 14:24 did gyre and gimble: Would it work to return a list of some limited number of randomly ordered featured listings/items on the page, while leaving the full list ordered

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
'Twas brillig, and Andrew Ballard at 20/08/10 15:04 did gyre and gimble: On Fri, Aug 20, 2010 at 9:31 AM, Colin Guthrie gm...@colin.guthr.ie wrote: Speaking of SEO, that was one of our concerns about randomising listings too. What impact do you think such randomised listings will have on SEO?

Re: [PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Ashley Sheridan
On Fri, 2010-08-20 at 15:19 +0100, Colin Guthrie wrote: 'Twas brillig, and Andrew Ballard at 20/08/10 15:04 did gyre and gimble: On Fri, Aug 20, 2010 at 9:31 AM, Colin Guthrie gm...@colin.guthr.ie wrote: Speaking of SEO, that was one of our concerns about randomising listings too. What

Re: [PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Andrew Ballard
On Fri, Aug 20, 2010 at 10:19 AM, Colin Guthrie gm...@colin.guthr.ie wrote: The customer is always right - in his own mind (even if not in his RIGHT mind) - after all! Corrected that for you. ;-) Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Bitwise NOT operator?

2010-08-20 Thread Andy McKenzie
Hey everyone, I'm really not sure what's going on here: basically, the bitwise NOT operator seems to simply not work. Here's an example of what I see. Script $ cat bintest2.php ?php $bin = 2; $notbin = ~$bin; echo Bin: . decbin($bin) . !bin: . decbin($notbin)

Re: [PHP] mod_php

2010-08-20 Thread Bostjan Skufca
Yes, this is correct. If you look at sapi/apache2handler/sapi_apache2.c in PHP sources, you will find that PHP SAPI registers it's function php_handler() within apache. This function gets called every time PHP is requested by some client (with appropriate configuration, of course). I must admit

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
'Twas brillig, and Ashley Sheridan at 20/08/10 15:29 did gyre and gimble: If you use a sitemap specific to a search engine (Google sitemap for example) then you can specify how often a page changes, or tell it not to index at all. This could help a little in preventing getting penalised by a

[PHP] Re: Bitwise NOT operator?

2010-08-20 Thread Colin Guthrie
'Twas brillig, and Andy McKenzie at 20/08/10 16:10 did gyre and gimble: Hey everyone, I'm really not sure what's going on here: basically, the bitwise NOT operator seems to simply not work. Here's an example of what I see. Script $ cat bintest2.php ?php

Re: [PHP] Bitwise NOT operator?

2010-08-20 Thread Peter Lind
On 20 August 2010 17:10, Andy McKenzie amckenz...@gmail.com wrote: Hey everyone,  I'm really not sure what's going on here:  basically, the bitwise NOT operator seems to simply not work.  Here's an example of what I see. Script $ cat bintest2.php ?php $bin = 2;

Re: [PHP] Bitwise NOT operator?

2010-08-20 Thread Peter Lind
On 20 August 2010 17:41, Peter Lind peter.e.l...@gmail.com wrote: On 20 August 2010 17:10, Andy McKenzie amckenz...@gmail.com wrote: Hey everyone,  I'm really not sure what's going on here:  basically, the bitwise NOT operator seems to simply not work.  Here's an example of what I see.

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
'Twas brillig, and Andrew Ballard at 20/08/10 15:55 did gyre and gimble: On Fri, Aug 20, 2010 at 10:19 AM, Colin Guthrie gm...@colin.guthr.ie wrote: The customer is always right - in his own mind (even if not in his RIGHT mind) - after all! Corrected that for you. ;-) :D -- Colin

Re: [PHP] Bitwise NOT operator?

2010-08-20 Thread Andy McKenzie
Thanks to everyone who responded. I've dealt with binary math before, but it never occurred to me (and doesn't seem to be anywhere in the document page at php.net!) that it would automatically pad the number I entered. The example I gave was essentially a test I was running: in the real

[PHP] add function to solr extension

2010-08-20 Thread Thomas Gambier
Hi, Can i have some help to create a class to add a function to solr extension ? I want to make a function which send me back the number of results of a query... (field NumFound of array return of SolrResponse::getResponse()) Here is the link to the extension :

Re: [PHP] mod_php

2010-08-20 Thread Stanisław Findeisen
On 2010-08-20 17:10, Bostjan Skufca wrote: Yes, this is correct. If you look at sapi/apache2handler/sapi_apache2.c in PHP sources, you will find that PHP SAPI registers it's function php_handler() within apache. This function gets called every time PHP is requested by some client (with

[PHP] Fatal error: Call to undefined method

2010-08-20 Thread TransientSeeker
Greetings, I'm having a very simple problem that I can't seem to find the solution to. I try and access a method in this class I made called MyPropertyManagement... the method is named get_complexes(). I try and strip down the entire class to just focus on this problem with the hopes of it

Re: [PHP] Fatal error: Call to undefined method

2010-08-20 Thread Jo�o C�ndido de Souza Neto
Try this: ?php class PropertyMgmt { function PropertyMgmt() { global $complexes; /* yes I know using globals is dangerous, I will fix this soon! :-) */ } public function get_complexes() { /* null */ } } // end class -- João Cândido de Souza Neto TransientSeeker

[PHP] error_log file error reporting level

2010-08-20 Thread hovnocuc
Hello, [ Question ] How do I force error_log to log only errors specified in the error_reporting directive? Is it even possible or did I get something wrong? I have one old script which uses ereg and the awesome size of the error log is getting on my nerves. [ Current ini config ]

[PHP] Re: [PHP-DEV] Re: [PHP] mod_php

2010-08-20 Thread Guillaume Rossolini
Hi, 1. What optimizations does PHP interpreter make? I guess it should be able to check file modification time and cease to compile it again and again. Is this correct? There is some bytecode form, right? Core PHP does not optimize your code like a DBMS would rewrite your SQL. There are

[PHP] fsockopen with ADH cipher

2010-08-20 Thread Dave Cundiff
Hello, I've scoured the net and it appears I may be out of luck. Is it possible to change the cipher fsockopen uses for SSL? I have a remote socket that uses ADH which I can connect to fine with the openssl client. CONNECTED(0003) --- no peer certificate available --- No client certificate