apache2

appengine, urlfetch, and the content-length header

不打扰是莪最后的温柔 提交于 2019-12-23 12:39:20
问题 I have a Google Appengine app requesting pages from another server using urllib2 POSTs. I recently enabled gzip compression on the other server running Apache2, and the Appengine page requests started failing on key-error, indicating 'content-length' is not in the headers. I am not explicitly declaring gzip as an accepted encoding in my requests from Appengine, but it is possible Appengine is adding that header. Googling has not turned up any clear indication that Appengine's urlfetch

Why is $_SERVER['PATH_TRANSLATED'] repeating itself?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 12:37:14
问题 I'm trying to create a MVC framework when I noticed the $_SERVER['PATH_TRANSLATED'] variable is doing this: [PATH_INFO] => /test/test2/test3 [PATH_TRANSLATED] => redirect:/index.php/test/test2/test3/test2/test3 This is when I'm accessing the PHP file by http://domain.tld/test/test2/test3 Notice how it is repeating after /test/ This is my .htaccess for rewriting: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d

Is it possible to have two password files in Apache2?

被刻印的时光 ゝ 提交于 2019-12-23 10:18:22
问题 Can I have two AuthUserFile directives in an apache2/sites-enabled/000-default configuration file? <Location /repo/trac> AuthType Basic AuthName "Trac" AuthUserFile /etc/apache2/passfile1 AuthUserFile /etc/apache2/passfile2 Require valid-user </Location> I want username/password for two types of users. DEV - can access SVN and Trac NOM - can only access Trac I have two options: keep separate password files for Trac and Svn and include them separately, or have 2 password files in 1 I put DEV

htaccess QUERY_STRING urldecode

折月煮酒 提交于 2019-12-23 09:30:07
问题 I have a problem concerning .htaccess and QUERY_STRING. I try redirecting an URL with my htaccess that looks like this: http://mydomain.tld/out/http%3A%2F%2Fotherdomain.tld%3Fparam%3D0 to http://otherdomain.tld?param=0 I use RewriteCond and RewriteRule with the REQUEST_URI to redirect the url and everything works fine since REQUEST_URI is urldecoded by default in the htaccess. However, when I email the link to Hotmail, Hotmail urldecodes the slashes and the question mark. The result looks

Dynamic image creation/Apache headers using Imagick

有些话、适合烂在心里 提交于 2019-12-23 09:26:38
问题 While transferring an existing, stable, website to a new server I've run into an intermittent problem with a bit of code that creates images dynamically using Imagick. The code parses a GET query (eg example.com/image.php?ipid=750123&r=0&w=750&h=1000) and then scales and rotates an image stored on the server and serves it to the client. ipid = id for an image stored on server r = degrees of rotation w = width to display h = height to display. The code has probably been used for at least 5

Apache 2.2 redirect to SSL *then* do auth (with solution < but is it crap?)

这一生的挚爱 提交于 2019-12-23 08:47:50
问题 Seems to be the place for apache so here goes :) Age old problem: how so I redirect HTTP->HTTPS, then and only if HTTPS, do an auth? Oh - and I'd like most of it in a single snippet that can be Include-ed in multiple <directory> or <location> blocks, so no virtual host level random path based rewrites... Well, here's what I have that does seem to work: In the top of a VirtualHost block # Set ssl_off environment variable RewriteEngine on RewriteCond %{HTTPS} =on RewriteRule ^ - [E=ssl] In the

Web application could not be started Passenger Error (Apache2) - Referencing Non-Existing Ruby Patch

孤人 提交于 2019-12-23 04:43:38
问题 I have been having problems after updating from p247 to the latest patch for Ruby 2.0.0 (P353) using the latest version of RVM. Here is the link to my original question where I was experiencing a missing RVN environment file for the old patch which was no longer in my system. RVM was corrected and that problem disappeared. ERROR: Missing RVM environment file After Doing rvm upgrade command - Passenger 4.0.23 I went ahead and installed the latest version of Passenger 4.0.29 using the gem file

%1 is not a valid Win32 application for php_mysql.dll

混江龙づ霸主 提交于 2019-12-23 04:42:30
问题 Im trying to set up a AMP installation on my windows 8 laptop. However, Im not being able to get PHP to talk to MySQL. When I start apache server, the following error log is generated PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_mysql.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_mysqli.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line .. Any idea why this could be

gitolite - smart-http - gives uninitialised value for rc(“UMASK”)

随声附和 提交于 2019-12-23 03:08:46
问题 I'm getting the following error in my /var/log/apache2/error.log when I try to do a git clone to my server running gitolite with smart-http enabled [Wed Jul 25 21:53:36 2012] [error] [client 124.149.104.106] FATAL: warn\tUse of uninitialized value $rc{"UMASK"} in umask at /opt/git/gitolite-source/src/ gitolite-shell line 95, <DATA> line 1.<<newline>> I do have the UMASK value set to 0027 in /home/git/.gitolite.rc Any thoughts why the value isn't setting when called from an su_exec from a file

How to set Apache HTTP 503 error code instead of HTTP 500 on PHP error

吃可爱长大的小学妹 提交于 2019-12-23 03:08:13
问题 any ideas how to replace Apache HTTP 500 (Internal Server Error) error by HTTP 503 (Service Unavailable) on PHP error once PHP error displaying is off? This is much better option to inform spiders to back to the site soon... P.S. would be great to be able to append Retry-After to the 50x error codes if possible... cheers, /Marcin 回答1: I assume you are referring to PHP's new (since 5.2.4) default behaviour of throwing a 500 if an error occurs, and no other output is being made. AFAIK, that