Jump to content

hakermania

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hakermania's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am running: Linux MaD-pc 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux And I am using this PHP: Build Date May 2 2011 23:04:25 Server API Apache 2.0 Handler Apache Version Apache/2.2.17 (Ubuntu) I don't know if you need more details! Well, the problem is that when I am trying to run a GUI program (a non-terminal-program) I get error messages: cannot connect to the DISPLAY cannot connect to :0.0 That's the problem. Any other info needed?
  2. Yes, I've read this dozens of times and I hadn't come up with a solution
  3. I have an apache server in my Ubuntu laptop and I use PHP. The server exists to make the communication with my friends possible even if im not in any chatroom or something like this. So, I made a simple php file with enables the outside world to send me a message, but when zeniy, the program that will create the GUI message is ready to take place, I get error the *Display not Found* and such Even if I execute the command like DIPLAY=:0 command_Here i get the same So, is there any way to make exec() run a GUI ?
  4. Yes, I am sure, the ubuntu server is mine, and I can do other things with the exec() function like ls or things like this, but I cannot touch any file
  5. Hmm, hello everyone, i'm running my php in an ubuntu server and I'm trying to run a command using exec (i.e. 'echo 1 > /var/www/test.txt') but I always get a permission denied issue, although i've already changed the permissions to 777 (read-write-execute) Any solution?
  6. Hello! I'm making a program in C++ which has some variables that I need to show inside my .php page. So, I have 2 main questions 1) Is there a possible way to detect when my .php page is being requested 2) After this to inform the C++ program that the page is being requested (editing a file or writing to files would be preferable to be avoided) and 3) After this the C++ program to give to php the variables that I want to show (again writing to files isn't preferable) Perhaps question (3) is not for these forums, but I'd like to know if someone has an idea about the issue.... Unfortunately I have the impression that PHP is a simple script language and cannot do s0 high-level things... Prove me wrong, please
  7. Thank you very much! This worked!
  8. I've created this code in PHP and I'm a complete newbie (i've done something in the past regarding email-sending but nothing more...) So, as I put this code inside my .php file and request it to load, an empty page is presented. What is the actual problem to the code? Thx in advance for any answer! <?php $wfilename = $_POST["wfilename"]; $wbody = $_POST["wbody"]; $rfilename = $_POST["rfilename"]; ?> <html> <head> <title>Write/Read files!</title> </head> <body> <h1>WRITE FILES</h1> <form method="post" action="<?php echo $PHP_SELF;?>"> Write filename:<input type="text" size="30" maxlength="30" name="wfilename">:<br /> Body:<br /><textarea rows="20" cols="20" name="wbody" wrap="physical"></textarea><br /> <input type="submit" value="write" name="write"><br /> </form><br /> <br /> <h1>READ FILES</h1> <form method="post" action="<?php echo $PHP_SELF;?>"> Write filename:<input type="text" size="30" maxlength="30" name="rfilename"><br /> <input type="submit" value="read" name="read"><br /> </form><br /> <?php if ($_POST['read']) { $fh = fopen($rfilename, 'r') or die(""); $theData = fread($fh, 5); fclose($fh); echo "$rfilename contains:\n\n$theData"; } else if ($_POST['write']) { $fh = fopen($wfilename, 'w') or die("can't open file"); fwrite($fh, $wbody); fclose($fh); echo "$wbody was successfully written to $wfilename" }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.