Accessing index.php returns URL not found on setup

Post Reply
riteoh
Observer
Observer
Posts: 36
Joined: Wed Oct 27, 2021 4:44 am

Accessing index.php returns URL not found on setup

Post by riteoh » Mon Jan 09, 2023 3:10 am

Numerous issues with my site over the last 3 weeks have led me to doing a complete reinstall.

I have followed the wiki instructions precisely, except for copying my backup of googlemapsKey, and using the settings for the database that I already have.

The setup returns no errors, and has a created a config.php file, which I can see when I ftp to my site.

However - when trying to access the index (http://www.eyesontheweather.com.au/template.index.php) I get a 404 not found error, and the address defaults to https://www.eyesontheweather.com.au/tem ... esktop.php.

Any suggestions on how to fix this anybody?

User avatar
lemimi
Advisor
Advisor
Posts: 86
Joined: Wed Dec 12, 2018 3:31 pm
Location: France - Normandie
Station model: Brandson 304557
Contact:

Re: Accessing index.php returns URL not found on setup

Post by lemimi » Mon Jan 09, 2023 4:14 am

Hello,
Maybe the /template subfolder is too much?
Indeed the address: https://www.eyesontheweather.com.au/indexDesktop.php, works.
To the pleasure... Michel

riteoh
Observer
Observer
Posts: 36
Joined: Wed Oct 27, 2021 4:44 am

Re: Accessing index.php returns URL not found on setup

Post by riteoh » Mon Jan 09, 2023 5:56 am

The site used to be installed in the root directory - now reinstalled in the 'template' directory, but this error is coming up.

User avatar
lemimi
Advisor
Advisor
Posts: 86
Joined: Wed Dec 12, 2018 3:31 pm
Location: France - Normandie
Station model: Brandson 304557
Contact:

Re: Accessing index.php returns URL not found on setup

Post by lemimi » Mon Jan 09, 2023 9:58 am

https://www.eyesontheweather.com.au/template/index.php does refer to https://www.eyesontheweather.com.au/tem ... esktop.php, and there is the 404 error.
This would mean that the indexDesktop.php file does not exist on the server... to be checked.

riteoh
Observer
Observer
Posts: 36
Joined: Wed Oct 27, 2021 4:44 am

Re: Accessing index.php returns URL not found on setup

Post by riteoh » Mon Jan 09, 2023 10:08 am

In my root directory (public_html) the file indexDesktop.php is present.

In my NEW install (public_html/template) the file does NOT exist

User avatar
lemimi
Advisor
Advisor
Posts: 86
Joined: Wed Dec 12, 2018 3:31 pm
Location: France - Normandie
Station model: Brandson 304557
Contact:

Re: Accessing index.php returns URL not found on setup

Post by lemimi » Mon Jan 09, 2023 11:09 am

The new installation may not have gone well.
And it might not be the only missing file on this one :-(
Maybe transfer missing file(s) from working root to template, or reinstall.
Good luck...Michel

riteoh
Observer
Observer
Posts: 36
Joined: Wed Oct 27, 2021 4:44 am

Re: Accessing index.php returns URL not found on setup

Post by riteoh » Wed Jan 11, 2023 8:36 am

Have tried a new install.

error.log is showing an error in the setup.

The error is

Undefined variable $lang in /home2/pudding1/public_html/template/install/setup.php on line 1300

And this is the relevant code in the setup.php file, starting from line 1299 to 1304

fforeach($availableLangs as $languageAvailable){
if($languageAvailable!=$lang){
echo "<img src='../imgs/flags/big/".strtolower($languageAvailable).".png' class='langIcon' onclick='langSelect(\"".$languageAvailable."\")' id='lang_".$languageAvailable."'>";
}
else{
echo "<img src='../imgs/flags/big/".strtolower($languageAvailable).".png' class='langIcon' onclick='langSelect(\"".$languageAvailable."\")' id='lang_".$languageAvailable."' style='width:50px'>";
}
}

Does anybody know what this means?

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Accessing index.php returns URL not found on setup

Post by FSC830 » Wed Jan 11, 2023 9:18 am

Just my guess:
You need to choose a language during setup, for each language the flag of the country is selected, i.e for English the Union Jack, for US the Stars and Stripes.
But it seems, that for any reason the language variable is not recognized in that file.
The default is defined in lines 121/122 and should be "gb".

Which language did you choose?

Regards
Image

riteoh
Observer
Observer
Posts: 36
Joined: Wed Oct 27, 2021 4:44 am

Re: Accessing index.php returns URL not found on setup

Post by riteoh » Wed Jan 11, 2023 10:09 am

I setup by selecting the US flag.

After seeing this post, I deleted the config.php file, and then changed it to GB.

My config.php file is now showing

$lang = 'gb';

But I am getting the same error.

And silly me deleted the error_log file thinking that it had not been updated because the timestamp had not changed. Now there is no new error file being created so I can't track the error.

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Accessing index.php returns URL not found on setup

Post by FSC830 » Wed Jan 11, 2023 10:49 am

Unfortunately my setup is years ago and I cant remember all steps in detail.
I was always thinking for setting up an virtual environment for testing, but never realized this (short of time, other projects, more excuses... :oops: ).
So I cant help any further at this point.

You wrote, you tried a new install. So my advise would be to remove all files and folders and start from scratch.
At least the error.log should created again that way.
Whats your PHP version?

Regards
Image

riteoh
Observer
Observer
Posts: 36
Joined: Wed Oct 27, 2021 4:44 am

Re: Accessing index.php returns URL not found on setup

Post by riteoh » Thu Jan 12, 2023 1:34 am

So I've checked my php version, and it is 7.4.28 - so all good there.

Completed (another) clean installation. This would be around attempt number 5 now.

Same error appearing in same place (selected the British Flag on setup). I'm now getting the following errors:

PHP Warning: Undefined variable $lang in /home2/pudding1/public_html/template/install/setup.php on line 1300
PHP Warning: Undefined variable $lang in /home2/pudding1/public_html/template/install/setup.php on line 1309
PHP Warning: Undefined variable $firstWeekday in /home2/pudding1/public_html/template/install/setup.php on line 2139
PHP Warning: Undefined variable $firstWeekday in /home2/pudding1/public_html/template/install/setup.php on line 2140
PHP Warning: Undefined variable $mobileHomepageType in /home2/pudding1/public_html/template/install/setup.php on line 2985
PHP Warning: Undefined variable $mobileHomepageType in /home2/pudding1/public_html/template/install/setup.php on line 2986

Any ideas anybody?

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Accessing index.php returns URL not found on setup

Post by FSC830 » Tue Jan 17, 2023 4:37 pm

Did not find some time earlier... Today I did a full new install at my server with v18 (Papaya).
Actually there was not any major issue, the setup was rather smooth, no errors.

The only few minor issues are caused to my leck of memory ;), I did not remember all settings at first trial.
But after some 2 or 3 hours the site appears as the previous installation some 6 years ago.

So I cant confirm the "url not found issue". :?

What I read in wiki was a hint about an issue with Apache web server. Not sure, if this is may be related to your issue?

Regards
Image

Post Reply