HTTP Requests With Crontab?

Apr 20, 2005

I set up a cron to run every minute & I'm running a PHP script by way of cron like

wget http://example.com/some_script.php

Now does each request of Cron is a seperate HTTP Request or what? Say my script takes more than 1 minute to execute completely but before its completed, its called again. So, will that effect the PHP script running because of previous HTTP Request or will it create a new HTTP Request & let the previous request finish its operation? Technically, it shouldn't block/affect the previous request, but I'm not sure!!

View 6 Replies


ADVERTISEMENT

Over 1000 Http Requests

Jan 12, 2008

Quote:

netstat -anpl|grep 80|grep 74.xx.179.xxx|wc -l
990

I observed too many http requests into the server, so just wonder how your guys twaek server to accept over 1000 request and more?

View 8 Replies View Related

What Else Would Be Blocking HTTP Requests

Jan 19, 2007

I have a guy who can't get to any of the 100 or so virtual hosts on my RHEL3 server.

It's running the latest Apache RPM from RedHat. I also have mod_evasive and mod_security running.

Here's what I know. The guy *CAN* connect via SSH and FTP. The guy *CAN* see the default web page when he hits the IP in his web browser (e.g. he types [url]into the address bar on IE). But when he uses any of the host names on the server he *CAN NOT* see anything. He gets timeout errors.

His IP in NOT in ANY error logs, it's not in mod_evasive or mod_security, it's not in IPTABLES, it's not anywhere I can see.

I must be missing something. Anyone have any ideas?

What would be in front of Apache blocking his requests?

View 5 Replies View Related

All Http Requests To My Server Redirected

Oct 8, 2007

There seems to be some problem with my server, none of the websites hosted on my server are accessible, the http requests either return a blank page or a page with a red quare on the upper left hand corner.

I am not sure if this is some kind of infection or DNS problem or a problem with memory apache is taking up
as i have thousands of virtualhost entries in my access log accumulated over the years out of which only a few 100 websites i am serving presently, but never deleted the non-exitent virtualhost blocks.

At times the websites are opening but most of the times they are not. And when they do not open my http requets are not logged in apacha access log.

Even the customers have reported the same problem.

Also, just four days back i had a strange issue where all
http requests to my server would take me to [url].

I can SSH to server, and everything else is working fine.

View 3 Replies View Related

Block Http Requests Coming Via Proxy

Jun 24, 2007

I want to block all http requests coming to my website via proxy. Is there any way/script to achieve this on the server?

View 5 Replies View Related

All HTTP Requests To My Server Gets Redirected To Malware Websites

Jul 24, 2009

When i try to open any website hosted on my server (around 50 of them) i am being taken to following malware website;

[url]
[url]
This is a problem with my Limnux server running Apache and not a virus on my local computer as customers from all over are reporting the same issue.

As soon as i restart Apache eveything returns to normal with no such redirects.

I think my server is being attacked causing http requests to get redirected to some malicious website.

This issue would resurface almost every hour and would not go away till i restart apache.

So far my Datacenter techs. have not been able to identify the cause of this.

View 14 Replies View Related

Apache Down With 503 Error / Http Requests Get Redirected / Is Server Hacked

Jun 4, 2009

My Linux Server's Http Daemon (Apache) would stop serving websites ever so often, as soon as apache is restarted the error fixes iteself only to resurface within few hours.

The apache process would still be running i.e. apache does not die but no websites hosted on my server would be accessible from browser. And when this happens the apache logs do not log any http requests.

Instead when this happens all http requests to my server would be redirected to some weird Trojan website and my Norton Antivirus would show an Alert/Warning, for example;
"Browser exploit at www.xxx.xxx was blocked"
Risk Name: MSIE WebViewFolderIcon ActiveX Control BO

or another error like;
"Auto-Protect has detected Trojan.Fakeavalert".

At first i thought the problem could be with my Laptop/ISP so i logged on to the server via SSH and opened try to open a website using command line "lynx mywebsite.com" and it shows following error;
"Alert!: HTTP/1.0 503 Service Unavailable".

Now if i assume my laptop were to be infected, then as soon as i restart my apache and visit mywebsite.com eveything returns to normal with no such warnings. Why do i see those norton error messages only when apache is down with 503, and when apache is down with 503 how come the http requests always get redirected to some suspicious websites and nothing gets logged in apache error log?

I think my server is being attacked causing http to get unresponsive and thereafter http requests to my server are redirected to some malicious website, is this correct?

Also, i suspect this is a php script exploit as some customers have reported that google have blocked their website due to security reasons, i found <iframe> tage inserted in some php pages which i fixed.

Also, another thinh i noticed;
when apache responds with the 503 it is referencing PHP 5.1.4 in the header response:

[root@]# curl -I xxx.xxx.xxx.xxx (my server ip)
HTTP/1.0 503 Service Unavailable
Server: Apache
X-Powered-By: PHP/5.1.4
Retry-After: 20

I am running PHP 4.3.9m why does apache responds with PHP 5.1.4 when this 503 error surfaces?

Also, since my apache was dowan with 503 error a customer mailed in today saying;
"It seems that my site www.xxxx.com is regularly down, and the winlogon virus is involved."

I suspect this is again due to the fact that http requests start getting redirected?

View 3 Replies View Related

Pico Etc/crontab VS Crontab -e

Sep 12, 2006

I have been searching for an answer on this for a couple of days and have yet to find one.

I am running a box with Centos.

If I Pico etc/crontab I get this type of output;

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

If I crontab -e I get this type of output;

44 21 * * * /scripts/upcp
0 1 * * * /scripts/cpbackup
*/15 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
2,58 * * * * /usr/local/bandmin/bandmin
0 0 * * * /usr/local/bandmin/ipaddrmap

Why different?

I am taking it crontab using -e is not the same file as etc/crontab?

View 4 Replies View Related

Crontab

Aug 7, 2007

1) #> nano /var/spool/cron/root
Then type in the cron entry and save it
#> service crond restart
It cannot work if have not restart crond

2) #> crontab -e
Then type in the cron entry and save it

3) #> nano /etc/crontab
type in the cron entry and save it

I can use above three method without any problem.

However I cannot use crontab [filepath] method

4) #> crontab /home/admin/domain.com/www/testing/crontab.dat
*crontab.dat is a cron entry.
after type in this line,
I use crontab -l and see cron entry has been added to /var/spool/cron/root
However, the cron job will not run even I restart crond.

View 0 Replies View Related

Crontab

Aug 20, 2007

It's been nearly a year i'm running several cron jobs on my CPanel hosting. The format for the command i used is as follows (putting aside the timing info):

php /home/account/public_html/subdir/cron/cron1.php

A few days ago, all cron jobs stopped working, probably because of a certain setting that my host changed. I contacted my host, and he replied that the format i'm using for the commands was not proper, and he gave me the proper command as:

GET [url]

I tried it, but it didnt work....

I googled the problem and got tens of commands... i simply wanna run a PHP file (the file itseld is functional if i browse it) every now and then, so what is the command i should be using?

View 4 Replies View Related

Crontab Permission

Mar 24, 2008

I have problem to change the /usr/bin/crontab permission to 4755 it still remain 0755 ...

View 5 Replies View Related

How Does One Run Crontab Effectively?

Nov 10, 2006

How does one get their cron jobs emailed to them?

How does one run crontab effectively?

I have been trying to start up a new cronjob. I wrote the line command chmoded it to 755 and put it in a folder cron.x

In my crontab I input the following:
30 23 * * * root run-parts /etc/cron.x

the first is minutes
the second hours, right?

At 23:30 on my server time, nothing happened. >_<;; I'd like to have my cronjobs emailed to me so that if there is an error, I can see it.

I've been combing google with little avail (can't find much other than unrelated blog junk on that engine nowadays anyway >_<) I figured WHT would be more useful.

View 7 Replies View Related

Where To Find My Crontab

Jun 23, 2009

in which folder is the crontab generally located.

i run LAMP

also,i m looking for a specific cron right now (xbt_cron).once i find it ,what command do i use to run it manually.its supposed to run by itself..i just moved to a new server last week and now its stopped working.

View 7 Replies View Related

Crontab Permissions

Mar 18, 2008

In trying to setup a cronjob on a new server I notice that cPanel tells me that usr/bin/crontab permissions are wrong and that they need to be changed to 4755.

When I log in to the server with WinSCP and attempt to change the permissions it just doesn't do it ... it looks like it's doing it, no errors, but it just leaves it the same!

View 4 Replies View Related

A Line In My Crontab :: 0 7-23/3 * * * Top.sh?

Jan 13, 2008

I found this line in my crontab file

0 7-23/3 * * * top.sh

when it's running?

and what is it doing?

View 6 Replies View Related

Crontab Absolute URL

Aug 11, 2007

Is it possible to run a Crontab that executes an absolute URL?

I tried it, but it doesn't seem to work.

View 4 Replies View Related

Crontab -e Command

Aug 23, 2007

I can't edit or add anything when using this command

crontab -e

all the jobs appears but I can't edit

View 3 Replies View Related

Crontab + Php In Freebsd 6.1

Feb 5, 2007

i created a new cron job with "crontab -e" command by using the "root" user.

* * * * * php -f /path/file.php

i tried it for php -q too. while i type this command on the shell the php file works. there is no problem with crontab rule too. the chmod of file.php is 777, user root group wheel..

but it cant work. i couldnt understand why it aint.

i created a shell file and changed the cron like:

* * * * * /path/file.sh

and in file.sh:

#!/bin/sh
php -q /path/file.php
mkdir /path/anydir

so, /path/anydir have been created but file.php not executed. so the problem is not about cron rule.

View 5 Replies View Related

Crontab In My Server

Jul 9, 2007

I have few servers and when I check my crontab, I found the same line in all servers but at a different time.

43 0 * * * cd /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/scripts/ ; /usr/local/cpanel/3rdparty/bin/php cron.php > /dev/null 2>&1

24 20 * * * cd /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/scripts/ ; /usr/local/cpanel/3rdparty/bin/php cron.php > /dev/null 2>&1

32 19 * * * cd /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/scripts/ ; /usr/local/cpanel/3rdparty/bin/php cron.php > /dev/null 2>&1

3 16 * * * cd /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/scripts/ ; /usr/local/cpanel/3rdparty/bin/php cron.php > /dev/null 2>&1

Anyone can explain what are the purpose for these command, and should I make any changes to these to standardize them all (the time)

--------------------------------------

Secondly, one of my server doesn't set any automatic CPanel updates, so I set automatic updates for CPanel packages and Security packages. Is it suppose to add "/scripts/upcp" into my crontab? Most of them are also at different time.

--------------------------------------

I assume this command is to inform me whenever my user make a new domain add-on?
/usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify

--------------------------------------

Also can anyone tell me what are the purpose of these?
/usr/local/bandmin/bandmin
/usr/local/bandmin/ipaddrmap
/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1
/scripts/exim_tidydb > /dev/null 2>&1
/usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1

View 0 Replies View Related

Crontab To Run PHP [without Using Wget And Lynx]

Aug 7, 2007

Hello, I don't know how to use crontab to run PHP without using wget and lynx

1) The PHP script can run via SSH command line mode without problem
2) I can use crontab to run the PHP script with wget or lynx.

However,

3) The script will not run if i using below entry

1 2 * * * php /path/to/script/crontest.php
1 2 * * * php -q /path/to/script/crontest.php
1 2 * * * php -f /path/to/script/crontest.php

1 2 * * * /usr/local/bin/php - /path/to/script/crontest.php
1 2 * * * /usr/local/bin/php -f /path/to/script/crontest.php
1 2 * * * /usr/local/bin/php -q /path/to/script/crontest.php

View 6 Replies View Related

Enabling Crontab For Users

Aug 19, 2008

I noticed on my new servers users doesnt have crontab permission.On my first server they have access.So what i need to do to enable users crontab permission automaticly on new servers?I have whm/cpanel there but it seems there is nothing about it there.

View 3 Replies View Related

Crontab Editing Error

Jan 13, 2008

I am trying to edit crontab using crontab -e, I seem to get to it okay but I am unable to edit anything in there, at the end of the file there are ~ in there, and I cant even delete them. Its like the file is locked.

View 6 Replies View Related

Crontab -e Using Nano/pico Instead Of Vi

Jul 7, 2007

how do I edit crontab using nano/pico editor -w instead of vi when executing "crontab -e"

I'm bad at using vi editor

View 9 Replies View Related

Not Able To Set Crontab To 4755 In SSH Logged In As Root

Mar 20, 2008

For some odd reason, when I run: chmod 4755 /usr/bin/crontab

in ssh, it still does not change it to 4755. It's like I don't have permission to change it, ans I'm logged in as root.

I've read some threads here on the forum and none really come to an issue where when they run that chmod 4755 /usr/bin/crontab it still doesn't chmod it.

So is there a way to check if it is chmodded to 4755 as I use CSF Exploerer to check if it is chmod'd to 4755, and it just stays at 755.

View 6 Replies View Related

How To: Crontab 4755 CPanel Error Fix

May 28, 2008

A common error that cPanel show after a fresh install is the:

usr/bin/crontab permissions are wrong. Please set to 4755

An easy fix is the using the following commands.
Make sure you're using root.

chmod 4755 /usr/bin/crontab
ps -aux |grep cron
/scripts/restartsrv_crond
/etc/init.d/crond restart
ps -aux |grep cron
ls -l /usr/bin/crontab

View 8 Replies View Related

Cronjob :: User/bin/crontab Permissions Are Incorrect

Apr 19, 2008

I am trying to setup a cronjob but cPanel, (Linux Centos 5), tells me that user/bin/crontab permissions are incorrect and need to be changed to 4755 - I try to change permissions in WinSCP [Properties] but it doesn't 'take'.

how to force a change of permissions with SSH (Putty)

View 2 Replies View Related

Apache Auto-restart Script (crontab)

Jan 10, 2007

I have root ssh access to a server and we notice when doing a bash ./mysq-backup script to dump the data from the web site's databases into .sql and .tgz them that httpd goes down sometimes. That, and sometimes it seems that httpd goes down in other situations. All fine, we will figure out why. But ..

It would be nice to run a crontab to check every 15 minutes if httpd is running, if not, to restart it.

Right now I when I notice the site is down I log into the ssh as root and type: service httpd restart. If it is up it will then first stop it, and restart it. I can look at the screen and see it happen, so I feel pretty safe doing this. One of my concerns is that when I am not at the screen and it stays down .. I do not notice this and downtime increases. And we don't want to just crontab service httpd restart, so a bash script to check for the pid and restart if it down .. would be nice.

I thought this would work:
(chmod 755 httpdcheck)

Code:
delta:~ root# cat httpdcheck
#!/bin/bash

if [ ! "$(pidof httpd)" ]
then
echo "Could not find pid of httpd - restarting"
service httpd restart
else
echo "Found pid of httpd - NO need to restart"
fi
delta:~ root#
And I have this crontab entry:

Code:
delta:~ root# crontab -l
*/5 * * * * /root/httpdcheck | mail my@email
delta:~ root#
When testing, I did service httpd stop and waited 5 minutes and I received the email : could not find it, restarting. But when I go to the web site in browser it remains down. I have to login to ssh and do service httpd start manually to really load it.

Manually loading btw .. shows it works as bash script just fine, so I dont't know why it won't work when run from cron?

Code:
delta:~ root# ./httpdcheck
Could not find pid of httpd - restarting
Stopping httpd: [FAILED]
Starting httpd: [ OK ]
delta:~ root#

So .. when is it going wrong? Am I forgetting something?

View 3 Replies View Related

Redirect Http:// To Http://www

Jun 23, 2008

Does anyone know how to redirect the URL of a host so that it always goes to the www subdomain? Is this done with RedirectMatch or is a rewrite rule?

View 3 Replies View Related

Http Messed Up But Not Http

Mar 31, 2008

where when I view my website through http using Firefox, it never stops loading. If I use IE, then I get a "page can not be displayed" error.

If I use https then everything works fine.

I have noticed that if I delete lines from the files, I don't have this problem.

If I try viewing images (so I know it can't be an html of php problem) some look fine (the very small files). But, larger files, around 168 kb, load halfway and the second half is distorted (green and purple chunks and other random colors and lines).

If I view the image through https, the image is perfectly fine!

If I put my site through w3.org's validator (just to see what it would report) it says "500 Line too long (limit is 4096)".

My website used to work, so I know there isn't any code in the pages that would cause this to happen.

Is there an Apache setting I check? Perhaps it is sending a really long header that I can not see? I am not really sure what to do. I have made my site to force https but it's slow and not signed.

View 6 Replies View Related







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