News:

Wondering if this will always be free?  See why free is better.

Main Menu

SMF Installation problems in mambo 4.5.1

Started by charleshardt, October 23, 2004, 08:34:20 AM

Previous topic - Next topic

charleshardt

I hope this is the proper place to post this, because it's certainly the most active forum on the subject. Also because I believe SMF is the best choice for forums, and I have put many hours into putting SMF on my mambo site.

I installed the latest release of the SMF integration with Mambo, and have tried installing it a few times without success. At best, I have gotten a screen full of errors.

In this post I want to document the steps that I go through in the installation. Here is my information:
* I am designing on my local test server using MSAS.
* I use Mambo 4.5.1.
* My SMF directory is in the root directory of my Mambo installation.
* SMF is practically a clean installation. I have one user (admin), and have done nothing but change some text at the top in a template. SMF works fine.
* Also it's necessary to note that I use the community builder component for registration and logins, but the mos_users table is intact and used by that component, so I don't believe this should get in the way of SMF.

Specific steps in installation:

1. Install com_smf_rc2.zip (all installations through mambo administration as it should be). SUCCESS.
2. Change config.smf.php to read: $smf_path = "hxxp:localhost/mambo451/smf"; [nonactive]
3. Install com_smf_registration_mos_4.5.1.zip. SUCCESS.
4. Install mod_smf_loginv2.0.zip. SUCCESS.
5. Activate module "Login Form" ("mod_smf_login").
6. Deactivate current login module (the "comprofiler" login module for Community Builder)
7. Add to my mambo template, on the line before "</head>" the following:

<?php  require ("components/com_smf/config.smf.php");
             require ($smf_path . "/SSI.php");
?>

Okay, that should be it! Let's see what I got when I pointed my browser to my home page:

1. Home Page: Almost normal. At the top above my page is a line that reads: "Please don't access SSI.php by URL directly; you may want to use the path ('W:\\www\\Mambo451\\smf\\SSI.php') or add ?ssi_function=something." Fine. Let's fix that after we check out the new forum. Let's go there now: rather than add a menu item, I'll just type in "hxxp:localhost/mambo451/index.php?option=com_smf. [nonactive]"

2. I get "Please don't access SSI.php by URL directly; you may want to use the path ('W:\\www\\Mambo451\\smf\\SSI.php') or add ?ssi_function=something.
Fatal error: Call to undefined function: reloadsettings() in W:\www\Mambo451\components\com_smf\smf.php on line 30" That's it.

3. Follow the advice and change my $smf_path configuration to "W:\www\Mambo451\smf." Refresh the page and I get :
4. A page full of errors. It "wants" to work--I get elements of my website and elements of the forum. But the page is full of the following errors:


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in W:\www\Mambo451\components\com_smf\smf.php on line 40

Notice: Table 'smf.mos_menu' doesn't exist in W:\www\Mambo451\includes\database.php on line 184

Notice: Table 'smf.mos_menu' doesn't exist in W:\www\Mambo451\includes\database.php on line 184

Warning: array_keys(): The first argument should be an array in W:\www\Mambo451\includes\pathway.php on line 53

Notice: Table 'smf.mos_modules' doesn't exist in W:\www\Mambo451\includes\database.php on line 184

Warning: Invalid argument supplied for foreach() in W:\www\Mambo451\includes\frontend.php on line 58

Notice: Table 'smf.mos_modules' doesn't exist in W:\www\Mambo451\includes\database.php on line 184

Warning: Invalid argument supplied for foreach() in W:\www\Mambo451\includes\frontend.php on line 58

Notice: Table 'smf.mos_modules' doesn't exist in W:\www\Mambo451\includes\database.php on line 184

Warning: Invalid argument supplied for foreach() in W:\www\Mambo451\includes\frontend.php on line 58

Notice: Table 'smf.mos_modules' doesn't exist in W:\www\Mambo451\includes\database.php on line 184

Warning: Invalid argument supplied for foreach() in W:\www\Mambo451\includes\frontend.php on line 58

Notice: Table 'smf.mos_modules' doesn't exist in W:\www\Mambo451\includes\database.php on line 184

Warning: Invalid argument supplied for foreach() in W:\www\Mambo451\includes\frontend.php on line 58
   
Notice: Table 'smf.mos_modules' doesn't exist in W:\www\Mambo451\includes\database.php on line 184

Warning: Invalid argument supplied for foreach() in W:\www\Mambo451\includes\frontend.php on line 58
   
Notice: Table 'smf.mos_modules' doesn't exist in W:\www\Mambo451\includes\database.php on line 184

Warning: Invalid argument supplied for foreach() in W:\www\Mambo451\includes\frontend.php on line 58

Notice: Table 'smf.mos_modules' doesn't exist in W:\www\Mambo451\includes\database.php on line 184

Warning: Invalid argument supplied for foreach() in W:\www\Mambo451\includes\frontend.php on line 58
Notice: Table 'smf.mos_modules' doesn't exist in W:\www\Mambo451\includes\database.php on line 184

Warning: Invalid argument supplied for foreach() in W:\www\Mambo451\includes\frontend.php on line 58




Well, that's a deadend for me. I don't know what to do now. (Interesting that database.php keeps looking for the mos_modules table in my SMF database.) Also, now I cannot login to my mambo backend, and if I delete the include in my template header, cannot access anything on my website. So now I'm going to manually delete the files and hope all returns to normal soon.

I know this is long, but I wanted to document this well, as many of you have put in a lot of time on this project. if any of you are still with me, what are your thoughts?

charleshardt

I'm sorry. I thought I was appending this to the Mambo thread that's now 20-some pages long. Well, move it where you seem fit, admin.

Orstio

#2
You'll have to put your Mambo tables and SMF tables in the same database.  Sorry for the inconvenience.

[EDIT -- I had put in a fix for your $smf_path before I saw that you fixed it.]   ;)

[Unknown]

Just as a note - remember, with MySQL you can use:

`database`.tablename

To access a table.  In the general sense, one way to resolve these problems would be to change the $db_prefix in Settings.php to `database`.prefix, and then change $db_name to the Mambo database name.

I was able to successfully run Mambo and SMF in separate databases with my example I gave in that topic...

I think a new topic for this is fine, and this board is fine.... it's for portals and issues with them, generally.

-[Unknown]

repete

I get problems with SSI.php as well.  With my almost non-existent knowledge of php I'm not sure what to do.  I get the same errors as described by charleshardt, the only difference is mine reads ('/var/www/html/smf/SSI.php'):

1. Home Page: Almost normal. At the top above my page is a line that reads: "Please don't access SSI.php by URL directly; you may want to use the path ('W:\\www\\Mambo451\\smf\\SSI.php') or add ?ssi_function=something." Fine. Let's fix that after we check out the new forum. Let's go there now: rather than add a menu item, I'll just type in "http://localhost/mambo451/index.php?option=com_smf."

2. I get "Please don't access SSI.php by URL directly; you may want to use the path ('W:\\www\\Mambo451\\smf\\SSI.php') or add ?ssi_function=something.
Fatal error: Call to undefined function: reloadsettings() in W:\www\Mambo451\components\com_smf\smf.php on line 30" That's it.

I tried changing what I thought would fix it, but I just receive different errors, if you can tell me exactly what I should change hopefully things will get running or I at least can report on what other errors may apply.

Thanks in advance

Orstio

QuoteI get problems with SSI.php as well.  With my almost non-existent knowledge of php I'm not sure what to do.  I get the same errors as described by charleshardt, the only difference is mine reads ('/var/www/html/smf/SSI.php'):

Here is what you can do to help yourself:

- Provide a link.  It's tough to see what's going on just by description.

- Copy the error message you are receiving and paste it here. 

You are getting the "Please don't access SSI.php by URL"?  Remember that $smf_path is asking for a path, not a URL.  So, it cannot begin with "http".  Your $smf_path variable in config.smf.php should be:
"/var/www/html/smf"

not:

"http://yourdomain.com/smf"



repete

I was providing an url and not a path, an easy mistake to fix.  The integration looks awesome!  Many thanks for your quick response and all the work you've done!  :)

charleshardt

Yes, it's true that the destination is nothing without the journey. I don't think I've ever been so ecstatic about php!

I exported all tables to my mambo database, and in less than 2 minutes it worked its magic. Thank you for your awesome support, and if you'll excuse me I'm going to go play with my forum now. . .

charleshardt

I'm having problems registering. Whenever I fill out the registration form and submit, I get what appears to be a general SMF error page. This is how it appears:

1. The page is not integrated with my website--it's strictly SMF. I am now in SMF land (all links point to smf directory).
2. In the content area of the page, (where the boards would normally be) there is a table whose header says: "An Error Has Occurred!" The table data area is empty.
3. What's strange is that the address of the page is my website's index page (index.php).
4. The new member is inserted as a user in my mos_users table, but not in the smf_members table.

Here are some settings that maybe would have an effect:

SMF settings:
1.  Immediate registration
2. Notify administrators when a new member joins? UNCHECKED
3. Email new password on email change? UNCHECKED
4. Send welcome email to new member? UNCHECKED

Mambo 4.5.1 configuration:
1.  Use New Account Activation: YES
2. GZIP Page Compression: NO

What other parameters or settings would you like to know to get a grasp of the problem? or (like my previous post) is there a simple solution?

Note that the first couple of times I tried registering a new user, it did work. I can't tell you what I changed, because I was still orienting myself with the whole thing. But any changes in settings were few and minor, and it does not SEEM that I did anything that would warrant this break down. One thing I do know is that, because I was getting warnings such as "user/email/password already exists" I would manually delete such users in mos_users and smf_members in order to keep testing.

All help is appreciated and thanks for your time.

charleshardt

I managed to get it to work. I was trying to register the new test member with the same email and password (mine) as I was the administrator (also me).

Even so, what are your thoughts on that general error screen. (I must clarify: it is not an "error screen" per se like a 404 error screen. It is just an error message from SMF.) The last thing I want is this happening sometime in the future with a prospective member who haplessly enters a username or password that is already taken.

charleshardt

Has anybody had any luck or have any suggestions on integrating comprofiler (Community Builder component) with the smf registration and login?

Advertisement: