|
Title: My gallery crashes when patching joomla files Post by: Javi 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!!! Title: Re: My gallery crashes when patching joomla files Post by: -Wolverine 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.
Title: Re: My gallery crashes when patching joomla files Post by: Javi 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????. (the problem appears when I force to overwrite the index.php file with the hack)
Thanks a lot again. Title: Re: My gallery crashes when patching joomla files Post by: -Wolverine on February 05, 2007, 02:37:46 PM It is not a JSMF problem. You should contact RSGallery authors.
Title: Re: My gallery crashes when patching joomla files Post by: Javi on February 06, 2007, 10:18:45 AM Ok.
Thanks a lot! Title: Re: My gallery crashes when patching joomla files Post by: ronald 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 Title: Re: My gallery crashes when patching joomla files Post by: -Wolverine 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? Title: Re: My gallery crashes when patching joomla files Post by: Javi 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??? Title: Re: My gallery crashes when patching joomla files Post by: ronald 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 (http://rsgallery2.net/component/option,com_smf/Itemid,14/topic,6084.0). Title: Re: My gallery crashes when patching joomla files Post by: -Wolverine 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.
Title: Re: My gallery crashes when patching joomla files Post by: -Wolverine 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! Title: Re: My gallery crashes when patching joomla files Post by: ronald 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! ;D 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 Title: Re: My gallery crashes when patching joomla files Post by: -Wolverine 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.
Title: Re: My gallery crashes when patching joomla files Post by: Javi 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. Title: Re: My gallery crashes when patching joomla files Post by: ronald 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 Title: Re: My gallery crashes when patching joomla files Post by: Javi on March 08, 2007, 12:48:45 PM Hi all.
What is the file and the line I must change in com_smf component, to point to joomla provided PEAR library???? thanks again. Title: Probelm with IP adress of members not showing up Post by: loki on March 12, 2007, 06:57:50 PM Hello,
Since i have installed JSMF using SMF for login and registration, some IP adress do not show up in the new members profiles, how can I get those IP adresses from the new members with Joomla or CB, I cant find the parameters .... ?. I need them to ban bots and troublemakets from the forum ... Thanks, LK
Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved. Joomla Bridge by JoomlaHacks.com |