-2

I edited the file "www / index.php" Wamp and duplicate each line MySql adapting with version of PostgreSQL

i have error Notice: Undefined offset: 1 in C:\wamp\www\index.php on line 64

my code is ( line 63 64 65 )

 preg_match('|PostgreSQLVersion = (.*)\n|',$wampConfFileContents,$result);
 $PostgreSQLVersion = str_replace('"','',$result[1]);
 preg_match('|wampserverVersion = (.*)\n|',$wampConfFileContents,$result);
oustyle
  • 103
  • 1
  • 10
  • If you make amendments to the wampserver `index.php` file you do so at your own risk – RiggsFolly Aug 03 '16 at 12:54
  • Cross-posted as http://gis.stackexchange.com/questions/205763/wampserver-error-notice-undefined-offset-1-in-c-wamp-www-index-php-on-line-64 – PolyGeo Aug 29 '16 at 09:48

1 Answers1

2

I had a similar issue, but with the default installation.

This issue is because wamp has a problem trying to read the php version.

I noticed that in my wampmanager.conf file, it looked like this:

[php]
phpVersion ="5.6.19"
phpLastKnown = "7.0.4"
phpIniDir = "."
phpConfFile = "php.ini"
phpExeDir = "."

As you can see, in the "phpVersion" line there's no space between = and the version number, so wamp cannot read the version. You can fix this by applying the space:

[php]
phpVersion = "5.6.19"
Pietro Coelho
  • 1,894
  • 1
  • 26
  • 34