apache

flex - SWFLoader - authentication

I have an issue where I am trying to load an external SWF using a SWFLoader, but the HTTP server requires authentication. <mx:SWFLoader source="assets/externalswf.swf"></mx:SWFLoader> Is there any way to pass the credentials to the SWFLoader? ...

How can I beta test web Perl modules under Apache/mod_perl on production web server?

We have a setup where most code, before being promoted to full production, is deployed in BETA mode - meaning, it runs in full production environment (using production database - usually production data; and production web server). We call that stage BETA testing. One of the main requirements is that BETA code promotion to production mu...

How to check whether your code environment on Windows or on Linux or other OS

hi, right now, i code custom wordpress theme and testing it in xampp windows XP on apache server. But as long as i concern, there's no wp build-in function to identify the code environment. Is there's any PHP build-in function to identify such thing ? for the record, what i want to code need to read a directory. in my apache (in window...

Different OS and Server Path

in windows (using apache as server), my file path directory will be C:\xampp\htdocs\mysvn\PhpDocumentor\phpdoc.php. But what happen with other OS such as linux on APACHE, or IIS on windows, Or other OS i don't know and never use ? i would like to know to make sure i wrote the bullet proof, file reading via PHP. Care anyone give an exam...

Why can't I use shell_exec from a PHP script on a network share in IIS?

I have some PHP scripts that reside on a network share. For argument's sake, let's call the share \\nas\dev. I have a Web Site on \\w2k3dev\ set up in IIS6 that uses \\nas\dev\ as its home directory by setting "A share located on another computer". Some of my scripts use shell_exec to execute functions on the server and return results t...

In Rails, what could cause a user to have another user's session?

I have a Rails application using with an authentication system using Restful Authentication without any modification. Users have reported finding themselves logged in as the wrong user. In at least one case it was on their very first page view, never having logged in before. Is it possible their session ids are getting mixed up? Would ...

How do I react when somebody tries to guess admin directiories on my website?

Hello! I've been getting these messages in apache error.log for quite a while: [client 217.197.152.228] File does not exist: /var/www/phpmyadmin [client 217.197.152.228] File does not exist: /var/www/pma [client 217.197.152.228] File does not exist: /var/www/admin [client 217.197.152.228] File does not exist: /var/www/dbadmin [client 2...

How do I do this simple 301 redirect from index.htm to root?

I've read various reference sites on redirection, and to be honest I understand very little. I currently have standard WordPress mod_rewrite redirect rules in my .htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /in...

502 Bad Gateway with nginx + apache + subversion + ssl (SVN COPY)

I'm having a problem running Apache + Subversion with SSL behind an Nginx proxy and I'm hoping someone might have the answer. I've scoured google for hours looking for the answer to my problem and can't seem to figure it out. What I'm seeing are "502 (Bad Gateway)" errors when trying to MOVE or COPY using subversion; however, checkouts a...

exclude the folders - url rewrite in htaccess

rewriteCond %{REQUEST_URI} ^(ajax|css|functions|image_viewer|images|img|include|fancybox|jquery|jscript|json)$ - [L] RewriteRule ^(.[^/])/(.[^/])/(.+[^/]) ?program=$1&usertype=$2&username=$3 [NC] could you please help me find what is wrong in this.. ? I need to exclude some folders from url rewriting. i tried with the solution given h...

How can I test caching and cache busting?

In PHP, I'm trying to steal a page from the Rails playbook (see 'Using Asset Timestamps' here): By default, Rails appends assets' timestamps to all asset paths. This allows you to set a cache-expiration date for the asset far into the future, but still be able to instantly invalidate it by simply updating the file (and he...

protect flash files

Hello Ive a website that create avatars for users and provide them with link for avatar to use it in their website or singuters etc , my problems is the website based on flash . the main page has 1 swf file that load other swfs used to create avatars , if someone knows the link for the these swf files he can download them which means h...

Why cgi scripts have to stay in cgi-bin folder ?

Why cgi scripts have to stay in cgi-bin folder ? What is the difference from insert python script ( or php script or any other script ) in public_html folder and in cgi-bin folder ? I don't understand :-\ ...

Remote access to apache2 server

Hi all, I'm trying to test my iPhone application on the device. I have a mac computer which stores my development environment. Right now I can only access PHP files using the http://localhost/PHPFileLocation which does not work when I try to test my app on real device. How do I configure apache2 to be accessible from outside? Is it pos...

Intercept page request behind firewall return altered content with php and apache

I'm providing free wifi service and need an ad to be added to all page requests. Currently I have a router forwarding all http requests to an apache server, which redirects all requests to an index.php page. The index.php page reads the request, fetches the content from the appropriate site, and edits the content to include the ad. The...

WAMP Apache 403 Forbidden error

I have recently changed from Windows XP to Windows 7 and have reinstalled WAMP server on my localhost testing pc. I have copied over my backup site too and this is working correctly. I have installed tinyMCE javascript editor as well as ajaxfilemanager. Everything works except when accessing a file i get the following error: Forbidd...

Create/Modify a Virtual Host and Reload Apache from Inside Rails App

My application is a set of two rails applications. Based on some parameters in first app. I need to setup the virtual host of the second app. I just need to change the ServerName and ServerAlias in apache VH and enable the site using a2ensite and then 'apache2 reload '. How can I do this from within a rails application? Thanks, Imran ...

newbie trying to write url rewite in .htaccess file

My site was under example.com/waha/. Now I move the site right under the root example.com. I want to 301 redirect all the old links like example.com/waha/notice/5803 to example.com/notice/5803. How can I do it? My current .htaccess file is below. <IfModule mod_rewrite.c> RewriteEngine On # NOTE: change this to your actual Statu...

What is the best solution for htaccess caching

I have found a number of articles such as this one that talk about using htaccess to cache images and files on your webserver. But which is best, why, and what is the best implementation of this? ...

ForceType text/html;charset=utf-8 in .htaccess is causing all externally linked CSS to stop rendering

I'm using: ForceType text/html;charset=utf-8 in my .htaccess file, but it's causing all externally linked CSS to stop rendering on their respective pages. So something like this: <link rel="stylesheet" type="text/css" href="somestyles.css" media="all" /> no longer works on the page using it. I've also been trying combinations of: ...