Guest Maqueo Posted August 14, 2004 Report Share Posted August 14, 2004 Hi guys, I've got Apache running locally (under MDK 10) for testing my PHP stuff. The problem I've run into is that a php file like /var/www/html/index.php parses OK, but a subdirectory like /var/www/html/whatever/index.php doesn't! Instead the browser asks if I'd like to open or save the file... Any insights? Cheers, Maqueo Quote Link to comment Share on other sites More sharing options...
Guest Maqueo Posted August 14, 2004 Report Share Posted August 14, 2004 Sorry, my bad. It seems it's not parsing anything located at /var/www/html either. Seems the configuration just ain't right. I'll post if I find the reason, but it sound like something really simple (total n00b here ;)) Quote Link to comment Share on other sites More sharing options...
Guest anon Posted August 14, 2004 Report Share Posted August 14, 2004 Have you installed mod_php4 ? urpmi mod_php Quote Link to comment Share on other sites More sharing options...
Guest Maqueo Posted August 14, 2004 Report Share Posted August 14, 2004 Hi, I haven't installed mod_php manually, no, but the php files were parsing fine earlier. It seems the problem is the new .htaccess file I've created. Content is: AuthName "restricted stuff" AuthType Basic AuthUserFile /var/www/html/.htpasswd AddType application/x-httpd-php .php require valid-user Thanks, Maqueo Quote Link to comment Share on other sites More sharing options...
Guest anon Posted August 14, 2004 Report Share Posted August 14, 2004 You must have "AllowOverride AuthConfig" in effect for those directives to work in Apache. Also , require valid-user should read Require valid-user Quote Link to comment Share on other sites More sharing options...
Guest Maqueo Posted August 14, 2004 Report Share Posted August 14, 2004 You must have "AllowOverride AuthConfig" in effect for those directives to work in Apache. My guess is this doesn't go into the .htaccess file - Apache crashes now: 500 - Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Quote Link to comment Share on other sites More sharing options...
Guest anon Posted August 14, 2004 Report Share Posted August 14, 2004 No, it goes in the httpd.conf file. add it to the dir you wish to control access to. Quote Link to comment Share on other sites More sharing options...
Guest Maqueo Posted August 15, 2004 Report Share Posted August 15, 2004 No, it goes in the httpd.conf file. add it to the dir you wish to control access to. <{POST_SNAPBACK}> That did the trick! Thanks for your time & help man Maqueo Quote Link to comment Share on other sites More sharing options...
Guest anon Posted August 15, 2004 Report Share Posted August 15, 2004 B) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.