Page 2 of 4

same hiawatha, same config

Posted: Mon 17 Jun 2013, 07:15
by Dromeno
I have just compared the hiawatha settings in lucid puppy 528005 (there both pplog and efiabruni's version work) to the situation in carolina. The hiawatha's are the same, the config file is also the same. Same for permissions and the contents of the /root/Web Server folder.

but in carolina I get the internal server error while in lucid it works fine.

???

server error

Posted: Mon 17 Jun 2013, 19:00
by efiabruni
Could you run the pe_pplog.pl files in a terminal for me and copy paste the result?

I guess you know how to run a file in a terminal, if not how to:
Open the terminal and type in /..path../to../pe_pplog.pl (In your case it is probably /root/Web-Server/pe_pplog.pl) press enter.

It would give me an idea of what is wrong :)

Possible outputs:
Can't locate... @lib -> either the path of sub.pl or pe_Config.pl is not correct
Bad name after... -> Syntax error in the script
Permission denied -> Permissions

I don't think this works

Posted: Tue 18 Jun 2013, 13:12
by Dromeno
Hi efiabruni,

Are you sure that is the right command? (see attachement)

command

Posted: Tue 18 Jun 2013, 16:42
by efiabruni
Yes, it is :) (see screenshot)

output you needed

Posted: Wed 19 Jun 2013, 09:24
by Dromeno
ah. I see. "terminal here"(in rox) differs from simply opening a terminal. I didn't know that.


Here is the output of the terminal in Carolina you needed:

# /root/Web-Server/pe_pplog.pl
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_showLatestCommentsLimit" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 211.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_metaRevisitAfter" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 87.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_customHTMLhead" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 100.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_adminPass" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 476.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_blogHeader" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 121.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_commentsSecurityQuestion" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 678.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_showLatestComments" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 196.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_menuShowLinks" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 228.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_menuEntriesLimit" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 148.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_metaKeywords" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 88.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_commentsSecurityAnswer" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 463.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_gmt" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 438.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_commentsForbiddenAuthors" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 472.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_allowComments" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 634.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_blogFooter" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 818.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_sendMailWithNewCommentMail" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 552.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_lightboxOpt" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 105.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_usersOnlineTimeout" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 256.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_ipBan" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 318.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_sendMailWithNewComment" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 548.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_bannedMessage" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 322.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_enableJQuery" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 94.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_customMenuHTMLbottom" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 224.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_customMenuHTMLtop" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 128.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Name "main::config_currentStyleFolder" used only once: possible typo at /root/Web-Server/pe_pplog.pl line 117.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in string eq at /root/Web-Server/pe_pplog.pl line 37.
Content-Type: text/html; charset=utf-8

<!DOCTYPE html>
<html>
<head>
<meta http-equiv=Content-Type content="text/html" />
<meta name="Name" content="blog" />
<meta name="Revisit-After" content="1" />
<meta name="Keywords" content="post, perl, blog" />
<meta name="Description" content="pe_pplog" />
<title>blog - Powered by pe_pplog</title> <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script> $(document).ready(function(){$(".hide").hide();
$(".article .hide ").before("<div id='flip'><a href='' title='Read the article'>Show/Hide Entry</a></div>");
$(".article #flip").click(function(event){$(this).next(".hide").slideToggle("slow");
event.preventDefault(); });
$(".slide #flip").mouseover(function(event){
$(this).next(".hide").toggle("slow");
event.preventDefault();
});
});</script><link rel="stylesheet" href="/js/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
<script src="/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded',});
});
</script><script language="javascript" type="text/javascript">
// FUNCTION BY SMF FORUMS http://www.simplemachines.org
function surroundText(text1, text2, textarea)
{
// Can a text range be created?
if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange)
{
var caretPos = textarea.caretPos, temp_length = caretPos.text.length;

caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text1 + caretPos.text + text2 + ' ' : text1 + caretPos.text + text2;

if (temp_length == 0)
{
caretPos.moveStart("character", -text2.length);
caretPos.moveEnd("character", -text2.length);
caretPos.select();
}
else
textarea.focus(caretPos);
}
// Mozilla text range wrap.
else if (typeof(textarea.selectionStart) != "undefined")
{
var begin = textarea.value.substr(0, textarea.selectionStart);
var selection = textarea.value.substr(textarea.selectionStart, textarea.selectionEnd - textarea.selectionStart);
var end = textarea.value.substr(textarea.selectionEnd);
var newCursorPos = textarea.selectionStart;
var scrollPos = textarea.scrollTop;

textarea.value = begin + text1 + selection + text2 + end;

if (textarea.setSelectionRange)
{
if (selection.length == 0)
textarea.setSelectionRange(newCursorPos + text1.length, newCursorPos + text1.length);
else
textarea.setSelectionRange(newCursorPos, newCursorPos + text1.length + selection.length + text2.length);
textarea.focus();
}
textarea.scrollTop = scrollPos;
}
// Just put them on the end, then.
else
{
textarea.value += text1 + text2;
textarea.focus(textarea.value.length - 1);
}
}
</script><link href=/css/style.css rel=stylesheet type=text/css>
</head>
<body><header>
<a href="/pe_admin.pl">» admin</a>
<h1>pe_pplog</h1></header>

<nav>
<h1>Main Menu</h1>
<a href=?page=1>Home</a>
<a href=?do=archive>Archive</a>
<a href="?do=RSS">RSS Feeds <img border="0" src="/images/news-feed.png" /></a><h1>Categories</h1><a href="?viewCat=General">General</a><h1>Search</h1>
<form name="form1" method="post">
<input type="text" name="keyword" style="width:150px"><input type="hidden" name="do" value="search"><br />
By Title <input name="by" type="radio" value="0" checked> By Content <input name="by" type="radio" value="1">
</form>
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in concatenation (.) or string at /root/Web-Server/pe_pplog.pl line 238.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in concatenation (.) or string at /root/Web-Server/pe_pplog.pl line 238.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in concatenation (.) or string at /root/Web-Server/pe_pplog.pl line 238.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in concatenation (.) or string at /root/Web-Server/pe_pplog.pl line 238.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in concatenation (.) or string at /root/Web-Server/pe_pplog.pl line 238.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in concatenation (.) or string at /root/Web-Server/pe_pplog.pl line 238.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in concatenation (.) or string at /root/Web-Server/pe_pplog.pl line 238.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in concatenation (.) or string at /root/Web-Server/pe_pplog.pl line 238.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: readline() on closed filehandle FILE at /root/Web-Server/pe_pplog.pl line 300.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: print() on closed filehandle FILE at /root/Web-Server/pe_pplog.pl line 308.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in string eq at /root/Web-Server/pe_pplog.pl line 320.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in string eq at /root/Web-Server/pe_pplog.pl line 320.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in string ne at /root/Web-Server/pe_pplog.pl line 330.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in string eq at /root/Web-Server/pe_pplog.pl line 417.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in string ne at /root/Web-Server/pe_pplog.pl line 422.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in string ne at /root/Web-Server/pe_pplog.pl line 422.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in string eq at /root/Web-Server/pe_pplog.pl line 699.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in string eq at /root/Web-Server/pe_pplog.pl line 704.
[Wed Jun 19 11:29:09 2013] pe_pplog.pl: Use of uninitialized value in string ne at /root/Web-Server/pe_pplog.pl line 709.
<h1>Entries</h1><div class="slide"><a id="flip" href="">Latest »</a><div style="text-indent:10px" class="hide"></div></div></div></br><h1>Links</h1><a href="'"></a><a href="http://puppylinux.com/">Puppy_Linux</a><a href="'"></a><a href="'"></a><a href="https://code.google.com/p/pplog/">Pup_pplog</a><a href="'"></a><a href="'"></a><a href="http://pplog.scottjarvis.com/">SJPPlog</a><a href="'"></a><a href="'"></a><a href="http://tine.pagekite.me/blog/">pe_pplog</a><a href="'"></a><h1>Stats</h1>Hits: 1</nav><div id="content">No entries created. Why dont you <a href="/pe_admin.pl?do=newEntry">make one</a>?</div><footer></footer></div></body></html>#

compared to lucid

Posted: Wed 19 Jun 2013, 09:42
by Dromeno
Hi efiabruni,

as you can see, the line "Use of uninitialized value in..." appears a lot. I think is something there. The reported "possible typos" are not a real problem, the same typos are rported in lucid but there pe plog works.

At first I also got this output:

<h1>Software error:</h1>
<pre>Can't locate ./blog/pe_Config.pl in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /root/Web-Server/pe_pplog.pl line 33.

but adding the correct location of Pe_config.pl in line 33 seems not to be critical either since it works fine in lucid with the (wrong) ./blog/pe_Config.pl instead of /root/Web-Server/blog/pe_Config.pl

re: compared to lucid

Posted: Wed 19 Jun 2013, 19:48
by efiabruni
Have you tried running the blog after changing the path to pe_config.pl? "the use of uninitialized value.." warning is fine, these are values used for adding entries etc, which means they are supposed to be empty (for now) :) Your first output is the blog running ok, the second one:
<h1>Software error:</h1>
<pre>Can't locate ./blog/pe_Config.pl in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /root/Web-Server/pe_pplog.pl line 33.
means it can not find the (required) pe_Config.pl file and therefore would get an internal server error. My question is: after changing the path to pe_Config.pl (and I guess also sub.pl) do you still get an error? and if yes, which?

Posted: Thu 20 Jun 2013, 09:06
by Dromeno
Have you tried running the blog after changing the path to pe_config.pl?
Yes I did. The "500 - Internal Server Error" persists stubbornly...

perhaps it is some specific for Carolina problem?

error redirecting stdout

Posted: Thu 20 Jun 2013, 09:15
by Dromeno
One difference between Lucid and Carolina is that Hiawatha gives an error warning in Carolina. When I type hiawatha in the terminal I get the following response:

Warning: error redirecting stdout

can than be the cause?

error redirecting stdout

Posted: Fri 21 Jun 2013, 06:20
by efiabruni
Yes, this is a problem, the server does not have permission to write in a system file. Or something like that :)

I googled a bit and tried things out in Carolina, here is the solution, change permission in /dev/null to make it writable for everyone.

After this it was working for me.
Screenshot (because I like taking them)

Working now!

Posted: Fri 21 Jun 2013, 21:21
by Dromeno
YES! Thanks again efiabruni! :D :lol:

Hopefully I have the time this weekend to play a bit more with different pplog templates.

cool!

Posted: Sat 22 Jun 2013, 00:39
by efiabruni
Glad I could help :) There are now pet packages available for the blog (see first post) so there is no need anymore for changing file paths or setting permissions. I also tested in in Carolina and Saluki, but would be grateful for feedback on how it works in other derivatives.

pagekite

Posted: Sat 22 Jun 2013, 08:30
by Dromeno
Thanks thanks thanks... Pet works indeed (Carolina). It would be great if you (or somebody else) could make a pagekite pet as well. Last year I used Opera Unite for these kind of things, but they dropped the project.

Of course Opera is not open source either, so not the first choice, but so far they have been producing great tools.

bugfix version

Posted: Wed 24 Jul 2013, 05:53
by efiabruni
There is now a bugfix version (2b) available of the blog, see the first post.

new css theme

Posted: Thu 01 Aug 2013, 05:05
by efiabruni
I made a new css theme for the blog (darkgrey).

updated 23.11.13 to work with the new css based lightboxes/gallery

pets for precise and slacko

Posted: Sun 01 Sep 2013, 04:28
by efiabruni
I tested the pets for Precise 2.7.1 and Slacko 5.6 and they are not only working fine, but also do not overwrite the inbuilt PPLOG files.

There is also a new theme, with the menu on the bottom of the page:

updated css file 23.11.13 to work with the new css based gallery/lightboxes

Upload page

Posted: Sun 08 Sep 2013, 18:57
by efiabruni
This is a plugin for the admin page of the blog, a simple upload page. Multiple file uploads are supported in modern browsers, otherwise it is only simple file upload.

The following variables have to be added to pe_Config.pl:

Code: Select all

our @config_uploadFolders = qw(/images /css);
Folder you want to upload to, the script will recognise subfolders and add them automatically (eg, for /images, /images/photos and /images/photos/thums would be added on the upload page to choose from)

Code: Select all

our @config_allowedMime = qw(image/ text/css text/html text/plain);
Allowed mime types, if no file extension is given all for this mime type can be used. As in this example all image files (png, gif, jpg etc.) can be used, but for text files only css, html and plain text files)

For localisation add the highlighted to the language you are using:

our %locale;

$locale {"EN"} = {
upload=>"Upload File",
...
}

in case the pe_pplog version without localisation is used add:

Code: Select all

our $lang = "EN";
our $locale{$lang} = {upload => "Upload File"};
Plugin:

choose locale and choose style option

Posted: Sat 14 Sep 2013, 00:07
by efiabruni
This is a diff file for the v2b of the pe_pplog to add a chose style and/or choose language option. A cookie is set to remember the choice.

I had added this to the demo page of the pe_pplog, but do not want to add it as a regular feature.

Adding a calendar

Posted: Tue 24 Sep 2013, 21:43
by efiabruni
Adding a calendar to the pe_pplog is quite easy, you can find a how-to here.

Using the same JQuery plugin I also wrote a new archive script replacing the old one with a calendar with click-able links.

Follow the instructions in the post in the link, or use the attached diff file.

The JQuery plugin (not by me) can be downloaded here. Place the files in the /js folder on your server.
Copy and paste the following to "our $config_customHTMLhead" and "our $config_customHTMLadmin" :

Code: Select all

<link rel="stylesheet" type="text/css" href="/js/fullcalendar.css" />
<script type="text/javascript" src="/js/fullcalendar.js"></script>

Posted: Sat 19 Oct 2013, 07:32
by smokey01
efiabruni I have your lovely pe_pplog.pl working very nicely locally using localhost on my desktop computer.

My next challenge is to upload it to my web site so others can also access it.

I would like to locate the blog at something like:
http://www.mysite/blog

If I had an index.html or index.php file in the blog directory then the blog would be launched. As the main perl script is named pe_pplug.pl, how do I make this work. I thought it would be as simple as creating a .htaccess file in the blog directory with the contents of:

DirectoryIndex pe_pplog.pl index.html index.php index.htm

but this didn't work.

Should the blog and Web-Server directories be sub directories of the blog directory? or do I put the contents of the blog and Web-Server directory at the blog level directory?

Regards