Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

File Manager Not Editing Files?


dredd15

Recommended Posts

Posted

Firstly, I know what you're thinking ... don't use the File Manager to begin with ... I know. I'm setting up a "News" section of a client's website where they can simply edit a text file, via File Manager (because they are not HTML knowledgeable), and it will update on the page.

 

I have everything working except one thing ... I cannot get File Manager to edit the text file. I open the file up in File Manager, I edit it, click "Save" and it just reverts back to the File Manager listing page ... no confirmation or error that anything occurred. When I look at the file, it is unchanged.

 

Permissions are set as:

 

-rwxrwxrwx 9 Oct 27 22:08 news_text.txt

 

So it seems like it has the right persmissions.

 

What am I doing wrong here?

Posted
Firstly, I know what you're thinking ... don't use the File Manager to begin with ... I know.

Since you're not suppose to use the file manager and you know you're not suppose to use the file manager, why not create a new table in the databse and use that for your "News" section?

Posted
Since you're not suppose to use the file manager and you know you're not suppose to use the file manager, why not create a new table in the databse and use that for your "News" section?

 

I'm trying to find a simple solution that my clients can update every few days without any HTML knowledge. Using the File Manager to edit a simple text file that I can display seems like the easiest route.

 

But why won't the file display the changes I make?

Posted

Okay, I was finally able to get an error ... does this help? Can someone tell me what's going on?

 

Warning: unlink(/home/user/public_html/shop//news_text.txt) [function.unlink]: Permission denied in /home/user/public_html/shop/admin/includes/functions/general.php on line 1265

 

I looked at the file, and starting with line 1264, here is what it shows:

 

if (is_writeable($source)) {

unlink($source);

} else {

$messageStack->add(sprintf(ERROR_FILE_NOT_REMOVEABLE, $source), 'error');

$tep_remove_error = true;

}

 

This is the other error:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/shop/admin/includes/functions/general.php:1265) in /home/user/public_html/shop/admin/includes/functions/general.php on line 22

 

Help! Please?

Posted

Probably a permissions error. You need to set the right permissions on either the the directory news_text.txt is in or on the file itself. Setting write permissions on the directory is a security risk.

 

I still say create a new table in database and use that. You can still create a file for the admin so they can update whatever they need. A lot easier and safer.

Posted

headers already sent means that you have a blank space before the opening or after the closing <php tag.. Delete that and the error will go away.

 

WHY does the client need to get into the filemanager to do anything in the news section.. isnt that ALL controlled by some functions in teh admin

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted

The headers already sent error is a result of the other error, not a "whitespace" in another PHP file.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Ooops sorry.. automatic response/

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...