apache

PHP Startup: Unable to load dynamic library, Windows, Apache 2.2, php 5.2.11

This is becoming a very frustrating issue. I am trying to do a clean install of apache 2.2 and PHP 5.2.11. Everything seems to be configured correctly but the php modules aren't starting... PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_mcrypt.dll' - T...

mod_rewrite works in .htaccess files but not in apache2.conf

I have the following in a .htaccess file as a test: RewriteEngine on RewriteRule ^(.*)$ /backend/$1 This works as expected. I was able to get rewrite logging working with the following in apache2.conf: <IfModule mod_proxy.c> RewriteLog "/tmp/REWRITE.log" RewriteLogLevel 9 </IfModule> The log file is created and logs debug inf...

Wildcard DNS combined with Single Subdomain DNS

I am trying to have all subdomains point to one location on disk, and a particular subdomain (dev) point to another. I tried this : <VirtualHost cueflash.com> ServerAdmin webmaster@localhost ServerAlias www.cueflash.com *.cueflash.com DocumentRoot /home/cueflash/www/cueflash.com CustomLog /var/log/apache2/cueflash.com.log combined...

apache not serving up cached pages from rails app

I'm setting up a rails app with simple page caching. (First time I've tried using page caching.) The cached pages are being created. I have my cache folder set to /public/cache. The cached pages are automatically being created according to their URL, which follows the published date (to avoid filename collisions). I don't have any custo...

BOM in a PHP page auto generated by Wordpress

I admin two different blogs. They are both wordpress 2.8.6 (so they have exactly the same source code, plugins apart) but they are located on two different hosting platform (hostmonster.com and aruba.it). To explain my problem I've dumped with SmartSniff a session with each one of the sites. Here is the dump from hostmonster: GET /blog...

Serving multiple Rails applications through one ruby interpreter instance

Hi, Given that each Ruby-On-Rails application needs at least about 40MBs of memory, I was wondering if there is a way of running multiple rails-application instances (different ones) over one interpreter of Ruby so that all shared libraries (rmagick etc) are shared between different application instances, saving space. If that would b...

Using 'mod_rewrite' how do I force HTTPS for certain paths and HTTP for all others?

I have a PHP-Apache application using mod_rewrite for clean URLs. I am having a lot of touble getting certain pages and paths forced to HTTPS while also ensuring all others will remain as HTTP. Here is an example of what I mean: // http://www.example.com/panel/ -> Should always redirect to HTTPS // http://www.example.com/store/ -> Sho...

Best practice for structuring a 'large' Rails app

My question here is seeking best practice, general advice and insight, rather than a solution to a specific problem. I am in the early stages of planning out a Rails project which I consider fairly large. At its simplest level it offers a cookie-cutter CMS to the target users. So users sign up and choose a subdomain and are given a pret...

Global variables in css style sheets.

I hava an absolute url in my stylesheet. http://localhost/images/myimage.jpg. I also have a config class with the following constant const SITE_ROOT = 'http://localhost/images' On php pages i write config::SITE_ROOT . "/myimage.jpg" so when i move the site to the production server i can change the site root in one central location....

Apache server cache images

Hi, On my Apache server I have a PHP service that gets requests and generates an image from them. What I want to do is to cache the generated image on my server (not client's browser) once it was generated, so if the image with specific parameters has been generated already and someone requests it my web server will return cached image ...

How can I change my DocumentRoot without breaking PHP?

I had my development machine set up just fine and everything worked perfectly. But then I needed to shuffle some folders around and in doing so needed to change my apache document root. It was d:/htdocs It is now d:/web/htdocs I've updated it both times in httpd.conf; at DocumentRoot d:/htdocs and <Directory "d:/htdocs"> The problem i...

Why won't this Apache modrewrite RewriteRule work?

I'm trying to get Apache mod rewrite to work on my local machine. I'm running OSX with PHP 5 and the Apache mod rewrite module is enabled. I have a directory called localhost/~Jason/hfh/admin with various PHP includes called based on a $_GET variable. I want to let users type (in theory) localhost/~Jason/hfh/admin/pages and have tha...

Increasing Upload speed with apache, PHP and HTML

Hi all, I have created html page for Updloadind some files. when i am using it with localhost upload is very fast But when i try to access the site from other machine with IP i s very slow in uploading same file Please suggest to fix this issue. Regard Hemant ...

getting safe mode on although i turned it off

did a phpinfo to check which php.ini is being loaded. then i put safe mode off saved and restarted apache. i also put php.ini in the directory and used htaccess safemode off. htaccess safe mode off throws me a 500. in any case i am not able to disable safemode?! ...

Redirect query string parameters to individual domain names in apache

We have a client who has many branches around the UK. Some of their branches have their own sites with their own domain names. The client has a part built system where visiting: www.client.com/aboutus.php?id=branchId shows the About Us page for that particular branch. What I need is a way to map specific domains to their branchId (thi...

Monitoring apache's load with php

UPDATE: thanks to all the answer given, but they are all about the system load, and not the apache. My goal is to understand, inside my php scripts (the templating ones), when apache have an high load and is prefearrable to fork some traffic on lighttpd, that is here just to the long-polling and to light the apache's load. Hi guys, aft...

Why are CodeIgniter application files in the public_html folder?

Isn't having all of the files in public view a bad thing? Surely things such as /system/application/config/database.php should not be publicly visible! ...

Why won't this mod-rewrite rule work?

I have a development site on my machine at localhost/~Jason/hfh/admin/?admin=collections My .htaccess file is in the /hfh/admin/ directory. It says: RewriteEngine On RewriteBase /~Jason/hfh/ RewriteRule ^([A-Za-z0-9\-\_]*)$ index.php?admin=$1 But when I go to localhost/~Jason/hfh/admin/collections I get a "page not found" error...

Apache mod-rewrite redirect domain name using querystring

We have a client who has many branches around the UK. Some of their branches have their own sites with their own domain names. The client has a part built system where visiting: www.client.com/aboutus.php?id=branchId shows the About Us page for that particular branch. What I need is a way to map specific domains to their branchId (thi...

Client cache validating when content is still fresh (Apache, Firefox, PHP)

I have a site with a rotatory banner, and there is a JavaScript that implements the rotation. I have instructed Apache to return Expires header for all images for a time in the future (maybe 12 hrs) something it is doing every time. The problem is Firefox (and the others I assume) is asking Apache for the validity of the image every time...