apache

Why can't DBD::SQLite insert into a database through my Perl CGI script?

I am running a SQLite database within a Perl CGI script which is being accessed by DBD::SQLite. This is being run as a straight CGI on Apache. The DBI connection works fine and selects are able to be run. However, when I attempt to do an insert I get a die with the following error: DBD::SQLite::st execute failed: unable to open databa...

RewriteRule not obeying directory structure for css & image virtual paths

I've been messing with what should be a fairly simple rewrite rule, and have kinda got it working. The rule I have is RewriteCond %{REQUEST_URI} !\.(php|html|css|js|gif|png|jpe?g)$ RewriteRule (.*)$ /index.php [L] All I'm trying to do is take anything beyond the home directory to get passed as a request and from there I'll ...

What caching headers prevent browsers from requesting last modified dates from the server?

Since I version all my css/js/images, they never "change". It might go from sprite.4.png to sprite.5.png, but sprite.4.png will never change. Anyway, it seems pointless for the browsers to be checking for modified versions and receiving 304 responses, so what do I need to put in .htaccess to prevent these last modified look ups? Right ...

.htaccess file is not working on Apache Server

I have hosted my site on www.hostmoster.com, I have written .htaccess file for URL rewritting, it was working properly since last 1 year.. but today they have made some upgrade in their Apache Server.. and now my .htaccess file is not working properly. the contents of my file is RewriteEngine on RewriteRule ^$ /index.php [L] RewriteCond...

How to handle special characters in .htaccess rules?

In my .htaccess file I have defined following rule, RewriteRule t/([^.]+)/$ /videos/tag.php?tag=$1 [QSA] The above rule works fine if I am browsing http://example.com/videos/t/world+news/ or http://example.com/videos/t/events/ but when I am browsing http://example.com/videos/t/business+%26+world/ (here original tag is: business & w...

how to rotate text in HSSFCell in apache POI?

How to rotate text which is there in HSSFCell class of Apache POI API? Can you please provide some example code for the same? ...

how to add images in HSSFCell in apache POI ?

Hi, How to add Image in different different HSSFCell object in poi ? I have written some code which is adding image but problem is, the cell were I added last image, That cell only showing image other than that no other cells are showing images ... appreciate your help ... My Code is while(rs.next()){ HSSFCell cell = getHSSFCell(s...

Apache .htaccess hotlinking redirect

I am trying to create a redirection when someone hotlinks images in one directory on my site. If someone hotlinks an image, I want to redirect them to a corresponding image (same file name) in a different directory. If someone hotlinks: www.mydomaoin.com/PlayImages/Basic/Embedded/{ImageName.gif} I want it to redirect to: www...

resolving sub-domain in apache -ignore, solved

Not sure how I fixed it, or if I did. might have just been taking forever for the dns to get resolved or something, but it works now. Apparently even though the site I listed below showed everything pointing to the right address, something somewhere wasn't resolving properly. --------- original message --------------- I'm not sure what...

Updating php version on windows with apache

I wonder what I should be carefull of updating PHP on Windows(with Apache). My current version is 5.2.9-2 My php folder is simply under C:\php If I simply download and unzip the new version, 5.3, which is a little more significant than going from 5.2.8 to 5.2.9, I'm thinking I need to be carefull not to overwrite some files. I'm think...

mod_rewrite, avatar set up

I'd like to use mod_rewrite to handle my requests of avatar images. I've got a folder containing all .png images and the file is named after the account's username. So I would like requests for /avatar/Juddling, to show the image, /images/avatars/Juddling.png BUT if that file doesn't exist, I would like it to show a default.png image. ...

Silverlight Ftp Upload

Hi I'm working on trying to ftp a file to the server through a silverlight application. Where the location to upload the file on server file system, exists outside the sandbox area for the web server. In this case the web server root exists at "C:\test\www\" and the location to upload the file will exist at "C:\User\Uploads". In this ...

Apache 500 error, rewrite engine & ajax

I've been working my way through setting up rewrite rules so I can have shorter and nicer URLs, and I have a very ajaxy site. I've got rewrite rules working on the server, and the pages load with the nice new urls, but it appears all the ajax is now broken. Firefox tells me its a 500 error. Trying to load the page directly, I don't ...

Configuring Apache Web Server with Tomcat

I am trying to configuring apache webserver with tomcat using AJP but i am not sure am i doing it right or not. Here are the steps that i followed Enabled required module in httpd.conf file LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_ajp_module modules/mod_proxy_ajp.so Added the ifModule condition...

.htaccess while upgrading web app

I am writing one web application using PHP/CodeIginter. Now, I want to add a .htaccess while I am upgrading the application in the server. The purpose of this .htaccess will be: - It'll allow normal operation if the user is accessing from some specific IPs, and Using a particular host name alias has a query string parameter "upgradi...

Apache, SVN and mod_python

We are using Apache 2.2 to server SVN (1.6.2) repositories on Windows. We use SSPI for authentication, and that's working. We have a number of different repositories, and use SVNParentPath in the httpd.conf to serve them. Something like: <Location /> DAV svn SVNParentPath c:\repos [SSPI stuff] </Location> So from a client...

Common Rewrite Setting For Multiple VHosts

Hey, I am running Apache2 with multiple vhosts in the sites-enabled folder, each looks a bit like this: <VirtualHost *:80> ServerName site1.com ServerAlias www.site1.com DocumentRoot /home/sites/site1/www/ <Directory /home/sites/site/www/> Options Indexes FollowSymLinks MultiViews AllowOverride all ...

Mod_Rewrite: Insert "/" between variables and values in URL

Hello all, I am attempting clean useful URLs using mod_rewrite. I am sure this is a common question but I am not so hot with mod_rewrite: I have this URL: http://mysite.com/user.php?user=fatcatmat&amp;sort=popularv I want to be able to rewrite it like this: http://mysite.com/user/user/fatcatmat/sort/popularv (Is there a way to remov...

Showing a flash file immediately while loading

I'm trying to embed a flash file from my site, but for some reason it looks like the entire swf file (often up to 1mb in size) is downloaded before anything is displayed. In the mean time a white box is displayed for anything up to 20 seconds. The same swf file on other websites shows the first frame of the swf file almost instantly the...

Setting error log filename in apache to include current date

Hi, I'm trying to have apache create a new error log file every day, based on the current date. The default error log filename is something like this: ErrorLog "/logs/error.log" and I want it to be something like: ErrorLog "/logs/error_$year$month$day.log" Any ideas? ...