Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: php.ini  (Read 4257 times)

tifosi

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
php.ini
« on: January 06, 2007, 01:27:18 AM »

Hi

I've just upgraded the php on my server (fc4, apache 1.3, php 5.2, mysql 4.1).

Everything appears to be fine with snews1.5 when using the php.ini-dist for the php.ini. But using the php.ini-recommended as the php.ini and snews gives no output.

Just found this issue, so not much time to debug.

Changing:
short_open_tag = Off
To:
short_open_tag = On

in the new php.ini sorts the issue so there's either a bug in php5.2.0 or an issue in snews1.5 somewhere.

Regards

Stephen
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
php.ini
« Reply #1 on: January 06, 2007, 01:50:33 AM »

Welcome tifosi... to the constantly changing world of sNews!
What you experienced is not a bug with PHP 5.2.0 and it's not really a bug in sNews 1.5.30. The newer versions of PHP are set (by default) to recognizing the long_open PHP-tag for opening PHP sessions and not the short_open... and all throughout the index.php and snews.php files... the short_open_tag was used in literally hundreds of instances. You rectified that by switching the short_open_tag to ON.

So... as a housekeeping measure... any time you are working in a particular area of either file and you come across the short tag - ... go ahead and change it to the long-form - . Or search out and replace them all file-wide.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

tifosi

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
php.ini
« Reply #2 on: January 06, 2007, 10:21:35 PM »

standards eh! :)

I've used the php.ini-recommended cos I'm developing for the  strictest standards, and php as it gets more mature is getting more requiring of programmers. Not to take anything away from this. I'm experienced enough to know the pitfalls.

Hosting companies use the most relaxed setups - and are reluctant to change to php5, ahich is a shame as it's got a lot of good points. Well they'll have to do it eventually and new scripts will have to be released/upgraded to cope.

S
Logged

digit

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
php.ini
« Reply #3 on: April 11, 2007, 09:10:47 PM »

Though this isn't really a bug in sNews, I do think it's something that should be changed. Short_open_tag has to be off to have a good declaration at the top of a php file.
Logged

katomi-tom

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
php.ini
« Reply #4 on: June 05, 2007, 05:03:42 AM »

Finally, some good sNews :)

I've recently upgraded my server also and was pulling my hair out trying to figure out why my sNews installations weren't working, it has been quite frustrating.  I came across this topic by chance, I was grabbing straws and here I am.  I'm not well versed in PHP although someday maybe it could happen, I was gettign a (mostly) blank page but no errors.  I must have recreated the databases three or four times thinking it was something that I did, until I tried the solution posted by tifosi above.  I had no idea that there was such a thing as a short open tag until now.  Anyway, I just wanted to express my thanks (Thank You) for the post.  

I would have liked to see this in the Readme, which is where I started, or perhaps a mailing list.
Logged