Undefined offset
Posted by: fullstackdev (---.xplore.ca)
Date: January 24, 2023 05:54AM

Hello,
I'm suddenly getting a lot of undefined offset errors when I try to add a vhost or even access my localhost page:

Notice: Undefined offset: 1 in C:\wamp64\scripts\wampserver.lib.php on line 1358


It looks very similar to this issue: [forum.wampserver.com], but it's in French and even trying to google translate and follow the steps, I haven't been able to get it working.

I'm not sure what changed, anybody able to help?

Options: ReplyQuote
Re: Undefined offset
Posted by: Otomatic (Moderator)
Date: January 24, 2023 08:47AM


Options: ReplyQuote
Re: Undefined offset
Posted by: fullstackdev (---.ded.execulink.com)
Date: January 24, 2023 02:07PM

Sorry - see below
-Win 10 x64
-Wamp 3.3.1 x64 (was 3.2.x, so I tried upgrading but it didn't help)
-Apache 2.4.55
-MySQL 8.0.2.1
-don't use Maria
-Green

When I browse to localhost, after I scroll down below all the errors, I do see the expected page. I can also add vHosts, but I'm not sure why I'm getting all the PHP errors.

Options: ReplyQuote
Re: Undefined offset
Posted by: Otomatic (Moderator)
Date: January 24, 2023 02:54PM

Hi,

The line 1358 of C:\wamp64\scripts\wampserver.lib.php should be :
$Alias_Contents['PMyAd'][] = $matches[1];
Is this correct ?

- What are the contents of directories wamp64/alias/ and wamp64/apps/ ?

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

Options: ReplyQuote
Re: Undefined offset
Posted by: fullstackdev (---.ded.execulink.com)
Date: January 24, 2023 03:25PM

-Yes, like 1358 is exactly that.
-wamp64/Alias has 4 files: adminer.conf, phpmyadmin.conf, phpmyadmin.conf.bak, phpsysinfo.conf
-wanp64/Apps has 4 folders: adminer4.7.7, phpmyadmin5.1.1, phpMyAdmin-5.2.0-english, phpsysinfo3.3.2

Options: ReplyQuote
Re: Undefined offset
Posted by: Otomatic (Moderator)
Date: January 24, 2023 03:45PM

Hi,

> phpmyadmin.conf.bak
> phpMyAdmin-5.2.0-english

These files and folders are not part of the original Wampserver installation or application additions.
File and folder to remove !

If you want to add PhpMyAdmin 5.2.0 :
PhpMyAdmin 5.2.0

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

Options: ReplyQuote
Re: Undefined offset
Posted by: Otomatic (Moderator)
Date: January 24, 2023 04:05PM

Hi,

> adminer4.7.7, phpsysinfo3.3.2

In addition to the Wampserver, Apache, PHP, etc. updates. We should also think about updating the applications:

- Adminer 4.8.1

- PhpSysInfo 3.4.2

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

Options: ReplyQuote
Re: Undefined offset
Posted by: fullstackdev (---.ded.execulink.com)
Date: January 24, 2023 04:07PM

So I removed that folder & file - restarted wamp - same error messages.

Downloaded & installed 5.2.0 with 'add to existing version' - now my phpMyAdmin won't open (403, don't have access to this resource). Fixed that by updating phpmyadmin.conf (for some reason it seems to be ignoring phpmyadmin5.2.0.conf, and phpmyadmin.conf was still pointing to the old 5.2.0-english folder).

When I browse to localhost, the error list is longer, and I'm also seeing 3 of these:

Deprecated: version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated in C:\wamp64\scripts\wampserver.lib.php on line 1402

Note that there are lots of different line numbers for the undefined array key: 1357 through 1366 in wampserver.lib.php, as well as the version_compare issues

Options: ReplyQuote
Re: Undefined offset
Posted by: fullstackdev (---.ded.execulink.com)
Date: January 24, 2023 04:14PM

...I've updated Adminer and Phpsysinfo as well, still the same issues

Options: ReplyQuote
Re: Undefined offset
Posted by: Otomatic (Moderator)
Date: January 24, 2023 04:32PM

Hi,

- Exit Wampserver

- Delete all files in wamp64/alias/

- Delete all files or folder in wamp64/apps/

Both folders must be completely empty.

Note: alias and apps must be in lower case and not as you wrote before: wamp64/Alias and wamp64/Apps

Launch Wampserver to see if errors

Exit Wampserver

Install : phpmyadmin 5.2.0, adminer and phpsysinfo from the links given before

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

Options: ReplyQuote
Re: Undefined offset
Posted by: fullstackdev (---.ded.execulink.com)
Date: January 24, 2023 04:50PM

-The folder names were lowercase, my error on uppercasing them
-I emptied the folders, exited and restarted. Apache errored out, the other 2 started. Apache errors:

The service 'wampapache64' is NOT started
EXIT error code:1066
Help message for error code 1066 is:The service has returned a service-specific error code.
>>> httpd.exe: Syntax error on line 595 of C:/wamp64/bin/apache/apache2.4.48/conf/httpd.conf: Include/IncludeOptional: No matches for the wildcard '*.conf' in 'C:/wamp64/alias', failing .
>>> httpd.exe: Syntax error on line 595 of C:/wamp64/bin/apache/apache2.4.48/conf/httpd.conf: Include/IncludeOptional: No matches for the wildcard '*.conf' in 'C:/wamp64/alias', failing .

-I exited Wamp, re-downloaded and installed all 3 (this time I chose "replace" for phpMyAdmin 5.2.0...and voila..all errors gone. Many thanks!

Options: ReplyQuote


Sorry, only registered users may post in this forum.