apache

Problem with path on using .htaccess

This is the path of folder where are my web documents and which I want to protect: "C:\Program Files\PostgreSQL\EnterpriseDB-ApachePhp/apache/www/MyWeb" Also in this folder I placed: .htaccess and .htpasswd My .htaccess has following: AuthName "Protected site" AuthType Basic AuthUserFile C:\Program Files\PostgreSQL\EnterpriseDB-ApacheP...

Tomcat and Ajax Issues

Hello, it's really the first time for me to post. I'am encountering a problem with my Web Apps and cannot find any answers on the web. My problem is that i have a Java Web App that works on parallel with tomcat and apache using mod_jk. Everything works fine, but after one day of running in tomcat, the Ajax request i do with Jquery dos...

Make sure Apache user is allowed to use shell

Hello, how can I make sure that Apache/web server user is allowed to execute shell commands? I would like to execute a shell command in PHP script but it doesn't work for some reason (it works when written manually in shell by hand, of course, so the command is surely correct). I believe the problem is that the user PHP is running under...

Enable PHP to read .css and .js files while keeping their original Content-Type

Hi all, I would like to configure apache php5 in a way that .css and .js files will be inspected by php their content type will remain as default (that is respectively "text/css" and "application/x-javascript") I need this because both CSS and JS files are using global PHP vars. This allows me from a single PHP file to control both ...

Multiple htaccess files in one folder, or conditional AuthType Basic?

I am using the same .htaccess file on my local, and live servers, and want to use the same file on my test server (to made code management easier). Currently though I have to have a different file, because my test server has htaccess password access on it, AuthType Basic. Is there a way to either have 2 .htaccess files in the same fold...

tomcat could not run ant reload command

when i enter command ant reload the server generate eception. I write the ant reload script in my buil.xml file. But server could not reload it. Exeption is BUILD FAILED E:\Work\projects\schoolguide_0_2\build.xml:182: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) ...

.htaccess routing

I want to create my own routing system with .htaccess, but I have some problems. My folder structure is: .htaccess |- system |- controller |- theme | -- domain.dk | --- gfx | --- style | --- html How can I make my .htaccess right? Using routing too? My .htaccess looks like this: RewriteEngine On php_value zlib.out...

Wrong xml path or just me?

I have a PHP script that loads in an XML file. That said XML file exists in the same directory as the script - the path in the script for the XML file is relative to the php file. Now when I put that PHP script+XML files in the root of my website it works. Yet when I put that PHP script+XML files in a sub-directory the XML file doesn'...

Help on rule on .htaccess

I have made an .htaccess to my root directory for creating a subdomain level, assume it is sub.domain.ex that redirect to domain.ex/deb/ RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} sub.domain.ex RewriteCond %{REQUEST_URI} !deb/ RewriteRule ^(.*)$ /deb/$1 [L] and this works well. Now, I go to /deb/ and create another .htac...

htaccess : make directories exceptions from auto_prepend?

Is there a way to make my auto_prepend command ignore my includes/ and ajax/ directories? I can write regular expressions easily it's just knowing how to markup the conditional statements... # choose which files are mother files (aka not includes or ajax) # add dochead to these files {some kind of regex conditioon here } php_value auto...

Character encoding issue between different versions of PHP, Apache and MySQL.

I recently converted an old MySQL database stored as latin1_swedish_ci to utf8_general_ci. I've now got the the HTTP header specifying UTF-8, the HTML tag on the page, and the data in the database is correctly encoded as utf8_general_ci. It all works fine on my testing server, so I upload the updated HTML files and PHP scripts to the ...

Stop PHP output buffering

Hi, I need to display continuous output from my php script. The script will stay in a loop of printing log data from a device and sleeping. My problem is that I can't get PHP or Apache to output data before the script is completed. I have tried all the commands for flushing the output buffer, and I have read through the config-files for...

nice url with apache and php

I have urls like /story.php?id=31 I want to show it as /31.html How? ...

mod_python and subpackages importing issues: ImportError: No module named...

Hello, I'm exploring mod_python and I'm having trouble with the package importing. I've a structure like this: my base dir | +- __init__.py +- index.py +- package (directory) | +- __init__.py +- package.py (file) and an Apache Virtual Host like this: <VirtualHost *:80> Serv...

concurrent users can a Apache + PHP solution support

How any concurrent users can a Apache + PHP solution support? Please don’t be bogged down by Mysql constraints – we are using LAP without M as we are storing around 2-8 PB at the back end. ...

"Drupal is not defined" Javascript error and drupal.js gives "Page not found" error

I'm installing Drupal like I've always done and I start to see this error in the console. I know Drupal object is defined in drupal.js, so I open up the source file and click on /misc/drupal.js and it says "page not found." Huh. That's weird because I can see that file is in my system, just where it should be. But somehow Drupal cannot f...

how to create a VirtualHost to serve only static content

I want to create a virtual host in apache such that it serves only static content like stylesheets, videos, images, javascripts, text files, etc. I am not looking at any "processing" capabilities from this virtual host. ...

Regex for String Parameter!

I am trying to implement a Url Rewriting and struggling to figure out pattern matching for SC%3aArgument1+Argument2+%26+Argument3+Argument4. Any help is great!! ...

Stale JSON get data from Chrome/Safari on my Apache/Django server, but Firefox is never stale?

I have a Django 1.1 Apache2 server running. There is a JSON get request at a fixed URL that returns "stale" data when accessed via iPad/iPhone/Safari/Chrome, but is always up to date from Firefox. By stale data, I mean that as the data the JSON represents changes, the broken requests don't get updated, their responses are getting cache...

How to internally rewrite / to /homepage with mod_rewrite

Ok, this should be simple, but I'm having a fair amount of trouble with it. Basically, I'm trying to rewrite http://server.com/ to http://server.com/homepage, but I only want it to rewrite it internally--the user should never see the /homepage URL. I tried this: RewriteRule ^$ /homepage [L] And it properly matches the URL, but it iss...