How to config Apache & php run as superuser
i try to config apache & php for my project to create web-based for file config management to open vpn in bsd unix, but i can't run as superuser to start or stop service ...
i try to config apache & php for my project to create web-based for file config management to open vpn in bsd unix, but i can't run as superuser to start or stop service ...
Then how do I import that? I run everything in python 2.4, but one of my scripts import xml.etree.ElementTree...which is only Python 2.5 ...
Ken Thompson, the creator of Unix, was once asked what he'd do if he had it to do over again. He said, "I'd spell create with an 'e'." What is Ken referring to? Is there a "creat" command? ...
I have a C file which I copied from somewhere else, but it has a lot of comments like below: int matrix[20]; /* generate data */ for (index = 0 ;index < 20; index++) matrix[index] = index + 1; /* print original data */ for (index = 0; index < 5 ;index++) How can I delete all the comments enclosed by /* and */. Sometimes, the comment...
Is there any reason this script always give me running ? In both cases, when my process is started and when my process is stopped. if ps ax | grep -v grep | grep "processName" > /dev/null then echo $"running" else echo $"not running" fi Thank you very much UPDATE : I add a full exemple of my script, maybe smothing wrong somewhe...
I'm using the following code to try to read an input from user and timeout and exit if more than 5 seconds pass. This is accomplished through a combination of setjmp/longjmp and the SIGALRM signal. Here's the code: #include <stdio.h> #include <setjmp.h> #include <unistd.h> #include <string.h> #include <sys/signal.h> jmp_buf buffer; /...
I am wondering what are the limitation of System-V message queue i.e. Maximum queue size, maximum size per item etc. As I am working on integration of C++ with my PHP scripts and have very large amount of data which will be pushed into queue from php and C++ process will read that data on the other end. I have devised an strategy in whi...
Hi, I'm working with a text file that looks something like this: rs001 EEE /n rs008 EEE /n rs345 EEE /n rs542 CHG /n re432 CHG /n I want to be able to collapse all of the rows that share the same value in column 2 into one single row (for example, rs001 rs008 rs345 EEE). Is there an easy way to do this using unix text proces...
Hi, I know what does dup or dup2 do ,but I have no idea when it would be used. Any practical examples? Thanks. ...
Hi, I would like to write a script that will tell another server to SVN export a SVN repository. This is my python script: import os # svn export to crawlers for s in ['work1.main','work2.main']: cmd = 'ssh %s "cd /home/zes/ ; svn --force export svn+ssh://174.113.224.177/home/svn/dragon-repos"' % s print cmd os.system(cmd)...
But, they were unable to be found!? How do I install both of them? ...
Is it possible in oracle sql to return a default row if no rows found. I have a process where in rows fetched will be put in a flat ascii file. now i have a requirement that if there are no rows fetched by the sql query then there should be a default row in the ascii file. is it possible in sql to output a default row if no rows fetched...
Sorry for the maybe trivial question. I fought a bit with the unix join command, trying to get tabs instead of whitespaces as the default separators. -t is the argument, but these don't work (ubuntu 9.10 64 bit 2.6.31-14, GNU coreutils version 7.4) join file1 file2 -t"\t" join file1 file2 -t="\t" join file1 file2 -t="\\t" join file1 fi...
Hello All... I am developing an application where i required to run some of the scripts of unix from Java Code. Platform i am using is Unix, Tomcat 5.5.. For that, My Sample Code is as follows : Runtime runtime = Runtime.getRuntime(); Process proc = runtime.exec("netstat -i|tail -n +3|cut -d ' ' -f1"); System.out.println("exitValue =...
In Perl: my ($usr,$sys,$cusr,$csys) = times; printf "real %s, user %s, sys %s\n", $usr + $sys, $usr, $sys; Is this true? I read some other questions where people did things like saving the current time away in a variable and collecting it later, but why wouldn't this work? ...
Say my program attempts a read of a byte in a file on a ZFS filesystem. ZFS can locate a copy of the necessary block, but cannot locate any copy with a valid checksum (they're all corrupted, or the only disks present have corrupted copies). What does my program see, in terms of the return value from the read, and the byte it tried to rea...
Ok I have two programs, and one calls another using executable from another. I am running it on Ubuntu terminal This is folder structure in place .../src/pgm1/pgm1 .../src/pgm0/pgm0 pgm1 and pgm0 are executables. This is how I call the other executable char cmd[1000]; string path = "/home/usr/src/"; // call pgm0 for e...
So I created a symlink: ln -s /location/to/link linkname Now I want to change the location that the symlink links to. How do I do that? is there a way to do it without deleting it first? ...
How I can get hardware information from a Linux / Unix machine. Is there a set of APIs? I am trying to get information like: OS name. OS version. available network adapters. information on network adapters. all the installed software. I am looking for an application which collects this information and show it in a nice format. I ha...
I am having a prior knowledge of shell scripting. I am trying to connect to a table using SQL*Plus and fetch the data in a Perl script and store that output in a Perl variable. Normally in a shell script I would do like below: SQL_RESULT=`sqlplus -s ${CONNECT_STRING} << EOF ${SQLPLUS_SETTINGS} select foo||'|'||bar ||'|'|| xy...