php-general Digest 3 May 2008 10:31:46 -0000 Issue 5438

Topics (messages 273818 through 273834):

XHTML/CSS problem
        273818 by: jeroen vannevel
        273819 by: Stut
        273822 by: Al
        273834 by: Per Jessen

Re: Assigning functions
        273820 by: Shawn McKenzie
        273821 by: Craige Leeder
        273823 by: Nathan Nobbe
        273825 by: Shawn McKenzie
        273826 by: Shawn McKenzie

Interacting with an IpServer via sockets
        273824 by: Todd Cary

XHTML Validation problem
        273827 by: It Maq
        273828 by: Craige Leeder
        273829 by: Simon Welsh
        273830 by: Steven R. Ringwald
        273832 by: Steven R. Ringwald

Apache child pid segfault + APD
        273831 by: Waynn Lue
        273833 by: Mario Guenterberg

Administrivia:

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

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

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


----------------------------------------------------------------------
--- Begin Message ---
hey,

this isn't a php problem, but an XHTML/CSS one.

have a look at www.speedzor.com/woopsie.php, and please tell me where my 
problem is.
i'm stuck at this for hours by now :p

thanks in advance,
jeroen

_________________________________________________________________
Gratis chat, gratis blog, gratis fototool, gratis....dankzij Windows Live
http://get.live.com

--- End Message ---
--- Begin Message ---
On 2 May 2008, at 22:34, jeroen vannevel wrote:
this isn't a php problem, but an XHTML/CSS one.

have a look at www.speedzor.com/woopsie.php, and please tell me where my problem is.
i'm stuck at this for hours by now :p

Please post your question to a list appropriate to the question - you're likely to get a better response and are less likely to annoy anyone although I can't guarantee anything.

Try here: http://www.css-discuss.org/

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message --- Use Firefox and install the HTML Validator. I looked at your page and it instantly showed ALL the errors.

jeroen vannevel wrote:
hey,

this isn't a php problem, but an XHTML/CSS one.

have a look at www.speedzor.com/woopsie.php, and please tell me where my 
problem is.
i'm stuck at this for hours by now :p

thanks in advance,
jeroen

_________________________________________________________________
Gratis chat, gratis blog, gratis fototool, gratis....dankzij Windows Live
http://get.live.com

--- End Message ---
--- Begin Message ---
jeroen vannevel wrote:

> have a look at www.speedzor.com/woopsie.php, and please tell me where
> my problem is. i'm stuck at this for hours by now :p
> 
> thanks in advance,
> jeroen

And the problem is?  Your page looks fine to me. 


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
Philip Thompson wrote:
Hi all. I have several classes. Within each class, a new class is called. Is there a way to assign a function in a *deeper* class to be called in the first class? Example to follow......

<?php
class A {
    function __construct () {
        $this->b = new B ();
        // I want to do the following. This does not work, of course.
        $this->doSomething = $this->b->c->doSomething;
    }
}

class B {
    function __construct () {
        $this->c = new C ();
    }
}

class C {
    function __construct () { }
    function doSomething () { echo "¡Hi!"; }
}

$a = new A ();
// Instead of doing this,
$a->b->c->doSomething();

// I want to do this.
$a->doSomething(); // ¡Hi!
?>

Basically, it's just to shorten the line to access a particular function. But, is it possible?!

Thanks,
~Philip

Why are you using OOP?  That's insane.

-Shawn

--- End Message ---
--- Begin Message ---
On Fri, May 2, 2008 at 7:27 PM, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
>  Why are you using OOP?  That's insane.
>
>  -Shawn

I  believe that's a matter of opinion. Some people like OOP, others
don't. Why criticize the man because he likes to use it? I like to use
it as well.

Regards,
- Craige

--- End Message ---
--- Begin Message ---
On Fri, May 2, 2008 at 5:37 PM, Craige Leeder <[EMAIL PROTECTED]> wrote:

> On Fri, May 2, 2008 at 7:27 PM, Shawn McKenzie <[EMAIL PROTECTED]>
> wrote:
> >  Why are you using OOP?  That's insane.
> >
> >  -Shawn
>
> I  believe that's a matter of opinion. Some people like OOP, others
> don't. Why criticize the man because he likes to use it? I like to use
> it as well.


shawn
for-real; thats a silly comment and this is a classic example of 'principal
of least knowledge'.  check the link so that thou might learn grasshopper ;)

-nathan

--- End Message ---
--- Begin Message ---


Craige Leeder wrote:
On Fri, May 2, 2008 at 7:27 PM, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
 Why are you using OOP?  That's insane.

 -Shawn

I  believe that's a matter of opinion. Some people like OOP, others
don't. Why criticize the man because he likes to use it? I like to use
it as well.

Regards,
- Craige

Why criticize? Because my other trolls don't draw any comments and I knew this one would ;-) All in fun.

-Shawn

--- End Message ---
--- Begin Message ---
Shawn McKenzie wrote:


Craige Leeder wrote:
On Fri, May 2, 2008 at 7:27 PM, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
 Why are you using OOP?  That's insane.

 -Shawn

I  believe that's a matter of opinion. Some people like OOP, others
don't. Why criticize the man because he likes to use it? I like to use
it as well.

Regards,
- Craige

Why criticize? Because my other trolls don't draw any comments and I knew this one would ;-) All in fun.

-Shawn

Bah, I should've let it go on longer...

--- End Message ---
--- Begin Message --- I have an IpServer using Turbopowers IpServer library) and am able to connect and send data (fwrite() ), however, I cannot receive data from the server. The PutString() in the IpServer executes without error, however the fgets() just hangs.

Any ideas on what I may be doing incorrectly?

  $fp = fsockopen("192.168.0.21", "5389");
  if ($fp) {
echo "Socket has been opened: " . $fp . " " . date("m/d/y h:n:s", time()) . "<br>";
    fwrite($fp, "Please send me a report!");
    //echo fgets($fp) . "<br>";
    fclose($fp);
  } else {
    echo "Socket cannot open socket<br>";
  }


Many thanks.....
Todd

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

I have a page that displays data entered by the user. There is one user that 
entered the character "&" inside the text he typed. For this case the xhtml 
validation fails and gives me the following error:
"character "&" is the first character of a delimiter but occurred as data."

I'm wondering if there is a way to avoid this error. The page itself is valid 
and fails just in the case the user enters the & character.

Thank you


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


--- End Message ---
--- Begin Message ---
html_entities()

http://ca.php.net/manual/en/function.htmlentities.php

Hope this helps
- Craige

On Sat, May 3, 2008 at 12:13 AM, It Maq <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I have a page that displays data entered by the user. There is one user that 
> entered the character "&" inside the text he typed. For this case the xhtml 
> validation fails and gives me the following error:
>  "character "&" is the first character of a delimiter but occurred as data."
>
>  I'm wondering if there is a way to avoid this error. The page itself is 
> valid and fails just in the case the user enters the & character.
>
>  Thank you
>
>
>       
> ____________________________________________________________________________________
>  Be a better friend, newshound, and
>  know-it-all with Yahoo! Mobile.  Try it now.  
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
>  --
>  PHP General Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Forgot to reply all

Begin forwarded message:

From: Simon Welsh <[EMAIL PROTECTED]>
Date: 3 May 2008 4:18:04 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] XHTML Validation problem


On 3/05/2008, at 4:13, It Maq wrote:

Hi,

I have a page that displays data entered by the user. There is one user that entered the character "&" inside the text he typed. For this case the xhtml validation fails and gives me the following error: "character "&" is the first character of a delimiter but occurred as data."

I'm wondering if there is a way to avoid this error. The page itself is valid and fails just in the case the user enters the & character.

Thank you


____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


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




Pass the input through htmlspecialchars().
---
Simon Welsh
Admin of http://simon.geek.nz/

Who said Microsoft never created a bug-free program? The blue screen never, ever crashes!

http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e





---
Simon Welsh
Admin of http://simon.geek.nz/

Who said Microsoft never created a bug-free program? The blue screen never, ever crashes!

http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e





--- End Message ---
--- Begin Message ---
Begin forwarded message:

>> I have a page that displays data entered by the user. There is one  
>> user that entered the character "&" inside the text he typed. For  
>> this case the xhtml validation fails and gives me the following  
>> error:
>> "character "&" is the first character of a delimiter but occurred  
>> as data."
>>
>> I'm wondering if there is a way to avoid this error. The page  
>> itself is valid and fails just in the case the user enters the &  
>> character.





Try replacing the '&' character with '&nbsp;'. That is what I did to get rid
of that warning in my xhtml documents.


Steve




--- End Message ---
--- Begin Message ---
>>> I have a page that displays data entered by the user. There is one  
>>> user that entered the character "&" inside the text he typed. For  
>>> this case the xhtml validation fails and gives me the following  
>>> error:
>>> "character "&" is the first character of a delimiter but occurred  
>>> as data."
>>>
>>> I'm wondering if there is a way to avoid this error. The page  
>>> itself is valid and fails just in the case the user enters the &  
>>> character.

> Try replacing the '&' character with '&nbsp;'. That is what I did to get rid
> of that warning in my xhtml documents.

Sorry y’all. I meant to say &amp; rather than &nbsp;. Ought to teach me to 
check email before eating dinner. ☺

Steve



--- End Message ---
--- Begin Message ---
I recently installed APD to help profile some code that I've written,
and noticed that whenever I run it (with apd_set_pprof_trace() at the
top) I get these errors in my apache logs.  I spent awhile looking at
different sites, but even recompiling PHP + Apache didn't help.
Anyone seen this before?

[Fri May 02 21:20:56 2008] [notice] child pid 13818 exit signal
Segmentation fault (11)
[Fri May 02 21:40:08 2008] [notice] child pid 14820 exit signal
Segmentation fault (11)
[Fri May 02 21:40:08 2008] [notice] child pid 15027 exit signal
Segmentation fault (11)
[Fri May 02 22:00:08 2008] [notice] child pid 16081 exit signal
Segmentation fault (11)
*** glibc detected *** free(): invalid pointer: 0x0000002a9956d000 ***
[Fri May 02 22:00:10 2008] [notice] child pid 15273 exit signal Aborted (6)

--- End Message ---
--- Begin Message ---
On Fri, May 02, 2008 at 10:24:03PM -0700, Waynn Lue wrote:

> *** glibc detected *** free(): invalid pointer: 0x0000002a9956d000 ***

Hi Waynn,

try to use xdebug instead of APD to profile you app. There is a problem with 
your glibc
version and your APD version.

In my environment php 5.2.6 with suhosin/apc, apache 2.2.8 and xdebug 2.0.2 it 
works fine.

Greetings
Mario

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM d- s++: a+ C++++>$ UBL*++++$ P++ L+++ E--- W+++ N+ o-- K- w O- M-
V-- PS++ PE++ Y PGP+++ t--- 5 X++++ R++ tv- b+++ DI D++++  G++ e* h----
r+++ y++++
------END GEEK CODE BLOCK------

--- End Message ---

Reply via email to