Does PHP expose Apache's Mime-Type to extension mapping in any way shape or form.
That is, Apache typically has a list of files extensions (.gif, .pdf) that it maps to a list of Mime-Types (image/gif, application/pdf, etc.) in a file typically called mime.types. Is there anyway to get a list of these mapings for the current running apa...
Hello.
Is there something like a wildcard directive to catch all possible errors and deal with them in a single custom error page?
ErrorDocument 404 /error.php?code=404
ErrorDocument 403 /error.php?code=403
...
ErrorDocument NNN /error.php?code=NNN #possible use of RegExp?
I know I probably won't be dealing with a lot of custom error...
I have XAMPP (latest version) installed on my Mac OS 10.6.3
I've added the following to .htaccess because I want .html to be interpreted as PHP.
AddType application/x-httpd-php .php .html
The problem is that the default XAMPP config seems to be caching .html files as static... so even though the PHP statements inside are being called...
I have buddypress working nicely on a server, however I can't display the 'members' page or any individual profile page on a local webserver install I have made.
If I try and visit /members/ I just get redirected back to the main buddypress page.
I also just noticed online members never shows whose online and the link to the default bl...
I'm trying to serve Django static media through nginx, Here's my nginx.conf
server {
listen 7777;
listen localhost:7777;
server_name example.com;
location / {
proxy_pass http://localhost:7777;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote...
Hey guys,
I've been experiencing a safari problem while building a web application. The screen goes completely blank (white) and refreshing won't help. Going to another page on the site gives the same problem. Then magically, after a little while, everything goes back to normal and pages are rendered correctly!
This started happening ...
Needed Finfo but deleted msi package, so uninstalled php 5.3.0, downloaded 5.3.2 and installed. Now all my sites have max execution time error's when they hit my custom error handlers. No problems until I updated - has anyone ran into this before?
Checked all error logs and ran through config files - nothing stands out.
Edit:
Commente...
Say I have three small web applications stored under a shared web root:
www.example.com/app1/
www.example.com/app2/
www.example.com/app3/
www.example.com/app4/
each application has a .htaccess file containing some run-off-the-mill mod_rewrite statements to rewrite urls like
RewriteCond %{REQUEST_URI} ^/app1/([^/]+)/([^/]+)\.html$
Re...
Has anyone ever used apache sshd (based on Apache MINA)?
I would like to get some user input.
Is it mature?
Does it have (annoying) bugs?
How is the API?
Can useful documentation/tutorials be
found?
etc.
Thanks all for your feedback.
...
Hi
I'm starting to learn symfony for php framework and I got problem with httpd.conf configuration.
First, I have xampplite installed on my windows c:\xampplite\
and then I created a symfony project (as described on getting started guide)
c:\xampplite\htdocs\symfonytest\
Everything works fine when I tried to access http://localhost/...
I think this is a pretty simple question.
How do you an apache rewrite to hide a folder.
EX: www.website.com/pages/login.php to www.website.com/login.php
or www.website.com/pages/home.php to www.website.com/home.php
The folder needs to alway be hidden. thanks
...
Hello,
We'd like to have a more fine-grained control on the connections we serve in a C++ Apache 2.2 module (on CentOS 5).
One of the connections needs to stay alive for a few multiple requests, so we set "KeepAlive" to "On" and set a short keep-alive period.
But for every such connection we have a few more connections from the browse...
Ok, I have a site, and it serves all images and mp3s through a php script and can be controlled and limited, but I am now worried about overall bandwidth of my site. For example, what if someone just sends a million requests to one of my pages? Does anyone have any suggestions into server methods used to prevent this? Should I use mod_cb...
I'm trying to create tiny urls like this:
site.com/abc123
goes to:
site.com/index.php?token=abc123
but I keep getting redirect loops no matter what I try, or it tries to redirect to index.php?token=index.php..
Current .htaccess is:
Options +FollowSymLinks
Options -MultiViews
RewriteEngine On
RewriteRule ^([^/]*)$ /index.php...
Is it safe to assume that $_SERVER['REMOTE_ADDR'] always returns a IPv4 address?
Thanks!
...
Hello All,
I've read previous posts like "Redirecting https requests to two different weblogic servers using the Weblogic proxy and Apache2". But I have a different situation and I don't think I'm understanding this to well.
I have an Apache 2 server (server1) that will receive http request for my application. Then I have two more serve...
I want to know the ideal instance site for a portal, may it be a news portal or sports portal
and is there a better hosting solution than ec2 for such a site ?
...
The code chokes at fopen():
<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
$fp = fopen("/path/to/file/some_file.txt","a") or die("can't open file");
fwrite($fp,"some text");
fclose($fp);
?>
And the resulting web page says:
"Warning: fopen(/path/to/file/some_file.txt) [function.fopen]: failed to open stream: Pe...
Hi,
I have a .htaccess redirect for "non www" like this:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
it is working. But, i have also some subdomains other than www.
If I call for example http://shop.example.com it redirects me to:
http://www.shop.example.com
I dont want t...
Hi,
I am dealing with a situation where someone has handed me a bunch of old files on the server which already have a lot of incoming links directly to them (mostly pdf files). I now have the files organized but in a different directory. Before it was 'domain/manuals/file' now it is 'domain/media/manual/file'. I am trying to resolve this...