Error trying to post to forum outside of phpbb

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
JustChise
Registered User
Posts: 95
Joined: Thu Oct 30, 2014 4:56 am

Error trying to post to forum outside of phpbb

Post by JustChise »

Hello. I am trying to use the submit_post function to make a post from outside of my phpbb forum. I can't even get it to try to do anything because it seems as soon as I include the requisite files from phpbb, functions_posting.php and common.php, I get an error referring to the file.php in the phpbb\cache\driver directory (line 37) --- Fatal error: Call to a member function getParameter() on null object in /path/to/forum/----/phpbb/cache/driver/file.php on line 37

I've completely commented out the calls to set the data array, generate_text_for_storage, and submit_post and it still throws the errors with nothing but the two include files. Any idea why? Am I maybe missing some other dependency? The documentation on phpbb's functions/api isn't really that detailed on this process.


Support Request Template
What version of phpBB are you using? phpBB 3.2.2
What is your board's URL? http://www.stablewars.com/forum
Who do you host your board with? Go Daddy
How did you install your board? I used the automatic download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3.2
Is registration required to reproduce this issue? N/A
Do you have any MODs installed? No
What version of phpBB3 did you update from? N/A
What styles do you currently have installed? prosilver and a few others
What language(s) is your board currently using? English
Which database type/version are you using? MySQL 5
What is your level of experience? Not new to phpBB nor PHP
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? Not really a problem but a general question.
Please describe your problem. See description of question above...
Generated by SRT Generator
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Error trying to post to forum outside of phpbb

Post by AmigoJack »

How has Re: Send PMs from outside of phpBB worked out for you?
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
JustChise
Registered User
Posts: 95
Joined: Thu Oct 30, 2014 4:56 am

Re: Error trying to post to forum outside of phpbb

Post by JustChise »

AmigoJack wrote: Thu Jul 19, 2018 7:31 am How has Re: Send PMs from outside of phpBB worked out for you?
Haven't really had a chance to finish that project as I had a bunch of other stuff with AJAX/jquery that was more of a priority. I was going to get back to it after I finished this submit_post stuff.
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Error trying to post to forum outside of phpbb

Post by AmigoJack »

Too bad, as learning from one would have helped you on the other. Basically just copy /posting.php and strip it down to what you want to do, because it has everything you need to properly call said function.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
JustChise
Registered User
Posts: 95
Joined: Thu Oct 30, 2014 4:56 am

Re: Error trying to post to forum outside of phpbb

Post by JustChise »

AmigoJack wrote: Thu Jul 19, 2018 2:06 pm Basically just copy /posting.php and strip it down to what you want to do, because it has everything you need to properly call said function.
Thanks AmigoJack. I used the section of the code from posting.php to set up the session and such and got it to work. That file has more include files than I was using so I'm thinking maybe that was it. I'll post my code later in case it helps anyone else.
Post Reply

Return to “phpBB Custom Coding”