21
zeronesystem
Re: All xoops headline mods DO NOT WORK with PHP5

hi,


Quote:
If you are, it would be good to see the specs, in particular if you are on a Linux or Windows server.




Server: Win XP SP2 + ISS 5.1

Bye.

22
mclindy
Re: All xoops headline mods DO NOT WORK with PHP5
  • 2005/2/27 2:20

  • mclindy

  • Just popping in

  • Posts: 38

  • Since: 2005/1/23


Yes, it looks like PHP5 is the culprit.

I run my XOOPS site on top of Xampp, which by default uses PHP5 but also comes with PHP4. I switched to PHP4 and all of a sudden everything works like it's supposed to.

I've been struggling with this for a while, so I'm releaved to finally figure it out.

Thanks to all who posted here, I wouldn't have figured it out alone. In fact, I don't think I can take credit for figuring anything out.

If you use Xampp (lampp), it's very easy to switch to PHP 4.

See http://www.apachefriends.org/en/xampp-linux.html and scroll down to:

Note to XAMPP since version 1.4.7
Because such very new versions like PHP 5 always should be handled with care we decided to include both current versions of PHP into XAMPP: PHP 5.0.x and PHP 4.3.x. If you find out your PHP application doesn't work with PHP 5 you will be able to switch back easily to PHP 4.

By the following command you can switch "back" to PHP 4.3.x:

/opt/lampp/lampp php4

And with the following command you can switch back to PHP 5.0.x:

/opt/lampp/lampp php5

If you forgot which version of PHP is in use simply use phpinfo() or call this command:

/opt/lampp/lampp phpstatus

23
Peekay
Re: All xoops headline mods DO NOT WORK with PHP5
  • 2005/2/27 3:06

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I think it would be good to get a definitive comment from XOOPS core dev team on this (I think many of them are getting legless in Belgium at the moment!). I don't even have a problem at present, but my host will almost certainly upgrade to PHP5 this year. I probably won't get any warning about it, so I need to know XOOPS will continue to work. Can interested posters try and keep this thread in the recent posts block (curses NewBB through gritted teeth!).

24
Peekay
Re: All xoops headline mods DO NOT WORK with PHP5
  • 2005/3/2 22:12

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Tiny bump. Anyone successfully using XOOPS with PHP 5 and MySQL 4.1?

25
wanikoo
Re: All xoops headline mods DO NOT WORK with PHP5
  • 2005/3/11 18:22

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


How about this change^^;;

I've never installed PHP5...but..I think this change is necessary!!

(target file: /xoopsheadline/class/headline.php)
From:
get_class($headline) != 'xoopsheadlineheadline'
To:
strtolower(get_class($headline)) != 'xoopsheadlineheadline'

because In PHP5, get_class($headline) returns XoopsheadlineHeadline !

Read this page!
http://kr2.php.net/manual/en/migration5.incompatible.php

26
wanikoo
Re: All xoops headline mods DO NOT WORK with PHP5
  • 2005/3/16 14:25

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Umm...
I succeed^^;;
If you want to use xoopsheadline on PHP5,
you have to fix some bug and change some code^^;;

(1)First, this change is necessary!!
---target file: /xoopsheadline/class/headline.php---
From:
get_class($headline) != 'xoopsheadlineheadline'
To:
strtolower(get_class($headline)) != 'xoopsheadlineheadline'

because In PHP5, get_class($headline) returns XoopsheadlineHeadline !

And
---target files: /xoopsheadline/admin/index.php , /xoopsheadline/index.php---
Change like this^^;;

$HTTP_GET_VARS to $_GET
$HTTP_POST_VARS to $_POST

(2)Some bug fixes needed^^;;
---------------------
/xoopsheadline/admin/index.php
From:
$hlman =& xoops_getmodulehandler('headline');;
To: ( I mean not ;; just ; )
$hlman =& xoops_getmodulehandler('headline');
--------------------
And
/xoopsheadline/class/headlinerenderer.php

From:(Yeah^^This bug is one of real culprits !!!!!!!)
class XoopsHeadlineRenderer
{
// holds reference to xoopsheadline class object
var $_hl;

var $_tpl;

// XoopTemplate object
var $_tpl;

To:
class XoopsHeadlineRenderer
{
// holds reference to xoopsheadline class object
var $_hl;

var $_tpl;

// XoopTemplate object
//var $_tpl;
I mean not two $_tpl just one $_tpl !!!!!!!!!!!!!!

Umm...
I confirmed it works well on PHP5 after this change.
(3) this change is also necessary!!
/html/class/xml/saxparser.php
From:
function free()
{
xml_parser_free($this->parser);

unset($this);
$this = null;
}
To:
function free()
{
xml_parser_free($this->parser);

unset($this);
//$this = null;
}
I mean //$this = null;

And
this is optional....
but...I recommend that you use snoopy instead of fopen^^;;

27
Peekay
Re: All xoops headline mods DO NOT WORK with PHP5
  • 2005/3/16 22:19

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Excellent work wanikoo!. I hope someone else using PHP 5 can try this. Should really be posted in the FAQ as a 'fix' if everyone agrees it works.

28
joeboe
Re: All xoops headline mods DO NOT WORK with PHP5
  • 2005/3/17 23:57

  • joeboe

  • Just popping in

  • Posts: 2

  • Since: 2005/3/17


I attempted the fix described above and I now get blank pages after submitting changes and when viewing the front page with the headlines module enabled. Any chance at getting the patched files posted for download? Thx.

29
joeboe
Re: All xoops headline mods DO NOT WORK with PHP5
  • 2005/3/18 0:14

  • joeboe

  • Just popping in

  • Posts: 2

  • Since: 2005/3/17


Sorry to be post happy, but the News module does not appear to be acting properly either. It does not let me add any articles. Is this possibly a php5 issue as well?

It's disapointing to see issues with PHP5 this far into the release, but it seems like many of the upper end OS CMS's have this problem. I was recently evaluating the Drupal cms and found that it is highly incompatible with PHP5 as well.

30
wanikoo
Re: All xoops headline mods DO NOT WORK with PHP5
  • 2005/3/25 14:14

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

joeboe wrote:
I attempted the fix described above and I now get blank pages after submitting changes and when viewing the front page with the headlines module enabled.

Umm...
I checked and reconfirmed it works well.
Quote:

joeboe wrote:
the News module does not appear to be acting properly either. It does not let me add any articles.

Just replace the formers with the latters
And...
all basic modules included in XOOPS core package will work well.
( exception: myheadline )
$HTTP_GET_VARS to $_GET
$HTTP_POST_VARS to $_POST
$HTTP_COOKIE_VARS to $_COOKIE
$HTTP_POST_FILES to $_FILES
$HTTP_ENV_VARS to $_ENV
$HTTP_SERVER_VARS to $_SERVER
$HTTP_SESSION_VARS to $_SESSION

PS:
If you don't have free time to replace them,
Just visit this link below.
http://www.xoopscube.jp/modules/mydownloads/singlefile.php?cid=4&lid=192
(I didn't check this package in detail...
but..someone told me that although it's not perfect, he at least did replace all of them(mentioned above))

Login

Who's Online

423 user(s) are online (301 user(s) are browsing Support Forums)


Members: 0


Guests: 423


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits