Home arrow Forum My gallery crashes when patching joomla files
  Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2008, 10:56:57 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 2.0.x (Moderators: -Wolverine, kai920)
| | | |-+  My gallery crashes when patching joomla files
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Go Down Print
Author Topic: My gallery crashes when patching joomla files  (Read 3373 times)
Javi
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile
My gallery crashes when patching joomla files
« on: February 01, 2007, 10:43:46 PM »

Hi:

Thatīs my problem: I have The RSGallery2 instaled and when I patch the joomla files, RSGallery crashes reporting the next error:

Fatal error: Cannot redeclare _pear_call_destructors() (previously declared in /home/xxxxxx/public_html/administrator/components/com_smf/includes/PEAR.php:765) in /home/xxxxxx/public_html/includes/PEAR/PEAR.php on line 796

Thanks a lot! and SORRY FOR MY BAD ENGLISH!!!

Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: My gallery crashes when patching joomla files
« Reply #1 on: February 04, 2007, 12:07:26 PM »

Apparently the RSGallery is using a require to include PEAR.php.  To be a good 3rd party component(and work well with other components) they should be using require_once(or include_once) so that you don't get this error message.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Javi
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile
Re: My gallery crashes when patching joomla files
« Reply #2 on: February 04, 2007, 02:55:31 PM »

and, is there a solution for that problem?? Should I include some code in Pear.php or in another file?Huh. (the problem appears when I force to overwrite the index.php file with the hack)
Thanks a lot again.
« Last Edit: February 04, 2007, 02:58:27 PM by Javi » Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: My gallery crashes when patching joomla files
« Reply #3 on: February 05, 2007, 02:37:46 PM »

It is not a JSMF problem.  You should contact RSGallery authors.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Javi
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile
Re: My gallery crashes when patching joomla files
« Reply #4 on: February 06, 2007, 10:18:45 AM »

Ok.

Thanks a lot!
Logged
ronald
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4


View Profile
Re: My gallery crashes when patching joomla files
« Reply #5 on: March 05, 2007, 06:43:06 AM »

Apparently the RSGallery is using a require to include PEAR.php.  To be a good 3rd party component(and work well with other components) they should be using require_once(or include_once) so that you don't get this error message.

Beeing one of the RSGallery2 developers I can assure you there are no require statements in RSGallery2, only require_once(), so I don't like the suggestion without bothering to check first. Also com_smf is not using require statements, so this is a difficult one.

We will look into this.

Cheers,

Ronald Smit
RSGallery2 Developer
Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: My gallery crashes when patching joomla files
« Reply #6 on: March 05, 2007, 09:09:25 PM »

No negative implication intended, a fatal error in php is only produced by a require, hence my comment.  I hate having to include PEAR in my component but I have found it is unreliable to assume a webhost has PEAR available.  Unfortunately I have no exposure to RSGallery but that doesn't mean I shouldn't have checked.  Can you provide a link to any discussion you might be having on your site about this so we can keep them up to date?



After assessing the error message again, it appears this is due to the two different locations of PEAR.  Javi, can you provide your php include path?
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Javi
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile
Re: My gallery crashes when patching joomla files
« Reply #7 on: March 06, 2007, 03:16:54 AM »

Hi.

Yes, my include path is: .:/usr/lib/php:/usr/local/lib/php

Is it what you're asking for???



Logged
ronald
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4


View Profile
Re: My gallery crashes when patching joomla files
« Reply #8 on: March 06, 2007, 11:48:16 AM »

Quote
After assessing the error message again, it appears this is due to the two different locations of PEAR.  Javi, can you provide your php include path?

Wolverine,

This could be the problem. Your component provides it's own copy of the PEAR library, as RSGallery2 uses the PEAR library packed in the Joomla core.
Is there a specific reason you do not use the PEAR from the Joomla Core?

Cheers,

Ronald
PS: Discussion also on the RSGallery2 Support Site.
Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: My gallery crashes when patching joomla files
« Reply #9 on: March 06, 2007, 08:39:16 PM »

If I recall correctly Joomla was packaging an older copy of PEAR or some other problem, I don't remember exactly.  Ill get to testing without it and report back.

Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: My gallery crashes when patching joomla files
« Reply #10 on: March 06, 2007, 08:46:59 PM »

Preliminary testing shows no problems with removing the copy of PEAR in com_smf.  Javi, remove the file PEAR.php from administrator/components/com_smf/includes/ and it should start working properly for you.

Thanks for the help Ronald!
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
ronald
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4


View Profile
Re: My gallery crashes when patching joomla files
« Reply #11 on: March 07, 2007, 11:02:08 AM »

Preliminary testing shows no problems with removing the copy of PEAR in com_smf.  Javi, remove the file PEAR.php from administrator/components/com_smf/includes/ and it should start working properly for you.

Thanks for the help Ronald!

No problem wolverine, we devs have to stick together! Grin

Are you sure removing the file will do the trick? What about the require statements to your copy of PEAR in the different files of com_smf?

Cheers,

Ronald
Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: My gallery crashes when patching joomla files
« Reply #12 on: March 07, 2007, 07:21:05 PM »

they only require 'PEAR.php', so if it's in the include it should not be a problem.  I did not have it with any path, I simply appended the include path with the cwd.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Javi
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile
Re: My gallery crashes when patching joomla files
« Reply #13 on: March 08, 2007, 03:34:42 AM »

Hi.

I've just deleted the file, but a new error is reported (similar, but not the same: now in /usr/lib/php/PEAR.php)

Fatal error: Cannot redeclare _pear_call_destructors() (previously declared in /usr/lib/php/PEAR.php:765) in /home/xxxxx/public_html/includes/PEAR/PEAR.php on line 796

It happens 1 hour after deleting PEAR.php from administrator/components/com_smf/includes (approx.)

thanks.
« Last Edit: March 08, 2007, 03:39:35 AM by Javi » Logged
ronald
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4


View Profile
Re: My gallery crashes when patching joomla files
« Reply #14 on: March 08, 2007, 04:12:16 AM »

they only require 'PEAR.php', so if it's in the include it should not be a problem.  I did not have it with any path, I simply appended the include path with the cwd.
Wolverine,

i think the problem with this is that most components use the PEAR library provided by Joomla, because not all servers provide a PEAR library as a standard service. When you include without path, the script will search through the included paths as set in the php.ini first. If the server does not have PEAR available, this won't work, as the Joomla PEAR library is not in the include path set on the server.

The safest way in my opinion is to let com_smf rely on the PEAR library provided by Joomla, so this conflict between different components won't appear, like this:

Code:
<?php
require_once($mosConfig_absolute_path."/includes/PEAR.php");
?>

Or there must be a good reason not to do this. The above example is exactly why Joomla decided to provide an own PEAR library.

Any thoughts on that?

Cheers,

Ronald
« Last Edit: March 08, 2007, 04:15:04 AM by ronald » Logged
Pages: [1] 2 Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
MamboBuzz.com
Search Contact About Advertise Blogs Topsites Submit News Register Login