News:

Join the Facebook Fan Page.

Main Menu

Error - Undefind Variable

Started by winter4w, June 18, 2013, 03:08:56 AM

Previous topic - Next topic

winter4w

Hello when I try to go on my website www.animalcraft.cu.cc [nofollow] I get this error. Can someone tell me on how to go fix it




Notice: Undefined variable: boarddir in /home/mcanimal/public_html/animalcraft.cu.cc/index.php on line 46

Notice: Undefined variable: sourcedir in /home/mcanimal/public_html/animalcraft.cu.cc/index.php on line 50

Warning: require_once(/QueryString.php) [function.require-once]: failed to open stream: No such file or directory in /home/mcanimal/public_html/animalcraft.cu.cc/index.php on line 50

Fatal error: require_once() [function.require]: Failed opening required '/QueryString.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mcanimal/public_html/animalcraft.cu.cc/index.php on line 50

Burke ♞ Knight


live627

Settings.php is ******ed up.

Shambles

Quote
Settings.php is ******ed up.

Empty, blank and devoid of content too  8)



Topic title could do with a little work as well  ::)

kat

#4
Got a file named:

Settings_bak.php  ???

If so, try downloading it, renaming it to:

Settings.php

then uploading it, overwriting what you have.

MrPhil

DO NOT RENAME Settings_bak.php EVER! COPY it over the blank (empty) Settings.php. That way you still have the backup copy in case Settings.php gets hosed again (which is quite possible).

You had multiple database errors close together in time, and due to a horrendous bug in SMF (which the developers have stated that they will never fix, even though I told them YEARS ago how to fix it), it emptied out your Settings.php file. Hopefully you have a good backup, either in Settings_bak.php or in a site backup. Otherwise, you will have to re-create it from scratch (using repair_settings.php to help fill it in).

Kindred

ummm....   excuse me - when did the developers state that "they will never fix" it?
And once again, since you have a fix, please, feel free to drop it into the 2.1 repository on GitHub
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori

actually it is fixed already in 2.1 there is a db_last_error.php with the contents

<?php
$db_last_error 
0;
?>

MrPhil

That sounds like the fix I suggested years ago. Hopefully they rewrite ONLY that little file, and include it from Settings.php? And I hope they got rid of that silly "empty file first", which was a fix for an ancient UNIX server, but introduced a race condition.

Illori

the settings.php file would not be touched to update the db error time stamp.

winter4w

Ok I tried copying the settings_ba.pcp to settings.php yet no fix is there any way I can keep my post and topics and users all saved I do have a backup of the database

MrPhil

If your Settings_bak.php had the wrong settings (database connection, path, URL, etc.), you would have to fix them before proceeding. Did you recently make any major changes to the forum or database? Did someone modify Settings_bak.php and maybe put in wrong information? There should be nothing wrong with the database itself, so don't panic.

winter4w

Quote from: MrPhil on June 18, 2013, 06:21:19 PM
If your Settings_bak.php had the wrong settings (database connection, path, URL, etc.), you would have to fix them before proceeding. Did you recently make any major changes to the forum or database? Did someone modify Settings_bak.php and maybe put in wrong information? There should be nothing wrong with the database itself, so don't panic.
No I did no changes at all but when I open the settings.php and setting_bak.php they are blank

MrPhil

Ah, if the backup was bad, do you have another backup (Settings.php from your most recent backup)? If you can't find a good backup anywhere, you'll have to rebuild Settings.php from a clean copy (install package). You have to manually edit it to fill in as much as you can, and may be able to finish up with repair_settings.php. That'll learn ya not to have backups! When it's all working again, make the file Read-Only (444 on Linux).

winter4w

Quote from: MrPhil on June 18, 2013, 09:03:34 PM
Ah, if the backup was bad, do you have another backup (Settings.php from your most recent backup)? If you can't find a good backup anywhere, you'll have to rebuild Settings.php from a clean copy (install package). You have to manually edit it to fill in as much as you can, and may be able to finish up with repair_settings.php. That'll learn ya not to have backups! When it's all working again, make the file Read-Only (444 on Linux).

I did find a old backup but I still get an error

Kindred

if so, then your settings.php file is STILL not correct.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

winter4w

Quote from: Kindred on June 20, 2013, 12:36:54 AM
if so, then your settings.php file is STILL not correct.

Ok I will contact my web host and see if the info is right I will post back with a anser

MrPhil

The backup (Settings_bak.php, or Settings.php from a file backup) is bad if it's also empty (0 size).

Advertisement: