>>
Site Map
>>
Forums
>>
PHP-Nuke Common Problems & Solutions
Forum module - topics in forum:
PHP-Nuke Common Problems & Solutions - <font color=red>Look Here First For Your Problems And Get Their Solutions.</font><br><br>See also <a href="http://phpnuke-uk.net/modules.php?name=PHP-Nuke_HOWTO&page=common-installation-problems.html"><b>this</b></a> section of the phpnuke howto.<br>
Site broken due to Theme error
---- The Error
- You cant access your site due to a theme error of some kind
---- The Reason
- There is a problem with one of the theme files and if its in the themeheader() function you will only see the error as the site cant fully parse itself. Because of this you cant get into the Admin section or Your Account to select another theme that works.
---- The Solution
- Please Note: Backup your database before you use this code. You have been Warned!!!
- Create a file called fixtheme.php and place the following code in it:
| Code: : |
<?PHP
/* ------------------------------------------------------------------------------- */
require("config.php");
$host = $dbhost;
$database = $dbname;
$username = $dbuname;
$password = $dbpass;
$def_theme = "NukeNews"; // -< Change This If you Want to Select A Different Theme
mysql_connect($host, $username, $password);
@mysql_select_db($database);
/* Begin the Install ------------------------------------------------------------- */
mysql_query("update ".$prefix."_config set Default_Theme='$def_theme'");
?> |
If you don't have the NukeNews theme uploaded in your site then change the value for $def_theme = "Insert_Theme_Name_Here"; so that it reflects one of your working themes.
- Save the file and upload it to your sites root directory.
- Point your browser to http://yoursite.com/fixtheme.php
- IMPORTANT: Make sure that you delete the fixtheme.php file from you server once you are finished as someone else could run the file and change your default theme
---- Still Not Working
- If you find that you are still having problems and cant get this solution to work please post up your specific problem in the Theme Forum, stating that you have tried this Solution and we will try to help

Added Poll