Server :: Unpredictable 403 Responses For Image-parsing PHP Script?
Jan 14, 2011
The problem I'm having is that the reflect2.php script is unpredictably returning 403 (forbidden) or 404 (not found) errors sporadically. The behavior will vary for a given image so it's apparently got no relation to the image format. For example, I will load my page and I'll get some 403/404 for certain urls (which correspond to images in my page):
FIRST ATTEMPT - only one bad reflection image url
The second time I load the same page, that previously broken image will be fine but this other one will be broken
SECOND ATTEMPT url
The third time, all the prior images are fine and this image, which was fine before, is not 403:
THIRD ATTEMPT url
I don't know why a given request to reflect2.php might result in a 403 reponse. As far as I can tell there is no code in the script that would result in such a header being sent for any reason whatsoever. I'm wondering if this might be a problem with Apache somehow. I'm on thin ice when it comes to Apache configuration values but perhaps there's a limit in the simultaneous connections permitted, the number of PHP threads available, or the keep-alive values or something?
I am running webcam under Ubuntu 9.04 and I want to upload the images it captures to a server via ftp and have every image have a date and time in the filename. But I can't get this to work.From reading the man page for webcam it appears that I should be able to specify file = "webcam_%Y-%m-%d_%H:%M:%S.jpeg" and have it parsed so I get something like webcam_2010-01-05_10:54:23.jpeg but webcam is just uploading an image with an unparsed filename. So instead of getting a series of images on the server, I just get the most recent image (with the older images being overwritten every 1800 seconds). I know I could write a script on the server to rename the files as they are uploaded and put it on a cron but this seems to be something webcam should be able to handle.Here is my .webcamrc config file:
[grab] device = /dev/video0 text = "webcam %Y-%m-%d %H:%M:%S"
I'm having a problem with connecting over ssh to a server (wrdsvr) that has me perplexed. I'm using putty to connect from my WIndows VM desktop to a SLES 9 server. If I connect to wrdsvr from my desktop over ssh and run certain commands with multi-line output, the display freezes after the first line. If I connect from my desktop to a different server (oksvr), and then from oksvr I connect to wrdsvr, then there is no problem. In fact, by running 'w' after connecting in that roundabout way I can see that subsequent commands I type into the frozen window still run.
I just can't see anything in the window itself as the display is frozen. I have sshd logging running in debug mode on wrdsvr and there is nothing produced during this. There is also nothing in the putty event log. If I type 'exit' in the frozen window, the server sees the connection as closing normally and then gone. Usually my putty window would then close automatically, but in this frozen case it doesn't. So although it is sending characters I type in, it doesn't seem to be receiving the output in return.
commands that run successfully are: w ls man less
commands that cause the display to freeze are: ps ax ls -l top (for this one I don't even get the first line of output, it freezes immediately)
The machine I'm connecting from is a VMFusion guest running Windows XP. I get this behavior connecting using putty, but I also installed a demo version of securecrt (when this issue occurred previously) which saw the same problem, but I can't repeat it as my license expired. (Last time the issue went away while I was troubleshooting an immediate service-affecting problem on that and a number of other servers and I don't know what fixed it!) I exported the putty registry keys and the profiles for the two servers are identical. I tried loading the profile for oksvr and temporarily changing the hostname to wrdsvr, but saw the same issue. I am connecting over a Cisco VPN.
My colleague is on the local network and does not see this issue when he connects to wrdsvr using putty. We are both using the same version of putty 0.60. Here is the background on the servers. Both wrdsvr and oksvr are running SLES 9. My actions just before I noticed these issues were the following. I updated them using you (yast online update) to the latest patch versions. Using the rpms from Novell, I installed binutils, make, gcc, and glibc-devel and finally VMware tools on both. I then rebooted. Since then I've run you again but that hasn't changed anything. I've compare the installed patches using diff and they are the same. Now I'm working my way through the output of rpm -qVa on each one, but nothing so far.
We have an environment where couple of webservers are being active behind the loadbalancer, the webpage is getting loaded extremely slow if we restart the apache on those boxes its responding very fine. So currently we are restarting the apache service daily basis, i have attached the config with this thread could anyone suggest how to fine tune apache so it works fine without restarting it daily?
I have my own internal bind9 server, for my local domain, and I forward internal requests for public domains to OpenDNS servers. This server is not in a DMZ, but is instead behind an dynamic NAT. I do not accept queries from the public network, only responses. I understand that DNS is primarilly a UDP protocol, so it can't pass through a stateful/nat. without a firewall allow.
I've done a little reading and learned that bind9 does not run 53 <-> 53 anymore (is now >1024 <-> 53), and modified my config so it works like bind4 did, but I am concerned that this makes me less secure. additionally, I'd really rather not have a completely open 53 rule, but it seems that if I constrain 53 traffic to my known forwarders, it interfers with some of my network services like transmission. so, what firewall rules would you guys recommend for recieving forwarded DNS query responses to my server?
Back in April I set up a Ubuntu DHCP server and a multiple VLAN network [URL] to migrate our various servers, workstations, etc off the 192.168.1.1 /24 network that everything was on because we where running out of address space. I built out the new network and everything worked great except our AD server would never get an IP address from the DHCP server (static reservation) and even if I set the IP statically on the AD server it couldn't ping the gateway and noone could log in. After several attempts to resolve this, including bringing in outside help, we where never able to figure out what the problem was.
Now 6 months later I have time to revisit the issue without effecting the live network. I used Acronis and imaged the AD server last Friday, cloned it on to another box with the same hardware, and put it up on the new network that's been sitting unused for the last 6 months. Today when I statically set the IP on the AD server (which is what I want) it connects and I can ping it's gateway 192.168.1.1 and all the way across vlans to a test sales agent workstation at 192.168.8.xxx on vlan 800 but only if I statically assign the agents station an IP address. When I try to get an IP address via DHCP it fails as destination unreachable. Nothing has changed in the last 6 months on the DHCP server but now it for some reason can't ping its default gateway 192.168.1.1. All of the config files are the same as they where left from the post linked above aside from the vlan id's used where changed from 1's to 100's (i.e. vlan 3 is now vlan 300) /etc/network/interfaces
auto lo iface lo inet loopback auto vlan100 iface vlan100 inet static
why it can't reach the gateway, when I do a tcpdump I can see the DHCP requests come in on eth0 but the server never responds and I'm pretty sure its because it isn't "seeing" them since it thinks there isn't a network connection but I don't know how to trouble shoot to find out where the problem lies.
I have a new setup of 8.04 with Apache2, MSQL5 and PHP5.However, I can't get the PHP to run. It is NOT the common problem of the browser offering to download the files. In my case I have some PHP in an HTML file, but the PHP is just ignored.
I have played around with my httpd.conf and also php5.conf files, but I couldn't make any difference.
My httpd.conf sets the document root to /var/www and if I put a php file in here with command phpinfo(), then it seems to dispay correctly. My HTML files are /var/www/app/index.html
I managed to successfully install LAMP on my VPS and proceeded to install Wordpress only to run into an odd error.When I click on index.php, it starts to load but nothing happens.
LAMP = CentOS5.5, Apache 2.2.18(compiled from source), MySQL 5.1.57(compiled from source), PHP 5.3.6(from source too) My site: ottomatic.org as you can see in the index of files index.php is what I'm trying to load and if you check phpinfo.php you can see that PHP was installed correctly too. I added an .htaccess file with 644 permissions to my web root directory and that only seemed to produce an error, this is what I put in the .htaccess:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /
I have an issue with Apache2 and ldap authentication. Here are the specs: Linux 2.6.32-24-generic i686 GNU/Linux Ubuntu 10.04.1 LTS Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.5 with Suhosin-Patch configured
I have installed our site onto a newer server as we were previously running SLES 9.3. The site has installed correctly, however, It seems to be serving the pages a hell of a lot slower than SLES (eventhough the specs etc are much improved). The main problem seems to be with Ldap - sometimes taking 2 or 3 minutes before authenticating/serving the user - and sometimes one minute it works, another minute it doesn't! We know it's a problem specific to this Ubuntu machine, as the older server has no issues with ldap whatsoever. Also, sometimes the ldap authentication fails all together with a timeout, resulting in a 500 status code. I'm not sure whether this a problem with the apache config, the network settings or the server setup. We know ldap itself is fine.
Here's the /etc/apache2/sites-available/default config for ldap. Are these directives correct? (I know a lot of changes were made between apache2 and apache2.2 that may affect this config): Code: ScriptAlias /home/ "/var/www/cgi-bin/" <Directory "/var/www/cgi-bin/"> AuthType Basic AuthzLDAPAuthoritative On AuthBasicProvider ldap AuthName "Active Directory Authentication Required." AuthLDAPURL "ldap://x.x.x.x:3268/DC=xxxxxx,DC=com?userPrincipalName?sub?(objectClass=*)" NONE AuthLDAPBindDN "firstname.lastname@example.org" AuthLDAPBindPassword xxxxxxxx require valid-user Options +ExecCGI -Includes AllowOverride None </Directory>
Here's some examples of some of the log messages we have been receiving: 1. This one occurs upto ten times in a row when the client is being authenticated: Code: [Thu Nov 04 12:47:19 2010] [debug] mod_authnz_ldap.c(377): [client x.x.x.x]  auth_ldap authenticate: using URL ldap://x.x.x.x:3268/DC=xxxxxxx,DC=com?userPrincipalName?sub?(objectClass=*), referer: http://x.x.x.x/home/page
2. This is output when the authentication works: Code: [debug] mod_authnz_ldap.c(474): [client x.x.x.x]  auth_ldap authenticate: accepting email@example.com, referer: http://x.x.x.x/home/page
3. And this one is always output after the error above. This one is more interesting. What does this mean exactly? And why does it say 'declining to authorise' directly after saying 'accepting firstname.lastname@example.org'? Surely this makes no sense: Code: [debug] mod_authnz_ldap.c(546): [client x.x.x.x]  auth_ldap authorise: declining to authorise (no ldap requirements), referer: http://x.x.x.x/home/page
4. This one is output when the authentication attempt times out (after 10 outputs of error number 1): Code: [warn] [client x.x.x.x]  auth_ldap authenticate: user email@example.com authentication failed; URI /home/page [LDAP: ldap_simple_bind_s() failed][Can't contact LDAP server], referer: http://x.x.x.x/home/page
I have apache 2.2.3 installed with php5 and libapache2-mod-php5. The server displays web-pages fine, but when I try to load a .php file, nothing shows up. There aren't any errors, not in the browser and not in the Apache2 error logs... just nothing shows up. When I look at the page source on the browser, all the HTML code is there, but all the PHP code is gone, as though it was parsed. I can't get any output to show up though, echo and print both do nothing.What could be the problem?Example:
I've just installed ProFTPd with mySQL and need to collect and/or parse statistics about users, traffic usage and so on. I've googled for a while and found no luck on getting some good guidance or manual on that. And on ProFTPd.org not much of info concerning the mySQL.
I am making a library, but I am facing a strange problem while sending data over network using ethernet.
I am sending 39 bytes of the data from one server to slave application but some time slave receives 39 bytes and some time it receives 29 bytes. And when ever slave receives 29 bytes all the memories to which my pointers are pointing get changed. This problem is only when I am sending data from the server to slave, while sending data from slave to server I am facing no such issue.
I have several systems experiencing this issue, but the "worst case" system at the moment is a system where there are 2 dual-port PCI-X e1000 cards, and two on-board e1000e PCI-express card.What happens is maddening. If the /etc/sysconfig/hwconf is removed, and kudzu is not run, and the 6 interfaces each have a corresponding script:
Now what happens defies explanation. The only way I can be sure to make the e1000e first-listed-in-pci-order e1000e device always eth0 is to remake the initrd and add e1000e to the initrd.If I do not do that, eth0 might be the onboard night, it can also be the first port on either of the dual port cards.So eth0, eth2 and eth4 all take turns being eth0. This was not an issue in the EL-5.1 timeframe. This is certainly new to the EL-5.2 timeframe and thus far is not possible to control because the system does not load eth0's driver alias in order, and the enumeration of the PCI devices causes what seems to be random labeling of the first interface.
This is a particular problem in that identical hardware systems will come up with different eth0 interfaces , and on a single system, without the /etc/sysconfig/hwconf (which calls "eth0" something different from what was originally in the /etc/sysconfig/network-scripts/ifcfg-eth0 HWADDR directive).I need as little auto-magic as possible, I can live with PCI-bus order and driver load order is the order ethernet devices appear in, I cannot use the software in a state where what is "eth0" is randomly determined and the only way I can nail it down is to run kudzu, generate a hwconf AND brand the network interfaces in the network-scripts with HWADDR. I've been using EL since 6.2 and this is the first time I've ever encountered a situation where the enumeration rules (which are ancient at this point) over-ridden by something.
Version-Release number of selected component (if applicable): EL-5.2 series.The random enumeration of PCI devices and the subsequent assigning of eth0 to a random NIC is not on every reboot, and does not seem tied to a power off scenario vs a simple reset or warm reboot. Over the course of 0 reboots , eth0 should have moved between 2-3 times.Packages that seem relevant.
My hard disk is blank now due to some faults I made in installation.I made a USB stick from which can start Fedora 10 livecd image successfully. My USB device is only 2GB, so livecd image is my only choice. Everything is fine in live cd system. but when I try to install system to hard disk, my PC got frozen - no responses from anything. This situation only happens when I set up the partition and began to write image to the hard disk. It happens at about 5 percent of the progress bar every time. It seems I can't install F10 this way.
So I tried another way : using this LiveCD USB Stick, install it in text mode. However, strange thing came up too: when I finished install the system , it tips "reboot". so I pressed "reboot", however it start KDE and then got frozen again. When I restart PC by "reset" button, it tips me can't find OS - insert system disk and press Enter. It's a BIOS message , so I think at least GRUB is not working. But why and how this happens? I set up them correctly without error tips. But now it can't be started. I set GRUB to be installed in MBR during the installation. My hardware is like this : AMD 5000+ black edition , 4GB RAM , ati 3200 video card , 320GB hard disk (sata port).
I have a pretty quick machine, quad core 2.66GHz duo processor, nice ASUS motherboard, high speed memory bus and so on. Basically, this is not a machine that's getting "maxed out" by playing some music.Load averages for the 4 processors according to htop are 1.48, 1.25, 0.85. Looking at the System Monitor CPU history I am seeing an average of perhaps 25% load.
However, when I am in a shell, I am getting a second or longer waits between key presses at times.My only guess as to why is that may be is that the streaming audio is on some very high priority so everything else gets put on the back burner. In any case, does anyone have any experience with this and a possible tweak that would give everything else a "fair go" so things didn't seem so unresponsive?
Several days ago responses to many, but not all, of my internet requests slowed from long to never.I'm on Verizon FIOS; running Firefox on a Debian Lenny system with 6GB or RAM and 500GB HD with 32GB cache.
internettrafficreport.com shows index of 84 for North America. I've pinged a few sites -- see returns from 16ms to 91ms.I've also rebooted my Verizon DSL router.
I'm writing a mass snmp toner check which polls any toners available to be snmp polled, however when using a loop statement I get the results on different lines; which sounds good, however the tool I use to check with (nagios) ignores the new lines.
Is there any way I can get the output on one line? Also, I need to raise a fault if any of the toners are below a specific level (with nagios you raise faults with the exit code) - any way I can do this without exiting the loop. Code below with bits and bobs commented out.
I am having (seemingly) random trouble with my wired network ever since I installed Lucid. I have no problem getting an ip address from dhcp. However, randomly the computer will boot and although I have an ip address I do not receive any responses for pings on the network nor can I browse the web. If I sudo /etc/init.d/networking restart a few times (or reboot) it will start working. However, restarting the networking services (as mentioned above) again will cause me to no longer receive responses for pings or browse the web.
Furthermore, I have never been able to successfully ping if I manually set an ip address. I have un-installed network manager and I am using /etc/network/interfaces to configure the network. Using Lucid Lynx 64bit on a Dell Precision. I have pasted below the output of a few working commands. When I switch between static ip and dhcp I am commenting/uncommenting the lines shown in /etc/network/interfaces.
I have a home network consisting of 1 Linux box running Fedora 13, a laptop running Windows XP, and an HP Officejet Pro L7780. With the Fedora 13 box I have Firefox 3.6.4. I have noticed in the last couple of days a very sluggish response seemingly one site, amazon.com. I'll connect to the site but Firefox remains loading the page and parts of it will be missing. If I search for a particular item it takes forever to display parts of the newly requested page. I have hit stop and then refresh and sometimes the page will then come up although it's never 100%. Eventually I'll loose my router (which by the way is a Linksys BEFSR8.1 v3.01), in that if I ping it I'll get the error that it is unreachable. The laptop also looses access to the router. I'll then reset it (unplug/plug) and it'll come back up ok until I go back to Amazon and start searching again.
My question(s) are: Can a router go bad and just show up bad with one site initially? In other words is the router slowly dying?Can a problem with a site affect the router this way?I have also changed my namserver settings in /etc/resolv.config and on the router with no real change in symptoms. It's always Amazon and I don't seem to have issues with any other sites that I visit. Any clues?
Host machine is a "2.6.32-24-generic-pae #38-Ubuntu" and VMware Workstation version is 7.1.2 build-301548.In addition to those three IP addresses(192.168.1.254/24, 192.168.1.68/24 and 192.168.1.221/24) seen on a drawing, there are four identical virtual machines inside the 192.168.1.68/24 machine. Virtual machines are named Olive0-3. Olive0 has IP address 192.168.1.100, Olive1 has 192.168.1.101, Olive2 has 192.168.1.102 and Olive3 has 192.168.1.103.
Just installed squeeze and noticing slow responses to ping. Ping with -n is fine, and as expected. Ping without -n is very slow to appear on the screen.
ben@WOPR:~$ ping google.com PING google.com (18.104.22.168) 56(84) bytes of data. 64 bytes from 22.214.171.124: icmp_req=1 ttl=54 time=26.2 ms 64 bytes from 126.96.36.199: icmp_req=2 ttl=54 time=25.9 ms 64 bytes from 188.8.131.52: icmp_req=3 ttl=54 time=29.3 ms 64 bytes from 184.108.40.206: icmp_req=4 ttl=54 time=25.5 ms ^C64 bytes from 220.127.116.11: icmp_req=5 ttl=54 time=25.8 ms
--- google.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 20199ms rtt min/avg/max/mdev = 25.514/26.569/29.308/1.399 ms ben@WOPR:~$ ping -n google.com PING google.com (18.104.22.168) 56(84) bytes of data. 64 bytes from 22.214.171.124: icmp_req=1 ttl=54 time=25.6 ms 64 bytes from 126.96.36.199: icmp_req=2 ttl=54 time=26.0 ms 64 bytes from 188.8.131.52: icmp_req=3 ttl=54 time=26.8 ms 64 bytes from 184.108.40.206: icmp_req=4 ttl=53 time=21.5 ms ^C --- google.com ping statistics --- 5 packets transmitted, 4 received, 20% packet loss, time 4006ms rtt min/avg/max/mdev = 21.540/25.042/26.859/2.064 ms
I've tried disabling ip6, disabling avahi and adding options single-request to my /etc/resolv.conf - problem remains. If it helps when installing Squeeze was prompted to install firmware-realtek, which I didn't have. So downloaded onto usb from another machine installed once setup was complete.
I'm learning about the HTTP protocol and I'd like to know if there's a tool I can use to input a HTTP request I have created myself that will output the raw response. I've had a look at cURL and wget but they don't seem to have an obvious option to do this. For example:
I currently run Windows Server 2008 at my office, but I'm looking to test Samba as a PDC for future reference/consulting work. Before I go and try to configure Samba, I wanted to ask if anyone can think of pitfalls I would run into and perhaps recommend a better setup: <10 PCs running either Windows XP, Vista, or 7.
VirtualBox running Debian (planning on swapping for Fedora) on a Windows XP Home computer. Computers are connected to a large switch, which is connected to a wireless router. The Windows server doesn't employ ICS (essentially is just a $1500 PDC ). where I could find a .ovm format image of a windows server installation? I'm guessing vmware would work in this regard, but I'm not fond of using purposely crippled software.
I have an Intel server, which has it's two SATA HDD's in "Intel Embedded Server RAID Technology 5.4" RAID1 volume. How to proceed with a system image in case two of those SATA HDD's fail at the same time? Should one take the first HDD of RAID1 volume, connect it to another machine and execute:
# ddrescue /dev/sda1 /media/External/image_of_first_hdd /media/External/log_of_first_hdd * HDD from the problematic RAID1 volume would be recognised as /dev/sda1 behind new machine * /media/External/ is a mount point for large external HDD in the new machine * log_of_first_hdd would be the log file
..and then take the second HDD to another machine and execute:
I'm using the "Beginning PHP5, Apache, MySQL Web Development" book from WROX to teach myself these processes. I'm a retired programmer and trying to keep my brain active. I've been able to get through most of the process and get things to work. But getting a picture upload and then display it is killing me. The picture is moved from the initial directory and placed in the destination but will not show on the web page, I get a place holder and all the information about the picture, but no pic. The MySQL is processing all the database stuff .I haven't a clue what is not working, Firefox, Apache or what. I'm running Fedora 14.
I wonder if someone can shade alight on this problem,I have active subscription for rhel4 ES and trying to do a fresh install of rhel5,I was able to download rhel5.3 DVD image from redhat site,burnt it to a DVD but is not booting,i have so far tried on 2 different DVDs but both have failed. I have even downloaded and burnt 1 CD ISO image burnt it still failed.BIOS level is set to cd device first so no problem there,it works!