admin interface 'incomplete' post upgrade,blog not displayin

Found a bug? Tell us!!
subgeometer
Regular
Posts: 14
Joined: Thu Mar 05, 2009 4:39 am

admin interface 'incomplete' post upgrade,blog not displayin

Post by subgeometer »

I apologize for the length of this post

As a favour, I agreed to help in upgrading a local political reps blogs which had been using ancient blogware to current versions after security on the old versions had been compromised and they had been taken offline by the server webmaster. This involved a serendipity install to be upgraded from 0.7 to 1.4.1 as well as a wordpress installation. Both are using the same (mysql)database.
I don't have any kind of root access to the server or to any apache logs, but I can ssh in as the owner of the files in the blogs etc
The wordpress upgrade proceeded smoothly and without problems

for the serendipity install I upgraded following instructions at s9y.org - the only glitch being that I misread the instruction about setting the version to the old version number in serendipity_config.local.inc.php, and I set it to the new version instead. So the upgrade didn't work until I'd carefully recopied all the new files into place and reset the the version to the old version, and then changed the permissions to world writeable on some files the upgrade page complained about. At this point I was able to proceed with completing the upgrade.But the main pane of the blog doesn't display except for the header and a link list. And the admin interface is missing many of controls I would be expecting from the documentation, in particular those relating to templates and plugins. (page source below)

The blog is a "Councillor Diary" which loads from diary.php, which contains some wrapper html and php boilerplate to display $blog_data. The copy of serendipity looks like it hasn't been much customized(a diff with the original tarred code package I found on the server follows)- and the main pane seems to have loaded from code in templates/default/layout.php.

I'm not familiar with php code, though I write python and C++, so I get some inkling of what the code is about: displaying elements of the blog according to various switches - like gui code.Anyway I read about how after the upgrade from s9y-0.7 to 0.8, the new procedure is to include such code in config.inc.php. After fixing the include filenames I did so with some limited results(the first few lines -wrapped in <div id="serendipity_banner"> do now display. - So perhaps I'm on the right track, but I don't really want to be forever hacking about on someone else's live web server)

The rest, a <table id="mainpane"> is still nowhere - I guess because bulletproof doesn't have an element of the name "mainpane". - Bulletproof is the template I inherited with the upgrade -I think because the old setup used 'default'

My first choice would simply be to keep the original code (mainpane and so on). so the page is as similar to the old layout as possible. But it seems like I need a "complete" admin interface to fix the installation - even if only to change to a template using "mainpane" as an id. Or would using some other id for the table make bulletproof use it. Am I barking up the wrong tree?

Or Would it be best to import the entries/db into a reinstallation of serendipity and recreate the blog .

Any suggestions would be much appreciated.

thankyou
John O'Driscoll

#########
page source generated for serendipity/admin
#######################
<html>
<head>
<!-- ADMIN-ENTRY TEMPLATE: index.tpl START -->
<title>Serendipity Administration Suite</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="http://www.socialistpartyaustralia.org/ ... _admin.css" />
<link rel="stylesheet" type="text/css" href="/council/serendipity/templates/default/admin/pluginmanager.css" />

<script type="text/javascript">

function spawn() {
if (self.Spawnextended) {
Spawnextended();
}

if (self.Spawnbody) {
Spawnbody();
}

if (self.Spawnnugget) {
Spawnnugget();
}
}

function SetCookie(name, value) {
var today = new Date();
var expire = new Date();
expire.setTime(today.getTime() + (60*60*24*30*1000));
document.cookie = 'serendipity[' + name + ']='+escape(value) + ';expires=' + expire.toGMTString();
}

function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}


</script>


</head>

<body id="serendipity_admin_page" onload="spawn()">
<table cellspacing="0" cellpadding="0" border="0" id="serendipityAdminFrame">

<tr>
<td colspan="2" id="serendipityAdminBanner">
<h1>Serendipity Administration Suite</h1>
<h2>Councillor blog</h2>

</td>
</tr>
<tr>
<td colspan="2" id="serendipityAdminInfopane">
<span>Logged in as steve (Standard editor)</span>
</td>
</tr>

<tr valign="top">

<td id="serendipitySideBar">

<ul class="serendipitySideBarMenu serendipitySideBarMenuMain">
<li class="serendipitySideBarMenuHead serendipitySideBarMenuMainLinks" style="display:none"></li>
<li class="serendipitySideBarMenuLink serendipitySideBarMenuMainLinks serendipitySideBarMenuMainFrontpage"><a href="serendipity_admin.php">Frontpage</a></li>
<li class="serendipitySideBarMenuLink serendipitySideBarMenuMainLinks serendipitySideBarMenuMainPersonal"><a href="serendipity_admin.php?serendipity[adminModule]=personal">Personal Settings</a></li>
<li class="serendipitySideBarMenuFoot serendipitySideBarMenuMainLinks" style="display:none"></li>
</ul>

<br class="serendipitySideBarMenuSpacer" />

<ul class="serendipitySideBarMenu serendipitySideBarMenuEntry">
<li class="serendipitySideBarMenuHead serendipitySideBarMenuEntryLinks">Entries</li>
<li class="serendipitySideBarMenuLink serendipitySideBarMenuEntryLinks"><a href="serendipity_admin.php?serendipity[adminModule]=entries&serendipity[adminAction]=new">New Entry</a></li>
<li class="serendipitySideBarMenuLink serendipitySideBarMenuEntryLinks"><a href="serendipity_admin.php?serendipity[adminModule]=entries&serendipity[adminAction]=editSelect">Edit Entries</a></li>


<li class="serendipitySideBarMenuLink serendipitySideBarMenuEntryLinks"><a href="serendipity_admin.php?serendipity[adminModule]=category&serendipity[adminAction]=view">Categories</a></li>

<li class="serendipitySideBarMenuFoot serendipitySideBarMenuEntryLinks" style="display:none"></li>

</ul>

<ul class="serendipitySideBarMenu serendipitySideBarMenuMedia">
<li class="serendipitySideBarMenuHead serendipitySideBarMenuMediaLinks">Media</li>
<li class="serendipitySideBarMenuLink serendipitySideBarMenuMediaLinks"><a href="serendipity_admin.php?serendipity[adminModule]=media&serendipity[adminAction]=addSelect">Add media</a></li>
<li class="serendipitySideBarMenuLink serendipitySideBarMenuMediaLinks"><a href="serendipity_admin.php?serendipity[adminModule]=media">Media library</a></li>
<li class="serendipitySideBarMenuFoot serendipitySideBarMenuMediaLinks" style="display:none"></li>
</ul>




<br class="serendipitySideBarMenuSpacer" />
<ul class="serendipitySideBarMenu serendipitySideBarMenuLogout">
<li class="serendipitySideBarMenuHead serendipitySideBarMenuLogoutLinks" style="display:none"></li>
<li class="serendipitySideBarMenuLink serendipitySideBarMenuLogoutLinks serendipitySideBarMenuLogoutWeblog"><a href="http://www.socialistpartyaustralia.org/ ... ity/">Back to Weblog</a></li>
<li class="serendipitySideBarMenuLink serendipitySideBarMenuLogoutLinks serendipitySideBarMenuLogoutLogout"><a href="serendipity_admin.php?serendipity[adminModule]=logout">Logout</a></li>
<li class="serendipitySideBarMenuFoot serendipitySideBarMenuLogoutLinks" style="display:none"></li>
</ul>

</td>

<td class="serendipityAdminContent">

<div class="further_links">
<p class="further_links_head">Further Links</p>
<ul>
<li><a href="http://www.s9y.org/">Serendipity Homepage</a></li>
<li><a href="http://www.s9y.org/33.html">Serendipity Documentation</a></li>
<li><a href="http://blog.s9y.org/">Official Blog</a></li>
<li><a href="http://www.s9y.org/forums/">Forums</a></li>
<li><a href="http://php-blog.sf.net/">Spartacus</a></li>

<li><a href="javascript:bm=document.selection?document.selection.createRange().text:document.getSelection();void(newwin=open('http://www.socialistpartyaustralia.org/ ... [title]='+ escape(document.title) + '&serendipity[body]=' + escape(bm) +'&serendipity[url]=' + escape(location.href), 'new_log_entry','resizable=yes, scrollbars=yes, width=800, height=600, location=yes,status=yes')); newwin.focus();" onclick="alert('Bookmark this link and then use it on any page you want to blog about to quickly access your Serendipity Blog.'); return false;" title="Bookmark this link and then use it on any page you want to blog about to quickly access your Serendipity Blog.">Bookmarklet</a></li>
</ul>
<p class="further_links_foot" style="display: none"></p>
</div>
<h3 class="serendipityWelcomeBack">Welcome back, steve</h3>

</td>
</tr>
</table>
<div class="serendipityAdminFooterSpacer">
<br />

</div>
<div id="serendipityAdminFooter">
<span>Powered by Serendipity 1.4.1 and PHP 5.2.8</span>
</div>
</body>
<!-- ADMIN-ENTRY TEMPLATE: index.tpl END -->
</html>





**************************************************************
Diff of the original install against a virgin copy of serendipity(the tar.gz archive found with the installation

output from:(mysql user&passwd info has been edit out)
##############
$ diff -ur /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity /home/johno/Desktop/socialistpartyaustralia/software_versions/serendipity-0.7_server_version/serendipity

Only in /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity: archives
Only in /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity: diary.php
Only in /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity: .htaccess
diff -ur /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity/lang/serendipity_lang_en.inc.php /home/johno/Desktop/socialistpartyaustralia/software_versions/serendipity-0.7_server_version/serendipity/lang/serendipity_lang_en.inc.php
--- /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity/lang/serendipity_lang_en.inc.php 2009-02-16 14:00:19.000000000 +1100
+++ /home/johno/Desktop/socialistpartyaustralia/software_versions/serendipity-0.7_server_version/serendipity/lang/serendipity_lang_en.inc.php 2004-10-21 02:27:25.000000000 +1000
@@ -522,7 +522,7 @@
@define('CALENDAR_BOW_DESC', 'The day of the week that should be considered the beginning of the week. Default is Monday');
@define('SUPERUSER', 'Blog Administration');
@define('ALLOWS_YOU_BLAHBLAH', 'Provides a link in the sidebar to your blog administration');
-@define('CALENDAR', 'Entries');
+@define('CALENDAR', 'Calendar');
@define('SUPERUSER_OPEN_ADMIN', 'Open administration');
@define('SUPERUSER_OPEN_LOGIN', 'Open login screen');
@define('INVERT_SELECTIONS', 'Invert Selections');
diff -ur /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity/serendipity_config.inc.php /home/johno/Desktop/socialistpartyaustralia/software_versions/serendipity-0.7_server_version/serendipity/serendipity_config.inc.php
--- /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity/serendipity_config.inc.php 2009-02-16 14:00:19.000000000 +1100
+++ /home/johno/Desktop/socialistpartyaustralia/software_versions/serendipity-0.7_server_version/serendipity/serendipity_config.inc.php 2004-11-08 19:55:08.000000000 +1100
@@ -113,26 +113,12 @@
* Make sure that the file included is in the current directory and not any possible
* include path
*/
-// echo('1me');
if (file_exists($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php')) {
- //echo('2me'.$_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php');
- // include_once($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php');
- $serendipity['versionInstalled'] = '0.7';
- $serendipity['dbName'] = 'XXXXXXXXXpartyXXXXXXXXX';
- $serendipity['dbPrefix'] = 'serendipity_';
- $serendipity['dbHost'] = 'localhost';
- $serendipity['dbUser'] = 'XXXXXpartyXX';
- $serendipity['dbPass'] = 'XXXXXXXXX';
- $serendipity['dbType'] = 'mysql';
+ include_once($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php');
} elseif (file_exists($serendipity['serendipityPath'] . '/serendipity_config_local.inc.php')) {
-//echo('3me');
include_once($serendipity['serendipityPath'] . '/serendipity_config_local.inc.php');
-} elseif (file_exists(S9Y_INCLUDE_PATH . '/serendipity_config_local.inc.php')) {
-//echo('4me');
+} else {
include_once(S9Y_INCLUDE_PATH . '/serendipity_config_local.inc.php');
-}else{
-//echo('5me');
- include_once('/home/httpd/html/socialistpartyaustralia/council/serendipity/serendipity_config_local.inc.php');
}

/*
Only in /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity: serendipity_config_local.inc.php
diff -ur /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity/serendipity_functions.inc.php /home/johno/Desktop/socialistpartyaustralia/software_versions/serendipity-0.7_server_version/serendipity/serendipity_functions.inc.php
--- /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity/serendipity_functions.inc.php 2009-02-16 14:00:18.000000000 +1100
+++ /home/johno/Desktop/socialistpartyaustralia/software_versions/serendipity-0.7_server_version/serendipity/serendipity_functions.inc.php 2004-11-04 20:32:16.000000000 +1100
@@ -1243,9 +1243,7 @@
echo implode(', ', $cats);
}

- echo ' ' . AT . ' <a href="' . $entryLink . '">' . date('H:i', $entry['timestamp']) . '</a></div>'. "\n";
-
- /*
+ echo ' ' . AT . ' <a href="' . $entryLink . '">' . date('H:i', $entry['timestamp']) . '</a>'. "\n";

if (serendipity_db_bool($entry['allow_comments']) || !isset($entry['allow_comments']) || $entry['comments'] > 0) {
if (!isset($serendipity['GET']['id'])) {
@@ -1283,12 +1281,9 @@
if (!empty($entry['add_footer'])) {
echo $entry['add_footer'];
}
- */
?>
- </div>
+ </div>
</div>
- <?php
- /*
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
@@ -1300,8 +1295,6 @@
dc:identifier="<?php echo serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL'); ?>" />
</rdf:RDF>
-->
- */
- ?>
<?php
$eventData = array_merge(array('display_dat' => ''), $entry);
serendipity_plugin_api::hook_event('frontend_display:html:per_entry', $eventData);
@@ -1340,13 +1333,13 @@
if (!$serendipity['enablePopup']) {
$tbu = $serendipity['baseURL'] . 'comment.php?type=trackback&entry_id=' . (int)$entry['id'];
?>
- <!-- <div class="serendipity_comments">
+ <div class="serendipity_comments">
<br />
<a id="trackbacks"></a>
<div class="serendipity_commentsTitle"><?php echo TRACKBACKS; ?></div>
- <div class="serendipity_center"><a style="font-weight: normal" href="<?php echo $tbu; ?>" onclick="alert('<?php echo htmlentities(TRACKBACK_SPECIFIC_ON_CLICK) ?>'); return false;" title="<?php echo htmlentities(TRACKBACK_SPECIFIC_ON_CLICK) ?>"><?php echo TRACKBACK_SPECIFIC; ?></a></div><br />-->
+ <div class="serendipity_center"><a style="font-weight: normal" href="<?php echo $tbu; ?>" onclick="alert('<?php echo htmlentities(TRACKBACK_SPECIFIC_ON_CLICK) ?>'); return false;" title="<?php echo htmlentities(TRACKBACK_SPECIFIC_ON_CLICK) ?>"><?php echo TRACKBACK_SPECIFIC; ?></a></div><br />
<?php
- // serendipity_printTrackbacks(serendipity_fetchTrackbacks($entry['id']));
+ serendipity_printTrackbacks(serendipity_fetchTrackbacks($entry['id']));
?>
</div>
<?php } ?>
Only in /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity: spamblock.log
Only in /home/johno/Desktop/socialistpartyaustralia/socialists_www__backup_pre/council/serendipity: uploads
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by garvinhicking »

Hi!

Indeed the s9y version was ancient. :-)

The old site used a mechanism called "embedding", which is a fairly special method for using Serendipity - usually, only professional programmers used this feature.

So actually, I suggest to invest some time and energy, to get rid of that old embedding. Since Serendipity 0.8 supports easy templating, the "embed" method is really only used in very rare edge-case secnarios.

Now for that to happen, you would first need to get the blog itself functional. It seems the admin page should render fine for you - there you should try to click on the "Configuration" item inside the "Administration" area. There you should find an option called "Embedding" that you should turn off. Also set the "index file name" to "index.php".

Once you have that, you should see the usual blog content again, but in a different layout.

Now to get the layout you had in your old serendipity installation, you should:

1. Create a custom template, by creating a directory like "templates/socialist/". Inside that directory, you could simply copy the files "index.tpl", "style.css" and "info.txt" from "/templates/default/". This will be the framework of your new template. We will not be using the bulletproof template as a starting point, because it is not so easy to adapt and has much more functionality you probably won't need to restore your old layout.

2. Now that you have your "own" template, edit the "info.txt" file of yours. Insert some phantasy name of your new template inside there.

3. Now you can go to the s9y admin panel again, choose "Styles" and there you enable your own template - you can find it by searching for the phantasy name you assigned to it.

4. Now for the modification: You will need to edit the index.tpl template file to insert the HTML you previously had in your diary.php file. If you want to use custom PHP code, you can enable custom PHP code for smarty templates by creating a "config.inc.php" file in your /templates/socialist/ directory, and insert:

Code: Select all

<?php
$serendipity['smarty']->security = false;
This sounds more dangerous than it is: It simply allows you to use {php}...{/php} within .tpl smarty files to use any PHP you want, including "include" statements.

If that is too hard for you, maybe you can show us the contents of your "diary.php" file. This is what contained the previous logic to change the display.

Please also note that this is only getting so "hard" due to the use of the professional "embed" mechanism. If you were using a serendipity-delivered template instead of a customized one, all this hassle wouldn't have been necessary. :-)

Don't hesitate to ask here, if you have more questions.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
subgeometer
Regular
Posts: 14
Joined: Thu Mar 05, 2009 4:39 am

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by subgeometer »

Garvin,

thankyou for your informative reply.

I'll follow your suggestions - doing things the simple way. I'm not in the long run responsible for this site, which is run essentially by a volunteer or two who can't be expected to have 'professional programming skills', even if I have them myself - not sure about that one, not with php anyway. This problem arose because someone didn't hang around -or leave documentation- to maintain their programming

I'll let you know how I go, posting any issues that might arise.

Thanks again

John O'Driscoll
subgeometer
Regular
Posts: 14
Joined: Thu Mar 05, 2009 4:39 am

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by subgeometer »

I've just been to the admin page again, but the sections you mention aren't present - ie the administartion tab and the embedding etc. There are many tab I have seen in screen shots on the net which are not there(and not in the page source in the first posting). - I have atta
the admin interface front page
the admin interface front page
Screenshot.jpg (59.76 KiB) Viewed 31505 times
ched a screenshot

The links that are there do work. Is there something I'm missing in terms of getting other tabs to display.

Could it be that the user I am logged in as does not have 'admin' rights, so only a subset of controls(those relating to content rather than form) are present?(there is at least one other user account, so I'm trying to get hold of its details to see if I can do anything as 'andrew').

Otherwise is there maybe a few script arguments I can pass with the admin url to get me where I need to go, you know '?topic=embedding&action=config' and so on.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by judebert »

Yes, it looks like you are a Standard Editor, as opposed to an Administrator. You need to be an Administrator to access the blog configuration.

Even if you have the correct URL, Serendipity will not respond to your request unless you have the appropriate permissions.

It's likely the other account is an Administrator. It is possible, however, to remove all administrative privileges from all accounts. In this case, you'll need access to the database to reinstate privileges for at least one account.
Judebert
---
Website | Wishlist | PayPal
subgeometer
Regular
Posts: 14
Joined: Thu Mar 05, 2009 4:39 am

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by subgeometer »

Sorry for my ignorance.

It seems that the serendipity administrator password is lost. Gone overseas with the original installer of the blog

Given that situation is there any way, with the the db password, which I do have, that I can establish an administrator account and get the site functional again, or will I have to get the entries out of the database through the standard editor account, and reenter them into some new setup?

Thankyou

John O'Driscoll
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by garvinhicking »

Hi!

What you could do is this: Create a "recover.php" file in the s9y directory, with this code:

Code: Select all

<?php
include 'serendipity_config.inc.php';
$username = 'driscoll';
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors SET userlevel = 255 WHERE username = '$username'");
Then call it via http://yourblog-url/recover.php - this will then set the user "driscoll" to be an admin. Please change the blogurl and the $username variable to your specific settings.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
subgeometer
Regular
Posts: 14
Joined: Thu Mar 05, 2009 4:39 am

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by subgeometer »

Garvin,

thanks for your advice, which seems to have worked, but not with the outcome I had hoped for. I put the file recovery.php onto the server and ran it from a browser. I then went to the administrative page and successfully logged in as Steve, who is now acknowledged as an administrator in the top right corner welcome.

But this is the only change I can see in the page. The tabs available are just as they were before when logged in as a standard editor. As such nothing form related is available and I'm as stuck as ever.

Has serendipity somehow to be told to fully update its configuration? The people I am trying to help are getting impatient to get their blog, or at least it's content back, and I'm keen not to have to copy out all those -many- entries manually or somehow deal with a dump out of mysql.

Thanks again for your patient assistance

johno
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by garvinhicking »

Hi!

Then it might be that some other settings have been made to withdraw you from privileges.

Modify the PHP code to this:

Code: Select all

<?php
include 'serendipity_config.inc.php';
$username = 'driscoll';
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors SET userlevel = 255, right_publish = 1 WHERE username = '$username'");
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}config SET value = '0' WHERE name = 'no_create'");
This will set two flags to give your driscoll user full privileges, and the second flag will set ALL USERS (since I don't know your userid) to be able to have no login restrictions. If your blog has used self-created authors, this might enable users to do more than they were allowed previously; in this case you need to figure out the authorid of your user and then change the last command to

Code: Select all

serendipity_db_query("UPDATE {$serendipity['dbPrefix']}config SET value = '0' WHERE name = 'no_create' AND authorid = X");
The people I am trying to help are getting impatient to get their blog, or at least it's content back
We can happily try to help you, but only at the speed in which you reply. It's taken 8 days, so if you answer earlier, we might be able to close this down faster. ;)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
subgeometer
Regular
Posts: 14
Joined: Thu Mar 05, 2009 4:39 am

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by subgeometer »

Sorry Garvin, to get shirty

I can only do as I have internet access(Australia is a bit backward in that regard), and in between various other undertakings.

Anyway, I ran the modified script you supplied, with still no joy - nothing has changed

Any suggestions

Johno
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by garvinhicking »

Hi!
I can only do as I have internet access(Australia is a bit backward in that regard), and in between various other undertakings.
Okay, I understand. :)
Anyway, I ran the modified script you supplied, with still no joy - nothing has changed
And you did replace the "X" with your real authorid?

What result do you get if you execute those queries in phpMyAdmin:

Code: Select all

SELECT * FROM serendipity_config WHERE authorid = X;
(replace serendipity_ with your actual database table prefix, and X with the ID of your author)

and

Code: Select all

SELECT * FROM serendipity_authors WHERE authorid = X;
If you are having difficulties with understand that, the only thing left for me is to offer you to have a look at it, if you can PM/mail me the FTP data to your site, then I can fix the privileges.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
subgeometer
Regular
Posts: 14
Joined: Thu Mar 05, 2009 4:39 am

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by subgeometer »

I did set the username to the appropriate value.

As the are only the lost admin account and the author account I have been using are the only ones I used the first generalised version.

Phpmyadmin does not appear to be available on the server(at least under the names phpmyadmin and phpMyAdmin)

This is the text of the script I used:


<?php
include 'serendipity_config.inc.php';
$username = 'steve';
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors SET userlevel = 255, right_publish = 1 WHERE username = '$username'");
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}config SET value = '0' WHERE name = 'no_create'");

Perhaps I'm backward, and I appreciate your assistance, but let's not get nasty, or imagine criticism where it is not

thankyou
Johno
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by garvinhicking »

Hi!

Okay, if phpMyAmdin is not accessible, let's try to get some information about the custom PHP script. Can you please modify it to this:

Code: Select all

<?php
include 'serendipity_config.inc.php';
$username = 'steve';

$auth = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}authors WHERE username = '$username'");
print_r($auth);

foreach($auth AS $idx => $author) {
  print_r(serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}config WHERE authorid = '" . $author['authorid'] . '"););
}

serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors SET userlevel = 255, right_publish = 1 WHERE username = '$username'");
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}config SET value = '0' WHERE name = 'no_create'");
When you now execute the code, you should get some output prior to that which holds the Author-ID of that username and some more information about him. When I can get that output, I can see the Author-ID, and then also which configuration values are active for that user. I hope this can get us further. :-)
but let's not get nasty
No problems on my side here. :-)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
subgeometer
Regular
Posts: 14
Joined: Thu Mar 05, 2009 4:39 am

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by subgeometer »

Garvin,

Unfortunately the script returns a parse error as follows

Parse error: syntax error, unexpected T_STRING in /home/httpd/html/socialistpartyaustralia/council/serendipity/recovery2.php on line 12

I simply copied it directly to a text editor, so I don't think I inadvertently changed something. I'll attach the text to be sure

Anyway, it's always somehow reassuring to see output.

Thanks again for your help

Johno


<?php
include 'serendipity_config.inc.php';
$username = 'steve';

$auth = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}authors WHERE username = '$username'");
print_r($auth);

foreach($auth AS $idx => $author) {
print_r(serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}config WHERE authorid = '" . $author['authorid'] . '"););
}

serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors SET userlevel = 255, right_publish = 1 WHERE username = '$username'");
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}config SET value = '0' WHERE name = 'no_create'");
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: admin interface 'incomplete' post upgrade,blog not displayin

Post by garvinhicking »

Hi!

I'm sorry, there indeed was a ";" too much in the code. Please try this one instead:

Code: Select all

    <?php
    include 'serendipity_config.inc.php';
    $username = 'steve';

    $auth = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}authors WHERE username = '$username'");
    print_r($auth);

    foreach($auth AS $idx => $author) {
      print_r(serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}config WHERE authorid = '" . $author['authorid'] . '"));
    }

    serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors SET userlevel = 255, right_publish = 1 WHERE username = '$username'");
    serendipity_db_query("UPDATE {$serendipity['dbPrefix']}config SET value = '0' WHERE name = 'no_create'");
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply