Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

installing SMF2.0 problems: FTP path error

Aloittaja guddone, huhtikuu 03, 2011, 05:46:14 IP

« edellinen - seuraava »

guddone

i am trying to install SMF2.0 using webinstall and i am at the installation page , i have filled every information in but it keeps rejecting the information when i click connect a message in a pink box appears that says "Sorry, the FTP path you entered wasn't the same place as this installer was uploaded to" . I understand that this means i didn't put the right path into the "install path" text box , my problem now is this : is there a particular way to put the path in ? , i mean i have tried a lot to get past this and to the best of my knowledge i have entered the path but it still wouldn't accept it . 

redone


<?php echo $_SERVER['DOCUMENT_ROOT']; ?>


Open up a text editor, save and upload the code under the name of path.php or whatever you want to call it. Upload this to the same place your forum is at, this will show the absolute path. The just access the file to get your path. Usually though SMF is very good at detecting this for you.

~RedOne

JimM

Did the solution Red One work for you?  If not, give us some details of what you have tried and we'll go from there.
Jim "JimM" Moore
Former Support Specialist

mrtoner

Lainaus käyttäjältä: RedOne - huhtikuu 04, 2011, 06:44:09 IP

<?php echo $_SERVER['DOCUMENT_ROOT']; ?>


Open up a text editor, save and upload the code under the name of path.php or whatever you want to call it. Upload this to the same place your forum is at, this will show the absolute path. The just access the file to get your path. Usually though SMF is very good at detecting this for you.

~RedOne

Sorry, this can't possibly work in every circumstance. $_SERVER['DOCUMENT_ROOT'] is not necessarily the path to the directory the user is installing SMF into.

I'm wondering why entering the path is necessary at all. Since webinstaller.php "knows" where it's located, why doesn't it supply this itself?

Aargh! Off to manually install.

JimM

Manual install is my preferred method. 

Lainaus käyttäjältä: mrtoner - toukokuu 04, 2011, 01:04:46 AP
Sorry, this can't possibly work in every circumstance. $_SERVER['DOCUMENT_ROOT'] is not necessarily the path to the directory the user is installing SMF into.

I'm wondering why entering the path is necessary at all. Since webinstaller.php "knows" where it's located, why doesn't it supply this itself?

I guess you missed the part about uploading this to the same place your forum is installed.  If you do that, it will work every time.
Jim "JimM" Moore
Former Support Specialist

mrtoner

From the PHP docs:

'DOCUMENT_ROOT': The document root directory under which the current script is executing, as defined in the server's configuration file.

http://www.php.net/manual/en/reserved.variables.server.php

$_SERVER['DOCUMENT_ROOT'] will return the exact same location no matter where on your server you put that script. You're perhaps thinking of $_SERVER['PATH_TRANSLATED'] (which may not work -- it doesn't on my server) or dirname(__FILE__)? The latter accurately returns the filesystem's path to the script.

JimM

mrtoner, I don't intend to argue with you. 

@ guddone - were you able to solve this issue with any of the information mentioned?
Jim "JimM" Moore
Former Support Specialist

lexxie

Hello,
I'm having the same problem. I did the path.php trick and it did give me the exact path but I'm still getting the same error in red..."Sorry, the FTP path you entered wasn't the same place as this installer was uploaded to."  I'm also getting this error message..."Sorry, but unless you read and agree to the license, you cannot download and install SMF."

I check the agree to license box each time I try to install, so I'm not sure why I'm getting that message.

I also have an error log in the forum folder where I have the webinstall.php script.

The contents of the log are:

[06-May-2011 10:20:10] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 10:20:10] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 10:20:10] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 10:20:10] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:17:52] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:17:52] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:17:52] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:17:52] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:19:07] PHP Notice:  Undefined index:  files_to_download in /home1/********/public_html/forum/webinstall.php on line 686
[06-May-2011 13:19:07] PHP Warning:  Invalid argument supplied for foreach() in /home1/********/public_html/forum/webinstall.php on line 686
[06-May-2011 13:22:05] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:22:05] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:22:05] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:22:05] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:22:05] PHP Notice:  Undefined index:  smf_1-1-13_ in /home1/********/public_html/forum/webinstall.php on line 584
[06-May-2011 13:25:07] PHP Notice:  Undefined index:  files_to_download in /home1/********/public_html/forum/webinstall.php on line 686
[06-May-2011 13:25:07] PHP Warning:  Invalid argument supplied for foreach() in /home1/********/public_html/forum/webinstall.php on line 686
[06-May-2011 13:33:21] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:33:21] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:33:21] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:33:21] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:33:21] PHP Notice:  Undefined index:  smf_1-1-13_ in /home1/********/public_html/forum/webinstall.php on line 584
[06-May-2011 13:34:48] PHP Notice:  Undefined index:  files_to_download in /home1/********/public_html/forum/webinstall.php on line 686
[06-May-2011 13:34:48] PHP Warning:  Invalid argument supplied for foreach() in /home1/********/public_html/forum/webinstall.php on line 686
[06-May-2011 13:45:15] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:45:15] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:45:15] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:45:15] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:45:15] PHP Notice:  Undefined index:  smf_1-1-13_ in /home1/********/public_html/forum/webinstall.php on line 584
[06-May-2011 13:47:25] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:47:25] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:47:25] PHP Notice:  Undefined index:  access in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:47:25] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home1/********/public_html/forum/webinstall.php on line 1319
[06-May-2011 13:47:25] PHP Notice:  Undefined index:  smf_2-0-rc5_ in /home1/********/public_html/forum/webinstall.php on line 584

I'm not sure what is going on here. I followed the instructions to a "T."

I've tried playing with the path, as others have suggested: /public_html/forum, /public_html, and the full path supplied by the path.php script is /home1/******/public_html

I've tried them all and this same message pops up.

I've been at this for several hours and would really appreciate any help.
Thanks in advance


mrtoner

@lexxie: $_SERVER['DOCUMENT_ROOT'] should have returned /home1/********/public_html for your installation; however, you need to add the path to your forum: /home1/********/public_html/forum

The errors you're getting (I got them, too) indicate that $_SESSION['webinstall_state']['access'] is not set. In fact, there don't appear to be any session variables set OMM -- and there is no  session cookie being set, either. That's going to affect the values of the form we're submitting, and thus the location of the installation (which, I presume, is NULL).

lexxie, would you mcheck to see if your copy of webinstall.php has a blank line at the very beginning? If so, remove that blank line (carriage return) -- the first line should now start with "<?php". Then re-run the installer.

lexxie

@ mrtoner, thanks for the quick reply. I got a friend to go in and figure it out for me. I'm not sure what the issue is but he figured it out! Thank goodness. I'll make note of what you said in case I have to reinstall at some point and run into this issue again.  ;)

Advertisement: