[PHP-DOC] Hello world in PHP

2010-04-30 Thread Robert P. J. Day
  probably about to embarrass myself but i'm looking at the PHP  
manual page Your first PHP-enabled page, which suggests this as an  
initial PHP program:


html
 head
  titlePHP Test/title
 /head
 body
 ?php echo 'pHello World/p'; ?
 /body
/html

but if i enter, then browse to that page, i get as browser output:

=
hi world

'; ?
=

  um ... what's with those trailing characters?  did i just do  
something hideously dumb?  misconfiguration?


rday



Re: [PHP-DOC] Hello world in PHP

2010-04-30 Thread Philip Olson

On Apr 30, 2010, at 7:35 AM, Robert P. J. Day wrote:

  probably about to embarrass myself but i'm looking at the PHP manual page 
 Your first PHP-enabled page, which suggests this as an initial PHP program:
 
 html
 head
  titlePHP Test/title
 /head
 body
 ?php echo 'pHello World/p'; ?
 /body
 /html
 
 but if i enter, then browse to that page, i get as browser output:
 
 =
 hi world
 
 '; ?
 =
 
  um ... what's with those trailing characters?  did i just do something 
 hideously dumb?  misconfiguration?

Aside from the amazing mind reading ability of PHP to know you wanted 'hi' 
instead of 'hello', my guess is you do not have PHP enabled (at least, for the 
file extension you're using).

Regards,
Philip

Re: [PHP-DOC] Hello world in PHP

2010-04-30 Thread Rasmus Lerdorf

On 4/30/10 7:35 AM, Robert P. J. Day wrote:
  probably about to embarrass myself but i'm looking at the PHP manual 
page Your first PHP-enabled page, which suggests this as an initial 
PHP program:


html
head
titlePHP Test/title
/head
body
?php echo 'pHello World/p'; ?
/body
/html

but if i enter, then browse to that page, i get as browser output:

=
hi world

'; ?
=

  um ... what's with those trailing characters?  did i just do 
something hideously dumb?  misconfiguration?
You probably don't have PHP enabled in your web server configuration.  
Try doing a view-source on that page.

Or you have a silly typo.

-Rasmus



Re: [PHP-DOC] Hello world in PHP

2010-04-30 Thread Robert P. J. Day

Quoting Philip Olson phi...@roshambo.org:



On Apr 30, 2010, at 7:35 AM, Robert P. J. Day wrote:

 probably about to embarrass myself but i'm looking at the PHP   
manual page Your first PHP-enabled page, which suggests this as   
an initial PHP program:


html
head
 titlePHP Test/title
/head
body
?php echo 'pHello World/p'; ?
/body
/html

but if i enter, then browse to that page, i get as browser output:

=
hi world

'; ?
=

 um ... what's with those trailing characters?  did i just do   
something hideously dumb?  misconfiguration?


Aside from the amazing mind reading ability of PHP to know you   
wanted 'hi' instead of 'hello', my guess is you do not have PHP   
enabled (at least, for the file extension you're using).


  first part was cut and paste error, argh.  and, yes, i embarrassed  
myself as i was ssh'ed into the wrong test box which didn't even have  
the PHP package installed.  and that, people, is the danger of  
drinking decaf.  never forget it.


rday







Re: [PHP-DOC] Hello world in PHP

2010-04-30 Thread Daniel Brown
On Fri, Apr 30, 2010 at 10:47, Robert P. J. Day rpj...@crashcourse.ca wrote:

  first part was cut and paste error, argh.  and, yes, i embarrassed myself
 as i was ssh'ed into the wrong test box which didn't even have the PHP
 package installed.  and that, people, is the danger of drinking decaf.
  never forget it.

Incidentally, the closing remarks regarding decaf caused me to
spit a mouthful of regular coffee onto my keyboard as I laughed (and
subsequently choked a bit).  Alas, the true definition of irony.

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
We now offer SAME-DAY SETUP on a new line of servers!


Re: [PHP-DOC] Hello world in PHP

2010-04-30 Thread Robert P. J. Day

Quoting Daniel Brown danbr...@php.net:

On Fri, Apr 30, 2010 at 10:47, Robert P. J. Day   
rpj...@crashcourse.ca wrote:


 first part was cut and paste error, argh.  and, yes, i embarrassed myself
as i was ssh'ed into the wrong test box which didn't even have the PHP
package installed.  and that, people, is the danger of drinking decaf.
 never forget it.


Incidentally, the closing remarks regarding decaf caused me to
spit a mouthful of regular coffee onto my keyboard as I laughed (and
subsequently choked a bit).  Alas, the true definition of irony.


  hmmm ... apparently, it's not as simple as i thought.  i'm on a  
test, fresh install of fedora 13 beta, i've installed apache 2 and  
started it, i've done a


  # yum install php

and i can see:

# rpm -qa *php*
php-5.3.2-1.fc13.x86_64
php-cli-5.3.2-1.fc13.x86_64
php-common-5.3.2-1.fc13.x86_64
#

  i created /var/www/html/phpinfo.php which, unsurprisingly, simply  
runs phpinfo(), i've checked that there is a  
/etc/httpd/conf.d/php.conf file, i've verified that there is a shared  
object /usr/lib64/httpd/modules/libphp5.so ... and yet, when i browse  
to localhost's phpinfo.php, i see only (verbatim):


?php
phpinfo();
?

httpd -M verifies that, yes, php5_module is loaded.  so, again, what  
have i done stupidly?  and even if it's a trivial solution, i'm going  
to verify that a fresh install of fedora 13 with both httpd and php  
doesn't support php, which is just weird.


rday

p.s.  at this point, this clearly belongs on the main php list but,  
since i started it here, i might as well finish it here.







Re: [PHP-DOC] Hello world in PHP

2010-04-30 Thread Robert P. J. Day

Quoting Robert P. J. Day rpj...@crashcourse.ca:


Quoting Daniel Brown danbr...@php.net:

On Fri, Apr 30, 2010 at 10:47, Robert P. J. Day
rpj...@crashcourse.ca wrote:


 first part was cut and paste error, argh.  and, yes, i embarrassed myself
as i was ssh'ed into the wrong test box which didn't even have the PHP
package installed.  and that, people, is the danger of drinking decaf.
 never forget it.


   Incidentally, the closing remarks regarding decaf caused me to
spit a mouthful of regular coffee onto my keyboard as I laughed (and
subsequently choked a bit).  Alas, the true definition of irony.


  hmmm ... apparently, it's not as simple as i thought.  i'm on a
test, fresh install of fedora 13 beta, i've installed apache 2 and
started it, i've done a

  # yum install php

and i can see:

# rpm -qa *php*
php-5.3.2-1.fc13.x86_64
php-cli-5.3.2-1.fc13.x86_64
php-common-5.3.2-1.fc13.x86_64
#

  i created /var/www/html/phpinfo.php which, unsurprisingly, simply
runs phpinfo(), i've checked that there is a /etc/httpd/conf.d/php.conf
file, i've verified that there is a shared object
/usr/lib64/httpd/modules/libphp5.so ... and yet, when i browse to
localhost's phpinfo.php, i see only (verbatim):

?php
phpinfo();
?

httpd -M verifies that, yes, php5_module is loaded.  so, again, what
have i done stupidly?  and even if it's a trivial solution, i'm going
to verify that a fresh install of fedora 13 with both httpd and php
doesn't support php, which is just weird.


  *sigh*.  never mind, just restarting apache seemed to do it.  maybe  
i'll just start my weekend now.


rday



Re: [PHP-DOC] Hello world in PHP

2010-04-30 Thread Christopher Jones



On 04/30/2010 09:00 AM, Robert P. J. Day wrote:


hmmm ... apparently, it's not as simple as i thought. i'm on a test,
fresh install of fedora 13 beta, i've installed apache 2 and started it,
i've done a

# yum install php

and i can see:

# rpm -qa *php*
php-5.3.2-1.fc13.x86_64
php-cli-5.3.2-1.fc13.x86_64
php-common-5.3.2-1.fc13.x86_64
#

i created /var/www/html/phpinfo.php which, unsurprisingly, simply runs
phpinfo(), i've checked that there is a /etc/httpd/conf.d/php.conf file,
i've verified that there is a shared object
/usr/lib64/httpd/modules/libphp5.so ... and yet, when i browse to
localhost's phpinfo.php, i see only (verbatim):

?php
phpinfo();
?

httpd -M verifies that, yes, php5_module is loaded. so, again, what
have i done stupidly? and even if it's a trivial solution, i'm going to
verify that a fresh install of fedora 13 with both httpd and php doesn't
support php, which is just weird.

rday

p.s. at this point, this clearly belongs on the main php list but, since
i started it here, i might as well finish it here.



Regardless of what httpd -M says, did you stop and start Apache
after installing PHP?  (For historical reasons I never trust restart).

And does httpd.conf have a line like Include conf.d/*.conf?

And (to triple-check) does /etc/httpd/conf.d/php.conf have the line:
AddType application/x-httpd-php .php


Chris

--
Email: christopher.jo...@oracle.com
Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/
Free PHP Book: http://tinyurl.com/ugpomhome


Re: [PHP-DOC] listing inherited properties

2010-04-30 Thread Philip Olson

On Apr 29, 2010, at 6:04 AM, Daniel Convissor wrote:

 Hi Hannes:
 
 On Thu, Apr 29, 2010 at 10:49:34AM +0200, Hannes Magnusson wrote:
 
 I didn't even realize that built-in classes had private
 properties/methods. Seems utterly useless to tell the end-user that.
 
 You're right.  They shouldn't be in the docs in the first place, even in 
 their original classes.  Someone should hunt them down and remove them.

Thankfully these only existed in a few places. They have all been removed, and 
the docgen script now ignores them.

Regards,
Philip