phpinfo problem

This is a discussion on phpinfo problem within the PHP General forums, part of the PHP Programming Forums category; I have just installed PHP-5.2.3 on my Kubuntu Feisty box. I removed all the debian php first ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-13-2007
Rick Knight
 
Posts: n/a
Default phpinfo problem

I have just installed PHP-5.2.3 on my Kubuntu Feisty box. I removed all
the debian php first and then compiled php with the options I needed.
Now everything seems to be working except phpinfo.php which consists of
one line.

<? phpinfo(); ?>


I get a blank screen.

If I delete the php.ini file it get the usual phpinfo output.

php -r "phpinfo();" works as does php -i and my php scripts run fine.
What would cause phpinfo.php to not work? It's set rw for the apache2
user so I think the permissions are right. Is there a phpinfo
enable/disable in the php.ini? Or in ./configure?

Thanks.
Rick Knight
Reply With Quote
  #2 (permalink)  
Old 08-13-2007
Chris
 
Posts: n/a
Default Re: [PHP] phpinfo problem

You probably just have short_open_tags set to Off in your php.ini file.
If so, either turn it On, or change the file to be:

<?php phpinfo(); ?>

Chris

Rick Knight wrote:
> I have just installed PHP-5.2.3 on my Kubuntu Feisty box. I removed
> all the debian php first and then compiled php with the options I
> needed. Now everything seems to be working except phpinfo.php which
> consists of one line.
>
> <? phpinfo(); ?>
>
>
> I get a blank screen.
>
> If I delete the php.ini file it get the usual phpinfo output.
>
> php -r "phpinfo();" works as does php -i and my php scripts run fine.
> What would cause phpinfo.php to not work? It's set rw for the apache2
> user so I think the permissions are right. Is there a phpinfo
> enable/disable in the php.ini? Or in ./configure?
>
> Thanks.
> Rick Knight
>

Reply With Quote
  #3 (permalink)  
Old 08-13-2007
Rick Knight
 
Posts: n/a
Default Re: [PHP] phpinfo problem

Thanks Chris,

That was the problem. Is this new php5? I've used 3 prior php4 version
and didn't have this problem.

Thanks,
Rick

Chris wrote:
> You probably just have short_open_tags set to Off in your php.ini
> file. If so, either turn it On, or change the file to be:
>
> <?php phpinfo(); ?>
>
> Chris
>
> Rick Knight wrote:
>> I have just installed PHP-5.2.3 on my Kubuntu Feisty box. I removed
>> all the debian php first and then compiled php with the options I
>> needed. Now everything seems to be working except phpinfo.php which
>> consists of one line.
>>
>> <? phpinfo(); ?>
>>
>>
>> I get a blank screen.
>>
>> If I delete the php.ini file it get the usual phpinfo output.
>>
>> php -r "phpinfo();" works as does php -i and my php scripts run fine.
>> What would cause phpinfo.php to not work? It's set rw for the apache2
>> user so I think the permissions are right. Is there a phpinfo
>> enable/disable in the php.ini? Or in ./configure?
>>
>> Thanks.
>> Rick Knight
>>

>

Reply With Quote
  #4 (permalink)  
Old 08-13-2007
Stut
 
Posts: n/a
Default Re: [PHP] phpinfo problem

Rick Knight wrote:
> Thanks Chris,
>
> That was the problem. Is this new php5? I've used 3 prior php4 version
> and didn't have this problem.


The default value for short_open_tags was flipped a while back. Might I
suggest you read the changelog next time you upgrade to a newer version
- it tells you important stuff like that.

-Stut

--
http://stut.net/

> Chris wrote:
>> You probably just have short_open_tags set to Off in your php.ini
>> file. If so, either turn it On, or change the file to be:
>>
>> <?php phpinfo(); ?>
>>
>> Chris
>>
>> Rick Knight wrote:
>>> I have just installed PHP-5.2.3 on my Kubuntu Feisty box. I removed
>>> all the debian php first and then compiled php with the options I
>>> needed. Now everything seems to be working except phpinfo.php which
>>> consists of one line.
>>>
>>> <? phpinfo(); ?>
>>>
>>>
>>> I get a blank screen.
>>>
>>> If I delete the php.ini file it get the usual phpinfo output.
>>>
>>> php -r "phpinfo();" works as does php -i and my php scripts run fine.
>>> What would cause phpinfo.php to not work? It's set rw for the apache2
>>> user so I think the permissions are right. Is there a phpinfo
>>> enable/disable in the php.ini? Or in ./configure?
>>>
>>> Thanks.
>>> Rick Knight
>>>

>>

>

Reply With Quote
  #5 (permalink)  
Old 08-13-2007
Richard Heyes
 
Posts: n/a
Default Re: [PHP] phpinfo problem

> The default value for short_open_tags was flipped a while back. Might I
> suggest you read the changelog next time you upgrade to a newer version
> - it tells you important stuff like that.


And, FWIW, never use short tags. Always use <?php

--
Richard Heyes
+44 (0)844 801 1072
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support
Reply With Quote
  #6 (permalink)  
Old 08-13-2007
Lester Caine
 
Posts: n/a
Default Re: [PHP] phpinfo problem

Stut wrote:
> Rick Knight wrote:
>> Thanks Chris,
>>
>> That was the problem. Is this new php5? I've used 3 prior php4 version
>> and didn't have this problem.

>
> The default value for short_open_tags was flipped a while back. Might I
> suggest you read the changelog next time you upgrade to a newer version
> - it tells you important stuff like that.


The problem people will have is having to go through ALL the PHP5 changes when
converting from PHP4. That particular one adds a lot of characters to files on
some PHP4 upgrades, where there are lots of <? ?> - so switching it is the
quicker fix.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird - http://www.firebirdsql.org/index.php
Reply With Quote
  #7 (permalink)  
Old 08-13-2007
Richard Heyes
 
Posts: n/a
Default Re: [PHP] phpinfo problem

>> The default value for short_open_tags was flipped a while back. Might
>> I suggest you read the changelog next time you upgrade to a newer
>> version - it tells you important stuff like that.

>
> The problem people will have is having to go through ALL the PHP5
> changes when converting from PHP4.


Why is that a problem? I would have thought that that is automatic.
Surely you're not suggesting that people are upgrading from PHP4 to PHP5
without exhaustive testing?

> That particular one adds a lot of
> characters to files on some PHP4 upgrades, where there are lots of <? ?>
> - so switching it is the quicker fix.

^ on ?

--
Richard Heyes
+44 (0)844 801 1072
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support
Reply With Quote
  #8 (permalink)  
Old 08-13-2007
Rick Knight
 
Posts: n/a
Default Re: [PHP] phpinfo problem

Richard Heyes wrote:
>>> The default value for short_open_tags was flipped a while back.
>>> Might I suggest you read the changelog next time you upgrade to a
>>> newer version - it tells you important stuff like that.

>>
>> The problem people will have is having to go through ALL the PHP5
>> changes when converting from PHP4.

>
> Why is that a problem? I would have thought that that is automatic.
> Surely you're not suggesting that people are upgrading from PHP4 to
> PHP5 without exhaustive testing?
>
> > That particular one adds a lot of
>> characters to files on some PHP4 upgrades, where there are lots of <?
>> ?> - so switching it is the quicker fix.

> ^ on ?
>

Most of my tags are the long type, justa very, very few that are not,
but I have turned short tag support on.

Also, this was not a planned upgrade. I run Slackware 9.0, PHP4 & MySQL4
on my server, Kubuntu on my workstations. Debian has dropped support for
MySQL 4. I needed to add mysql 4 to my workstation (to solve a server
problem) and found that the mysql4 binary was not compatible with the
debian packaged php5 so I had to remove that and install php5 from
source. Kind of a domino effect. I do much more reading and testing when
do a planned upgrade, I just didn't have the time this time.

Thanks,
Rick
Reply With Quote
  #9 (permalink)  
Old 08-13-2007
Robert Cummings
 
Posts: n/a
Default Re: [PHP] phpinfo problem

On Mon, 2007-08-13 at 17:07 +0100, Lester Caine wrote:
> Stut wrote:
> > Rick Knight wrote:
> >> Thanks Chris,
> >>
> >> That was the problem. Is this new php5? I've used 3 prior php4 version
> >> and didn't have this problem.

> >
> > The default value for short_open_tags was flipped a while back. Might I
> > suggest you read the changelog next time you upgrade to a newer version
> > - it tells you important stuff like that.

>
> The problem people will have is having to go through ALL the PHP5 changes when
> converting from PHP4. That particular one adds a lot of characters to files on
> some PHP4 upgrades, where there are lots of <? ?> - so switching it is the
> quicker fix.


Sure it's quicker. But search and replace is pretty damn fast too. Not
to mention future proof.

Cheers,
Rob.
--
.................................................. ..........
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
.................................................. ..........
Reply With Quote
  #10 (permalink)  
Old 08-13-2007
Richard Lynch
 
Posts: n/a
Default Re: [PHP] phpinfo problem

On Sun, August 12, 2007 10:32 pm, Rick Knight wrote:
> I have just installed PHP-5.2.3 on my Kubuntu Feisty box. I removed
> all
> the debian php first and then compiled php with the options I needed.
> Now everything seems to be working except phpinfo.php which consists
> of
> one line.
>
> <? phpinfo(); ?>
>
>
> I get a blank screen.
>
> If I delete the php.ini file it get the usual phpinfo output.
>
> php -r "phpinfo();" works as does php -i and my php scripts run fine.
> What would cause phpinfo.php to not work? It's set rw for the apache2
> user so I think the permissions are right. Is there a phpinfo
> enable/disable in the php.ini? Or in ./configure?


You probably have short_open_tags OFF and so you need <?php
phpinfo();?> instead of just <? ... ?>

You'd know for sure if you looked at "View Source" and saw <?
phpinfo();?> for the short-tag version, but the <?php version worked.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:22 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0