login about faq


<?php
$msg = $_GET['w'];
$logfile= 'data.txt';
$fp = fopen($logfile, "a");
fwrite($fp, $msg);
fclose($fp);
echo $msg;
?>

This script isn't writing data.txt or anything. It is chmod 777.

asked Jul 02 '12 at 19:03

Moldjelly1's gravatar image

Moldjelly1
46336

edited Jul 02 '12 at 19:04


I doubt this is it, but try putting the a in singles not doubles. Also, try a w and see what that does.

answered Jul 03 '12 at 00:51

ryebread761's gravatar image

ryebread761
7.5k214241322

I found the issue. For anybody who has the issue and is using a vps make sure you have the www folder 777 and if you use cent os 777 html & www folders

answered Jul 03 '12 at 16:07

Moldjelly1's gravatar image

Moldjelly1
46336

1

Careful, having public folders chmodded 777 can open you up to some serious security vulnerabilities.

(Jul 04 '12 at 20:28) CJS7070 CJS7070's gravatar image

I think anything over 644, will work

answered Jul 05 '12 at 11:39

Moldjelly1's gravatar image

Moldjelly1
46336

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported


Join Us in the Chat Room

Tags:

×125
×96
×89

Asked: Jul 02 '12 at 19:03

Seen: 753 times

Last updated: Jul 05 '12 at 11:39