Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Use shell_exec and take a look at what the command outputs.
  2. Your not escaping the single quotes within your single quote delimited strings within your array.
  3. On Debian (Ubuntu should be the same) you need to edit the /etc/apache2/envvars file to change the user & group Apache runs as. You'll then need to restart Apache. sudo /etc/init.d/apache2 restart
  4. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=307049.0
  5. Oh and ps. The reason you are getting the working message is because exec must be returning false. 0 is the same as false in php. You will need to use the === operators to make sure you are actually getting the string "0".
  6. Surrounding a command in backticks executes it. I'm not sure why you are then trying to pass the output of that commands execution to the exec function.
  7. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=307041.0
  8. There are plenty of examples around on how to execute a query with php. Start on the man page. mysql_query.
  9. Its pretty safe to say this topic has been flogged. The op hasn't been in to reply in 3 months.
  10. What does the produced html (and javascript) look like?
  11. No. As the manual says exec returns the last line of output resulting from the command. Its looks like your trying to check the commands status (which by the way will be 0 if successful). You'll want to look at the third arg to exec.
  12. $points = isset($_COOKIE["points"]) ? $_COOKIE['points']:0;
  13. It doesn't matter if you use shell scripts or not. PHP will do fine. Given that your only going to allow one user on these systems, I would make Apache execute as this user. This should (in theory) solve the issue as Apache will be running as the same user who owns the desktop environment. I wouldn't recommend them being root however as they can still quite easily damage filesystems on the machine.
  14. Theoretically, if your Apache server user (the user Apache executes under) has the correct permissions this should be possible. You would however need to make a $HOME directory for this user because allot of applications store data within hidden dirs within $HOME. A better option might be to setup the suexec module for Apache, and have your users own there own versions of this 'site' interface. Then your server could execute commands as the user who owns the sites. The entire problem is that websites run under the server, while applications need to run under indeveidual users. I'd like to say this is simple to fix but its likely not unless you know a bit about Linux and Apache.
  15. Sorry, but your post makes little to no sense.
  16. This topic has been moved to PHP Installation & Configuration. http://www.phpfreaks.com/forums/index.php?topic=307015.0
  17. /site/Uploads isn't a typical path. The first / stands for the root of the filesystem. Given these details, does /site/Uploads actually exist? This directory will also need to be writable by the user your server runs as.
  18. It will depend on your distro but there is likely an example within /etc/{init,rc}.d or you should read some docs specific to your distro.
  19. This topic has been moved to Linux. http://www.phpfreaks.com/forums/index.php?topic=307024.0
  20. You should take a look at the twisted library if your planning on making a half decent server. Allot of the grunt work will already be done for you this way.
  21. If its a simple script place a call to it within /etc/rc.local or (for something more complex eg a deamon) write a proper rc script and place it within /etc/init.d (there will already be plenty of examples in there)
  22. Have you checked out some of the editors mentioned in this thread?
  23. Your query is failing. There is a WHERE in there that shouldn't be.
  24. What Java is disabled message? Your not even using Java. Java and javascript are not the same thing. I'm not sure where you heard that. In fact is not possible because js executes on the client, long after php is done. You need to view your html source. The javascript array you are creating is broken for sure, but i'm not sure that is your actual problem as yet.
  25. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=307001.0
×
×
  • 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.