RSGallery2 Forum Portal

RSGallery2 support forums => RSGallery2 2.x bugs & problems => Topic started by: Javi on February 24, 2007, 02:58:10 PM

Title: Gallery display problem
Post by: Javi on February 24, 2007, 02:58:10 PM
i have a problem: sometimes my gallery don't display the pictures (only an empty box with the description). The only way to fix it is deleting the display_temp.jpg file in /media folder. What can I do???? If I delete this file, the gallery runs, but it's a temporally solution, because the problem returns again in.....

Title: Re: Gallery display problem
Post by: Ronald Smit on February 24, 2007, 08:09:31 PM
Javi,

Please tell us more about your setup.
Joomla version, PHP version, RSGallery2 version (SVN number)

Thanks,
Title: Re: Gallery display problem
Post by: Javi on February 24, 2007, 10:11:41 PM
Yes. I'm using joomla 1.0.11, php v.5.2.0 and rsgallery2 1.12.1 SVN 550.
Here is an example, the url of one of my pics: ()

Thanks!
Title: Re: Gallery display problem
Post by: Ronald Smit on February 25, 2007, 09:46:19 AM
Javi.

As you still use 1.12.1 at SVN 550, you do not use the latest version.
As we are at 1.12.2 SVN 608 you miss 58 fixes and code adjustments.
I suggest you upgrade first and see if that fixes your problem.

Cheers,
Title: Re: Gallery display problem
Post by: Javi on February 25, 2007, 06:39:01 PM
I've updated the gallery to the last version and the problem appears again....
Title: Re: Gallery display problem
Post by: Ronald Smit on February 25, 2007, 07:35:40 PM
Javi,

When I go to the URL now, all is OK in IE7, FF2.0 and Opera.





Title: Re: Gallery display problem
Post by: Javi on February 25, 2007, 08:16:19 PM
Yes, it's because i've just deleted the display_temp file (three times this afternoon) but the problem is not solved. :-[ :-[ :'(

(sorry for my poor english!) :-[
Title: Re: Gallery display problem
Post by: Ronald Smit on February 25, 2007, 08:40:04 PM
Javi,

I cannot reproduce your problem, I am sorry.
If I understand you, it does not happen always, but when it does you delete the display_temp.jpg and all is well again.

How did you find out that deleting the display_temp.jpg fixed your problem?

Do you have this in all browsers(IE,FF Opera)?

If there are other users that have this problem, please report in this thread.

Title: Re: Gallery display problem
Post by: Javi on February 25, 2007, 09:15:49 PM
Yes, it does not happen always, but when it does I delete that file and all works again. I have the same problem in IE6, FF2.0... (Opera... i don't know).

I've just had another problem 10-12 days ago with the gallery, that reported me the next error:

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

and my hosting provider service solved it commenting the line 13 of img.utils.php, changing "require_once(JPATH_ROOT.'/includes/PEAR/PEAR.php');" for "/* require_once(JPATH_ROOT.'/includes/PEAR/PEAR.php'); */"

Could it be the cause of that new problem???

PD: If you click on the url link, you will see that it happened again  :-[ :-[
Title: Re: Gallery display problem
Post by: Ronald Smit on February 25, 2007, 09:53:21 PM
Javi,

It could be as we use the error trapping from the PEAR library.
Where did you receive the other error?

Perhaps you could uncomment the line in img.utils.php again and test it for a period of time to see if that is it.

Good luck,
Title: Re: Gallery display problem
Post by: Javi on February 26, 2007, 05:51:06 PM
Hi:

If I uncomment the line in img.utils.php the gallery crashes (totaly unaccesible) displaying the PEAR error. :-\

Could it be a cache problem too? What's the cache directory used by rsgallery???
Title: Re: Gallery display problem
Post by: Ronald Smit on February 26, 2007, 07:09:36 PM
We don't have a specific RSGallery2 cache, it is handled by Joomla.

I find it strange that the PEAR is causing RSGallery2 to crash. Are you sure the gallery crashes or is it another component/application that crashes.
PEAR has been a part of RSGallery2 for quite some time now and it works OK.

Perhaps you have other components or scripts running that use PEAR in some way.

Also more information about your setup would be welcome.

Cheers,



Title: Re: Gallery display problem
Post by: Javi on February 26, 2007, 08:25:50 PM
This is the part of the msg send by my hosting service providers about the first pear error (translated by me  :-\ :-[):

File /home/xxxx/public_html/administrator/components/com_rsgallery2/includes/img.utils.php is including PEAR class deffined in your user directory, and the principal application is including PEAR system class. Two different "ways" to define the same class.

The only component that can create incompatibility with the gallery are SMF forums (PEAR error is not displayed if I uninstall the SMF bridge...) But that forum is the most used in joomla and I think there are a lot of people using SMF and RSgallery without problems. I don't know what's happening, but pear error is over and I think that this new problem has a very simple solution but....what is it? Why deleting display_temp file the pics are displayed again?? ??? ..... I'm really stressed whith that problem, because gallery is really a important section of my website.

If you need more details of my rsgallery config or my component/modules i will post you.

Thanks a lot!
Title: Re: Gallery display problem
Post by: Javi on February 27, 2007, 08:58:22 PM
I've just find another thing:

If you see the properties of the empty white box displayed, you will see that is reporting the next error:

Warning:  fopen(/home/xxxxx/public_html/media/display_temp.jpg) function.fopen: failed toopen stream: Permission denied in /home/xxxxx/public_html/administrator/components/com_rsgallery2/includes/img.utils.php on line 912
Warning:  fclose(): supplied argument is not a valid stream resource in /home/xxxxx/public_html/administrator/components/com_rsgallery2/includes/img.utils.php on line 913
Warning:  imagejpeg() function.imagejpeg: Unable to open '/home/xxxxx/public_html/media/display_temp.jpg' for writing: Permission denied in /home/xxxxx/public_html/administrator/components/com_rsgallery2/includes/img.utils.php on line 914

I think we are close to fix it....

Thanks.
Title: Re: Gallery display problem
Post by: Ronald Smit on February 27, 2007, 09:25:52 PM
Ok,

Sounds like something with writing the file.
I have an idea.
Open up img.utils.php and goto line 912.
You will find the following line:
Code: [Select]
$fh=fopen($file_name_dest,'w');change that to:
Code: [Select]
$fh=fopen($file_name_dest,'wb');
This will force binary mode. Perhaps this will solve your problem.

Let me know if that works.

cheers,
Title: Re: Gallery display problem
Post by: Javi on February 28, 2007, 06:06:43 AM
Hi again:

It does not work. The problem is still present  :-\ (same time interval approx.)
Title: Re: Gallery display problem
Post by: Ronald Smit on February 28, 2007, 11:12:23 AM
Javi,

Could you post the relevant PHP settings.
These are available in the backend menu under System Info.
Just copy and paste the Relevant PHP settings block.

Cheers,
Title: Re: Gallery display problem
Post by: Javi on February 28, 2007, 04:18:24 PM
hi.

Theese are the relevant php settings:

Configuraciones relevantes de PHP: 
Joomla! Emulaci?n de los Registros Globales:  ACTIVADO   
Registros Globales:  ACTIVADO   
Magic Quotes:  ACTIVADO   
Modo seguro:  DESACTIVADO   
Subida de archivos:  ACTIVADO   
Sesi?n auto start:  DESACTIVADO   
Sesi?n save path:  /tmp 
Short Open Tags:  ACTIVADO   
Output Buffering:  DESACTIVADO   
Open basedir:  /home/xxxxx:/usr/lib/php:/usr/local/lib/php:/tmp 
Visualizaci?n de errores:  ACTIVADO 
XML activado:  Si 
Zlib activado:  Si 
Desactivar funciones:  none 

Thank you again!
Title: Re: Gallery display problem
Post by: Javi on March 01, 2007, 07:13:22 PM
Hi again:

If you really want, i can register you whith admin permissions in my website, so you can see the complete configuration.....

Thanks!
Title: Re: Gallery display problem
Post by: Ronald Smit on March 01, 2007, 07:23:38 PM
Javi,

That would be great. I don't know if I can read anything in that language but I'll try!
Send me a Personal Message with the login details please.

Cheers,
Title: Re: Gallery display problem
Post by: Javi on March 01, 2007, 11:26:49 PM
Hi again:

I've send you the pm.

Thanks a lot.

Title: Re: Gallery display problem
Post by: Ronald Smit on March 02, 2007, 08:30:05 AM
Javi,

I sent you a new PM, I need Super Admin rights.

Cheers,
Title: Re: Gallery display problem
Post by: Javi on March 04, 2007, 03:25:39 PM
I've send you another pm. You already have super-admin ones.

Thanks.
Title: Re: Gallery display problem
Post by: Ronald Smit on March 04, 2007, 04:02:08 PM
Javi,

I am really sorry, I cannot find anything out of the ordinary.

This is a mystery to me.

Title: Re: Gallery display problem
Post by: Daniel Tulp on March 04, 2007, 04:46:57 PM
wasn't the display_temp file only used when the watermarking is applied? or will it still be used when this is not so?

if it isn't used when the watermarking is not set to be active, then you could try turning off the watermarking
Title: Re: Gallery display problem
Post by: Javi on March 04, 2007, 07:54:12 PM
Hi:

I turned off the watermarking and it works!!!!!  :D

But we have now another problem: we can't upload images. When we try to upload the next error is displayed:

Fatal error: Class 'PEAR' not found in /home/xxxxx/public_html/administrator/components/com_rsgallery2/includes/img.utils.php on line 301

Like I said in a previous post, we have commented the line 13 of img.utils.php (PEAR). If I uncomment this line the gallery crashes, and i think that new error could be relationed with previous PEAR error... but we have uploaded a lot of pics with this line already commented  ??? ???

Thaks a lot...
Title: Re: Gallery display problem
Post by: Ronald Smit on March 04, 2007, 10:00:21 PM
Javi,

I understand your problem, but the gallery needs PEAR to function properly.
Disabling part of the script, makes it hard for us to help you.

Title: Re: Gallery display problem
Post by: Javi on March 05, 2007, 12:56:04 AM
Hi again.

And if I uncomment this line (setting the img.utils.php file as in a fresh instalation).... What can I do to fix this problem? :

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

Thanks a lot for all your explications and efforts!!
Title: Re: Gallery display problem
Post by: Ronald Smit on March 05, 2007, 07:31:03 AM
Well,

From the looks of it, it is an error in com_smf.
Obviously you are using the bridge component for SMF forums.

That is exactly the same as we use here on our support site, and as you see, we don't have any problems.
What version of SMF and bridge component are you using?

Title: Re: Gallery display problem
Post by: Javi on March 05, 2007, 11:13:20 AM
 
I'm using the jsmf bridge 2.0 from joolahacks. I tried with the official bridge, but i get the same error. I have posted my problem at joomlahacks support forum too, and that was the reply from one of the jsmf developers:

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.

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

...and smf forums are working in my website (with no problems). Gallery is the only component that crashes with that PEAR error.  :-\

thanks.

 

 




 
Title: Re: Gallery display problem
Post by: Ronald Smit on March 05, 2007, 11:25:43 AM
Well,

As you can see, we use require_once(), so that is not the problem.
I really have no idea then.

Title: Re: Gallery display problem
Post by: Ronald Smit on March 05, 2007, 12:50:39 PM
Javi,

It could be that there is another component you installed, that uses PEAR and didn't use require_once().
What other components do you have installed?

Cheers,
Title: Re: Gallery display problem
Post by: Javi on March 05, 2007, 03:46:25 PM
Hi.

I only have installed the next components:

-eBackup Repository
-JSMF Bridge from joomlahacks
-RSGallery2  (with RSGallery scroller and RSItems)
-TFSforMambo (statistic component)
-UddeIm (PM Component)

I'm using a lot of modules, but only theese components

cheers
Title: Re: Gallery display problem
Post by: Ronald Smit on March 07, 2007, 05:05:53 PM
Frans,

I am pretty sure you are not talking about Javi's problem with the PEAR library here.
Please open up another thread if you have a problem.

Javi,

Your problem has been identified by the com_smf development team. Here (http://www.joomlahacks.com/index.php?option=com_smf&Itemid=94&topic=3272.new;topicseen#new) is a link to the discussion.

Here's the quote from the Joomlahacks website:
Quote
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!

Good luck trying and let me know!


Cheers,

Title: Re: Gallery display problem
Post by: Javi on March 08, 2007, 09:33:56 AM
Hi Ronald.

I've deleted the file, and works, but if i uncomment the line of img.utils.php this is what happens:

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

similar, but no the same error. Now it's on /usr/lib/php/PEAR.php

i will post this error in com_smf forums too

Thanks.
Title: Re: Gallery display problem
Post by: Ronald Smit on March 08, 2007, 10:06:30 AM
Javi,

This is because now cmo_smf is using the preinstalled version of PHP on your server and not the one provided with Joomla.
In order to make this work, every include and require statement in com_smf needs to be pointing to the one provided in the Joomla core.

A quick solution would be to replace the line in img.utils.php with:
Code: [Select]
require_once("PEAR.php");
This way it will also use the preinstalled PEAR.php from your server configuration. This is not the preferred wy for RSGallery2 however because not all servers provide a standard PEAR library. Therefor the ideal solution would be if every JOomla component uses the PEAR library privded by Joomla.

Let me know if the quick solution works for you. I will get in touch with Joomlahacks about this.

Cheers,

Title: Re: Gallery display problem
Post by: Javi on March 08, 2007, 07:38:12 PM
Hi Ronald,

I've tried it, and seems to work ;). Now, com_smf and rsgallery are using my server preinstalled version of PEAR, and the most "logical" solution is that both components pointed to /includes/PEAR/PEAR.php, isn't it??

If both components pointed to /includes/PEAR/PEAR.php, then I could let the line 13 of img.utils like in a fresh installation (require_once(JPATH_ROOT.'/includes/PEAR/PEAR.php');
isn't it??

I'm waiting to the Wolverine reply to tell me what line i must change in com_smf to point to this PEAR file...

PD: It's been really hard for me to explain all this things in english!!! :'( :'(


Title: Re: Gallery display problem
Post by: Ronald Smit on March 08, 2007, 10:08:35 PM
Javi,

You are doing great man!


Quote
If both components pointed to /includes/PEAR/PEAR.php, then I could let the line 13 of img.utils like in a fresh installation (require_once(JPATH_ROOT.'/includes/PEAR/PEAR.php');
isn't it??

Yes that is correct. If com_smf is adapted, the normal settings in img.utils.php can be used again. FOr now, you're fine.
I will check with wolverine about that. It would be best if he adapted com_smf to use the Joomla PEAR library, so no conflicts will appear.

Good luck!

Ronald
Title: Re: Gallery display problem
Post by: Javi on March 09, 2007, 08:56:15 AM
 Hi!

There is no upload problems now! and gallery is still working OK.
I'll come back here frecuently (and to joomlahacks forum), to verify if wolverine includes the joomla pear library in his component.

Thousands of thanks to you and Daniel!!! ...and I hope this could help anyone with the same problem.

Thanks again, man!  ;)
Title: Re: Gallery display problem
Post by: Jed on May 26, 2007, 05:03:47 AM
I have the exact same problem as above (and due to the same reasons0

This problem is present in the latest release of RSGallery.

The problem I have is trying to apply this modification to img.utils.php doesn't work with the latest version because its not present (the require) in the latest img.utils.php file.

I've had to choose the last version of the gallery to get this to work.

Can you suggest what to do to fix this so I can use the latest version?

Thanks,

J.
Title: Re: Gallery display problem
Post by: Jed on May 31, 2007, 10:07:39 PM
Anyone?  ???
Title: Re: Gallery display problem
Post by: R. de Vroede on June 01, 2007, 10:08:23 AM
Disclaimers:

There is a require_once for PEAR.php in file.utils.php in the same directory. It's possible that the require_once got moved there. Try uncommenting it there.
Title: Re: Gallery display problem
Post by: Lady Benjamin on September 07, 2007, 05:32:25 AM
Hello,
I am new to this forum.  i followed the directions in this thread as I am having the same problem since I moved my site over to a different server.  So I downloaded the img.utils.php file and made the follwoing change:


A quick solution would be to replace the line in img.utils.php with:
Code: [Select]
require_once("PEAR.php");

Only problem is that I can not reupload the img.utils.php file after i have changed it.  I am using fetch and i can upload and download to every directory of my site except for this one.  Every time I try to i get a message saying:
Quote
Server responded: "img.utils.php" : Permission denied

This feels like such a novice question, but I can't for the life on me get this to work.  Any suggestions would be greatly appreciated.

Lady
Title: Re: Gallery display problem
Post by: Jonathan on September 07, 2007, 06:09:29 AM
you do not have permission to edit the file. because it is owned by apache.  The easiest thing to do is change the group of the file to a group that you are in, if you have the ability to, must have sudo todo so or ask your server admin, although It may even be more easy to install JoomXplorer and edit the file through that components interface.

Good Luck
Title: Re: Gallery display problem
Post by: Lady Benjamin on September 07, 2007, 03:43:18 PM
Thank you very much for your reply.  This site is on a dedicated server which I have root access to.  So is there a way for me to modify the file through the root?

Thanks,
Lady
Title: Re: Gallery display problem
Post by: Jonathan on September 08, 2007, 02:36:32 AM
yes you can change the group of the file or the owner(do not suggest, just incase you want to upgrade), to a group that you apart of, or if you are comfortable with using VI, pico, or nano you can edit the document directly with sudo

Good Luck
Title: Re: Gallery display problem
Post by: Maksin on December 20, 2007, 01:59:07 AM
Same problem has happened to me.
Only I was getting the error for docman component and rsitems 1.4.2 alpha module, when using together.

Solution founded in file administrator/components/com_docman/contrib/pear/HTML_Select.php file.
Just delete 3 lines in file:
Code: [Select]
//only load if it hasn't already been loaded
if(!class_exists( "PEAR")) {
require_once dirname(__FILE__) . '/PEAR.php';
}

require_once dirname(__FILE__) . '/HTML_Common.php';


New code:
Code: [Select]
//only load if it hasn't already been loaded

require_once dirname(__FILE__) . '/HTML_Common.php';


It works, without a problems.
But it only works with rsgallery2_1.13.2-alpha.

With new version of gallery, even [SVN] the docman and rsitems 1.4.2 alpha module would not work at all.

Cheers  :)
Title: Re: Gallery display problem
Post by: Jonah on December 20, 2007, 10:05:35 PM
Probably another namespace collision.  The 1.14 series contains the J15Backport project which will conflict with any other component that has backported classes from J1.5.  We have wrapped the most common collision classes with if class_exists but I'm sure there are many more.