EditWrx Knowledge Base Home
 Search       Login   Register   Members   Help   Home 
Search by username

EditWrx Knowledge Base > FAQ (Frequently Asked Questions) > Installation Issues > wrx.cgi does not save changes after initial login

wrx.cgi does not save changes after initial login
 Moderated by: Keith  
 New Topic   Reply   Print 
AuthorPost
Dude
Member
 

Joined: Sun Oct 9th, 2005
Location:  
Posts: 3
 Posted: Sun Oct 9th, 2005 12:25 pm
 Quote  Reply 
Hello!

I just installed editwrx on my server. I put all data files and images into the htdocs/editwrx folder but had to put the wrx.cgi into the cgi-bin/ where I acces it with cgi-bin/wrx.cgi. I can edit all data in the admin control panel but nothing gets saved although I don't get any error message. Do I have to edit some data in wrx.cgi manually to setup editwrx properly or is this a hint that SuExec is not installed on the server?

Last edited on Sun Oct 9th, 2005 12:36 pm by Dude

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 603
 Posted: Sun Oct 9th, 2005 04:03 pm
 Quote  Reply 
Dude wrote: is this a hint that SuExec is not installed on the server?

If you use the InstallPoint installer it tests for suExec. It looks like you have done a manual install so you need to test for suExec separately.

First create a file named test.txt with the word "empty" in it and FTP it to the editwrx folder. Give it 0644 permissions.

Create file named text.cgi and copy/paste the code below into test.cgi. Upload text.cgi to the cgi-bin and give it 0755 permission.

Run test.cgi. If suExec is running you should get OK returned to the browser and the contents of test.txt should be changed to "hello". If suExec is not running the browser will display Could not write to file and test.txt will remain unchanged.

(The path in $file assumes your cgi-bin is inside the htdocs folder, if it is outside the htdocs folder, change the path to "../htdocs/editwrx/test.txt")


#!/usr/bin/perl --

$file = "../editwrx/test.txt";

print "Content-type: text/html\n\n";

open(TEST,">$file") || ¬
print TEST "hello";

print "OK";

sub not{
print "Could not write to file";
exit;

Dude
Member
 

Joined: Sun Oct 9th, 2005
Location:  
Posts: 3
 Posted: Mon Oct 10th, 2005 01:42 pm
 Quote  Reply 
Thanxalot! Now the installation works fine. But when I use editwrx, another error occurs: My whole website ist built on templates for the layout that is included via SSI-Tags. When I save a document the SSI-includes are gone and replaced by the templates. I used to workaround by using HTML-Files, editing them online and saving as SHTML-Files to prevent the SHTML-files being processes via SSI. But editwrx replaces the header of the HTML-file with a new header without my "<!--#include virtual="/template/news_a.shtml" -->" includes that are positioned directly after "<body>". Is there any possibility to prevent editwrx from doing this WITHOUT having to use excludeblocks because I would have to edit all files on the server?

The excludeblocks feature does not even work correctly on my server when I include them in the following way:


<body>
<div excludeblock="one">
<!--#include virtual="/template/news_a.shtml" -->
</div><!--excludeblock="one" -->
<div editblock="1">
<h4 class="alt">Headline</h4>


I get an error message that tells me I did not close the excludeblock because editwrx changes the html code to:

<BODY><DIV excludeblock="one">
<!--#include virtual="/template/news_a.shtml" -->
</DIV>
<DIV editblock="1">
<H4 class=alt>Headline</H4>


Another question to security: Where does editwrx save the passwords and are they encrypted? Can I simply generate a htpasswd-file to prevent unauthorized acces to the data files?

Last edited on Mon Oct 10th, 2005 03:02 pm by Dude

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 603
 Posted: Mon Oct 10th, 2005 04:40 pm
 Quote  Reply 
Is there any possibility to prevent editwrx from doing this WITHOUT having to use excludeblocks because I would have to edit all files on the server?
No. There is no way to do this safely programatically. You must hard code the excludeblocks into each page.

The excludeblocks feature does not even work correctly on my server

The excludeblock's close comment appears to be improperly formatted

<!--excludeblock="one" -->

add a space before excludeblock like so

<!-- excludeblock="one" -->

Also, the editblock needs a properly formatted closing comment

Where does editwrx save the passwords and are they encrypted?

EditWrx passwords are stored in /library/data/users.txt. The passwords are encrypted with the same MD5 hash used by htpassword files, but with a proprietary salt.  If you want to make them super secure, on Apache/Linux, give all of the files in /library/data folder only 0600 permissions. Only the FTP owner, and cgi scripts owned by the FTP owner, will be able to read or write to those files. Apache and other users on the srver will be forbidden access.

Dude
Member
 

Joined: Sun Oct 9th, 2005
Location:  
Posts: 3
 Posted: Tue Oct 11th, 2005 03:26 pm
 Quote  Reply 
I already tried to change the closing "excludeblock" code (that was copied 1:1 from the website) but it does not change anything. The problem is that editwrx itself removes the closing "excludeblock" when I save a file:

<BODY><DIV excludeblock="one">
<!--#include virtual="/template/news_a.shtml" -->
</DIV>
<DIV editblock="1">
<H4 class=alt>Headline</H4>

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 603
 Posted: Tue Oct 11th, 2005 04:15 pm
 Quote  Reply 
Dude wrote: The problem is that editwrx itself removes the closing "excludeblock" when I save a file:

There is something else on the page (or in the include file) that is involved. EditWrx will not remove the comment unless told to by something on the page that is incorrectly formatted.

Please send the URL to the page to support@editwrx.com so we can look at the page's source code.

Adri
Member
 

Joined: Thu Jan 26th, 2006
Location:  
Posts: 1
 Posted: Thu Jan 26th, 2006 05:31 pm
 Quote  Reply 
And wath to do if the test give Could not write to file.

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 603
 Posted: Thu Jan 26th, 2006 09:57 pm
 Quote  Reply 
Adri

If you installed manually on Unix your server may not support writing to files. Installing with InstallPoint installer tests for that condition.

If you installed on Windows make certain that the domain has Write and Modify properties set.


 Current time is 08:55 pm




Powered by WowBB 1.62 - Copyright © 2003-2004 Aycan Gulez