Browser name incorrectly recorded in ini file, preventing it from launching
Posted by: jwj (101.32.44.---)
Date: July 01, 2024 11:37AM

Recently, I received some feedback that Wampserver could not be started properly, prompting "The configuration file contains a syntax error on line 404".
[EParseError] Invalid section tag".

Screenshot: [imgur.com]

It's strange, the browser name in the ini config file is incomplete, it looks like the last character is missing or an extra byte

Options: ReplyQuote
Re: Browser name incorrectly recorded in ini file, preventing it from launching
Posted by: Otomatic (Moderator)
Date: July 01, 2024 03:03PM

A priori, the problem arises with the name of the "360 browser".

The names and paths of the browsers installed on the system come from the registry at the key:
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet
the top-level key, for example:
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome
contains "by default" of type REG_SZ the name of the navigator
and the key of fifth level:
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\shell\open\command
contains "by default" of type REG_SZ the access path to the navigator.

Export the contents of the HKEY_LOCAL_MACHINESOFTWARE\Clients\StartMenuInternet\360........ key and post its contents here.

Post also the contents of the file : c:\wamp64\scripts\ListBrowsers.txt


You can temporarily overcome this problem by modifying the file:
C:\wamp64\scripts\getInstalledBrowsers.php
At the end of the file, comment out the line write_file(.....) in principle line 61 and add the following two lines just before the ?> php closing tag:
unlink('ListBrowsers.txt');
unlink('ListBrowsers.php');
to obtain the final result:
//write_file('ListBrowsers.txt',$FileContents);
unlink('ListBrowsers.txt');
unlink('ListBrowsers.php');
?>

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Browser name incorrectly recorded in ini file, preventing it from launching
Posted by: jwj (101.32.44.---)
Date: July 02, 2024 03:09AM

Here's the data I exported, which contains:
1. Export the HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet registry;
2.wampmanager.ini;
3.ListBrowsers.txt;
4. ListBrowsers.php

Download link: [www.upload.ee]

I don't know if you can download it, note that this site has ads. If you can't, I'll re-upload it somewhere else.

Options: ReplyQuote
Re: Browser name incorrectly recorded in ini file, preventing it from launching
Posted by: Otomatic (Moderator)
Date: July 02, 2024 11:21AM

Hi,

Thanks for the files, I was able to download them.

I can only run simulations with:
 $browser = array ( 'name' => array ( 0 => '360安全浏览器',
The ListBrowsers.php and ListBrowsers.txt files must be UTF-8 encoded, check with Notepad++.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Browser name incorrectly recorded in ini file, preventing it from launching
Posted by: Otomatic (Moderator)
Date: July 02, 2024 02:38PM

Hi,

I tested this with a ListBrowser.txt file:
<?php

$browser = array (
  'name' =>
  array (
    0 => 'Mozilla Firefox',
    1 => 'Google Chrome',
    2 => 'Internet Explorer',
    3 => 'Microsoft Edge',
    4 => 'Opera Stable',
    5 => '360安全浏览器',
  ),
  'path' =>
  array (
    0 => 'E:/Com/Net/Firefox/firefox.exe',
    1 => 'C:/Program Files/Google/Chrome/Application/chrome.exe',
    2 => 'C:/Program Files/Internet Explorer/iexplore.exe',
    3 => 'C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe',
    4 => 'E:/Com/Net/Opera/opera.exe',
    5 => 'E:/Com/Net/Opera/opera.exe',
  ),
);

?>
And there is no problem in wampmanager.ini :
Type: Item; Caption: "Opera Stable"; Action: multi; Actions: browser_Opera Stable
Type: Item; Caption: "360安全浏览器"; Action: multi; Actions: browser_360安全浏览器
...
[browser_360安全浏览器]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 07/02/2024 09:39PM by Otomatic.

Options: ReplyQuote
Re: Browser name incorrectly recorded in ini file, preventing it from launching
Posted by: jwj (101.32.44.---)
Date: July 03, 2024 11:30AM

I tested it by opening cmd in the scripts directory and executing . \bin\php\php7.4.33\php.exe . \refresh.php when wampmanager.ini results are correct.
But the wampmanager.ini you get from running wampmanager.exe is faulty.

For testing, I installed Wampserver in Windows Sandbox, so the environment was clean and I didn't change the Wampserver files after installation.

This is indeed a very strange problem, the guess is whether wampmanager.exe starts up with wampmanager.ini processed again, causing the problem

Options: ReplyQuote
Re: Browser name incorrectly recorded in ini file, preventing it from launching
Posted by: Otomatic (Moderator)
Date: July 03, 2024 11:59AM

Hi,

You can use the regeneration tool for wampmanager.ini :
Wampmanager.ini repair
Repair tool for wampmanager.ini file if it is corrupted or missing. You can download at any time, but install this tool only if you need it, because it takes into account the current configuration of Wampserver.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Browser name incorrectly recorded in ini file, preventing it from launching
Posted by: jwj (101.32.44.---)
Date: July 11, 2024 03:59AM

wampserver3_repair_wampini.exe should only be able to repair the ini config file that is currently in trouble, right? The problem I'm having now is that the ini file is fine before startup, but after startup, I'm having the problem at the beginning of the post.
This problem has only appeared in recent releases.

Options: ReplyQuote
Re: Browser name incorrectly recorded in ini file, preventing it from launching
Posted by: Otomatic (Moderator)
Date: July 11, 2024 08:48AM

Pending further investigation, in the file wamp64/scripts/refresh.php, you comment on line 2969:
//$tpl = str_replace('[WampserverBrowser]','[WampserverBrowser]'.$BrowserChangeMenu.$BrowserChangeSub,$tpl);

Don't forget to do it again if you install an update later.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.