pe_pplog v2.1b bufixes!

Browsers, email, chat, etc.
Message
Author
efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

#41 Post by efiabruni »

There are two ways to do this. The easiest is to unzip the blog in the web server root directory as is and put an index.php file in the web-server/blog directory with the following:

Code: Select all

<?php
	if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
		$uri = 'https://';
	} else {
		$uri = 'http://';
	}
	$uri .= $_SERVER['HTTP_HOST'];
	header('Location: '.$uri.'/pe_pplog.pl/');
	exit;
?>
this will redirect any request to localhost/blog to localhost/pe_pplog.pl without any need for .htacces files or the like.

if you don't like the .pl ending showing put the blog directory of the zip file into the blog directory of the web-server. For example the pe_Config.pl file would then be located in web-server/blog/blog/pe_Config.pl.
Move the pe_pplog.pl and pe_admin.pl to web-server/blog.
Leave the /css /js and /image folders in web-server.
Add an .htacces file to the web-server/blog folder with

Code: Select all

DirectoryIndex pe_pplog.pl
These directions assume the server is an Apache web-server

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#42 Post by smokey01 »

Neither suggestion worked. I am getting a 403 (forbidden) error.

I have check the permissions. Directories are 755 and files 644.

From the http://www.MySite.com/public_html my directory structure is:

.
|-- blog
| |-- CHANGELOG
| |-- change.pl
| |-- comments
| |-- contact.pl
| |-- editConfig.pl
| |-- LICENSE
| |-- newGallery.pl
| |-- pe_Config.pl
| |-- pe_Config.pl.bak
| |-- posts
| | |-- 00000.ppl
| | `-- hits.ppl.hits
| |-- readme
| | |-- README
| | |-- README_GER
| | |-- README_GERhiawatha
| | `-- README_GERzip
| `-- sub.pl
|-- css
| |-- menu2.jpg
| |-- menu3.jpg
| |-- menu.jpg
| |-- m_menu2.jpg
| |-- m_menu3.jpg
| |-- m_menu.jpg
| |-- mobile.css
| `-- style.css
|-- images
| |-- news-feed.png
| |-- prettyPhoto
| | |-- dark_rounded
| | | |-- btnNext.png
| | | |-- btnPrevious.png
| | | |-- contentPattern.png
| | | |-- default_thumbnail.gif
| | | |-- loader.gif
| | | `-- sprite.png
| | |-- dark_square
| | | |-- btnNext.png
| | | |-- btnPrevious.png
| | | |-- contentPattern.png
| | | |-- default_thumbnail.gif
| | | |-- loader.gif
| | | `-- sprite.png
| | |-- default
| | | |-- default_thumb.png
| | | |-- loader.gif
| | | |-- sprite_next.png
| | | |-- sprite.png
| | | |-- sprite_prev.png
| | | |-- sprite_x.png
| | | `-- sprite_y.png
| | |-- facebook
| | | |-- btnNext.png
| | | |-- btnPrevious.png
| | | |-- contentPatternBottom.png
| | | |-- contentPatternLeft.png
| | | |-- contentPatternRight.png
| | | |-- contentPatternTop.png
| | | |-- default_thumbnail.gif
| | | |-- loader.gif
| | | `-- sprite.png
| | |-- light_rounded
| | | |-- btnNext.png
| | | |-- btnPrevious.png
| | | |-- default_thumbnail.gif
| | | |-- loader.gif
| | | `-- sprite.png
| | `-- light_square
| | |-- btnNext.png
| | |-- btnPrevious.png
| | |-- default_thumbnail.gif
| | |-- loader.gif
| | `-- sprite.png
| `-- smilies
| |-- angry.png
| |-- cry.png
| |-- dilemma.png
| |-- happy.png
| |-- heart.png
| |-- lol.png
| |-- mmh.png
| |-- oh.png
| |-- ouch.png
| |-- sad.png
| |-- shock.png
| |-- surprised.png
| `-- wink.png
|-- js
| |-- jquery.prettyPhoto.js
| |-- prettyPhoto.css
| `-- README
|-- .htaccess
|-- index.php
|-- pe_admin.pl
|-- pe_pplog.pl
`-- README


Server Software
Apache: 2.2.23
CentOS: CentOS release 6.4 (Final)
cPanel: 11.36.2 (build 4)
Curl: 7.12.1
MySQL 5.5.33
phpMyAdmin 3.5.5
Python: 2.6.6
Perl: 5.8.8
PHP: 5.2.17
ionCube Loader: 4.2.2
Zend Optimizer: 3.3.9
Ruby: 1.8.7
Rails: 2.3.18
OpenSSL: 1.0.0-fips

My other blog runs fine but it's written in php not perl.

I'm running out of ideas.

Cheers
Attachments
directory.tar
Clearer directory structure
(20 KiB) Downloaded 370 times

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

#43 Post by efiabruni »

Ok, I see three possibilities
1. The server is not set up to allow .htaccess files. In this case the 403 Error should read like:
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
In this case use the solution with the php script

2. I think this is the case here:
The server is not set up to run cgi files from outside of the cgi-bin folder.

then error message is likely:
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
try and add the following to your .htacces file:
AddHandler cgi-script .pl
Options +ExecCGI
3. The server does neither allow for htaccess files nor cgi scripts outside of the cgi-bin

In this case, rename the pe_pplog.pl and pe_admin.pl to pe_pplog and pe_admin, make them executable and move them to the cgi-bin.
Move the blog folder to the cgi-bin
change the index.php file to:

Code: Select all

<?php
   if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
      $uri = 'https://';
   } else {
      $uri = 'http://';
   }
   $uri .= $_SERVER['HTTP_HOST'];
   header('Location: '.$uri.'/cgi-bin/pe_pplog.pl/');
   exit;
?>

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#44 Post by smokey01 »

efiabruni wrote:Ok, I see three possibilities
1. The server is not set up to allow .htaccess files. In this case the 403 Error should read like:
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
In this case use the solution with the php script
The server is fine with .htaccess files, in fact I use them to assign icons and descriptions like:
http://smokey01.com/software/Fatdog64-600/
efiabruni wrote: 2. I think this is the case here:
The server is not set up to run cgi files from outside of the cgi-bin folder.

then error message is likely:
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
try and add the following to your .htacces file:
AddHandler cgi-script .pl
Options +ExecCGI
This didn't fix the problem either. It really seems to be some sort of permissions problem
efiabruni wrote: 3. The server does neither allow for htaccess files nor cgi scripts outside of the cgi-bin

In this case, rename the pe_pplog.pl and pe_admin.pl to pe_pplog and pe_admin, make them executable and move them to the cgi-bin.
Move the blog folder to the cgi-bin
change the index.php file to:

Code: Select all

<?php
   if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
      $uri = 'https://';
   } else {
      $uri = 'http://';
   }
   $uri .= $_SERVER['HTTP_HOST'];
   header('Location: '.$uri.'/cgi-bin/pe_pplog.pl/');
   exit;
?>
Option three didn't work either.

Here is the really strange bit. CatDude has exactly the same blog set up on the same company's server but under a different account.

It really seems like I have to enable perl scripts to run. Hostgator allows perl as you can see from a previous post. I guess I might need to put some definition in the .htaccess to do this, I just need to work out what that syntax is.

Thanks

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

#45 Post by efiabruni »

Ok, I'm out of ideas as well. Hosting companies can be specific with cgi script set ups, I guess. Let me know if you solve this problem. Sorry I couldn't help :(

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#46 Post by smokey01 »

efiabruni your advice was very close and on the right track.

You suggested adding this to the .htaccess file:
AddHandler cgi-script .pl
Options +ExecCGI
This is what got it working:

Code: Select all

Options Indexes FollowSymLinks MultiViews +ExecCGI
AddHandler cgi-script .py .pl .cgi
Thanks again

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#47 Post by smokey01 »

efia, I sent you a couple of messages to your gmail account.

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

#48 Post by efiabruni »

I saw the messages and answered :)

some lessons learned from the epic battle of setting the pe_pplog up on a live server:

the zip file is set up to extract in the web-server root, not a sub-folder (I will change this in the next version, but for know to avoid headaches it might be easier to follow this)

To execute cgi-scripts write the following in the .htaccess file:
[quote=smokey01]Options Indexes FollowSymLinks MultiViews +ExecCGI
AddHandler cgi-script .py .pl .cgi[/quote]
without MultiViews, as this might mess with js files (according to my experience, though I cannot explain why)

To get prettyPhoto to work add the following in $config_customHTMLhead:

Code: Select all

<script src=js/jquery.prettyPhoto.js></script>

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

new Release!

#49 Post by efiabruni »

I proudly present the latest version of the pe_pplog. Thank you to Grant and Chris for suggestions :)

Some changes:
Fixing some path issues and adding an htaccess file to make it easier to upload and run the zip file on a live server.

replaced prettyPhoto with a css solution, lightboxes are now made with the "box" button. {box=thumbnail title=title}photo or text(any bbcode works in here){/box}. If there is no thumbnail the title will be clickable. Example.

possibility to use other programs than sendmail to send mail or to save mails locally and read them from the admin page.

notes to save and publish later

smiley buttons (like in this forum)

See first post for more info and download

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#50 Post by BarryK »

efiabruni,
I like your pe_pplog very much! :D

I have installed it, see here:

http://bkhome.org/news/

As you can see, I have worked on the theme a bit.

I turned off jquery, as it seems that calls to jquery.com slow the first page load down a bit?

I am using your latest version.

I put back the option to have numeric-only security code, coz I like that.

I found a bug. When I made the fourth entry, number 00004, the last line in file posts/00004.ppl had this:

Code: Select all

<br />¬23 Nov 2013, 9:36¬Insight¬posts
whereas it should have been:

Code: Select all

<br />¬23 Nov 2013, 9:36¬Insight¬00004
This meant that the entry did not display when I clicked on that post (it was listed in the menu).
I manually fixed it by downloading file 00004.ppl and editing it.
[url]https://bkhome.org/news/[/url]

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

bug

#51 Post by efiabruni »

I noticed the same bug. It seems that it appears if one writes a new post and then edits immediately. I have not figured out why, yet. For now I would advice clicking on index after writing a post and then go back to edit it.


there is a bug with the lightboxes as well, they only work in firefox, but this is easily fixed by changing the following in the css file

Code: Select all

input:focus + .box {width:100%; padding:2%; font-size:14px; }
to

Code: Select all

input:focus + .box {width:100%; padding:2%; font-size:14px; height:100%;}
and

Code: Select all

.box
{	
     width:0%;
     top:0px;
     left:0px;
     height:100%;
    position: fixed;
    background: rgba(0,0,0,0.5);
    text-align:center;
    color:white;
    font-size:0%;
}
to

Code: Select all

.box
{	
	width:0%;
	top:0px;
	left:0px;
	height:0%;
	overflow:hidden;
    position: fixed;
    background: rgba(0,0,0,0.5);
    text-align:center;
    color:white;
    font-size:0%;
}

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#52 Post by BarryK »

efiabruni,
I have a couple of feature requests!

1.
Sage commented on my blog that he would like to be able to edit his comments.

I don't really know if I want to give people the right to go back at any time and edit their comments, however what would be really great is a Preview window.

So, alongside the Submit button, have a Preview button, so the person can see what their comment will look like, and if required go back to the edit window and fix any typos, links, etc., then submit.

2.
It would be good to have the (optional) security question in the Contact Me page also.
[url]https://bkhome.org/news/[/url]

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

contact me page with bugfix and new feature

#53 Post by efiabruni »

I fixed a bug in the contact me page for the blog (when saving messages locally the new one would overwrite the previous one) and added the possibility to use a security question.

Settings for security question or captcha is now chosen as with comments ($config_commentsSecurityCode etc) in the pe_config.pl file

I have a contact me page as a stand alone page outside of the blog, which I have fixed/updated as above.
Attachments
contact_page.zip
contact me page as a separate page
(1.71 KiB) Downloaded 304 times
contact.pl.gz
fixed contact plugin
(1.17 KiB) Downloaded 335 times

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#54 Post by BarryK »

efia,
Thanks, I have applied your latest fixes.
[url]https://bkhome.org/news/[/url]

User avatar
broomdodger
Posts: 279
Joined: Sat 10 May 2008, 02:38
Location: Santa Cruz, CA

wrong password but still posted

#55 Post by broomdodger »

Hello Efia

I posted a comment on Bary Kauler's blog:
http://bkhome.org/news/

The first time I mistyped my password, got an error, but the comment was posted.

I assumed it would not be posted, and tried again with the correct password. Now there are two of the same post.

I posted a comment to Barry, and he suggested filing a bug report with you.

Bill
Santa Cruz, California

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

post with wrong password

#56 Post by efiabruni »

I tried to recreate the error, but do not seem to be able to, neither on mine nor Barrys blog. Can you tell me exactly what happened?

User avatar
broomdodger
Posts: 279
Joined: Sat 10 May 2008, 02:38
Location: Santa Cruz, CA

Re: post with wrong password

#57 Post by broomdodger »

efiabruni wrote:I tried to recreate the error, but do not seem to be able to, neither on mine nor Barrys blog. Can you tell me exactly what happened?
Efia

I posted 'passwd test 01' with a bad password and got this error:

Wrong password for this nickname. Please try again or choose another nickname.

So far, today, I do NOT see the 'passwd test 01' post using a bad password!

Then I posted 'passwd test 02' with the good password and it is shown on the blog.

Early yesterday, I could not enter into the comment fields or select any of the blog text using Mac Safari or the RSS reader Vienna. Today everything works!

There are other double posts, and I wonder if the same wrong password message prompted the second post.

Bill

User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

Re: post with wrong password

#58 Post by jrb »

broomdodger wrote:There are other double posts, and I wonder if the same wrong password message prompted the second post.

Bill
I just managed to create a double post on Barry's blog. I posted last night and all looked fine, just a single post. I went to bed without shutting down the webpage. When I came back to the computer this morning I simply refreshed the webpage to see if there were any new comments and lo and behold, double comment. :oops:

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

bugfixes and new features

#59 Post by efiabruni »

I'm currently working on bugfixes for the blog.
Bugs I fixed:
bug in the lightbox as described above
bug for the "contact me" page also as described above
posts being printed instead of the entry number as described by Barry
changed the way entries were sorted out from posts as the old way could lead to no entries per page for the index
some spelling and css changes

the double post problem is still a mystery to me, as I cannot recreate it (except hitting refresh, as jrb described)

new features
delete emails when they are saved locally
comment preview (see here)

any other bugs you found, let me know :)

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: double post problem

#60 Post by L18L »

efiabruni wrote:...the double post problem is still a mystery to me, as I cannot recreate it (except hitting refresh, as jrb described)
...just check : if the post already exists then do not insert it :wink:

[edit]derivated from the rule: Check all user input[/edit]

Post Reply