SH Script Becomes Zombie After Executing Via Cron

Sep 29, 2008

A very simple shell script that rotates log files of lighttpd server everyday becomes zombie after executing via cron. If executed directly in the shell it just dies normally. Tried to add "exit 0;" in the last line but the same effect...

An important notice: the script stops and starts the server, maybe it dies abnormally because it forks a process (lighttpd)?

View 5 Replies


ADVERTISEMENT

Cron Jobs Not Executing PHP Files

Jun 16, 2008

I have a new dedicated server and am trying to set up a cron job via CPanel on on of my accounts (we'll call it "abc" account).

In the Cron job area, where it asks for the command to run, I enter this:

/home/abc/public_html/forum/class/sendnotice.php

But when the job runs, it doesn't seem to be executing the .php file. Instead, I get stuff like this via email:

/home/acb/public_html/forum/class/sendnotice.php: line 1: ?php: No such file or directory
/home/abc/public_html/forum/class/sendnotice.php: line 2: ////////////////////////////: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 3: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 4: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 5: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 6: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 7: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 8: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 9: //: is a directory

So it is as if the cron job is reading each line of the .php file instead of just running it. Am I doing something wrong in setting up the cron job to run that file or could it be a configuration issue with the new server?

View 3 Replies View Related

SuPHP + CGI PHP And Zombie Processes

May 28, 2009

OS: CentOS 5
Software: Apache 2 / PHP CGI 5.8 / suPHP

Today I took the leap and switched to suPHP, rather than the Apache module. This is just what suited us best for hosting our own websites, keeping them more isolated from eachother bar a certain shared directory.

All is great, apart from I'm now noticing Zombie processes all of the time. These processes do seem to go away though, if I watch top the amount of Zombie processes will go up and down between 0 and 10.

Code:
17471 gnation 15 0 0 0 0 Z 1 0.0 0:00.03 php-cgi <defunct>
17463 gnation 16 0 0 0 0 Z 1 0.0 0:00.02 php-cgi <defunct>
17467 gnation 16 0 0 0 0 Z 1 0.0 0:00.02 php-cgi <defunct>

Are these processes a problem, considering they do leave after a while? I've read up about Zombie processes and it would seem that as long as they are closing at some point, instead of hanging around, then that's fine. Is this supposed to happen in my setup?

View 3 Replies View Related

Zombie DDOS Attack On My Domains

Dec 20, 2007

I have 4 domains under heavy dDOS attack for the last 3 years. Someone included my domains in a virus that infected thousands of machines all over the world.

The infected machines request 4-5 specific files from my domains. Is there a way to block those specific requests, without affecting the others?

I am using shared hosting and so far 5 companies rejected my domains, after trying to host them for a while.

View 3 Replies View Related

Phpinfo.php.gif Executing Php

Mar 6, 2007

Having this problem on chroot'ed sites in Ensim.

This is what I have in my php.conf:

Code:
[root@ns1 conf.d]# cat /etc/httpd/conf.d/php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so

SetOutputFilter PHP
SetInputFilter PHP

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
This prevents file.php.gif from executing in a non-chrooted site, but in my chrooted sites, file.php.gif will execute as a PHP file. Any idea why? Some other config I have to change?

View 10 Replies View Related

Executing Memtest86 Remotely Without KVM

Apr 16, 2009

how I can execute memtest86 remotely without any KVM access. Is this possible? If so, how would I go about it? I run Debian 5.0 32bit with bigmem kernel (16x4GB Dimms)

View 5 Replies View Related

Php Showing Code Not Executing

May 14, 2007

i have a vps account and am trying to setup my website i installed php 4 from a control panel where it auto installed php and there is mysql and i installed all of them but when i upload my script and go to install or go to the index of my site it shows the php code and does not execute.

my permissions are right on i also made a testphp file and used this code <?php phpinfo(); ?> and still nothing just shows the php code when you browse to the file i even went further i installed from the control panel another program called phpmyadmin and when i log in it does the same thing just shows php code so what the hell is going on you think i need to contact my host provider for this issue i sent an email out but waiting for a responce

View 7 Replies View Related

Script Using Curl Executing Ssh Commands

Apr 26, 2009

im trying to write a script interfacing to WHM again via remote access key. What I want to achieve is to remove an ip from iptables. using PHP script (CURL), any thoughts on how i can remove an ip from iptables? I know the ssh command how to do it but i dont know if it will work via a PHP (CURL) script connecting to WHM via remote access key.

View 1 Replies View Related

Executing A Queue Of Shell Commands From Php

Feb 4, 2008

This is following on from:
[url]

So I need to execute a list of commands via a cron job rather than having the script 'wait' for the shell to finish processing (as this was leading to time outs and all sorts of issues).

I'm guessing the way to do this is to have my php set up a cron job to occur at some point in the near future (like current time + 1 min), then to prevent the job from repeating the next hour, it removes itself from the cron list as the final command.

Does this sound like a reasonable way to go about executing a queue of shell commands from the browser that take an indefinite (possibly long) amount of time?

View 4 Replies View Related

Executing ./ Commands Through Hackers Shells

Jul 12, 2008

I've been concerned about executing commands through (./) using php and perl shells on the server

a new way of hacking these days is using perl shells , even if the perl was terminated on the server ,, or was forbidden for users
hackers upload a (perl) program to the server to use it instead of the server's own perl

any way ,,

chmoding the (ls-cat-more-less) to 4750 seems to give permission denied when exeuting these programs on the server
but the hackers also found that they could upload their own ls-cat-more-less programs and use them instead of the server's

they also could rename them ls==>ki or anything and use them like this

./ki /etc/valiases -alXrt
and the commands work like charm for them

./ <<--- this command uses the sh program on the server ,, ((sh which refers to bash on most servers))
so

./ki
is the same as

sh ki

and

bash ki

so i tried chmoding sh with 4750 and that killed the exploit

i was concerned about cpanel's and the website's functionality
so i tried changing an accounts password and creating a database ,, they both worked fine

so ,, if u thing chmoding 4750 sh is a bad idea please let me know

and if you know any other ways of disabling all the perl scripts on the server

View 14 Replies View Related

Executing A Linux Command Via Text Message

May 24, 2008

how I might be able to execute a Linux command by sending a text message to some email address? Where if that email address gets a message (either any message, or perhaps only messages containing some password), a Linux command is executed, e.g.

named -u named
Perhaps via bash script.

View 14 Replies View Related

Apache :: 2.4.3 - Difference Between Executing As Service Or As Application

Feb 12, 2013

I installed apache 2.4.3 in windows server 2003. Since i did not get administrator rights in this machine i could not install as a service.

I runned as an application through the command line console and is working fine.

Is there any difference regarding performance when running as a service or as an application?

Is there any other benefit or drawback of running as a service or as an application?

View 2 Replies View Related

Plesk 12.x / Linux :: Executing Cronjob Every Minute

Apr 18, 2015

A customer want to execute a cronjob in plesk every minute, but the cronjob was only executed every 5 minutes...

(so that the cronjob was executed every minute...)

View 2 Replies View Related

SSH Cron Job

Feb 28, 2007

I wanna run this command "./adfsas.sh" Every 4 Hours can someone tell me what command I can use via SSH to set this cronjob?

View 8 Replies View Related

Cron Job

Oct 4, 2008

PHP Code:

* */1 * * *

But I didnt understand the difference from

PHP Code:

* * * * *

time property? Why is there a need for /1?

View 7 Replies View Related

Cron

Sep 17, 2007

I have root access to a server. Is it possible to create a cron that would restart my ftp and http server every so often. Like once a week or somthing. If so how would i do it?

View 6 Replies View Related

Cron Job

Feb 24, 2007

in order to backup db automatically i want to use cron job. So i set cron job at 00 AM

suppose that : my infos
db name : db
db user : zode
db pass : 123

the command i use is following

PHP Code:

mysqldump -u zode -p123 of -K -c -f --compatible=mysql40 --default-character-set=utf8 db > backup/db_`date +%d%m%y`.sql 

in good time i am looking into backup directory db is in it or not

but there is nothing in it

View 3 Replies View Related

Cron Job

Jun 18, 2007

I run A Centos 4.xx latest kernel server and Ive got a problem with Cron Job reporting.

The Cron Jobs themselves are working fine but I keep getting this message, on the hour, every hour

Quote:

Originally Posted by Email from the Cron Daemon

Not a directory: /etc/cron.hourly

The folder etc/cron.hourly DOES EXIST! and I cannot work out what could be causing this?

Does anyone hgave any ideas what could be causing it

View 2 Replies View Related

CRON Job Timing Out

Sep 19, 2007

i have had a problem for some time now, regarding my CRON jobs. I am trying to download a large amount of data from ebay (through their API, totally legal and aboveboard) using php, but my CRONjob times out.

I have tried resetting the timeout variable, but then it exceeds the maximum filesize
SO, my question: is there any way to have a script run as a CRON job, and wen it is complete, call another script?

View 4 Replies View Related

Per Second Cron Jobs?

Apr 5, 2009

Hey everyone, my friend's dad is looking for a web host that will allow his cron jobs to run every second. Most hosts apparently dont allow cron jobs faster than 5 seconds apart.

How often a host can run cron jobs isn't really advertised on their sites so I'm having a bit of trouble finding a host. I've resorted to just sending emails to sales addresses asking about it.

Does anyone know how I can find a host like this?

View 7 Replies View Related

Reboot Cron Job

Aug 20, 2007

VPS isn't rebooting by itself when it goes down. Anyone has any program/script that monitors heartbeat of the server? Like when it goes down, the program will automatically reboots the system. I know there's such a script out there but I forgot what it called.

View 2 Replies View Related

Cron Job Every Month

Jul 12, 2007

I want to execute the following command on the 15th of every month at 1AM:

echo > /usr/local/apache/logs/error_log

How to accomplish this?

View 2 Replies View Related

Cron: How To Run Php File

Feb 7, 2007

My server with cPanel, I'd like run file http://domain.com/file.php at 0h00 everyday, I have set the Cron Job in cPanel :

Code:
0 0 * * * /usr/bin/ehpwget http://domain.com/file.php
but The cron is not working well

Code:
/bin/sh: /usr/bin/ehpwget: No such file or directory

Can any one please let me know how to run a php file with cron.
(as user or root)

View 2 Replies View Related

Cron: First Of The Month

Jun 13, 2005

Anyone know how I'd run a cron job on the begining (first day)of every month?

View 2 Replies View Related

Does Cron Timeout?

May 23, 2007

Simply wondering, does cron timeout?

I have heard mixed reports and can't find any good info. Personally i've run a cronjob for up to 6 minutes, but as my best method was sending myself emails through php, its not exactly a highly accurate testing method.

On the same note, what would happen if one cronjob is running a php script for over 10 minutes, then another cron job starts on the same script, before the first one has finished?

View 2 Replies View Related

Cron Run Php Scripts

Sep 27, 2006

I have my own server. I create php file for adding cronjobs. I checked /etc/cron.deny and /etc/cron.allow. both of them is empty so no problem. I execute the php script but nothing : I check with crontab -u user l and it told me no cronjobs for that user. When I access as root from ssh and try teh same command, it works fine. I don't understand how to fix that.

View 0 Replies View Related

Rsync And Cron

May 5, 2009

I have a bit of a strange problem, I have an rsync command setup in the servers crontab and from the cron log it show it ran the command but the files don't copy to the backup server. If I take the rsync syntax and run it manually all the files copy across with no errors, but I can't figure out why the cronjob doesn't work properly.

View 8 Replies View Related

Remote Cron

Mar 30, 2009

I've just noticed that many people may have a free remote cron facility without realising it.

If you have any domains registered with Godaddy, you get free web space that includes a cron facility. It only runs every half hour, but you could set six jobs at 5 min intervals to get an effective 5-minute poll, which is good enough for many purposes. You could use it to check uptime on another site, for example. Has anyone tried this?

View 11 Replies View Related

Cron Job Deleted - Is Their A Log?

Jul 4, 2009

We are running cpanel on one of our servers. Several cron jobs were deleted from the cron panel of one acct. I have no idea of the paths to re-enter these jobs. Is their a log file on the server that will show cron job history from previous runs so I can recover the proper paths?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved