
trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
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".
-
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.
-
This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=307041.0
-
There are plenty of examples around on how to execute a query with php. Start on the man page. mysql_query.
-
Its pretty safe to say this topic has been flogged. The op hasn't been in to reply in 3 months.
-
What does the produced html (and javascript) look like?
-
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.
-
$points = isset($_COOKIE["points"]) ? $_COOKIE['points']:0;
-
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.
-
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.
-
Sorry, but your post makes little to no sense.
-
This topic has been moved to PHP Installation & Configuration. http://www.phpfreaks.com/forums/index.php?topic=307015.0
-
Browse to file(Image) upload problem
trq replied to s-o-s's topic in PHP Installation and Configuration
/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. -
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.
-
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.
-
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)
-
Have you checked out some of the editors mentioned in this thread?
-
Your query is failing. There is a WHERE in there that shouldn't be.
-
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.
-
This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=307001.0
-
Sorry, Ive not used CI so I'm not sure I'll be much help but any post data likely still turns up within $_POST. Unless they unset it somewhere along the line. I would look at the documentation in regards to the Request object or similar. Post data should be within there somewhere. There is likely form helpers as well.
-
related thread box as you create a new thread.
trq replied to Anti-Moronic's topic in PHPFreaks.com Website Feedback
This is something that should be taken up with the SMF devs. Unless its in vanilla SMF, were not likely to maintain any patches for it. -
How can i use a variable to get an array from another php file?
trq replied to Jarid's topic in PHP Coding Help
Is all this code within <?php ?> tags? Post your ACTUAL code. It won't print if done properly. -
This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=306618.0