apache

Clean URL's not working, mod_rewrite module installed

I just installed a fresh copy of Drupal 6.19 to get to speed on how to write modules. But for some reason the rewrite module isn't working for Drupal. What I have checked: $ apachectl -M >> it is installed php_info() on current server >> says rewrite is installed also I also double-checked the .htaccess file in my Drupal root folde...

HTTP Apache - redirect error page

Hi I want to redirect error 403 Forbidden to another error page for specific directories but i fail to do that using rewrite mod Any help would be appreciated thanks ...

Why are Scandinavian characters converted to UTF-8?

I am trying to create an array with Danish characters - why are the characters converted to UTF-8 when output by PHP? Apache's httpd.conf? PHP.ini? // Fails $chars = array_merge(range("A","Z"),str_split("ÆØÅ")); // Observed result: (array) ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ // Expected result: (array) ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ // Wor...

Help needed with mod_rewrite and htaccess for Drupal

I want to enable .htaccess files on my server in order to use "clean_url" functionality in Drupal. This is what I've done so far: sudo a2enmod rewrite sudo /etc/init.d/apache2 restart cd /etc/apache2/mods-enabled grep mod_rewrite * In phpinfo() results I can see: mod_rewrite, so I guess the module is enabled. I've added a htaccess f...

PHP: htacess default variable

I want to set a default variable for a query that comes at the end of a url The .htaccess file redirects the url as follows: http://www.server.com/folder/subfolder/index.php?page="some-page-name" displayed url http://www.server.com/folder/some-page-name if the page name is not set, as in: http://www.server.com/folder/ the def...

simple redirect to default page with htaccess

The htaccess file requires an entry at the end of /folder/ to redirect the page example: http://www.server.com/folder/"some-page-name" If no page is defined as, then I want it to be "index" by default the htacess RewriteBase /folder/ RewriteRule ^(.*)$ subfolder/index.php/?page=$1 [L] ...

Switched to new server - Why do relative links link to ip address, not domain.name

Just started a new server - relative urls go to ip.numb.er/files rather than www.domain.com/files and this is causing images and links to work incorrectly. Did I misconfigure something? Forget to turn on a switch? ...

Apache Virtual Hosts File Update

For the past couple of weeks I've been porting over my site from Drupal to Wordpress. Well last night I finished so I uploaded the files to my host (Linode). There is no change in domain, I just want my domain to look at my 'wordpress' folder instead of my 'drupal' folder. I opened up my virtual host file and changed the DocumentRoot ac...

How to process all requests with one php script?

How to process with apache2 all requests by one script? Without mods if it is possible. ...

PHP on Mac OS X - Loading Non-Existent Extensions by Default - Erroneous phpinfo() Results?

I have enabled PHP 5.3.2 and Apache 2.2.14 on my install of Mac OS X Snow Leopard and have confirmed that I am connecting to it with a call to phpinfo(); On inital startup, it appears that ALL possible extensions are being loaded, as the call to print_r(get_loaded_extensions()) implies: Array ( [0] => Core [1] => date [2] =...

Restrict access to web directory but allow sub-domain

I am trying to deny access to a sub-domain directory from people accessing directly rather get them to browse to the sub-domain directly. For e.g I want people to be able to go to http://test.example.com and not http://example.com/test. If they do show a 403 Forbidden error. Is this possible through htaccess ? Googled it but cant see any...

UPDATED: Apache Chokes on PHP ldap_connect() Call

If I run the following PHP code on the command line I get the expected result: php -r 'var_dump(ldap_connect("ldaps://ldaps.example.com", 636));' resource(4) of type (ldap link) However if I put this in a PHP script <?php ldap_connect("ldaps://ldaps.example.com", 636); ?> Apache drops the connection, for example this is what cURL r...

how do i use xsendifle module Apache+mongrel

Hii All, i loaded mod_xsendfile.so in apche , i added few line in httpd.conf files LoadModule xsendfile_module modules/mod_xsendfile.so XSendFile on XSendFileAllowAbove on ServerName src DocumentRoot C:/InstantRails-2.0-win/rails_apps/src/public/ ProxyPass / http://localhost:3000/ ProxyPassReverse same as above ...

htaccess calling rewrite rule on everything

This is my htaccess file: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Static pages RewriteRule ^print/([0-9]+)$ index.php?action=PublicDisplayPrint&page_id=$1 [L,QSA] RewriteRule ^email/([0-9]+)$ index.php?action=PublicDisplayEmail&page_id=$1 [L,QSA] RewriteRule ^login$ index.php?action=Pu...

Need to upload a single file across 2 load balanced servers.

Hey guys, Currently my company has a 3 server set-up. 2 web boxes behind a load-balancer and another box not behind the load-balancer (used for Admin, CMS and stats). Due to the state of funds at the moment we are looking to decommission our single box which is not behind the load-balancer. The box has our CMS on it and a media subdomai...

Sample app required with rails mysql and apache

I want a sample application which is of Rails and the database Mysql and the server Apache. Please let me know if any such application is available. Thanks in advance I am using Opensolaris machine. ...

Errors while installing AAA Radius module on Apache Server

I am trying to install the AAA Radius module to my apache server installed on Linux machine. When trying to install it using the following command (to compile): apxs -i -a -c mod_auth_radius.c i am getting the following errors... /usr/lib/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SO...

How to prevent multiple authentication in a web app / site?

Hello, There's a site with registered users area, they all have their own user/pass. The problem is, some of then try to share the authentication info with others to help them finish their job. There's no posibility to restrict by ip adress because there's a dynamic-ip provided for everyone. What could be the best solution? store ses...

Why has PHP Module Penetration on Apache been falling for the past 5 years?

According to Security Space The penetration of PHP on Apache servers has been falling since the start of 2005, my question is why? PHP seems to be doing very well, are people using Ruby or other languages..... ...

recommend a PHP script to create XML sitemap? (crawl/scrape method)

I'm happy to write my own but if there's a really nice PHP script out there that i can just run on a cron and exclude directories then i'd love to hear about it! I'd prefer to use a scraper/crawler type script than write the XML from the database.... ...