Cannot turn off global resize for non-gallery images

The Official support forum for AWSOM.org (Artist Website: Setup, Options, Markup) and other Web Development questions. AWSOM.org is the website created by Harknell to help artists, webcomic creators, and regular bloggers get started in using Wordpress as their website system. Come here to post ideas, ask questions, or (grumble) post bugs you discover in any of the AWSOM designed plugins.

Moderators: cxc, kweee, SHADOBOXXER, Onezumi

Cannot turn off global resize for non-gallery images

Postby jester0000 » Mon Jan 21, 2008 6:07 pm

I am using AWSOM PixGallery 4.4.5 with Wordpress 2.3.2. I don't know what could be causing this, as i've tried everything referred to in previous posts to fix this problem. For some reason, I cannot release the stranglehold that AWSOM PixGallery has on any image I try to place within a post or page. All images that are displayed throughout the theme, images found on category pages, archive listings, etc work fine and the pages load immediately.

If I place an image on a post or a page, that page will take 30 seconds per picture to load (30 seconds with only 1 picture, 60 seconds for 2 pictures, etc.). After the 30 seconds, the images i placed on there DO appear, however sometimes (but not every time) receive the following errors (this example uses an image I am linking to from outside of my website, just to prove that this happens even when the image doesn't reside on my site) (edited to not show my domain. If you need my domain to check out this problem, I will send it to you in a PM):

----------------------
Warning: getimagesize() [function.getimagesize]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/MYDOMAIN/public_html/beta/wp-content/plugins/awsompixgallery/pixgallery.php on line 560

Warning: getimagesize(http://upload.moldova.org/movie/actors/ ... _braff.jpg) [function.getimagesize]: failed to open stream: Permission denied in /home/MYDOMAIN/public_html/beta/wp-content/plugins/awsompixgallery/pixgallery.php on line 560
Invalid image or bad permissions [http://upload.moldova.org/movie/actors/z/zach_braff/thumbnails/tn2_zach_braff.jpg]

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/MYDOMAIN/public_html/beta/wp-content/plugins/awsompixgallery/pixgallery.php on line 770

Warning: imagecreatefromjpeg(http://upload.moldova.org/movie/actors/ ... _braff.jpg) [function.imagecreatefromjpeg]: failed to open stream: Permission denied in /home/MYDOMAIN/public_html/beta/wp-content/plugins/awsompixgallery/pixgallery.php on line 770

---------------------------------------------

This occurs whether I uploaded the pictures via an FTP client, or via the wordpress upload feature. This occurs no matter where the image is coming from. I have tried it with images within my wordpress installation, outside of my wordpress installation, and outside of my website altogether! This occurs whether the owner of the image is my website, or if the owner is "99".... doesn't matter, I get the same result. No matter what, if I try to embed an image in any post or page, it takes 30 seconds. I assume the 30 seconds is waiting for a php function to time-out before it loads the correct images, but i need to know how to make PixGallery ONLY affect images within my gallery. The most amazing part is, my gallery works PERFECTLY! this is ONLY happening with the images OUTSIDE of the gallery! I was having the same problem when i had the global resize turned on, but i decided to just resize the images myself before uploading, so I was able to shut that feature off, and it totally fixed the problem within my gallery, but did NOT fix the problem with pics outside the gallery. Its like it can't be turned off.... its still trying to do some image manipulation function of some kind.

Here are my current PixGallery settings:

Gallery Images
Maximum thumbnail page image size (0 = no max) Width: 150 px Height: 100 px
Maximum image size for viewing full size images within the Wordpress page(0 = no max) Width: 570 px Height: 0 px
Make all thumbnails squared on thumbnail page: YES
Globally manage image size for all images in Wordpress (even those not in a gallery)(0 = disabled): Width: 0 px Height: 0 px
AWSOM Mod Options
Remove Underscores? NO
Captions? YES
Hide Sidebar? NO
Advanced Visual Editor? YES
Absolute Linking Path Support? YES (its currently in a subfolder for testing purposes, and uses pretty permalinks)
Limit number of thumbnails on index page? 0 (disabled)
Turn off titles and link text under thumbnails? YES
Watermark? NO
Popup method? NO POPUP
Open in new window? NO
Thumbnail Popup? UNCHECKED
Cache Path? wp-content/uploads/cache/

-----------------------------------------

The cache folder is 777, and as I stated before, The gallery currently works perfectly. However, with all of these settings the way they are, PixGallery is STILL trying to do SOMETHING with images placed on a post or page, and thats all I have been able to figure out. I looked through the PHP code to see if I found any obvious way to shut it off, but I couldnt find anything obvious enough that I knew wouldn't mess up how the gallery itself works.

This is EXACTLY what I need in a photo Gallery...... however with this problem, it's rendered completely useless for me, which is a real shame considering the gallery part actually works fine. I've looked through all the posts and haven't been able to fix the problem. Any advice?

UPDATE: after messing around a little more, I found out that because AWSOM PixGallery is insisting on doing a "getimagesize()" on ANY image I try to embed, and because you cannot do a getimagesize() on a full URL (even if it the same domain), that is why the images would load only after getimagesize fails. I did find a workaround that seems to do the job. So, this plugin is affecting ALL posts on my website, pixgallery seems to REQUIRE that i use relative linking instead. I usually link all my images with FULL URL even from my own server, just in case I decide to move the post to a different category or whatever, the image will still be correct, rather than if I use relative image linking, which will break images when the post is moved. Also, this is the default way wordpress links to images within the editor, with the full URL. I'd rather have AWSOM PixGallery just not do anything with any posts outside of the gallery posts, but i still havent been able to figure out how to do that. Of course, this means I will not be able to insert images via wordpress without editing the URL every time to be relative rather than then full link, being thats how wordpress does it by default. Now, while this kinda fixes the problem with embedding images located on the same domain, but I will definately need to embed images from a number of my other websites, and because of this getimagesize relative linking problem, that will be IMPOSSIBLE, being that in that case I would NEED to use the full URL.

Any ideas on how to get this plugin to stop trying to getimagesize() on any images except those in the gallery? Perhaps there is a way to change the code so that when the plugin sees a full URL, it can change it to a relative one BEFORE passing it on to the getimagesize() function. I realize there is no way to make getimagesize() receive a full URL (or at least i don't think there is), so maybe we can adjust the plugin to accommodate it. I can't imagine i'm the only one experiencing this problem, being that the code is the same for everybody, and PHP is the same for everybody.

of course, the BEST way to fix this was if i could just get PixGallery to totally ignore posts that don't contain gallery tags!

AT LEAST WE'RE NARROWING IT DOWN! :) Thanks!
jester0000
Not so Chibi
 
Posts: 10
Joined: Mon Jan 21, 2008 5:40 pm

Postby Harknell » Mon Jan 21, 2008 9:26 pm

Hi, from the research I've seen on this it appears that it's a settings issue on your server. (or possibly a bug in php).

It's talked about here: http://www.thescripts.com/forum/thread640272.html

here: http://www.htmlforums.com/php-programmi ... 71783.html

or it's an issue with older versions of php (it's hard to tell exactly which issue is causing the problem). What version of php is running on your server?

Basically it looks like the fopen command for a remote file is turned off or broken on your server.
User avatar
Harknell
CEO & Site Admin
 
Posts: 1317
Joined: Wed Jul 21, 2004 12:16 pm

Postby jester0000 » Tue Jan 22, 2008 1:36 am

Hi,

Thank you so much for taking the time to help me with this problem! It's a great plugin that I'd LOVE to see working fully. So thank you very much for that.

As for your question, I am currently running PHP 4.4.6

Is there any way you know of that would work as a specific test to see if fopen is activated or not? I remember I had a similar situation on another server over a year ago where I had to activate the ability to use fopen, as it was not "turned on" by default. I usually learn things I need to know as I go, so at this point I don't remember what I did to do that. Any thoughts/ideas?

Thanks again!!! :)

-Alex
jester0000
Not so Chibi
 
Posts: 10
Joined: Mon Jan 21, 2008 5:40 pm

Postby Harknell » Tue Jan 22, 2008 10:08 am

Many times you can see php information through your administration panel for your server. Do you use Cpanel? If so there's usually an option on the main page to see your php setup or info. In the long list of settings you'll usually find fopen and it's settings. Check there.
User avatar
Harknell
CEO & Site Admin
 
Posts: 1317
Joined: Wed Jul 21, 2004 12:16 pm

Postby jester0000 » Tue Jan 22, 2008 12:10 pm

i used phpinfo() to determine this. It states the following:

allow_url_fopen Local Value: ON Master Value: ON


so looks like it is switched on.... you said that it could possibly be "broken"? I look forward to your reply.
jester0000
Not so Chibi
 
Posts: 10
Joined: Mon Jan 21, 2008 5:40 pm

Postby Harknell » Tue Jan 22, 2008 12:49 pm

Ok, I'm guessing that this issue has to do with this: http://bugs.php.net/bug.php?id=11058 where they talk far down about the dns issue. Apparently the way some people have resolved it is by adding entries to the etc/hosts file for the locations that they want to add files from. Apparently no one knows exactly what the root of the issue is, but that's the workaround.

As far as I can tell, this issue only happens on particular servers. It does not happen on mine and most others running Pixgallery. It's probably one of those things that only arises with a certain combination of factors. I'll look into a hack to possibly remove the function for images outside of galleries, but the engine isn't really designed to separate things like this.
User avatar
Harknell
CEO & Site Admin
 
Posts: 1317
Joined: Wed Jul 21, 2004 12:16 pm

Postby jester0000 » Tue Jan 22, 2008 2:33 pm

Ok, so I did what you suggested, and it worked! Granted, that means any time I need to embed an image from another website, I will have to go through this, but this has at least solved the BIGGEST problem of not being able to embed images located on my own site with full URLs.

You go above and beyond for your forum members and product users.... thanks for offering such great support and helping with this problem!

Let us all know if you ever release a new version, a patch, or a code fix to fix this problem completely and permanently. Thanks for the great plugin. :)
jester0000
Not so Chibi
 
Posts: 10
Joined: Mon Jan 21, 2008 5:40 pm

Postby Harknell » Tue Jan 22, 2008 2:50 pm

Thank you, it's appreciated. It appears that this is a case where certain server configurations don't like certain types of actions. I'm looking into how I might be able to have it so that images on remote servers aren't parsed in these cases. Unfortunately that's not a super easy task. But I'll keep looking. The new version of Pixgallery (4.5.0) is now in development so check at AWSOM.org over the next few weeks, or look on the plugin page if you are using wordpress 2.3.2 since the update function will now tell you if a new version is available.
User avatar
Harknell
CEO & Site Admin
 
Posts: 1317
Joined: Wed Jul 21, 2004 12:16 pm


Return to AWSOM.org Web Development Support Forum

Who is online

Users browsing this forum: No registered users and 0 guests

cron