1
rebenta
Xoops Modules Troubleshot - Questions about compatibility with PHP 5.0.5
  • 2005/11/4 14:50

  • rebenta

  • Just popping in

  • Posts: 30

  • Since: 2005/8/23


We are seeing many problens with some XOOPS Modules. Some pages come blank and anybody knows why.
After php upgrade to version 5.0.5, the most common error is: Quote:
fatal-error-only-variables-can-be-passed-by-reference


The problem can be see in this example:
Quote:

function getAnArray() {
$myArray = array ( 1, 2, 3 );
return $myArray;
}
echo( array_pop( getAnArray() ) );


Where in the past this would have resulted in the output ‘3′, now you get this:

Quote:
Fatal error: Only variables can be passed by reference


It is happening because the most of modules don´t be rewritten to works with new php restrictions.
The problem is better reported in this link:
http://www.the-stickman.com/web-development/php/php-505-fatal-error-only-variables-can-be-passed-by-reference/

We need to work for rewrite modules to works corretly. Someone have any idea to mobilize XOOPS Developers?

2
hervet
Re: Xoops Modules Troubleshot - Questions about compatibility with PHP 5.0.5
  • 2005/11/4 20:07

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


May be you can first report modules with problems ?

3
rebenta
Re: Xoops Modules Troubleshot - Questions about compatibility with PHP 5.0.5
  • 2005/11/7 13:25

  • rebenta

  • Just popping in

  • Posts: 30

  • Since: 2005/8/23


The modules who i have found error are:
myalbum 2.86 (in the index page)
news 1.4 (when i open a news to see all)
newbb 2.01 (in some pages of admin and anothers pages)

4
davidl2
Re: Xoops Modules Troubleshot - Questions about compatibility with PHP 5.0.5
  • 2005/11/7 13:42

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Newbb2 has been superceeded by CBB 1.15 (or 2.3 with XOOPS 2.2.3) - I'm not sure if this works with Php5 - but if you have a test site, you may want to try this out...

5
hervet
Re: Xoops Modules Troubleshot - Questions about compatibility with PHP 5.0.5
  • 2005/11/7 17:01

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Quote:

rebenta wrote:
news 1.4 (when i open a news to see all)

Strange, I'm using this Php version.
Are you sure that you use the latest News version ?

6
rebenta
Re: Xoops Modules Troubleshot - Questions about compatibility with PHP 5.0.5
  • 2005/11/8 15:12

  • rebenta

  • Just popping in

  • Posts: 30

  • Since: 2005/8/23


Well, i´ve solved the problem with myalbum. The index page have be modified to pass value only (don´t pass by reference)
I´ll comunicate the myalbum developer website.
I´ve installed the cbb and it works corretly!
The piCal module have problems when i go create new category (piCal/admin/categories.php)
But the news module have problems when i will create blocks (latest news) in the index page of Xoops.
The php debug show:
Quote:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 58368 bytes) in /home/users/r/rebenta/www/rebenta.com.br/templates_c/%%D0^D05^D05DAAB4%%db%3Aarts_spot.html.php on line 62
Warning [PHP]: xoops_load_lang_file() [function.xoops-load-lang-file]: Unable to access /home/users/r/rebenta/www/rebenta.com.br/modules/myalbum/language/portuguese/modinfo.php in file include/functions.php line 152
Warning [PHP]: xoops_load_lang_file(/home/users/r/rebenta/www/rebenta.com.br/modules/myalbum/language/portuguese/modinfo.php) [function.xoops-load-lang-file]: failed to open stream: No such file or directory in file include/functions.php line 152
Warning [PHP]: xoops_load_lang_file() [function.include]: Failed opening '/home/users/r/rebenta/www/rebenta.com.br/modules/myalbum/language/portuguese/modinfo.php' for inclusion (include_path='.:/home/servers/php/lib/php') in file include/functions.php line 152
Warning [PHP]: main() [function.main]: open_basedir restriction in effect. File(/home/servers/php/lib/php/include/get_perms.php) is not within the allowed path(s): (/home/users/r/rebenta) in file modules/myalbum2/xoops_version.php line 112
Warning [PHP]: main(include/get_perms.php) [function.main]: failed to open stream: Operation not permitted in file modules/myalbum2/xoops_version.php line 112
Warning [PHP]: main() [function.include]: Failed opening 'include/get_perms.php' for inclusion (include_path='.:/home/servers/php/lib/php') in file modules/myalbum2/xoops_version.php line 112
Notice [PHP]: Undefined variable: global_perms in file modules/myalbum2/xoops_version.php line 113
Notice [PHP]: Undefined variable: global_perms in file modules/myalbum2/xoops_version.php line 121
Notice [PHP]: Constant _MI_TEXT already defined in file modules/xoopspartners/language/portuguese/modinfo.php line 38

7
rebenta
Re: Xoops Modules Troubleshot - Questions about compatibility with PHP 5.0.5
  • 2005/11/9 11:01

  • rebenta

  • Just popping in

  • Posts: 30

  • Since: 2005/8/23


The soapbox module 1.5 is having troubles too.

8
rebenta
Re: Xoops Modules Troubleshot - Questions about compatibility with PHP 5.0.5
  • 2005/11/9 19:28

  • rebenta

  • Just popping in

  • Posts: 30

  • Since: 2005/8/23


I´ve found another problem with cbb, to see topics, cbb show:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 14109 bytes) in /home/users/r/rebenta/www/rebenta.com.br/class/smarty/Smarty_Compiler.class.php on line 1235

9
rebenta
Re: Xoops Modules Troubleshot - Questions about compatibility with PHP 5.0.5
  • 2005/11/10 17:28

  • rebenta

  • Just popping in

  • Posts: 30

  • Since: 2005/8/23


I´ve fix the problem to see topics of cbb. In the page to view topics, you must change the function assign_by_ref by assign:

Before change:
Quote:
$xoopsTpl->assign_by_ref('viewmode_options', $viewmode_options);
unset($viewmode_options);


Final:
Quote:
$xoopsTpl->assign('viewmode_options', $viewmode_options);
unset($viewmode_options);


In the viewtopic.php page.

But to see cbb blocks and news blocks, the page come blank. I´ve search the block page and i didn´t find any error at first look...

Login

Who's Online

171 user(s) are online (63 user(s) are browsing Support Forums)


Members: 0


Guests: 171


more...

Donat-O-Meter

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

Latest GitHub Commits