apache

Can a PHP script start before all POST data is received?

I'm running PHP under Apache and I'd like to send a slow trickle of POST data to the page that will write messages into a database as the POST data arrives. I'm sending the data from a .NET app using WebRequest and I've set SendChunked to true. Unfortunately, it looks like the PHP script doesn't start executing until all the POST data h...

Why do some of my pages return 500s on my XAMPP server?

I cannot figure out what the hell is going on for the life of me. Normally when I want to run a site locally for testing purposes, I simply point my browser to: http://localhost/site_folder This works on the majority of my pages but for some strange (and I mean really strange) reason, some folders give a 500 redirect error. I thou...

RewriteRule is redirecting rather than rewriting

I have a rewrite rule that looks like this: RewriteEngine On RewriteRule ^$ store [L] That's the only thing in the .htaccess file. It's supposed to allow someone to go to http://www.site.com/ and according to the server, they're accessing http://www.site.com/store . But it's redirecting the user. In other words, you see "/store" in...

Preventing a 504 Gateway Timeout with huge PHP script.

I'm currently running an Apache server (2.2) on my local machine (Windows) which I'm using to run some PHP scripts to take care of some tedious work. One of the scripts involves a ton of moving, resizing, and download / uploading files to another server. I would very much like the script to run constantly so that I don't have to baby the...

XAMPP: how to configure Apache for PHP

My XAMPP is not reading my PHP. Probably, there's a problem with my Apache configuration. My PHP book suggested that I open the httpd configuration file and add these lines: LoadModule php5_module c:/php/php5apache2_2.dll PHPIniDir "c:/php/" AddType application/x-httpd-php .php Which I did, but when I went back to the control panel to ...

allow only specific ips to access site and allow all to access specific file

I have this configuration in my httpd.conf <Directory /> AllowOverride none Order Deny,Allow Deny from all Allow from 66.220.144.0/20 69.63.176.0/20 </Directory> <Files crossdomain.xml> Order deny,allow Allow from all </Files> What I am trying to achive is allow facebook to access the web application and deny ...

VirtualHost on XAMPP

Hi, I'm using XAMPP lite on Windows 7, but instead of http://localhost I'd like to have http://mycustomname mapped to a directory myfolder in root/htdocs. What should I change in httpd.conf? Many thanks! ...

Automation Process for Website PHP PostgreSQL

Hello, Currently, I'm working with a website. This website is written using PHP with PostgreSQL as the back-end. For the server I use Apache (XAMPP). My website has a membership feature consist of free membership and premium membership. Premium membership valid for 1 year after the registration, after that the user membership will be re...

Mod Rewrite question

How to make this work?: somesite.com/page/2 -> somescript.php?page=2 ...

Google Chrome forces download of PHP scripts' source

I'm experiencing a behaviour of Google Chrome (Google Chrome 7.0.517.41 beta) that I can't understand. In some cases, Google Chrome downloads the source code of the PHP script that is requested from my server instead of it being executed. I don't have this problem with cURL or Firefox; when I request the same URL with them the script is ...

Packaging Apache configuration files with WAR

I have built a Spring 3 MVC driven RESTful web service app. I use Maven 2 to manage the application lifecycle including packaging up the WAR for distribution. As part of the end solution, I filter application requests through Apache to handle some of the GET requests for static content. This of course requires that I have several custom ...

Apache: Friendly URLs and mod_rewrite help

Hi, On my site I have pages like "shoutbox", "admin", "blog" etc. I want the url to look like this: http://localhost/shoutbox/post Instead of: http://localhost/index.php?page=shoutbox&amp;action=post Then I'll have PHP grab the string and explode() it seperating each part, grabbing the values between the "/"'s and then use the values...

apache - redirect subdomain to another domain

Hi, I need to redirect every subdomain into the domain it belongs changing the subdomain name into a parameter using mod_rewrite, and I'm not sure how. Also, I need to "reindex" the parameters so that the subdomain name becames the first parameter of the uri and the other parameters of the uri follow it by their own order. Something lik...

Django + apache: How can I create a server alias which invisibly redirects to my django app on the server?

I am trying to figure out a how to forward a specific alias of a server to a specific django web app, and at the same time, keep the URL address bar in the user's browser to only show the server alias. To be more specific: This is for an intranet project at my company. We have a big linux server which does a lot of computational wo...

Quickest way to rewrite urls to lowercase?

I'm looking for a way, preferably with .htaccess to rewrite a url when a user types in something with a capital. For example, the url could be website.com/pagename and the usertypes in website.com/PageName or website.com/PAGENAME Whats the best way to do with without slowing down page load? ...

some issues with removing www and redirecting index.html

Hello Fellas, I am having trouble doing what i want to do with the following setup. I would like to remove all WWW, and also forward index.html to root dir. I would like this to be for all domains, so i am doing inside httpd.conf directory directive. I tried many variations with no success. Latest version is below (domains are inside ...

Which server is best suitable for image hosting?

I want to move all the website (developed in ASP.NET) images to another server. The image hosting server should be dedicated only image processing like image resizing and etc. Which server is best suitable for this? Taking another IIS server would require more investment again. Instead can I go for Apache or Lighttpd? Also the server s...

Apache rewrite rule

I am a rewrite newbie, I am wondering why this rewrite rule is not working, it ceases Apache from starting RewriteRule ^([-a-zA-Z0-9_]+)?/constant/([-a-zA-Z0-9_]+)/(.*)$ http://$2.domain.com/$1/$3 [R=301, NC] What this rule should do is URL refactoring, examples: http://www.domain.com/controller/constant/variable/action should be red...

Parsing apache logs using PostgreSQL

This O'Reilly article gives an example of a PostgreSQL statement that parses an Apache log line: INSERT INTO http_log(log_date,ip_addr,record) SELECT CAST(substr(record,strpos(record,'[')+1,20) AS date), CAST(substr(record,0,strpos(record,' ')) AS cidr), record FROM tmp_apache; Obviously this only extrac...

mercurial + Apache gives 403 error

I have setup my repo at /home/adil/hg/sample-repo and want to serve it via httpd. I am following the tutorial at http://mercurial.selenic.com/wiki/PublishingRepositories#multiple and have created the hgweb.config file and have copied hgweb.cgi (renamed it to index.cgi) to /home/adil/web/mercurial/ My apache config (/etc/httpd/conf/httpd...