File attachment not showing up in ticket

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Darrell
Posts: 6
Joined: Mon Jan 14, 2008 9:38 pm

File attachment not showing up in ticket

Post by Darrell »

Script URL:
Version of script: 0.94.1
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

I added the .pub, to the Allowed file types and when my user uploads that attachment it doesn't show in the ticket, Just the paper clip icon appears. I look in the attachment directory and the attachment is there. Now I have tested other attachments and upload them and they appear in the ticket. Any idea what is going on here?

Thanks
Last edited by Darrell on Thu Jan 17, 2008 6:37 pm, edited 1 time in total.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Not sure what the issue could be, I just tested it on this server and worked fine.

If you upload another .pub file has that one problems as well?
Can you check in the database (for example if you have phpMyAdmin) and see what info is logged for the attached file (hesk_attachments table)?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Darrell
Posts: 6
Joined: Mon Jan 14, 2008 9:38 pm

File Attachment not working

Post by Darrell »

Klemen wrote:Not sure what the issue could be, I just tested it on this server and worked fine.


If you upload another .pub file has that one problems as well?
Yes I tried several different .pub files and they are in the attachment directory but do not show on the ticket.
Klemen wrote:Can you check in the database (for example if you have phpMyAdmin) and see what info is logged for the attached file (hesk_attachments table)?
The table shows no records at all in the hesk_attachments table.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

So this is a problem for ALL files you try to attach, not just .pub ones?

You didn't edit any files, did you?
Did you upgrade your Hesk to 0.94.1 from a previous version (which one?) or did you do a clean install?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Darrell
Posts: 6
Joined: Mon Jan 14, 2008 9:38 pm

Post by Darrell »

Klemen wrote:So this is a problem for ALL files you try to attach, not just .pub ones?
Just the .pub extension that I added in the database. I tested all other files and they show up.
Klemen wrote:You didn't edit any files, did you?
The only one I edited was submit_ticket.php and that was the ticket ID number. I changed it back to the original file and still the .pub files won't show up.
Klemen wrote:Did you upgrade your Hesk to 0.94.1 from a previous version (which one?) or did you do a clean install? It was a clean install. I am using php4 and mysql server 4
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

What is the URL of your Hesk? I would like to test it myself and please make sure the original submit_ticket.php is there.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Darrell
Posts: 6
Joined: Mon Jan 14, 2008 9:38 pm

Post by Darrell »

Klemen wrote:What is the URL of your Hesk? I would like to test it myself and please make sure the original submit_ticket.php is there.


Now last night it worked after I restarted apache so let me know if it works for you.
Last edited by Darrell on Thu Jan 17, 2008 6:41 pm, edited 1 time in total.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Works fine here.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Darrell
Posts: 6
Joined: Mon Jan 14, 2008 9:38 pm

Post by Darrell »

Klemen wrote:Works fine here.
It works now very strange. Thanks for the help
DC
Posts: 138
Joined: Sun Dec 09, 2007 9:28 am

Post by DC »

Hi this is for anyone who modified the script as I have, theres a mod on the forum that allows you to have a clickable show hide reply ...
viewtopic.php?t=1466

If you use the mod as is it will not show you the download and will show only a paperclip, this is because the code given in the post is incorrect and must be updated. I ran into this glitch myself.


Replace this block

Code: Select all

if ($hesk_settings['attachments']['use'] && !empty($reply['attachments'])) {
    echo '<p><b>'.$hesklang['attachments'].':</b><br>';
    $att=explode('#####',substr($reply['attachments'], 0, -5));
    foreach ($att as $myatt) {
        echo '<img src="img/clip.gif" width="20" height="20"><a href="'.$myatt.'" target="_blank">'.substr(strstr($myatt, $trackingID),16).'</a><br>';
    }
    echo '</p>';
}

echo '</span></td></tr>';
} 


with this block

Code: Select all

if ($hesk_settings['attachments']['use'] && !empty($reply['attachments'])) {
    echo '<p><b>'.$hesklang['attachments'].':</b><br>';
    $att=explode(',',substr($reply['attachments'], 0, -1));
   
    foreach ($att as $myatt) {
    list($att_id, $att_name) = explode('#', $myatt);
    echo '<img src="img/clip.gif" width="20" height="20"><a href="download_attachment.php?att_id='.$att_id.'">'.$att_name.'</a><br>';
    
    }
    echo '</p>';
}

echo '</span></td></tr>';
} 
Hope that helps some of you out ...

DC
To Code Or Not To Code That Is The Question?

Was my post of any help to you? if so please do [url=http://www.clickcraft.net/slice_donations.php][b]Buy Me A Slice[/b][/url] ...
Post Reply