Closed XinYenFon closed 10 years ago
Why wouldn't parse_url() return a "host" item in there as well? Unless the URL is a relative one (parse_url doesn't work with relative URLs), there should always be a host in the results...
maybe an issue when using localhost vs a real server/host?
I've just come across this problem, too (local install):
Notice: Undefined index: host in /opt/lampp/htdocs/SMFalpha/Sources/Subs-Auth.php on line 134
Notice: Undefined index: host in /opt/lampp/htdocs/SMFalpha/Sources/Subs-Auth.php on line 134
Notice: Undefined index: host in /opt/lampp/htdocs/SMFalpha/Sources/Session.php on line 41
Notice: Undefined index: host in /opt/lampp/htdocs/SMFalpha/Sources/Session.php on line 41
Don't know why those notices get repeated, but that's how it showed up... Below those notices, it still tells me that the forum installation was successful (but apparently it wasn't, as the forum main page won't open up).
During the installation I used MySQL (not the light one, which was default) and I also selected SSL. Everything else was with the default options.
EDIT: just tried it again, sticking with all the default options during installation. Same problem at the end.
What's your $scripturl and PHP version?
On Tue, Jul 22, 2014 at 6:47 PM, Chainy notifications@github.com wrote:
I've just come across this problem, too (local install):
Notice: Undefined index: host in /opt/lampp/htdocs/SMFalpha/Sources/Subs-Auth.php on line 134
Notice: Undefined index: host in /opt/lampp/htdocs/SMFalpha/Sources/Subs-Auth.php on line 134
Notice: Undefined index: host in /opt/lampp/htdocs/SMFalpha/Sources/Session.php on line 41
Notice: Undefined index: host in /opt/lampp/htdocs/SMFalpha/Sources/Session.php on line 41
Don't know why those notices get repeated, but that's how it showed up... Below those notices, it still tells me that the forum installation was successful.
— Reply to this email directly or view it on GitHub https://github.com/SimpleMachines/SMF2.1/issues/2013#issuecomment-49824042 .
@live627
By $scripturl, I suppose you mean this: http://localhost/SMFalpha/
PHP version = 5.5.11 (I'm using XAMPP for Linux from Apache Friends)
SMF2.0.8 installed with no problems. Just have this problem with 2.1.
What does this return?
<?php
echo '<pre>' . print_r(parse_url('http://localhost/SMFalpha/')) . '</pre>';
?>
Array ( [scheme] => http [host] => localhost [port] => 8080 [path] => /github2.1/ )
1
given my server is on port 8080
That's what I expected. It must be returning something different for the others then.
actually i cant duplicate the issue on my localhost... wamp with php 5.5.12
i know i saw the issue when i did the install for Irisado on wamp with php 5.4.
actually i went further in the install and i can duplicate the issue, it is on the page after you enter the admin details.
Yes, the problem comes up right at the end, where you have the option to click on the link to take you to your new forum. The page where it tells you that the installation was successful!
@Oldiesmann
This is what I got:
Array ( [scheme] => http [host] => localhost [path] => /SMFalpha/ )
1
Just wondering if there's a temporary workaround for this bug? Just so that I can get SMF2.1 up and running on my local server...
This is only related to the redirection to your forum after everything is done installing, right?
I still have no idea why there wouldn't be a "host" in the array returned though.
@Oldiesmann
Yes, you're right. It's a redirection issue. When I type in the full URL, the forum opens up fine.
The failed redirection really gives the impression of a failed installation, though! Certainly very confusing if you're not familiar with such error messages...
Thanks for pointing this out - I can now tinker around with 2.1 to try things out.
This is all spawned from the call to setLoginCookie (the code to automatically log you in after the install is complete), but I still have no idea why parse_url wouldn't have a host in it unless $boardurl is somehow being set improperly.
IMO this should be fixed before a beta 1 release... we do want users to be able to install SMF without errors.
This is actually an easy fix. Just global $boardurl in function DeleteInstall() ;)
With this fix I don't get the undefined error BUT I'm also not automatically logged in after install...
\Themes\Sources\Subs-Auth.php on line 134 \Themes\Sources\Session.php on line 41
Happens after installer creating admin account