apache

php ‘apache_note’ function whilst SUPHP is active

I am using maxminds geoip apache mod extention. It requires the php function 'apache_note'. However while suphp is active I am unable to access the function. Ideally I would like to use suphp as I understand it offers security benefits. Is it possible to use apache_note while also using suphp? ...

I can't seem to get mod_proxy_html working at all - no debug output, no errors.

I'm running apache 2.0.52, and I've compiled the mod_proxy_html module (version 3.1), apache starts fine, no errors. The only problem is that the module appears to do nothing - I'm not even getting any debugging output in the error log, so I'm a little stumped, as I fdon't even have any logging to point at a clue why it isn't working. Th...

PHP, LAMP server, changing display paths of certain URLs?

I apologize if this is a basic question, however I have been searching on this and can't find anything of use, probably since I don't really know the proper terms.. I am wondering if there is a way to interpret the url that is called on the server, such as: http://mydomainname.com/site1/module1 and then using PHP (ideally), or some oth...

mod_rewrite creates 301 instead of transparent redirection if folder exists

Hello, i'm having a small problem here. I'm using a simple rule to redirect all requests to a script, excepts some folders with static content : RewriteEngine On RewriteCond $1 !^(templates|css|js|uploads)/(.*)$ RewriteRule ^(.*)$ index.php?url=$1 [L,QSA] Most of the time, the redirection is good and transparent. But if the folder mat...

PHP - Apache server config DocumentRoot

Recently on my web server I changed the index.php page to 301 to / for SEO purposes. Now that I'm offline and using XAMPP, the document root is set to http://localhost/xampp/ and trying to login is sending the form to / which is the xampp folder rather than that specific app's folder. I have many different folders for all the different ...

Apache Admin Panel for Auth Control?

I'm in the process of launching a client tool that stores information on an apache server. I want to be able to control access to the files after they've been created. The basic Apache Auth module seems to meet my requirements, my only concern is that the permissions must be maintained by a non-technical user. Does anyone have a recomme...

Passing and URL as parameter in mod-rewrite

Hi Folks! I'm trying to pass an URL as a parameter in mod-rewrite. I guess there is a problem in my Regex. This my .htaccess: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule **^go/((http:\/\/)+[A-Za-z0-9\-]+[\.A-Za-z])/?$** feedmini.php?url=$1 [L] </IfModule> the URL I want to pass looks like http://www.aaaa.com/aaa/?q=v but ...

Custom Environment Variables in PHP

Is there a way to set a custom variable such as environment_name in my apache vhost file that can be read via $_ENV or ini_get("environment_name")? ...

Rewrite Problem - L(ast) not being respected?

So I'm working on a CSS/JS compressing system for a site, that has basically the following htaccess RewriteEngine On ... RewriteRule ^css/images/(.*)$ images/site/$1?%{QUERY_STRING} [L] RewriteRule ^css/([0-9a-fA-F]{32})$ assets.php?hash=$1 [L] RewriteCond %{HTTP_HOST} ^www.site.com [NC] RewriteRule ^(.*)$ http://site.com/$1 [L,R=301...

Apache FTPClient failing to download larger files

I have code that connects to an FTP server and gets an input stream to a file which works wit smaller files, but doesn't work at all with larger ones. It simply returns null each time, yet when I paste the full url into a browser it works fine. Here is my FTP download code: publishProgress("Downloading..."); try { ...

Apache installation on Windows 7

I am newbie with Apache. I am learning .. after the installation when i try to start the service I am see the following errors. The Apache service named reported the following error: Unable to open logs . The Apache service named reported the following error: no listening sockets available...

php book recommendation

Possible Duplicate: What is the best PHP programming book? I am a seasoned developer using microsoft technologies. Licensing and hosting prices are pushing me towards opensource. I want to develop a website using php apache and my sql, please recommend me a book for learning web development using php apache and my sql. i wil...

.htaccess on specific filetypes

Hi! I have some magic stuff in my htaccess. It works very well but I don't know how RewriteRule ^[^_+/]. index.php I think it says that all requests should go through index.php no matter which directory the visitor ask for. So far so good. However images, css files, js files etc should of course not be parsed in index.php. Can I ex...

What should be the right file permissions for program executables and logs files?

I have written a Linux system wide C++ program /usr/bin/PROG_X that uses a configuration file /etc/PROG_X.conf and log file /var/PROG_X.log. Now I need to call this program, after strong authentication, from the web using apache web server and php. Calling the program may involve changing configuration files and will change, of course, ...

Perl cgi script left running when client closes webpage mid-download

Hi I have a perl script (Cgi / Apache / Windows) which executes some programs on the computer, and formats the output for the web. The script takes about 4-5 minutes to completely run. My problem is that when someone cancels page load (or closes the web browser) while the script is running, the perl process in the server will keep runni...

how do i get mod_rewrite to execute the RewriteRules if and only if there is no paramater q= in the url?

the below code works to deal with my url structures but i need the rules not to work if there is parameter q= in the url. i tried to set up a rewritecond (in the commented out line below) without success, please help! thanks :) Options +FollowSymlinks RewriteEngine on # RewriteCond %{QUERY_STRING} q!=(.*) RewriteRule ^FSD/([^/]+)/([^...

Routes not resolving in Production Environment (Rails 2.3.5)

Hi all, I'm deploying my app to a live server running passenger on Apache. I've tested the app locally and my routes appear sound. I have my public controllers under app/controllers/content and my admin controllers under app/controllers/admin. Despite everything working in the development environment i'm getting "The page you were look...

Simple 301 redirect in .htaccess with query string does not work with Redirect directive

I am trying to redirect a single URL in a .htaccess file with Redirect: Redirect 301 /index2.php?option=com_rss&feed=RSS2.0&no_html=1 /something/somethingelse/ I have a bunch of other similar rules which work using directory structure URLs, but this one refuses to get processed. Redirect 301 /old/url/ /new/url/ Do I have to do anyt...

What linux / apache host server settings could be affecting my upload speeds?

Upload speeds to one particular server of mine are drastically slower than expected, or tolerable. I am moving a site to a new host; part of the functionality of the site is the upload of several large (>50Mb) files daily. The current upload speeds are unacceptably slow on the new server. I am new to linux and apache server config...

Setting up Postgresql to work with my local dev

I have Snow Leopard and am using the default apache. I installed postgresql via macports. So now I can do a psql from a terminal (I tried but failed to do a install of php5 through macports but there was an error) I have enabled php5 and restarted the apache so now I have php. But for the life of me I cannot figure out to hook up postgr...