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?
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?
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';
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.
wow... I never noticed that it uses a txt file. that is terribly insecure.