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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 > |
|
|||
|
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 >> > |
|
|||
|
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 >>> >> > |
|
|||
|
> 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 |
|
|||
|
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 |
|
|||
|
>> 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 |
|
|||
|
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 |
|
|||
|
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! .................................................. .......... |
|
|||
|
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? |