News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF Permalink Issue.

Started by ryaninnon, January 07, 2013, 03:58:57 AM

Previous topic - Next topic

ryaninnon

Hello,

Does SMF has a "catch-all" attribute or settings that i could configure?
Reason is i had a .php file which is located at the SMF root folder example - hxxp:forum.sample.com/example.php [nonactive], however, when i access that .php file, it shows the Homepage of SMF.

The issue i had located at the folder - hxxp:forum.myoko-nagano.com [nonactive], where i actually had oneall social login installed, and there's a callback at hxxp:forum.myoko-nagano.com/oneall_social_login.callback.php [nonactive], but it shows the mainpage, causing the plugin not to be able to work properly.

Regards,

Kindred

that should not be happening...   

It sounds like you have some sort of bad configuration on your hosts's side of things....

smf version?
mods installed?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

ryaninnon

SMF Version 2.0.3

Mod Installed : (I just copied and paste from the modification packages)
   Mod Name   Version   
1.   SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update    1.0   [ List Files ] [ Delete ]
2.   SMF 1.0.15 / 1.1.7 Update    1.0   [ List Files ] [ Delete ]
3.   SMF 1.0.14 / 1.1.6 Update    1.0   [ List Files ] [ Delete ]
4.   OneAll Social Login    1.0     [ Uninstall ] [ List Files ] [ Delete ]
5.   SMF 1.1.15 Update    1.0   [ List Files ] [ Delete ]
6.   SMF 1.0.20 / 1.1.12 Update    1.0   [ List Files ] [ Delete ]
7.   Header Link Mod    1.1   [ List Files ] [ Delete ]
8.   Ohara YouTube Embed    1.0     [ Uninstall ] [ List Files ] [ Delete ]
9.   SMF 1.0.16 / 1.1.8 Update    1.0   [ List Files ] [ Delete ]
10.   SMF 1.0.19 / 1.1.11 Update    1.0   [ List Files ] [ Delete ]
11.   SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update    1.0   [ List Files ] [ Delete ]
12.   SMF 1.0.22 / 1.1.16 Update    1.0   [ List Files ] [ Delete ]
13.   SMF 1.0.21 / 1.1.13 Update    1.0   [ List Files ] [ Delete ]
14.   Ad Managment    3.0.1     [ Uninstall ] [ List Files ] [ Delete ]
15.   SMF 1.0.18 / 1.1.10 / 2.0 RC1-2 Update    1.1   [ List Files ] [ Delete ]
16.   SMF 2.0.3 Update    1.0     [ Uninstall ] [ List Files ] [ Delete ]
17.   Add Facebook Like to Posts    1.1     [ Uninstall ] [ List Files ] [ Delete ]
18.   SMF 1.1.14 Update    1.0   [ List Files ] [ Delete

vbgamer45

Check if you have a .htaccess file in the main directory of your forum and post its contents here.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Kindred

Wait....

If you have 2.0.3, why the heck do you hae all of those 1.0 and 1.1 package updates?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Sounds like it was a 1.1.x installation that's been upgraded...

ryaninnon

Quote from: vbgamer45 on January 07, 2013, 11:20:37 PM
Check if you have a .htaccess file in the main directory of your forum and post its contents here.

Weirdly, i thought it was that issue - so i tried and found no .htaccess from any of it's root folder.

Also - yes it's been upgraded from version 1.1, as we wanted to retain all forum contents and just do a quick upgrade as i'm fairly new to SMF as well.

Kindred

well, you can probably just delete all of those 1.0.x/1.1.x packages. they are useless to 2.0 anyway....


As for the file...
I looked at the oneall_social_login.callback.php file....

there is not a single echo in the file...    that means that there is nothing that happens on the screen when that file is called.

So. from what I can see, a call to that file will either bounce you to the profile page or to the forum index...

Actually, from what I can tell, that file is never supposed to be called by itself...  it needs an action.

// Launch callback handler.
if (isset ($_POST) AND !empty ($_POST ['oa_action']) AND !empty ($_POST ['connection_token']))
{
if ($_POST ['oa_action'] == 'social_login')
{
oneall_social_login_login_callback ();
exit();
}
elseif ($_POST ['oa_action'] == 'social_link')
{
oneall_social_login_link_callback ();
exit();
}
}

// The url has likely be called directly
redirectexit();
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

ryaninnon

Quote from: Kindred on January 08, 2013, 01:47:10 AM
well, you can probably just delete all of those 1.0.x/1.1.x packages. they are useless to 2.0 anyway....


As for the file...
I looked at the oneall_social_login.callback.php file....

there is not a single echo in the file...    that means that there is nothing that happens on the screen when that file is called.

So. from what I can see, a call to that file will either bounce you to the profile page or to the forum index...

Actually, from what I can tell, that file is never supposed to be called by itself...  it needs an action.

// Launch callback handler.
if (isset ($_POST) AND !empty ($_POST ['oa_action']) AND !empty ($_POST ['connection_token']))
{
if ($_POST ['oa_action'] == 'social_login')
{
oneall_social_login_login_callback ();
exit();
}
elseif ($_POST ['oa_action'] == 'social_link')
{
oneall_social_login_link_callback ();
exit();
}
}

// The url has likely be called directly
redirectexit();


Thank you very much for looking into it. I've emailed the developer of the plugin and will update soon. I really don't know where the issue is.  ::) Thanks alot shall update you soon!

Claude, OneAll

Quote from: Kindred on January 08, 2013, 01:47:10 AM
well, you can probably just delete all of those 1.0.x/1.1.x packages. they are useless to 2.0 anyway....


As for the file...
I looked at the oneall_social_login.callback.php file....

there is not a single echo in the file...    that means that there is nothing that happens on the screen when that file is called.

So. from what I can see, a call to that file will either bounce you to the profile page or to the forum index...

Hello, I'm the developer of this plugin.

You are absolutely right. The file it is not meant to be opened directly, it is called by the OneAll API with a set of $_POST arguments.

If the file is nevertheless opened directly, it should just bounce you back to the forum index. This however does not work.

In my opinion it's not really the file oneall_social_login.callback.php that is being opened when you call http://forum.myoko-nagano.com/oneall_social_login.callback.php
You can in fact open any arbitrary url on the forum and you will always end up on the forum homepage:

http://forum.myoko-nagano.com/this-is-an-arbitrary-url
http://forum.myoko-nagano.com/tfdgfdsggdsfgdfg

In my opinion the first step would be to disable the catch-all mechanism that makes that you can open any arbitrary url without getting an error.
Alternatively just put a die("test"); on top of the file oneall_social_login.callback.php to make sure that it is really this file that is beeing called.

Regards,

Kindred

OneAll,

There is no catchall like that...  At least not in the standard SMF.
SMF will catch "actions" (i.e. index.php?action=...) and bounce to the index page, but if I attempt to go to mysite.com/blah.php, my system will indeed display blah.php on my site...   I use this all the time to run test scripts and SSI functions.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

ryaninnon

Quote from: Kindred on January 08, 2013, 08:51:09 AM
OneAll,

There is no catchall like that...  At least not in the standard SMF.
SMF will catch "actions" (i.e. index.php?action=...) and bounce to the index page, but if I attempt to go to hxxp:mysite.com/blah.php [nonactive], my system will indeed display blah.php on my site...   I use this all the time to run test scripts and SSI functions.

Does that mean our site hxxp:forum.myoko-nagano.com [nonactive] had something that is actually displaying the index.php even when you go to a non-existant site which is hxxp:forum.myoko-nagano.com/example [nonactive]?

Regards,

Kindred

yes/no...   you are doing it wrong.


1- if example exists AS A DIRECTORY, then that is valid and will display that directory (or the index file in that directory)
2- if example does not exist AS A DIRECTORY, then it gives a 404
3- if example exists AS A FILE, then you are calling it incorrectly. You would need to call it as example.html or example.php
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

ryaninnon

Quote from: Kindred on January 08, 2013, 11:45:08 AM
yes/no...   you are doing it wrong.


1- if example exists AS A DIRECTORY, then that is valid and will display that directory (or the index file in that directory)
2- if example does not exist AS A DIRECTORY, then it gives a 404
3- if example exists AS A FILE, then you are calling it incorrectly. You would need to call it as example.html or example.php

The weirdest thing is that - when i go to hxxp:forum.myoko-nagano.com/example [nonactive], it doesn't have any directory nor any file, it didn't show the 404 error page, it shows the main page of the forum.

Kindred

which means that you have a mis-configuration somewhere which is redirecting back tot he forum index....
(nice, clean theme, by the way, I like it)

You said that there is no .htaccess file in your forum root directory?
(do note, .htaccess will often NOT show up in ftp connections. You need to look at your files using your site's cpanel file manager)

and the only mods that you have installed are:
4.   OneAll Social Login    1.0     [ Uninstall ] [ List Files ] [ Delete ]
7.   Header Link Mod    1.1   [ List Files ] [ Delete ]
8.   Ohara YouTube Embed    1.0     [ Uninstall ] [ List Files ] [ Delete ]
14.   Ad Managment    3.0.1     [ Uninstall ] [ List Files ] [ Delete ]
16.   SMF 2.0.3 Update    1.0     [ Uninstall ] [ List Files ] [ Delete ]
17.   Add Facebook Like to Posts    1.1     [ Uninstall ] [ List Files ] [ Delete ]
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

ryaninnon

Quote from: Kindred on January 09, 2013, 09:01:02 AM
which means that you have a mis-configuration somewhere which is redirecting back tot he forum index....
(nice, clean theme, by the way, I like it)

You said that there is no .htaccess file in your forum root directory?
(do note, .htaccess will often NOT show up in ftp connections. You need to look at your files using your site's cpanel file manager)

and the only mods that you have installed are:
4.   OneAll Social Login    1.0     [ Uninstall ] [ List Files ] [ Delete ]
7.   Header Link Mod    1.1   [ List Files ] [ Delete ]
8.   Ohara YouTube Embed    1.0     [ Uninstall ] [ List Files ] [ Delete ]
14.   Ad Managment    3.0.1     [ Uninstall ] [ List Files ] [ Delete ]
16.   SMF 2.0.3 Update    1.0     [ Uninstall ] [ List Files ] [ Delete ]
17.   Add Facebook Like to Posts    1.1     [ Uninstall ] [ List Files ] [ Delete ]

Checked using file manager. No .htaccess file is detected. Urgh!

Claude, OneAll

Are you using Apache?

Could you check if you have a VirtualHost configuration with something like this:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

ryaninnon

Quote from: OneAll on January 10, 2013, 09:10:21 AM
Are you using Apache?

Could you check if you have a VirtualHost configuration with something like this:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]


I've emailed the hosting provider. Awaiting reply.

ryaninnon

Thank you all that helped. Issue was solved by contacting our host. Seems like it's really related to server configuration which is out of our control.

Claude, OneAll

Thank you very much for the update!
I just checked out your forum and Social Login works great now!

Advertisement: