Page MenuHomePhabricator

Warning: Invalid argument supplied for foreach() in ...includes/User.php on line 94
Closed, InvalidPublic

Description

Author: ardentimothy

Description:
I have set up LocalSettings.php. When I access Index.php
in a browser the message (below) comes up. I have tried
deleting all the wiki files and uploading the original
files, but after setting up the LocalSettings.php again,
it still comes up with the message (below).


$IP = "/public_html"; if ( ! isset( $DP ) ) { $DP = $IP; }
include_once( "$DP/DefaultSettings.php" ); $wgSitename

"SpongeBob SquarePants Wiki"; $wgScriptPath

"/home/sbspwiki/public_html"; $wgScript

""/home/sbspwiki/public_html/index.php";

$wgRedirectScript

"/home/sbspwiki/public_html/redirect.php";

$wgArticlePath = "/home/sbspwiki/public_html/index.php/
$1"; $wgEmergencyContact = "admin@sbspwiki.tk";
$wgPasswordSender = "admin@sbspwiki.tk"; $wgDBserver

"localhost"; $wgDBname = "sbspwiki_Wiki"; $wgDBuser

"Rainer"; $wgDBpassword = "[--password--]"; $wgDBsqluser

"sbspwiki_Rainer "; $wgDBsqlpassword = "[--password--]";

$wgDBminWordLen = 3; $wgDBmysql4 = true;
$wgEnablePersistentLC = true; $wgUseDatabaseMessages =
false; $wgUseImageResize = true; $wgWhitelistEdit = true;
Warning: Invalid argument supplied for foreach()
in /home/sbspwiki/public_html/includes/User.php on line 94

Warning: Invalid argument supplied for foreach()
in /home/sbspwiki/public_html/includes/User.php on line 94

Warning: Invalid argument supplied for foreach()
in /home/sbspwiki/public_html/includes/User.php on line 94



Version: 1.3.x
Severity: blocker
OS: Windows XP
Platform: PC

Details

Reference
bz1078

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:01 PM
bzimport set Reference to bz1078.
bzimport added a subscriber: Unknown Object (MLST).

Your LocalSettings.php seems to be badly corrupt, and is missing the <?php ... ?> tags which tell the PHP interpreter that it is
code, not data. You should correct this immediately, as it contains a plaintext database password. Depending on your system
configuration, this could be a serious security breach for you.

Normally you should not create LocalSettings.php by hand, but would use the one created by the installer.

ardentimothy wrote:

(In reply to comment #1)

Your LocalSettings.php seems to be badly corrupt, and is missing

the <?php ... ?> tags which tell the PHP interpreter that it is

code, not data. You should correct this immediately, as it

contains a plaintext database password. Depending on your system

configuration, this could be a serious security breach for you.
Normally you should not create LocalSettings.php by hand, but

would use the one created by the installer.

When I first installed MediaWiki, following instructions, the
LocalSettings file didn't get made, so I searched Google and found
somewhere that showed how to do it. Anyway what do you mean by
putting <?php ... ?> Where do I put them.

(In reply to comment #2)

When I first installed MediaWiki, following instructions, the
LocalSettings file didn't get made,

Try 1.4beta2. Most old install problems are likely fixed.

so I searched Google and found
somewhere that showed how to do it.

Well, you didn't follow all the directions or else the directions were wrong. Also you need to confirm that the database was set
up, or you'll have to do it manually.

Anyway what do you mean by putting <?php ... ?> Where do I put them.

Around the whole file. Look at all the other .php files.

ardentimothy wrote:

OK, I have uploaded 1.4beta2 MediaWiki, and opened up Index.php. The
LocalSettings file still doesn't exist. Maybe I am not making it
writable. To make sure I am doing it write - How do I make it writable?

bugzilla_wikipedia_org.to.jamesd wrote:

Please read the installation and upgrade instructions which come as part of the
package. When you have done that, make a backup of your data (see the MySQL
backup instructions at MySQL.com). Finally, follow the instructions. If you have
problems after that please report the exact error messages you encounter.

ardentimothy wrote:

(In reply to comment #5)

Please read the installation and upgrade instructions which come

as part of the

package. When you have done that, make a backup of your data (see

the MySQL

backup instructions at MySQL.com). Finally, follow the

instructions. If you have

problems after that please report the exact error messages you

encounter.

I haven't got any data that needs to be backed up. I have uploaded
1.4beta2, how do I fix the problem of the LocalSettings file not
getting created?

Since you cannot describe what you've done, provide what error
messages you encountered in the installation, or list the installation
information which the installer requests that you provide when asking
for help, there is nothing we can do to help you.

Please read the documentation, follow the directions in detail, and if you
still have problems send a post to the mediawiki-l list describing,
exactly, in detail, what steps you followed, what problems and error
messages you encountered, and how, exactly, your results differed from
the expected results. You will provide some details of your server's
configuration, and you will list which instructions you have followed or
diverged from, exactly.

If you do not do these things, I can guarantee that we will never be able
to provide you with any help beyond asking you to educate
yourself, follow the directions, and provide detailed diagnostic
information if something goes wrong.

This bug report is CLOSED, since the problem is one you created yourself
by not following the directions and randomly doing things without any
understanding of what you were doing.

ardentimothy wrote:

(In reply to comment #7)

Since you cannot describe what you've done, provide what error ...

Well it is fixed now so I don't need any more help, thank you.