apache

require_once() [function.require]: Failed opening required '/vars.inc' (include_path='.;C:\php5\pear')

Hey, I have several sites setup on my local machine - customerappglobal, customerapp and naturaleigh. I have just one - customerappglobal - working at the moment because thats the only one I need working. I have added the following code to my httpd.conf file: <VirtualHost *:427> # The name to respond to ServerName customerappglobal ...

Remove file extensions from urls

Hi, I've never used mod_rewrite but i want to remove all file extensions from my urls for a website. What is the rule that i would need to do this? I've tried this, but that gives me an internal error every time i click a link on my website RewriteRule ^(.*)$ $1.php [L] ...

Android DefaultHttpClient accept all certificates for SSL session help

I am attempting to connect to a local HTTPS server using the apache DefaultHttpClient on a Android device. DefaultHttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://192.168.1.121:4113/services"); ... header and content filling in ... HttpResponse response = httpclient.execute(httppost); I am ...

Mixing authenticated and unauthenticated URLs, Internet Explorer and mod_auth_sspi

Setup: Apache 2.2, mod_auth_sspi 1.0.3/1.0.4, mod_wsgi 3.3, python 2.6.2 Some background information: Whenever IE hits an URL, that requires it to perform NTLM challenge-response, further POST requests to the same domain are performed as follows: A zero-length POST (Content-Length 0) is performed The server replies with 401. WWW-Authe...

How to monitor Apache Camel status?

Hi. I have already working Camel configuration that is watching a database table (through spring and hibernate), and when something shows up in DB, Camel consumes it and sends message to JMS broker. This works flawlessly. And is built in DSL in MyOwnMessageRouteBuilder.configure() Now I'd like to add monitoring that do something if no...

Apache PDFBox Java library - Is there an API for creating tables?

Hello all, I am using the Apache PDFBox java library to create PDFs. Is there a way to create a data-table using pdfbox? If there is no such API to do it, I would require to manually draw the table using drawLine etc., Any suggestions on how to go about this? Thanks -Keshav ...

APC cache fragmentation problem

I'm running APC (php cache) on a medium website (13 000 visits a day) on a CentOS server 5 running php 5.3.3 with APC 3.1.4 with 4Gb of RAM. In the last weeks I'm experiencing many "unable to allocate memory for pool" errors in logs, and often the site goes down. I think the problem is in APC. From the stats I see that the cache is full...

Simple URL Mod_rewrite

Why does the following htaccess file generate 300 errors, when this URL is called? URL: hxxp://subdomain.domainame.com/keyworda/ IndexIgnore * RewriteEngine on RewriteRule ^([a-z]+)/$ /index.php?p=$1 Error log: 300 hxxp://subdomain.domainame.com/keyworda (no trailing slash) ...

csv to excel conversion

Is there a way to convert csv file to excel file upon request through apache/.htaccess ...

How to append cookie value to end of response Location header with Apache?

I have a page that issues an HTTP redirect. I need to append the current session id (jsessionid) to the end of the HTTP redirect to pass this id as a GET parameter in the redirect. Can mod_header's Header append directive pick up a cookie value via SetEnvIf? Should a rewrite rather be involved? But mod_rewrite just rewrites the reque...

Apache (2.0) mod_headers not outputting environment variables?

My .htaccess file: Header add X-Hello "time %D" Now I check to see what it looks like, check out the X-Hello header: $curl -v http://foo.com/bar.php ... < HTTP/1.1 200 OK < Date: Wed, 06 Oct 2010 20:43:39 GMT < Server: Apache < Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 < Expires: Thu, 19 Nov 1981 0...

IllegalStateException: ResourceLoader was not initialized

What is in my velocity.properties file resouce.loader = string string.resource.loader.description = Velocity StringResource Loader string.resource.loader.class = org.apache.velocity.runtime.resource.loader.StringResourceLoader #string.resource.loader.repository.class = org.apache.velocity.runtime.resource.loader.StringResourceRepository...

Exception: Super privilege, a MySql+ASP.NET+Linux mess

When i access any page on my site i am greeted by the error below. I wonder what happened so i checked my mysql file and i see some of my tables created by not all. i looked in my table creation code and it is inside a transaction so i am confused. I write quick code to dump the stack via Application_Error and it doesnt catch that error ...

Is there a way to have Apache log slow requests?

If a page takes over a couples seconds to process, I'd like Apache to log that URL somewhere. Is this possible? I have a lot of sites, so I was looking for an automatic way to do this as opposed to proprietary code for each site. ...

Handle HTTP POST with PHP

Hello all, I struggled half a day and came to conclusion that it can't be done. I threw away my php scripts and rewrote it in perl and it worked right from the start the way I wanted it to work. Still, I want to find out if such trivial task can be done correctly in PHP. The question: I have arbitrarily long (in size and time) file uploa...

Does this top look healthy to you?

I run a server with the following specs: Intel i7 920 8 GB RAM Linux 2.6.32-25-server #44-Ubuntu 10.04 SMP Fri Sep 17 21:13:39 UTC 2010 x86_64 GNU/Linux 75 Apache processes Low-end hardware RAID-1 with 2 disks Historically all our problems with scaling the service have been disk bound but currently we see higher load numbers than bef...

SSL certificate install ... .pfx, .cer and .txt files?

While I know nothing about SSL or installing SSL Certificates, I'm sure one of the many results Google will give me for CentOS, SSL certs and Apache would help. However, the certificate files which have been provided for this project are a .pfx file, .cer (the certificate) file and a .txt (apparently a certificate request) file, none of...

No ButtonGroup.clearSelection() method in Apache Harmony Java

When tried to port my code from Sun JDK to Apache Harmony, The clearSelection() method of the the ButtonGroup objects was flaged as a compilation error. What can I do instead? ...

Redirect Status Code 302 between Tomcat and IIS 7.0 is not properly handled by the isapi redirector

We recently installed a web application under Tomcat 6 which is connected over the isapi redirector interface (see http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html) to an IIS 7 server. The connector works properly in every case, except for some pages in the web application that return a status 302, with a new location to ...

prevent *.bak *.inc file upload from a apache server

Is it possible to prevent people from seeing files like .bak from am apache directory ? If there is a request for the url (http://foo.com/bar.bak), it'd be good to have a 404 error, and prevent anybody to upload the file. ...