Page 1 of 1

Attaching Images

PostPosted: Fri May 18, 2007 9:18 am
Author: nGAGE
Your phpBB Version: 2.0.22
phpBB Type: Integramod 141
MODs: Yes
Your knowledge: Basic Knowledge
Board URL: http://www.net-clan-gaming.com

PHP Version: 5.2.1
MySQL Version: 5.0.37


What was done before the problem appeared?
Nothing


What was done to try to solve the problem?
Tried several things, listed below.



De.scription and Message

Ok... This one I haven't been able to figure out yet. Nomatter if I use my server or my localhost for testing, the remote FTP works fine and files are uploaded, but it can't create a thumb, also making the attachment useless, as you can't open it anywhere without a link either!

Here's my localhost error message, but it's rather the same on the server:
Code: Select all
 Warning]: Unable to access /tmp/t00000 in C:LocalhostxampphtdocsaL3Xisattach_modincludesfunctions_thumbs.php on line 261  Warning: imagejpeg() [function.imagejpeg]: Invalid filename in C:LocalhostxampphtdocsaL3Xisattach_modincludesfunctions_thumbs.php on line 261  Warning: Cannot modify header information - headers already sent by (output started at C:LocalhostxampphtdocsaL3Xisattach_modincludesfunctions_thumbs.php:261) in C:LocalhostxampphtdocsaL3Xisincludespage_header.php on line 1162  Warning: Cannot modify header information - headers already sent by (output started at C:LocalhostxampphtdocsaL3Xisattach_modincludesfunctions_thumbs.php:261) in C:LocalhostxampphtdocsaL3Xisincludespage_header.php on line 1168  Warning: Cannot modify header information - headers already sent by (output started at C:LocalhostxampphtdocsaL3Xisattach_modincludesfunctions_thumbs.php:261) in C:LocalhostxampphtdocsaL3Xisincludespage_header.php on line 1169  


Now I've tried with use of "ImageMagick" and with GD only, but no change!
I've tried turning use of Thumbs off... no change!

[flash=,:16kp8mcy]http://www.net-clan-gaming.eu/ftp/ngage/images/after_upload.JPG[/flash:16kp8mcy]

I've checked all my stuff in the PHP.INI (thinking might be the "tmp" folder it's refering to,
all was fine! (and obviously if I can upload .RAR files it's working)
Made sure that all settings are right and they were.
Checked all extensions, they are fine as well... so I went back to the files mentioned themselfs, but couldn't see anything wrong with the lines mentioned.
Only real mod I have installed at the moment is the "Advanced User Color Management". I've already tried replacing the relevant files with originals (so without the mod) and the only difference is the line numbers in the error, still referring to the same lines basically.

Hope somebody wants to help try figure this one out! I'm kind of at loss, as I believe the origin of the problem is not to be found in the files/lines mentioned in the error, but from somewhere else.

NEXT:
I'll try another clean install on the localhost and see if that makes a difference!

Re: Attaching Images

PostPosted: Fri May 18, 2007 9:34 am
Author: Helter
not sure what you mean when you are refurring to trying it on local host. For most web apps, localhost only means that your php or asp AND database are on the same machine. integrmod.com is localhost.
If your refuring to running the application only on your desktop, be sure you have compiled php with gd support (gd2 even better)

PostPosted: Fri May 18, 2007 9:51 am
Author: nGAGE
Yeah... I was indeed referring to having tested it on my Desktop machine, as well as the server machine... both have same settings for php/mysql etc. Same extensions etc. Wouldn't be particularly handy to use a different setup when testing, would it? <img>
Always worked the way it's setup and GD2 extension is enabled, among others of course. But ok... Now I'm gonna eat something and then I'll do a clean install of IntegraMOD to see if it makes a difference!

PostPosted: Fri May 18, 2007 10:28 am
Author: nGAGE
OK... Installed IntegraMOD (Clean Install)

Normal upload works fine!
Using FTP, I get this (as well):

Code: Select all
 Warning]: Unable to open '/tmp/t00000' for writing: No such file or directory in D:Localhostxampphtdocswwwintegraattach_modincludesfunctions_thumbs.php on line 261  Warning: Cannot modify header information - headers already sent by (output started at D:Localhostxampphtdocswwwintegraattach_modincludesfunctions_thumbs.php:261) in D:Localhostxampphtdocswwwintegraincludespage_header.php on line 1152  Warning: Cannot modify header information - headers already sent by (output started at D:Localhostxampphtdocswwwintegraattach_modincludesfunctions_thumbs.php:261) in D:Localhostxampphtdocswwwintegraincludespage_header.php on line 1158  Warning: Cannot modify header information - headers already sent by (output started at D:Localhostxampphtdocswwwintegraattach_modincludesfunctions_thumbs.php:261) in D:Localhostxampphtdocswwwintegraincludespage_header.php on line 1159  


This is with all default settings (except enabling FTP and entering details).

So GD2 enabled / ImageMagick path not entered.

Re: Attaching Images

PostPosted: Fri May 18, 2007 10:51 am
Author: Helter
do you have an ftp "server" installed on your desktop? if not, your desktop will not know how to handle an ftp request

PostPosted: Fri May 18, 2007 11:05 am
Author: nGAGE
I've got a remote FTP server and I've setup the details in the ACP... it definately seems to have something to do with that!
I've even now tried with reset/default server settings, still the same! Must be those "tmp/t00000" folder messages. But where should those folders be?

Also tried with a 140 install on php4... same issue! I just dont understand it! The FTP account I use and the details I enter have FULL access. Creating folders or changing CHMOD isn't an issue.

PostPosted: Fri May 18, 2007 11:29 am
Author: nGAGE
OK... So far I've been able to figure out that this is only happening when using EXTERNAL FTP and when the image is too big for INLINE display (so Thumb must be created) and that's where it goes wrong!
It doesn't matter if ImageMagick is installed or not if a images size is set or not, it doesn't matter if you use 141 or 140, it simply doesn't want to work!
It will not give errors on images that don't need resizing though.

This drives me nuts! I need my external FTP, otherwise I don't have proper download speed <img>

Could somebody try to use the FTP function under "Attachments" and see if they also got that problem?

PostPosted: Sat May 19, 2007 5:47 am
Author: nGAGE
Can't figure this one out :?

I can't use thumbnails and my site looks like crap if images display inline that exceed the postbody width! <img>

PLS Help!

PostPosted: Sat May 19, 2007 5:49 am
Author: nGAGE
C'mon... I'm creating a HOTTEST topic with my own replies here <img>

PostPosted: Sun May 20, 2007 9:26 am
Author: nGAGE
Hmm... BUMP again <img>

Re: Attaching Images

PostPosted: Sun May 20, 2007 10:53 pm
Author: CaNNon
Have you tried other image types?

functions_thumbs.php @ 255 is where it singles out image types with line 261 seting up for jpg files.

case IMG_JPG:
imagejpeg($new_image, $new_file, 90);

looks JPG is the only one that has extra sizing with the "90" at the end.

and from line # 208
$new_file = trim($value) . '/t00000'; <--- looks like a file not a folder to me?

also line 290 is setting the chmod on that file when functions_thumbs is called.
@chmod($new_file, 0664); But the file is not getting that far.

I'm just guessing tho I just can't stand watching you type to yourself LOL!

PostPosted: Mon May 21, 2007 12:42 am
Author: nGAGE
I truly appreciate that! I was confusing myself by having to reply to myself all the time.

Anyhow... I've tried using other image files, but then the line number will simply change to the one of that image-type.

the /t00000 indeed seems to be the temporary file it wants to create in order to be able to output the thumbnail... or something. (as I've mentioned elsewhere... other files, like RAR do fine... it's just the Image files and when using FTP that causes problems. Without FTP there isn't any issue.

I'm suspecting it's something on my end, as nobody ever reported any issues like this (and I never had any before either) making me believe that I've got something missing somewhere and simply can't find anything solid to start fixing it. Just frustrating this issue <img>

Re: Attaching Images

PostPosted: Mon May 21, 2007 10:51 am
Author: CaNNon
What about the ftp program, any chance it's trying to create a temp file of it's own thats somehow conflicting or does the file finish up loading before this happens?

PostPosted: Mon May 21, 2007 12:13 pm
Author: nGAGE
The upload isn't done with an FTP program. It's a php uplaod from the .script, but yes! The file does get uploaded, but because thumbnail fails, it has nothing to display and won't even display a bloody link to the file... just the name <img>

Re: Attaching Images

PostPosted: Mon May 21, 2007 12:25 pm
Author: Helter
ive read all the posts, but i cant figure out if your having this problem with attatchment mod, or pafiledb. If pafiledb, check the chmod at pafiledb/images/screenshots
if it is attatchment mod, check in the acp to be sure you have selected the folder "files" and that inside the "files" folder, you have the folder "thumbs" and that it is 777. whatever folder you have set for uploading attatchments, needs to have the folder "thumbs" and have it set to 777

PostPosted: Mon May 21, 2007 12:42 pm
Author: nGAGE
Ok... to clear that up.

It's attachement MOD.

Attaching files works just fine, but thumbs don't. when using locally (to folder files and files/thumbs) there isn't any problem.
The problem is only when I use the ACP's options to use FTP upload to external host! I it can't create the thumb and that's why I get the error and no images will be displayed inline (as thumb).
The actual file is uploaded however (just no way of viewing it).
Also, if I upload images that do not exceded the postbody-size (thus not needing to be getting a thumbnail) will upload and display just fine!

So once more to be clear on it. Using the normal (default) upload to the local folder /files (and /files/thumbs) works just fine! But I "must" use external FTP as I'm hosting website from at home and my upload wouldn't be able to handle to many image uploads to display inline.
Thus I'm using external FTP as I've always done in the past. Just not working since I put this site up. <img>


PS: And I've tried making sure everything is properly CHMODed 777, even tried creating that weirdo /tmp folder with 777 (just in case that's what it's looking for)... to no avail.

Re: Attaching Images

PostPosted: Mon May 21, 2007 1:13 pm
Author: CaNNon
they do work tru http?

So maybe you can compare the 2 handlers and see if something in the way it's dealing the thumbs is different? It could give a hint maybe.

PostPosted: Mon May 21, 2007 1:27 pm
Author: nGAGE
I'm totally not sure! I'm still n00b with php itself and finding the err (unless it's an obvious typo) isn't yet my strongest side. Simply can't find the time to dig into the books to actually understand what's written there.
Usually just compare.... In this case, I don't have anything to compare! I checked if the advanced User Color Mod has changed anything in the files mentioned, but it didn't and in the page_header, the changes (when made undone) don't change anything for the error.
I've also compared the attachmod file with the 1.40 version and there isn't any problem at all! Now I wonder if it could have something to do with the php version I'm running?

PS: Yes... The uploaded files are available over http if I enter direct url. But not in the post... I only see image name... no link.

Re: Attaching Images

PostPosted: Mon May 21, 2007 4:16 pm
Author: CaNNon
"they do work tru http?"

I was meaning the thumbs, If they resize right. sorry for confusion. <img>

Kind of thinking same as you, compare the http handling with the ftp handling and hope for a clue.

PostPosted: Tue May 22, 2007 5:01 am
Author: nGAGE
[quote=""CaNNon";p="25780""]
"they do work tru http?"

I was meaning the thumbs, If they resize right. sorry for confusion. :?

PostPosted: Tue May 22, 2007 5:50 am
Author: nGAGE
I've checked the PhotoAlbum features... but all works fine, as this doesn't get affected by FTP upload. It's locally! (wish this could be remote as well!) I guess I'm gonna have to move my board to one of my hosts so I don't need to use FTP. But I sure prefer being able to work on my site from here better!

Re: Attaching Images

PostPosted: Tue May 22, 2007 7:46 pm
Author: CaNNon
I set it to NOT use the FTP, attach image (with inline and use of thumb), it creates the thumb in "files/thumbs"


Do you know witch file handles this? if we compare how it's handling the thumbs to the ftp version we should see whats happening?

Re: Attaching Images

PostPosted: Wed May 23, 2007 8:18 am
Author: nGAGE
It seems to me that it's all done by the "attach_mod/includes/functions_thumbs.php"

I did get a similar problem when playing with KisMOD RC1... the problem was solved by adding the missing folders. Problem here is... I've already got thumbs folder and even a tmp folder on the FTP and it doesn't make a difference.

Aside from that... If nobody else uses the FTP function and thus doesn't have any problems, then I'm clearly not gonna be able to verify if this problem is on my end or if it's a bug.
Also... I'm already gonna have to find a different solution, as I don't find any possibility to have all uploads/downloads (including the ones from PhotoAlbum) to happen over FTP. Meaning to me... Even my 20Mbit/1Mbit won't be able to handle all the images file uploads once a bunch of people are in the album at the same time <img>

PostPosted: Wed May 23, 2007 8:26 am
Author: nGAGE
Hmmm... or maybe?!

Shouldn't it be possible to setup my apache server to use virtual directories onto the FTP?
That way IntegraMOD would think it's storing Locally and Apache get's it onto the FTP server... hmmm!

Gonna have to read up on security for that!

PostPosted: Wed May 30, 2007 5:05 am
Author: nGAGE
Ok... I really couldn't find any proper solution for it... so I've now got a work-around that even looks better!

I no longer force use of thumbnails (as the creation was the only problem... files always uploaded successfully) and set the required file-size to something like 5MB before the system tries to create a thumbnail.
Then I integrated "HighSlide JS" (JavaScript for the fancy slide in and out effects) to be applied on the image-attachments and defined it's initial size to a specific height only, so the width is done in a proper aspect ratio to the actual/full-size image.

So now I've basically got the thumbnail (look-alike) transformed by the HighSlide JS which is the actual full-size image but shrunk to the thumbnail-like size, while still being able to use the external FTP/Web-server for storage of the files/uploads done with attachmod! :P
Anybody interested working on this, just let me know... I've got a lot of stuff to be done and probably not enough coding skills to do it all by myself, while being able to spare time is getting harder and harder with my "to-do" list piling up.
To those that do wanna help or have some suggestions, PM me or visit me on my site (click the siggie)


Thnx <img>