BACKTRACE errors

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
M.O.B.
Registered User
Posts: 923
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

BACKTRACE errors

Post by M.O.B. » Sun Mar 03, 2013 6:27 am

Support Request Template
What version of phpBB are you using? phpBB 3.0.11
What is your board's URL? http://www.mixingonbeat.com
Who do you host your board with? Canaca
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Conversion from phpBB2
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? Yes
What MODs do you have installed? AutoMOD
board3 Portal
What styles do you currently have installed? proFormell
What language(s) is your board currently using? English
Which database type/version are you using? MySQL 4
What is your level of experience? Comfortable with PHP and phpBB
What username can be used to view this issue? No answer given
What password can be used to view this issue? No answer given
When did your problem begin? Barely today, I've did the coversion from phpbb2 to phpbb3
Please describe your problem. I tried editing old threads that have an picture attachment and other bbcode. When I press either Preview or Submit, I get this error:

Code: Select all

General Error
    You are not allowed to access this file.

    BACKTRACE

    FILE: (not given by php)
    LINE: (not given by php)
    CALL: msg_handler()

    FILE: [ROOT]/includes/message_parser.php
    LINE: 1605
    CALL: trigger_error()

    FILE: [ROOT]/posting.php
    LINE: 414
    CALL: parse_message->get_submitted_attachment_data()
Generated by SRT Generator
Image

User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: BACKTRACE errors

Post by Oyabun1 » Sun Mar 03, 2013 7:20 am

Check the permissions on whichever folder your board storees attachments in, by default it is the /files folder, see phpBB3 Chmod Permissions.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

User avatar
M.O.B.
Registered User
Posts: 923
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: BACKTRACE errors

Post by M.O.B. » Sun Mar 03, 2013 7:32 am

I beleive this would be the "files" folder. I have CHMOD the folder to 777 -- but still the problem with old topics with attached files done with phpBB2 attachment MOD.
Image

Oleg
Former Team Member
Posts: 1221
Joined: Sat Jan 30, 2010 4:42 pm
Location: NYC
Contact:

Re: BACKTRACE errors

Post by Oleg » Sun Mar 03, 2013 10:09 am

You appear to be experiencing http://tracker.phpbb.com/browse/PHPBB3-9789.
Participate in phpBB development: Get involved | Issue tracker | Report a bug | Development board | [url=irc://chat.freenode.net/phpbb-dev]Development IRC chat[/url]
My stuff: mindlinkgame.com

User avatar
M.O.B.
Registered User
Posts: 923
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: BACKTRACE errors

Post by M.O.B. » Sun Mar 03, 2013 11:42 pm

Yes, it seems like that's the error. Though it doesn't state how to fix this. Can anyone lend a helping hand?
Image

User avatar
M.O.B.
Registered User
Posts: 923
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: BACKTRACE errors

Post by M.O.B. » Mon Mar 04, 2013 11:54 am

I've been trying to trouble shoot this bug.

I have found the cause--or at least I think I have. Please see my notes below.

Comparing phpBB2 vs. phpBB3 attachment features (keep in mind that phpBB2's attachment tool was from a third party MOD install), I've noticed that in the database the physical_filename entries differ from each other.

Original file name: mxl_cr30.jpg
phpBB2 physical_filename: mxl_cr30_197.jpg (notice the extra numbers at the end)
phpBB3 physical_filename: 2_536482257a53b040190cb634edcd08cf

I think the problem is that during the conversion from phpBB2 to phpBB3, the attachment files kept the phpBB2 file names. And I think phpBB3 doesn't know what to do with them? Does that make sense?

Now when I tried deleting the attachment from the post, I would still get the error. The only way I can do any changes to the post with an attachment done by phpBB2 is to delete the attachment entry in the phpBB3 MySQL database. Once I do that, I can refresh the post and the attachment doesn't appear anymore, I can then reupload the attachment and I can save the post without any errors.

So my question to you guys, is there a way to fix this with some kind of attachment rename converter? There has to be an easy way. Or else I may end up editing each post with this issue and that can take forever!

Let me know if you have anymore questions or suggestion.
Image

User avatar
M.O.B.
Registered User
Posts: 923
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: BACKTRACE errors

Post by M.O.B. » Mon Mar 04, 2013 2:25 pm

After so more testing, I realized it is the bug that was posted earlier. It has nothing to do with the phpBB2 and phpBB3 conversion.

It has to do with the following:

1) a normal (registered) user posts a message
2) after that, an admin or global moderator adds an attachment to that message (for e.g. to convert an outside image link to an attached image)
3) user edits message and then tries to preview or submit
4) "General error! You are not allowed to access this file."

More info here: http://tracker.phpbb.com/browse/PHPBB3-9789

I hope someone can tell me if they are working to fix this bug?
Image

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50413
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: BACKTRACE errors

Post by stevemaury » Mon Mar 04, 2013 4:01 pm

As a test, try commenting out line 1589 of includes/message_parser.php

CHANGE THIS:

Code: Select all

AND poster_id = ' . $check_user_id;
TO THIS:

Code: Select all

// AND poster_id = ' . $check_user_id;
and see if that solves it.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
M.O.B.
Registered User
Posts: 923
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: BACKTRACE errors

Post by M.O.B. » Mon Mar 04, 2013 5:58 pm

Thanks for the reply.

I am hoping with your help and my determination to get this fixed, we might be able to figure out this bug together. :)

I did what you instructed above, and then I tested one of the threads where I get the previous error, and now it gave me a new General Error. See below:

Code: Select all

General Error
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/ AND poster_id = 5525' at line 4 [1064]

SQL

SELECT attach_id, is_orphan, real_filename, attach_comment FROM phpbb_attachments WHERE attach_id = 2151 // AND poster_id = 5525

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/includes/db/dbal.php
LINE: 757
CALL: trigger_error()

FILE: [ROOT]/includes/db/mysql.php
LINE: 175
CALL: dbal_mysql->sql_error()

FILE: [ROOT]/includes/message_parser.php
LINE: 1622
CALL: dbal_mysql->sql_query()

FILE: [ROOT]/posting.php
LINE: 414
CALL: parse_message->get_submitted_attachment_data()
Image

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50413
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: BACKTRACE errors

Post by stevemaury » Mon Mar 04, 2013 7:22 pm

Please attach your /includes/message_parser.php file. You will have to rename it as .txt.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
M.O.B.
Registered User
Posts: 923
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: BACKTRACE errors

Post by M.O.B. » Mon Mar 04, 2013 8:17 pm

Yes, here it is attached below.

I did remove the code you suggested above, plus the other code I found in the other thread (linked above).

Thank you once again for all the help. It's really appreciated.
Attachments
message_parser.txt
(51.54 KiB) Downloaded 16 times
Image

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50413
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: BACKTRACE errors

Post by stevemaury » Tue Mar 05, 2013 12:17 am

In that file, the line I told you to comment out is not commented out. I need the file that produces that error.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
M.O.B.
Registered User
Posts: 923
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: BACKTRACE errors

Post by M.O.B. » Wed Mar 06, 2013 1:27 am

stevemaury wrote:In that file, the line I told you to comment out is not commented out. I need the file that produces that error.
Sorry about that, here you go.

And here is a copy/paste of the error it gives me when I try it with your code:

Code: Select all

General Error
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/ AND poster_id = 213' at line 4 [1064]

SQL

SELECT attach_id, is_orphan, real_filename, attach_comment FROM phpbb_attachments WHERE attach_id = 2045 // AND poster_id = 213

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/includes/db/dbal.php
LINE: 757
CALL: trigger_error()

FILE: [ROOT]/includes/db/mysql.php
LINE: 175
CALL: dbal_mysql->sql_error()

FILE: [ROOT]/includes/message_parser.php
LINE: 1622
CALL: dbal_mysql->sql_query()

FILE: [ROOT]/posting.php
LINE: 414
CALL: parse_message->get_submitted_attachment_data()
Please let me know if I am misunderstanding something?
Attachments
message_parser.txt
(51.54 KiB) Downloaded 23 times
Image

Oleg
Former Team Member
Posts: 1221
Joined: Sat Jan 30, 2010 4:42 pm
Location: NYC
Contact:

Re: BACKTRACE errors

Post by Oleg » Thu Mar 14, 2013 12:03 am

Commenting out like that does not work.

Replace the line in question with:

Code: Select all

';
After you deal with attachments in question, restore the line to what it was originally.
Participate in phpBB development: Get involved | Issue tracker | Report a bug | Development board | [url=irc://chat.freenode.net/phpbb-dev]Development IRC chat[/url]
My stuff: mindlinkgame.com

User avatar
M.O.B.
Registered User
Posts: 923
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: BACKTRACE errors

Post by M.O.B. » Thu Mar 14, 2013 5:01 pm

Oleg wrote:Commenting out like that does not work.

Replace the line in question with:

Code: Select all

';
After you deal with attachments in question, restore the line to what it was originally.
Thanks for the support.

I changed this:

Code: Select all

    AND poster_id = ' . $check_user_id;
To this:

Code: Select all

';
That seemed to fix it. No more errors, and I can edit the post with attachments that was posted inline from another member that was done with phpBB2.

Thanks!! :)

I plan to fix them all, and then add the line back the way it was. This beat having to go into my database and physically delete the attachment from there, so I can fix these posts. :)
Image

Locked

Return to “[3.0.x] Support Forum”