Closed (fixed)
Project:
SMFforum Integration module
Version:
6.x-1.23
Component:
Miscellaneous
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jun 2007 at 16:34 UTC
Updated:
28 Oct 2009 at 20:17 UTC
I followed the instructions but I get errors and I think it's trying to look else where for "smf_api_2.php"
I get the following :-
Successfully locating SMF installation.
Error locating /home/aussieh/public_html/forum1smf_api_2.php. Please fix your settings!
Unable to connect to the SMF database. Please fix your settings!
"smf_api_2.php" is not located in the forum directory it's located here :-
/home/modules/smfforum/includes/smf_api_2/
So whats going wrong here guys ???
Comments
Comment #1
aussieholden commentedThanks for any help given NOT
Comment #2
G Gavitt commentedWhat are your SMF location settings set to in admin/settings/smfforum?
Comment #3
aussieholden commentedIt's already fixed hence my last reply so A little too late.
Comment #4
Steel Rat commentedAussie, instead of being so snippy, how about letting the rest of us know ho you fixed it, since I'm getting the same problem.
Comment #5
Steel Rat commentedFYI, I have the same errors as originally reported:
Successfully locating SMF installation.
Error locating smf/smf_api_2.php. Please fix your settings!
Unable to connect to the SMF database. Please fix your settings!
my settings are as follows:
SMFForum root: smf
Path to SMF api file: /modules/smfforum/includes (this is the default value)
SMF api file name: /smf_api_2.php (also the default value.)
The errors seem to expect smf_api_2.php to be in the smf folder, and not under modules/smfforum/includes, where the instructions tell you to put it. I tried placing a copy where it tells me it can't find it, and it still can't find it....
Comment #6
G Gavitt commentedCould you try this...
Make a new folder in your smf installation called smfdrupalAPI or something similar. Copy the contents of the includes folder to that directory
Now try changing
Path to SMF api file: /modules/smfforum/includes to.. /smf/smfdrupalAPI
Comment #7
Steel Rat commentedthe API has its own folder as well, so copying from the original zip made it /smf_api_2/smf_api_2.php. Should I do away with the folder it had originally and put the .php files into the folder you're proposing?
Comment #8
Steel Rat commentedOk, it's working now, here's what I had to do.
Created a folder under the SMF installation called drupalSMFapi.
Placed just the files from the smf_api_2 folder in the new folder.
changed Path to SMF api file to smf/drupalSMFapi.
Now it's happy.
The installation instructions really need some help. And the defaults need to be done away with since they don't work.
Comment #9
G Gavitt commentedGlad it worked out for ya... Not sure why it picked the wrong folder at first..maybe it has something to do with where you put the forum root? I am not looking at the code so thats a total guess...
As far as docs go...
The programmer is russian..so his english is not the best. I did see in another issue that another user is starting to refine the instructions...
Comment #10
Steel Rat commentedThe leading "/" on the path to API was also messing it up. the default leads one to believe it needs to be there.
The part in the docs where it says to login to you SMF install as admin, then go to admin>modules>... Clearly that should say login to Drupal (not SMF) as admin, since there is no modules section in SMF.
I'd gladly re-write the docs for him, but the problems aren't language, but accuracy. Like not accounting for the API package having a sub-folder, and the above, thus the api file will never be found with the current instructions.
Comment #11
andrewpeacock commentedI think the isssue with the install instructions is not one of language.
ie,
Step 4: Unpack smf_api_2 archive and copy it to subdirectory .../modules/smfforum/includes/
Yet the SMF config is looking for smf_api_2.php in the path specified in the 'SMFforum root' setting, which is described as 'Path to forum directory. Enter the full directory path where SMF is installed.' (my emphasis).
I'm now unsure where to go. Will post the resolution here once I get it working.
Andy
Comment #12
vb commentedDownload latest http://vgb.org.ru/files/smf_api_2.zip (content zipped without subdirectory smf_api_2) and unzip it to .../modules/smfforum/includes/
Comment #13
Steel Rat commentedAndrewpeacock, see my post #8 above. the "Path to SMF api file" is the significant field, and it doesn't want a leading /, though this may depending on your path setup.
Comment #14
vb commentedI always use /smf_api_2.php with leading /
and path to forum without trailing /
/home/aussieh/public_html/forum
New dev version now should suggest you (if this field is blank)
/home/aussieh/public_html/smf
and you only need to change smf to forum in your case
I'd recommend to download new version. It has automatic path suggestion feature.
Comment #15
Steel Rat commentedVB, I think you're misunderstanding what I'm saying. The "Path to api" is the one that doesn't want a leading /.
Example, an smfforum I setup yesterday has these settings:
SMFforum root: smf
Path to SMF api file: modules/smfforum/includes/smf_api_2 (will not work with leading /, tried with 2 different installations)
SMF api file name: /smf_api_2.php
The error message if the second item isn't right is also wrong, it will use the path in the first field as the error message, not the path in the second field where the problem is.
Comment #16
vb commentedSorry, agree.
See my post #12, i link to repacked version of http://vgb.org.ru/files/smf_api_2.zip without subdirectory /smf_api_2
In new dev version i suggest path to api as
$smfinc = $drupal_get_path('module', 'smfforum') . '/includes';it gives
sites/all/modules/smfforum/includes
or
modules/smfforum/includes
without leading /
smf_api_2.php and all smf_api_2.zip should goes direct to
modules/smfforum/includes
(modules/smfforum/includes/smf_api_2.php)
I cannot place smf_api_2 in drupal CVS because non-GPL license of SMF
Thanks for help.
Comment #17
Steel Rat commentedOk, that makes more sense, didn't know about the license issue.
Comment #18
sudomaster commentedHas someone actually fixed this? I have followed the included readme, the instructions above, etc, and when I do I get taken to the update drupal screen. It would be nice to have an implementation of this that actually works according to the instructions. Is anyone working on this????????
Comment #19
Steel Rat commentedIt's working for me. Post your settings here and I'll see if I can help.
If you want to see it in use go to http://rpgmapshare.com/smfforum
Comment #20
enthusaroo commentedThanks Steel Rat for your info
Comment #21
aussieholden commentedComment #22
Steel Rat commentedHate to open this up again, but I've upgraded a site to Drupal 6.12 and have installed the latest smfforum module and api, but we're back to the same old problems as before.
This is REALLY frustrating.
Currently, my smfforum settings is giving me the following error:
My SMF forum root is: SMF (this is found)
Path to SMF api file: modules/smfforum/includes
SMF api file name: /smf_api_2.php (this is not found)
As before, the error message seems to expect the api file to be located in the SMF forum root, and not where the path option says it is. I'm really surprised this isn't fixed yet after this thread was closed the first time around.
Right now nothing I've tried is fixing this. I even placed a copy of the api in the SMF root where it thinks it's looking for it, and still no luck.
Comment #23
SimpleJage commentedI had to do 2 things first this still exists in the 6.x 1.23 release (latest for me):
http://drupal.org/node/121608
Except it is line 499 in smfforum.module:
Change this:
$smfapi = $smf_boarddir . $smfapifile;
To
$smfapi = $smfinc . $smfapifile;
That fixes the display error which shows the wrong path (keeps saying it can't find it in the SMF directory).
The second thing which I haven't seen anyone mention is that I originally only copied smf_api_2.php as that is all I thought the directions indicated. Bit confusing, I'll agree.
Once I copied smf_api_subs.php as well (which I probably mistook for smf_api.php without looking closely) I now have 3 lines of success:
Successfully locating SMF installation.
Successfully locating sites/all/modules/smfforum/includes//smf_api_2.php.
Successfully connected to the SMF database.
The values that I used are as follows (in order):
/home/wildboun/public_html/forum
sites/all/modules/smfforum/includes/
/smf_api_2.php
So the above leading and trailing slash combo is what worked, but not until I had smf_api_subs.php in the includes directory as well. Looking at this post I'm going to remove the trailing slash from the second line. Doesn't look as if it changed anything except the 3 lines of success:
Successfully locating SMF installation.
Successfully locating sites/all/modules/smfforum/includes/smf_api_2.php.
Successfully connected to the SMF database.
I hope this info helps anyone in the future who finds this thread.