Error 500: Broken Pipe - but only with one script

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Lawrence
-


Joined: 16 Jan 2003
Posts: 207
Location: Brisbane, AU

PostPosted: Fri Dec 29, 2006 2:52 pm    Post subject: Error 500: Broken Pipe - but only with one script Reply with quote

I have a weird issue. I have this great gallery script, just drop it in a directory full of JPGs and it creates thumbnails and a nice display of all the images. This script works fine.

There's a new version of the script available (available here) that doesn't work with Abyss. The setup works, the config file is created properly, but when the gallery is accessed I get an error 500 after a couple of seconds. There are no errors in the PHP error log, and all I get in Abyss' CGI error log is the standard prefix, followed by 'Broken Pipe'.

Does this seem like something that can be easily fixed, or should I give up the dream?
Back to top View user's profile Send private message Visit poster's website ICQ Number
Marty
-


Joined: 10 Sep 2006
Posts: 83

PostPosted: Fri Dec 29, 2006 3:12 pm    Post subject: Reply with quote

Emm the latest version 2.51 seems to work fine with abyss, whats your PC setup ?
_________________
www.web-bin.com | www.skydigitalcards.com
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Dec 29, 2006 3:13 pm    Post subject: Re: Error 500: Broken Pipe - but only with one script Reply with quote

Lawrence,

Broken pipe means that the PHP process stopped working before sending anything to Abyss Web Server. Try turning full error logging in PHP to see if there are any meaningful error reports from the interpreter.
What is the version of PHP you're using with the script (4.X or 5.X)?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Lawrence
-


Joined: 16 Jan 2003
Posts: 207
Location: Brisbane, AU

PostPosted: Fri Dec 29, 2006 3:38 pm    Post subject: Reply with quote

Thanks for the replies.

I'm using PHP 4.4.2, I'm not using FastCGI.

I'll try and enable full error logging now.

[UPDATE]

Logging was already set to
error_reporting = E_ALL & ~E_NOTICE;

I changed it to
error_reporting = E_ALL

but the results in the error log were the same: nothing in the PHP error log, and the same in the abyss CGI log:
CGI: [c:\php\php.exe ] URI: /test/index.php Broken pipe
Back to top View user's profile Send private message Visit poster's website ICQ Number
Marty
-


Joined: 10 Sep 2006
Posts: 83

PostPosted: Fri Dec 29, 2006 3:56 pm    Post subject: Reply with quote

so the script is loaded into a folder called test, which is directly placed on your url path http://yoursite.com/test/index.php because that directory doesn't seem to be there I get a 404 error, of course thats only if your url is http://www.gamesx.com for this script, can you post the config.php file from the _cache folder.
_________________
www.web-bin.com | www.skydigitalcards.com
Back to top View user's profile Send private message
Lawrence
-


Joined: 16 Jan 2003
Posts: 207
Location: Brisbane, AU

PostPosted: Fri Dec 29, 2006 11:36 pm    Post subject: Reply with quote

Yeah, sorry that URL is not the REAL one, I rarely post such intimate details of my site. It only seems prudent. =)

I'm reasonably sure there's nothing useful in the config file, it seems to be only gallery config, but here it is anyway:

Code:

<?php
$album_name = "Gallery";   //The name of your album
$display_errors = 1;   //set to 0 once you are satisfied that the script is installed correctly
$no_screen = 1;   //set to 1 and the original image will be used for display when you click the thumbnail instead of a medium sized generated image
$use_sips = 0;   //For Mac os X users only. Try setting to 1 to see if you get a speedup of thumbnail creation
$screen_size = 600;   //max width or height of the screen sized image
$thumb_size = 100;   //width and height of the thumbnail
$tiny_size = 50;   //width and height of the tiny thumbnail used in folder listings
$num_tinys = 10;   //number of tiny thumnials to display in a folder listing
$thumb_cols = 7;   //number of regular thumbnails to show per row
$thumbs_page = 836;   //number of thumbnails to display per page for big folders
$autorotate = 1;   //set to 1 to attempt to rotate an image if the camera sets the exif orientation
$sort_method = 4;   //how to sort the directories and filenames Possible Values: 0=no sort, 1=alphabetical ascending, 2=alphabetical descending 3=date asc 4-date desc
$show_filename = 1; //1 shows filename of photos in list view. 0 hides filename
$display_rating = 1; //1 shows the rating stars.  0 hides them
$show_extension = 0; //1 shows filename extension. 0 hides extension
$max_file_length = 20; //filenames longer than this will be truncated for display purposes
$show_extra_info = 1; //1=show extra info about an image if available (aperture, shutter speed, etc)
$jpeg_compression = 80; //image compression of thumbails. 100=big, 0=ugly
$image_crop = 1; //1=thumbnail is zoomed and cropped to a square 0=thumbnail is padded to a square
$admin = 0; //set to 1 to turn on admin tools for deleting and renaming folders and files
$admin_only = 0; //set to 1 to make a private album with photos hidden till you type the password
$password = 'admin'; //this is the admin password needed to make changes
$delete_tiny_files = 0; //set to 1 to automatically delete itty bitty images (probably old thumbnails)
$tiny_file_max_kbytes = 10; //this is the max size for the itty bitty images that will be deleted
$delete_empty_folders = 1; //set to 1 to automatically delete empty folders
$gallery_link = 0; //set to 1 to display a link to your photo gallery on the fotopholder home page
$gallery_link_url = "http://"; //the url of your photo gallery if you want to share it on the fotopholder website.
$image_bkgd = array( 255,255,255 ); //(red, green, blue) color of filler space in padded thumbnails
?>
Back to top View user's profile Send private message Visit poster's website ICQ Number
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Dec 30, 2006 3:22 pm    Post subject: Reply with quote

Lawrence,

We've just tested the script with PHP 5.2 (the preconfigured package available in http://www.aprelium.com/abyssws/php5win.html ) and it worked without any problems.

In your php.ini file, try setting:

Code:
display_startup_errors = On


Is the GD extension correctly installed?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Lawrence
-


Joined: 16 Jan 2003
Posts: 207
Location: Brisbane, AU

PostPosted: Mon Jan 01, 2007 1:31 pm    Post subject: Reply with quote

I use GD successfully with several other scripts. I've been wary of PHP5 'cause I fear the compatibility issues with older scripts.

Display startup errors was already on.
Back to top View user's profile Send private message Visit poster's website ICQ Number
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Jan 01, 2007 1:56 pm    Post subject: Reply with quote

Lawrence wrote:
I use GD successfully with several other scripts. I've been wary of PHP5 'cause I fear the compatibility issues with older scripts.

Display startup errors was already on.


Hmmm.... Could you please send your php.ini to support@aprelium.com so that we could reproduce your exact PHP setup and test it with that script?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Lawrence
-


Joined: 16 Jan 2003
Posts: 207
Location: Brisbane, AU

PostPosted: Mon Jan 01, 2007 2:50 pm    Post subject: Reply with quote

File sent!
Back to top View user's profile Send private message Visit poster's website ICQ Number
Lawrence
-


Joined: 16 Jan 2003
Posts: 207
Location: Brisbane, AU

PostPosted: Tue Feb 12, 2008 1:46 pm    Post subject: Reply with quote

This problem has never really been resolved for me. I'm running X2 on new server hardware, with an Aprelium-approved PHP5 installation, and I still can't get the script to work.

Since I've got new hardware, new PHP and new install of X2, I have to think the blame lies in the Abyss CONF file, but what could it possibly be? Is there any way to test it?
Back to top View user's profile Send private message Visit poster's website ICQ Number
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Feb 25, 2008 4:43 pm    Post subject: Reply with quote

Lawrence,

As a last check, have you tried increasing the amount of memory available to PHP scripts (in php.ini). Some scripts that require a lot of working memory will fail silently and result in error 500 (without any error logging from PHP).
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Lawrence
-


Joined: 16 Jan 2003
Posts: 207
Location: Brisbane, AU

PostPosted: Wed Feb 27, 2008 10:22 am    Post subject: Reply with quote

The max RAM was set to 16MB. I bumped it to 32MB to no avail. Within a few seconds (I can't be sure how long, VNC isn't super-responsive) PHP causes a Windows error dialogue to appear. As soon as I clear that window Abyss returns a 500 error.
Back to top View user's profile Send private message Visit poster's website ICQ Number
Toasty
-


Joined: 21 Feb 2008
Posts: 296
Location: Chicago, IL

PostPosted: Wed Feb 27, 2008 4:54 pm    Post subject: Reply with quote

Something you can try, if you're good with PHP is separating the functions of it into separate scripts.

I.E.

$thumbnailsize = "large";
@include("generatethumbnail.php");

Inside of that

SWITCH ($thumbnailsize)
{
CASE "large":
{
//Large Code here
break;
}
CASE "medium":
{
//Medium Code Here
break;
}
}

So on and so forth. This will use different parts of a script, or separate calls which may reduce the amount of memory required. Have a file parse the directory contents and call the new .php file (I'm not sure if this is what you're trying to accomplish, but it's worth a shot if you're good with PHP).

Edit wrote:

Looking over at your other topic with similar issues reminded me of an issue I had in the past.

When I set up my new server, I installed PHP 5.22 (I think). A few of my scripts I wrote with 5.16 generated the 500 issue you're receiving. When I deleted the 5.22 install, and replaced it with 5.16, everything went back to normal (worries me knowing that PHP6 is coming out soon...).

Regardless, try changing your installation to 5.16 and see if that works.
Download previous versions of PHP here


_________________
Security Blog
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Mar 19, 2008 5:35 pm    Post subject: Reply with quote

Lawrence wrote:
The max RAM was set to 16MB. I bumped it to 32MB to no avail. Within a few seconds (I can't be sure how long, VNC isn't super-responsive) PHP causes a Windows error dialogue to appear. As soon as I clear that window Abyss returns a 500 error.


OK. So here lies the problem. PHP was causing an error and Windows was "killing" it before it had any chance to process the script and send some data back to the server.

What was the dialog box error message?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Lawrence
-


Joined: 16 Jan 2003
Posts: 207
Location: Brisbane, AU

PostPosted: Mon Apr 21, 2008 8:21 am    Post subject: Reply with quote

So the problem has fixed itself. Along with several other issues, reinstalling the server and rebuilding every site from scratch has cured all my ills.

So it seems most likely that some sort of configuration malfunction was keeping the system from working. While I don't know what it was, it's gone.
Back to top View user's profile Send private message Visit poster's website ICQ Number
clippin
-


Joined: 18 Jun 2009
Posts: 1

PostPosted: Thu Jun 18, 2009 1:38 pm    Post subject: Reply with quote

Looks like everything worked out in the end. And as you said the configuration files and settings had been changed or corrupted somehow. Must of taken a while to sort out the sites and reinstall and rebuild the server: S I had a similar problem where I couldn’t figure out what was going on as I had reset all of my settings and my PHP was still generating errors
_________________
Broken Window - Glass and Window Repair UK
Back to top View user's profile Send private message Visit poster's website
akreech
-


Joined: 09 Sep 2009
Posts: 2

PostPosted: Wed Sep 09, 2009 9:48 am    Post subject: Reply with quote

Toasty wrote:
Something you can try, if you're good with PHP is separating the functions of it into separate scripts.

I.E.

$thumbnailsize = "large";
@include("generatethumbnail.php");

Inside of that

SWITCH ($thumbnailsize)
{
CASE "large":
{
//Large Code here
break;
}
CASE "medium":
{
//Medium Code Here
break;
}
}

So on and so forth. This will use different parts of a script, or separate calls which may reduce the amount of memory required. Have a file parse the directory contents and call the new .php file (I'm not sure if this is what you're trying to accomplish, but it's worth a shot if you're good with PHP).

Edit wrote:

Looking over at your other topic with similar issues reminded me of an issue I had in the past.

When I set up my new server, I installed PHP 5.22 (I think). A few of my scripts I wrote with 5.16 generated the 500 issue you're receiving. When I deleted the 5.22 install, and replaced it with 5.16, everything went back to normal (worries me knowing that PHP6 is coming out soon...).

Regardless, try changing your installation to 5.16 and see if that works.
Download previous versions of PHP here



thanks Toasty with the post. I learned something in your post. good brain :)
_________________
personal background checks | background search
Back to top View user's profile Send private message Visit poster's website
Toasty
-


Joined: 21 Feb 2008
Posts: 296
Location: Chicago, IL

PostPosted: Fri Sep 25, 2009 8:50 pm    Post subject: Reply with quote

No problem. Glad it could be of use ;)
_________________
Security Blog
Back to top View user's profile Send private message Visit poster's website
satishbhawra51
-


Joined: 11 Oct 2009
Posts: 2

PostPosted: Mon Oct 12, 2009 12:21 am    Post subject: Reply with quote

I have a weird issue. I have this great gallery script, just drop it in a directory full of JPGs and it creates thumbnails and a nice display of all the images. This script works fine.
_________________
web information | best hosting
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group