Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: VictoryAndGlory on August 11, 2016, 04:12:26 PM

Title: SMF API doesn't create settings.txt
Post by: VictoryAndGlory on August 11, 2016, 04:12:26 PM
I uploaded both files via ftp. I added require_once '/path/to/api/file/smf_2_api.php'; to my external page. But settings.txt doesnt show up.
Also when i add require_once '/path/to/api/file/smf_2_api.php' line in page. Page is not loading. Something wrong i guess?
Title: Re: SMF API doesn't create settings.txt
Post by: Kindred on August 11, 2016, 07:05:04 PM
Settings.txt?   I doubt that any file used by SMF, API or otherwise would ever use .txt.

There is a Settings.php file which is created and used by your SMF installation...

You really did not give enough actual information...

for example, did you use that exact line
require_once '/path/to/api/file/smf_2_api.php';

or did you (as you are supposed to) replace the /path/to/api/file/ with the ACTUAL PATH to the API file?
Title: Re: SMF API doesn't create settings.txt
Post by: VictoryAndGlory on August 12, 2016, 10:03:07 AM
Quote from: Kindred on August 11, 2016, 07:05:04 PM
Settings.txt?   I doubt that any file used by SMF, API or otherwise would ever use .txt.

There is a Settings.php file which is created and used by your SMF installation...

You really did not give enough actual information...

for example, did you use that exact line
require_once '/path/to/api/file/smf_2_api.php';

or did you (as you are supposed to) replace the /path/to/api/file/ with the ACTUAL PATH to the API file?
This api does, or it supposed to:  http://wiki.simplemachines.org/smf/SMF_API
In wiki page it says:
QuoteHow to use the API:
1. Download the two attachments here. Upload them to your server. Anywhere. Make sure your SMF installation is on the same server. It will seek out your installation and create a settings.txt file with the location of your Settings.php file for it's own future reference (to make it load faster)

And, no. I didnt use exact line require_once '/path/to/api/file/smf_2_api.php';.
I changed it as require_once '/forum/smf_2_api.php';
Title: Re: SMF API doesn't create settings.txt
Post by: margarett on August 12, 2016, 11:57:55 AM
The path is probably wrong though. It's highy unlikely your forum is on the filesystem's root.
Check Settings.php, the forum folder, Sources, etc, should tell you the complete path (eg: /home/users/xyz/public_html/forum or something like that.
Title: Re: SMF API doesn't create settings.txt
Post by: Kindred on August 13, 2016, 06:53:35 AM
wow... I never noticed that it uses a txt file.   that is terribly insecure.