[PHP] htaccess
Hi gang: I have a client who has an account with GoDaddy (I know). GoDaddy says they have PHP v 5.3 installed on the client's account, but phpinfo() says different, namely it reports 5.2.17. After calling GoDaddy, they said the client has an htaccess file that makes everything 5.2 instead of 5.3. Now, I'm not an expert on these things and the reason why I am asking here, but here are the two htaccess files I find at root level: 1. Named: .htaccess.bak_hosting_company_Apache24_compatibility_fix Options +ExecCGI AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php5-cgi .php .htm .html # AddHandler php5-script .php .html # AddHandler x-httpd-php5 .php .html ErrorDocument 404 /404.html ErrorDocument 403 /403.html AND 2. Named: .htacess # The below FilesMatch stanza was added by your # hosting provider on 2013-06-27 11:05:33 # to resolve a potential Apache 2.4 # compatibility issue with your custom AddHandler(s) # for PHP. If you feel this was in error, please # contact support and we will work to resolve the # issue. Thanks! FilesMatch \.(htm|html)$ Options +ExecCGI /FilesMatch Options +ExecCGI AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php5-cgi .php .htm .html Does anyone see a problem here? OR -- a way to get PHP to version 5.3? Cheers, tedd _ t...@sperling.com http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess
On 8/07/2013, at 8:06, Tedd Sperling t...@sperling.com wrote: Hi gang: I have a client who has an account with GoDaddy (I know). GoDaddy says they have PHP v 5.3 installed on the client's account, but phpinfo() says different, namely it reports 5.2.17. After calling GoDaddy, they said the client has an htaccess file that makes everything 5.2 instead of 5.3. Now, I'm not an expert on these things and the reason why I am asking here, but here are the two htaccess files I find at root level: 1. Named: .htaccess.bak_hosting_company_Apache24_compatibility_fix Options +ExecCGI AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php5-cgi .php .htm .html # AddHandler php5-script .php .html # AddHandler x-httpd-php5 .php .html ErrorDocument 404 /404.html ErrorDocument 403 /403.html AND 2. Named: .htacess # The below FilesMatch stanza was added by your # hosting provider on 2013-06-27 11:05:33 # to resolve a potential Apache 2.4 # compatibility issue with your custom AddHandler(s) # for PHP. If you feel this was in error, please # contact support and we will work to resolve the # issue. Thanks! FilesMatch \.(htm|html)$ Options +ExecCGI /FilesMatch Options +ExecCGI AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php5-cgi .php .htm .html Does anyone see a problem here? OR -- a way to get PHP to version 5.3? Cheers, tedd I don’t use GoDaddy, so this may not be entirely accurate. I’m guessing that it’s these two lines in .htaccess: AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php5-cgi .php .htm .html They’re changing the handler from PHP files from the default ones to x-httpd-php5-cgi, which would cause PHP 5.2 to be used instead. Try commenting out these two lines. --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess
Simon: Confirmed. Those two lines cause the problem. However, commenting out those lines causes other problems. Are there similar statements to these: AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php5-cgi .php .htm .html That will allow for their function (whatever that may be), but not reduce PHP to version 5.2.17? If these statement are for only the php interpreter to consider html prefixes, then I use the following on my main site: # handler for phpsuexec. -- this makes these prefixes considered for php FilesMatch \.(htm|html|css)$ SetHandler application/x-httpd-php /FilesMatch And it works for me without the PHP version reduction. What do you say? And thanks... Cheers, tedd On Jul 7, 2013, at 4:10 PM, Simon J Welsh si...@simon.geek.nz wrote: On 8/07/2013, at 8:06, Tedd Sperling t...@sperling.com wrote: Hi gang: I have a client who has an account with GoDaddy (I know). GoDaddy says they have PHP v 5.3 installed on the client's account, but phpinfo() says different, namely it reports 5.2.17. After calling GoDaddy, they said the client has an htaccess file that makes everything 5.2 instead of 5.3. Now, I'm not an expert on these things and the reason why I am asking here, but here are the two htaccess files I find at root level: 1. Named: .htaccess.bak_hosting_company_Apache24_compatibility_fix Options +ExecCGI AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php5-cgi .php .htm .html # AddHandler php5-script .php .html # AddHandler x-httpd-php5 .php .html ErrorDocument 404 /404.html ErrorDocument 403 /403.html AND 2. Named: .htacess # The below FilesMatch stanza was added by your # hosting provider on 2013-06-27 11:05:33 # to resolve a potential Apache 2.4 # compatibility issue with your custom AddHandler(s) # for PHP. If you feel this was in error, please # contact support and we will work to resolve the # issue. Thanks! FilesMatch \.(htm|html)$ Options +ExecCGI /FilesMatch Options +ExecCGI AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php5-cgi .php .htm .html Does anyone see a problem here? OR -- a way to get PHP to version 5.3? Cheers, tedd I don’t use GoDaddy, so this may not be entirely accurate. I’m guessing that it’s these two lines in .htaccess: AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php5-cgi .php .htm .html They’re changing the handler from PHP files from the default ones to x-httpd-php5-cgi, which would cause PHP 5.2 to be used instead. Try commenting out these two lines. --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htaccess to make html act as php suffixed files
Hi gang: To get html pages to use php scripts, I've used: RewriteEngine on # handler for phpsuexec. -- this makes these prefixes considered for php FilesMatch \.(htm|html)$ SetHandler application/x-httpd-php /FilesMatch In a .htaccess file. However, it works on one site, but not on another -- any ideas as to why? Cheers, tedd _ t...@sperling.com http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess to make html act as php suffixed files
On 11 Jun 2013, at 18:16, Tedd Sperling t...@sperling.com wrote: Hi gang: To get html pages to use php scripts, I've used: RewriteEngine on # handler for phpsuexec. -- this makes these prefixes considered for php FilesMatch \.(htm|html)$ SetHandler application/x-httpd-php /FilesMatch In a .htaccess file. However, it works on one site, but not on another -- any ideas as to why? At a rough guess there's an AllowOverride line in the main Apache config that's restricting what you can do in the .htaccess file. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess to make html act as php suffixed files
On Tue, Jun 11, 2013 at 7:17 PM, Stuart Dallas stu...@3ft9.com wrote: On 11 Jun 2013, at 18:16, Tedd Sperling t...@sperling.com wrote: Hi gang: To get html pages to use php scripts, I've used: RewriteEngine on # handler for phpsuexec. -- this makes these prefixes considered for php FilesMatch \.(htm|html)$ SetHandler application/x-httpd-php /FilesMatch In a .htaccess file. However, it works on one site, but not on another -- any ideas as to why? At a rough guess there's an AllowOverride line in the main Apache config that's restricting what you can do in the .htaccess file. Or the .htaccess usage is not enabled at all in that site.
Re: [PHP] htaccess to make html act as php suffixed files
Em Ter 11 Jun 2013 15:08:59 BRT, Matijn Woudt escreveu: On Tue, Jun 11, 2013 at 7:17 PM, Stuart Dallas stu...@3ft9.com wrote: On 11 Jun 2013, at 18:16, Tedd Sperling t...@sperling.com wrote: Hi gang: To get html pages to use php scripts, I've used: RewriteEngine on # handler for phpsuexec. -- this makes these prefixes considered for php FilesMatch \.(htm|html)$ SetHandler application/x-httpd-php /FilesMatch In a .htaccess file. However, it works on one site, but not on another -- any ideas as to why? At a rough guess there's an AllowOverride line in the main Apache config that's restricting what you can do in the .htaccess file. Or the .htaccess usage is not enabled at all in that site. ALSO, you have to be sure this site is using apache. Otherwise, .htaccess are not available. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess and user file/folder access outside public_html
Hi, i'm facing a problem and i don't know where to start and in fact, how to do it. Situation: Users of my website should be able to save their resume files + cover letters on my webserver. problem: how to make their file SECURED from any hack ? I mean only file owner and web administrator (so in this case... myself) should have access to those files. never user B should be able to access, read or download files of user A. my guess: i was thinking to store files outside public_html folder, in the following way: /resumes/user A/resume A /resumes/user A/cover letter A /resumes/user B/resume B - US /resumes/user B/resume B - ES /resumes/user B/cover letter B Questions: 1. how can i allow user to have access to folder/files outside public_html ? 2. how can i secure that user A has access to his own files ONLY ? i searched on internet for some help but i did not find anything really revelent...only theory and no really in details. I need your help. thx. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess and user file/folder access outside public_html
On May 25, 2013, at 13:38, Rafnews raf.n...@gmail.com wrote: Hi, i'm facing a problem and i don't know where to start and in fact, how to do it. Situation: Users of my website should be able to save their resume files + cover letters on my webserver. problem: how to make their file SECURED from any hack ? I mean only file owner and web administrator (so in this case... myself) should have access to those files. never user B should be able to access, read or download files of user A. my guess: i was thinking to store files outside public_html folder, in the following way: /resumes/user A/resume A /resumes/user A/cover letter A /resumes/user B/resume B - US /resumes/user B/resume B - ES /resumes/user B/cover letter B Questions: 1. how can i allow user to have access to folder/files outside public_html ? 2. how can i secure that user A has access to his own files ONLY ? i searched on internet for some help but i did not find anything really revelent...only theory and no really in details. I need your help. thx. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You will have to make a few scripts that check whether User A is logged in or not, read the files with PHP, change the default headers and print the output, which should be the exact same document. A quick example would be: ?php // file_exists also checks whether a directory exists if (!empty($_SESSION['userId']) file_exists(dirname(__FILE__).'/../resumes/'.$_SESSION['userId']) { // all the necesary headers, check out the documentation for header() function on php.net header('(all the needed headers)'); echo file_get_contents(dirname(__FILE__).'/../resumes/'.$_SESSION['userId'].'/resume A.doc'); } Above is basic pseudo-code, not tested. Now all you have to care about is that userId is correctly set and that nobody can hijack that user account. Greetings. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htaccess question
I know it's not a php question, but I can't readily find the answer elsewhere. I want to make this directive universal. Put htaccess file on any host in any folder. This works RewriteEngine On RewriteCond %{SERVER_PORT} !=443 RewriteRule ^(.*)$ https://www.foo.org/bar/$1 [R=301,L] #Here the foo.org and /bar must be specified I want what is in effect RewriteRule ^(.*)$ https://{host_name}/{directory}/$1 [R=301,L] I can easily do this with php regex capturing the (host and dir) and then rewriting the text string; but the Apache directives are not obvious. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess question
On Tue, Apr 9, 2013 at 2:07 PM, Al n...@ridersite.org wrote: I know it's not a php question, but I can't readily find the answer elsewhere. I want to make this directive universal. Put htaccess file on any host in any folder. This works RewriteEngine On RewriteCond %{SERVER_PORT} !=443 RewriteRule ^(.*)$ https://www.foo.org/bar/$1 [R=301,L] #Here the foo.org and /bar must be specified I want what is in effect RewriteRule ^(.*)$ https://{host_name}/{directory}/$1 [R=301,L] I can easily do this with php regex capturing the (host and dir) and then rewriting the text string; but the Apache directives are not obvious. You were on the right track: RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htaccess question
How can I prevent access to all files in a directory except one with an htaccess file. I've tried several approaches found with Googling; but, none seem to work. e.g., FilesMatch ^(makeScodeImg.php) Order Allow,Deny Deny from all /FilesMatch This seems to me as it should deny to all except makeScodeImg.php Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] htaccess question
First turn your ReWriteEngine On. This can be done in the particular folder to allow them access to only the one file. You need to understand the conditions of mod_rewrite read below. http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html OR you can just use the http://cooletips.de/htaccess/ from Germany. It will take you through step by step in creating an htaccess. I might suggest you do not use the password options because that to me is not safe to use someone else's website when creating htaccess screen names and passwords. Richard L. Buskirk -Original Message- From: Al [mailto:n...@ridersite.org] Sent: Monday, May 23, 2011 11:53 AM To: php-general@lists.php.net Subject: [PHP] htaccess question How can I prevent access to all files in a directory except one with an htaccess file. I've tried several approaches found with Googling; but, none seem to work. e.g., FilesMatch ^(makeScodeImg.php) Order Allow,Deny Deny from all /FilesMatch This seems to me as it should deny to all except makeScodeImg.php Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess question
On Mon, May 23, 2011 at 11:52 AM, Al n...@ridersite.org wrote: How can I prevent access to all files in a directory except one with an htaccess file. I've tried several approaches found with Googling; but, none seem to work. e.g., FilesMatch ^(makeScodeImg.php) Order Allow,Deny Deny from all /FilesMatch This seems to me as it should deny to all except makeScodeImg.php Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Also don't forget to enable override on the directory, otherwise .htaccess wont be read at all... http://httpd.apache.org/docs/2.0/mod/core.html -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray
[PHP] htaccess question
I want to restrict access to all files except one on my site and in parent dir. Thought this should work; but it doesn't. Files * Order Deny,Allow Deny from all Allow from xx.36.2.215 /Files xx.36.2.215 is actual value IP This file makes a captcha image and is called with img src=makeScodeImg.php alt=missing img file / in file /dir/control.php makeScodeImg.php is= /dir/includes/makeScodeImg.php Works fine if allow all just for testing Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php htaccess logins and logouts
Hi all, I've got a site set up that is using an htaccess file to provide secure access to a directory. That is working fine. What I wondered was, is there a way to log out via PHP. As I understand it, the login mechanism is part of Apache, so I guess what I'm really asking is, is there a way that I can get Apache to end the 'session' that Apache has set up, using PHP? I'm sure I've seen cPanel do it, so I was wondering how easy this would be to do myself. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] php htaccess logins and logouts
On Fri, Nov 27, 2009 at 12:12 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Hi all, I've got a site set up that is using an htaccess file to provide secure access to a directory. That is working fine. What I wondered was, is there a way to log out via PHP. As I understand it, the login mechanism is part of Apache, so I guess what I'm really asking is, is there a way that I can get Apache to end the 'session' that Apache has set up, using PHP? I'm sure I've seen cPanel do it, so I was wondering how easy this would be to do myself. IIRC if you unset $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] it will log you out. Cheers. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php htaccess logins and logouts
Hi, IIRC if you unset $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] it will log you out. I've done some research on this in the past - and not all browsers/web servers honour that as it's the browser that keeps the username/password cached and sends it after a 401 response, so the server knows nothing about the login - i.e. 1. User visits page 1 2. Server sends 401 Unauthorised header 3. Browser does not have any login details for the realm and prompts user 4. User inputs credentials, browser re-submits the request with the credentials attached 5. User visits page 2 6. Server sends 401 Unauthorised header 7. Browser has login details for the realm and re-submits the request with the credentials attached From the conclusion I came to after my research, there is no reliable way for the server to de-authorise a login after a 401 request. There are tricks you can do on the server, such as changing the authentication realm when the user has logged out - but if the user visits the same site again the realms will match and they will be logged in. I've seen a hack which uses a cookie on the user's machine - if the user has the cookie, the correct authentication realm is returned in the authentication request. If the user doesn't have the cookie, the server sends a random realm to trick the browser into thinking it's not logged in. By the time you've done all that, you might as well just use sessions. Regards, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htaccess question
Hi gang: Is there a way I can use a htaccess directive to require a php script to be included within each file contained within that directory? For example, let's say I have a directory with 100 scripts in it, but I want each script within that directory to pass through an authorization script before executing. The hard way is for me to go through each of the 100 scripts and add the statement require(auth.php), but I don't want to do that (I'm too lazy and beside there is too great of a chance of an error). So, is there a way for me to circumvent this problem by using a htaccess directive? Now, I know that I can use htaccess to require basic authorization, like so: AuthType Basic AuthName admin AuthUserFile /home/httpd/vhosts/mydomain.com/.htpass require valid-user But I don't want a file containing user ids and encrypted passwords in the file system. Instead, I want to move the user ids and passwords into the database and out of the file system. I can do this with an authorization script, but I don't want to alter 100 scripts to do it. Opinions and suggestions welcomed. Thanks, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess question
Is there a way I can use a htaccess directive to require a php script to be included within each file contained within that directory? For example, let's say I have a directory with 100 scripts in it, but I want each script within that directory to pass through an authorization script before executing. The hard way is for me to go through each of the 100 scripts and add the statement require(auth.php), but I don't want to do that (I'm too lazy and beside there is too great of a chance of an error). So, is there a way for me to circumvent this problem by using a htaccess directive? I don't think it is possible to include a particular script for every request without using include or require statements. You can solve this problem by routing all the request to one file, say index.php and then manipulate the flow from there. -- With warm regards, Sudheer. S Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess question
On Fri, Sep 11, 2009 at 4:46 PM, tedd t...@sperling.com wrote: Hi gang: Is there a way I can use a htaccess directive to require a php script to be included within each file contained within that directory? For example, let's say I have a directory with 100 scripts in it, but I want each script within that directory to pass through an authorization script before executing. The hard way is for me to go through each of the 100 scripts and add the statement require(auth.php), but I don't want to do that (I'm too lazy and beside there is too great of a chance of an error). So, is there a way for me to circumvent this problem by using a htaccess directive? Now, I know that I can use htaccess to require basic authorization, like so: AuthType Basic AuthName admin AuthUserFile /home/httpd/vhosts/mydomain.com/.htpass require valid-user But I don't want a file containing user ids and encrypted passwords in the file system. Instead, I want to move the user ids and passwords into the database and out of the file system. I can do this with an authorization script, but I don't want to alter 100 scripts to do it. Here is a link to the manual. http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file *PHP_INI_PERDIR* Entry can be set in php.ini, .htaccess or httpd.conf Opinions and suggestions welcomed. Thanks, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess - change index.php to index.abc
Joe Wollard wrote: If you don't want to change the names of the files themselve from .php to .abc then you'd need to use something like mod_rewrite for apache's HTTPD. I'm not entirely certain as to how you'd do this, but I've included what I normally use to hide index.php in the url. If possible I'd put this in httpd.conf instead of .htaccess - there are performance concerns that may be involved there. Anyway, I hope this gets you started or sparks an idea from another list member. Directory /var/www/html/ RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d off the top of my head, the following rule would translate 'afilenamestub.foo' (where 'foo' can be any extension, and 'afilenamestub' can contain dots) to 'afilenamestub.php': RewriteRule ^(.*)\.[^.]*$ $1.php [L,QSA] combined with the RewriteConds given above (to only rewrite when a file doesn't exist and/or isn't a dir) no warranty is available - I happily lose days trying to get RewriteRules running and tuned :-P chances are it requires tweaking to get working. RewriteRule ^(.*)$ index.php/$1 [L,QSA] /Directory .. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess - change index.php to index.abc
On Tue, June 6, 2006 3:38 pm, Jochem Maas wrote: no warranty is available - I happily lose days trying to get RewriteRules running and tuned :-P chances are it requires tweaking to get working. Which is one of the reasons I abandoned mod_rewrite as a solution for URL-munging. MUCH easier to use .htaccess and Files/ForceType to get what I want to be PHP, and then to access $_SERVER['PATH_INFO'] to get the URL-parameters. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess - change index.php to index.abc
On Sat, June 3, 2006 6:47 pm, Labunski wrote: What should I change in .htaccess, so that visitors will see index.abc instead of index.php. I just wanna hide file's extension. Assuming you use PHP as Module and not CGI: Files index.abc ForceType application/x-httpd-php /Files -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess - change index.php to index.abc
Hello, What should I change in .htaccess, so that visitors will see index.abc instead of index.php. I just wanna hide file's extension. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess - change index.php to index.abc
If you don't want to change the names of the files themselve from .php to .abc then you'd need to use something like mod_rewrite for apache's HTTPD. I'm not entirely certain as to how you'd do this, but I've included what I normally use to hide index.php in the url. If possible I'd put this in httpd.conf instead of .htaccess - there are performance concerns that may be involved there. Anyway, I hope this gets you started or sparks an idea from another list member. Directory /var/www/html/ RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] /Directory On 6/3/06, Labunski [EMAIL PROTECTED] wrote: Hello, What should I change in .htaccess, so that visitors will see index.abc instead of index.php. I just wanna hide file's extension. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php .htaccess
Hello I've a site with a .htaccess defined, the users have to enter the login and password to get in, Is it possible on php to ask the apache server wich user is using the current session? I'd like to give the users the oportunity to change their password but without ask again who are you. Thanks in advance for any answer. Regards Enediel Linux user 300141 Debian GNU/Linux -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php .htaccess
On 1/11/06, enediel gonzalez [EMAIL PROTECTED] wrote: Hello I've a site with a .htaccess defined, the users have to enter the login and password to get in, Is it possible on php to ask the apache server wich user is using the current session? $_SERVER['REMOTE_USER'] -robin
RE: [PHP] php .htaccess
You may want to check this list of Authentication related code examples : http://www.weberdev.com/search.php3?searchtype=categorycategory=Authenticat ionsecondary=IsSub=1 Sincerely berber Visit the Weber Sites Today, To see where PHP might take you tomorrow. PHP code examples : http://www.weberdev.com PHP Web Logs : http://www.weberblog.com/ PHP MySQL Forums : http://www.weberforums.com/ Learn PHP Playing Trivia http://www.webertrivia.com Web Development Index http://www.weberindex.com Web Templates http://www.webertemplates.com Search for PHP Code from your browser http://toolbar.weberdev.com -Original Message- From: enediel gonzalez [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 11, 2006 4:50 PM To: php-general@lists.php.net Subject: [PHP] php .htaccess Hello I've a site with a .htaccess defined, the users have to enter the login and password to get in, Is it possible on php to ask the apache server wich user is using the current session? I'd like to give the users the oportunity to change their password but without ask again who are you. Thanks in advance for any answer. Regards Enediel Linux user 300141 Debian GNU/Linux -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess
I am using .htaccess files throughout my code directory tree to set certain directives such as php_value auto_prepend_file ../lib/libmatrix.php The problem is, they don't work. I have this in apache: Directory usr/local/apache/htdocs/realtors/ Options FollowSymLinks AllowOverride None /Directory Where realtors is the root directory of my site...how can I get it to work? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess file
Greg Donald wrote: On 4/21/05, Pieter du Toit [EMAIL PROTECTED] wrote: Is there any way that i can see if using htaccess file is enabled on server without contacting my isp. I created a htaccess file and ftp'd it to the server with the register_globals flag set to 0: php_admin_flag register_globals 0 php_flag register_globals Off is what I've always used. On/Off and 0/1 are interchangeable in this context. but what really got me was the line: php_flag engine off that pretty much take away any doubt that this might have been a php related question :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htaccess file
Is there any way that i can see if using htaccess file is enabled on server without contacting my isp. I created a htaccess file and ftp'd it to the server with the register_globals flag set to 0: this is the htaccess code # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* Limit GET POST order deny,allow deny from all allow from all /Limit Limit PUT DELETE order deny,allow deny from all /Limit AuthUserFile /home/predicta/public_html/_vti_pvt/service.pwd AuthGroupFile /home/predicta/public_html/_vti_pvt/service.grp php_flag engine off AllowOverrid ALL php_admin_flag register_globals 0 and this is what happens Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.33 Server at www.predictabid.com Port 80 I suppose this means that htaccess use is not enabled? If this is the case, what else can i use to set register_globals to on? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess file
Well, if the htaccess file caused an internal server error (500) then yes, it's reading it. This isn't an apache list, you probably want to ask this question somewhere else... That being said... Are you missing an 'e' in the AllowOverride line near the bottom? Pieter du Toit wrote: Is there any way that i can see if using htaccess file is enabled on server without contacting my isp. I created a htaccess file and ftp'd it to the server with the register_globals flag set to 0: this is the htaccess code # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* Limit GET POST order deny,allow deny from all allow from all /Limit Limit PUT DELETE order deny,allow deny from all /Limit AuthUserFile /home/predicta/public_html/_vti_pvt/service.pwd AuthGroupFile /home/predicta/public_html/_vti_pvt/service.grp php_flag engine off AllowOverrid ALL php_admin_flag register_globals 0 and this is what happens Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.33 Server at www.predictabid.com Port 80 I suppose this means that htaccess use is not enabled? If this is the case, what else can i use to set register_globals to on? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess file
On 4/21/05, Pieter du Toit [EMAIL PROTECTED] wrote: Is there any way that i can see if using htaccess file is enabled on server without contacting my isp. I created a htaccess file and ftp'd it to the server with the register_globals flag set to 0: php_admin_flag register_globals 0 php_flag register_globals Off is what I've always used. -- Greg Donald Zend Certified Engineer http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess
I'm trying to figure out out to put a directive in .htaccess to make the session timeout in 4 hours .. tried php_flag session.cookie_lifetime 240 and a few others can someone help ! tia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess
pete M escribió: I'm trying to figure out out to put a directive in .htaccess to make the session timeout in 4 hours .. tried php_flag session.cookie_lifetime 240 and a few others can someone help ! tia Try ini_set(session.gc_maxlifetime,2400); -- Mario de Frutos Dieguez División de Ingeniería del Software y Comunicaciones CARTIF -Parque Tecnológico Boecillo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess
4 hours = 60 * 60 * 4 = 14400 Mario de Frutos Dieguez wrote: pete M escribió: I'm trying to figure out out to put a directive in .htaccess to make the session timeout in 4 hours .. tried php_flag session.cookie_lifetime 240 and a few others can someone help ! tia Try ini_set(session.gc_maxlifetime,2400); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess
and try php_value instead of php flag: php_value session.cookie_lifetime 14400 Martin Mandl wrote: 4 hours = 60 * 60 * 4 = 14400 Mario de Frutos Dieguez wrote: pete M escribió: I'm trying to figure out out to put a directive in .htaccess to make the session timeout in 4 hours .. tried php_flag session.cookie_lifetime 240 and a few others can someone help ! tia Try ini_set(session.gc_maxlifetime,2400); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess config
Philip Hallstrom wrote: allow_url_fopen can only be set in php.ini. See here for more info: scope of ini settings (from the manual)... ConstantValue Meaning PHP_INI_USER1 Entry can be set in user scripts or in Windows registry PHP_INI_PERDIR 2 Entry can be set in php.ini, .htaccess or httpd.conf PHP_INI_SYSTEM 4 Entry can be set in php.ini or httpd.conf PHP_INI_ALL 7 Entry can be set anywhere allow_url_fopen is PHP_INI_SYSTEM. note that it can also be passed as an arg to the CLI e.g (-d flag): /usr/bin/php -dallow_url_fopen=1 ./getmyremotefile.php http://us2.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen On Thu, 31 Mar 2005, Neo Theone wrote: Hi I got a simple problem: I need to have allow_url_fopen on for a certain directory and so I wanted to control it by .htaccess file. now I can control other php_flags like register_globals in this directory (so apache allows the Override) but I just simple can't get the following line to work: php_flag allow_url_fopen on any help is appreciated neo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess config
Hi I got a simple problem: I need to have allow_url_fopen on for a certain directory and so I wanted to control it by .htaccess file. now I can control other php_flags like register_globals in this directory (so apache allows the Override) but I just simple can't get the following line to work: php_flag allow_url_fopen on any help is appreciated neo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess config
allow_url_fopen can only be set in php.ini. See here for more info: http://us2.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen On Thu, 31 Mar 2005, Neo Theone wrote: Hi I got a simple problem: I need to have allow_url_fopen on for a certain directory and so I wanted to control it by .htaccess file. now I can control other php_flags like register_globals in this directory (so apache allows the Override) but I just simple can't get the following line to work: php_flag allow_url_fopen on any help is appreciated neo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] .htaccess and .htpasswd
Can I know the platform on which you are running apache. -Original Message- From: Matthew Sims [mailto:[EMAIL PROTECTED] Sent: Thursday, October 14, 2004 1:57 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] .htaccess and .htpasswd # .htaccess AuthType Basic AuthName Restricted Area AuthUserFile /www/html/path/to/file/admin/.htpasswd require valid-user # .htpasswd Admin:ChqaxtiTH1e0E Both files are in same directory. Why it doesn't work? Can I use as AuthUserFile .htpasswd since they are in the same directory? I know its not smart but let's get this working and I'll move .htpasswd later to upper level :) -afan Dude...do you know what mailing list you're on? http://httpd.apache.org/lists.html -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess and .htpasswd
Thanks but problem is already solved :) -afan Mulley, Nikhil wrote: Can I know the platform on which you are running apache. -Original Message- From: Matthew Sims [mailto:[EMAIL PROTECTED] Sent: Thursday, October 14, 2004 1:57 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] .htaccess and .htpasswd # .htaccess AuthType Basic AuthName Restricted Area AuthUserFile /www/html/path/to/file/admin/.htpasswd require valid-user # .htpasswd Admin:ChqaxtiTH1e0E Both files are in same directory. Why it doesn't work? Can I use as AuthUserFile .htpasswd since they are in the same directory? I know its not smart but let's get this working and I'll move .htpasswd later to upper level :) -afan Dude...do you know what mailing list you're on? http://httpd.apache.org/lists.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess and .htpasswd
# .htaccess AuthType Basic AuthName Restricted Area AuthUserFile /www/html/path/to/file/admin/.htpasswd require valid-user # .htpasswd Admin:ChqaxtiTH1e0E Both files are in same directory. Why it doesn't work? Can I use as AuthUserFile .htpasswd since they are in the same directory? I know its not smart but let's get this working and I'll move .htpasswd later to upper level :) -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess and .htpasswd
# .htaccess AuthType Basic AuthName Restricted Area AuthUserFile /www/html/path/to/file/admin/.htpasswd require valid-user # .htpasswd Admin:ChqaxtiTH1e0E Both files are in same directory. Why it doesn't work? Can I use as AuthUserFile .htpasswd since they are in the same directory? I know its not smart but let's get this working and I'll move .htpasswd later to upper level :) -afan Dude...do you know what mailing list you're on? http://httpd.apache.org/lists.html -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess and .htpasswd
try an apache mailing list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess and .htpasswd
Oops! Sorry guy, sent to wrong place! I apology. :) -afan Matt M. wrote: try an apache mailing list. . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess and .htpasswd
Afan Pasalic wrote: # .htaccess AuthType Basic AuthName Restricted Area AuthUserFile /www/html/path/to/file/admin/.htpasswd require valid-user # .htpasswd Admin:ChqaxtiTH1e0E Both files are in same directory. Why it doesn't work? Can I use as AuthUserFile .htpasswd since they are in the same directory? I know its not smart but let's get this working and I'll move .htpasswd later to upper level :) Did my filter throw an Apache mailing list email into my php folder? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess and .htpasswd
Yes, I sent it on wrong place. :) Sorry. -afan Matthew Sims wrote: # .htaccess AuthType Basic AuthName Restricted Area AuthUserFile /www/html/path/to/file/admin/.htpasswd require valid-user # .htpasswd Admin:ChqaxtiTH1e0E Both files are in same directory. Why it doesn't work? Can I use as AuthUserFile .htpasswd since they are in the same directory? I know its not smart but let's get this working and I'll move .htpasswd later to upper level :) -afan Dude...do you know what mailing list you're on? http://httpd.apache.org/lists.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess
hi, i would like to ask what happens when a user is downloading a large file from apache server and i modify the .htaccess file affecting the folder where is the file beeing downloaded by the user. For example i rewrite the list of ips allowed to access the file/folder and i remove the user's ip. Will the tranfer be interrupted or not? Is there any other way how to interupt the transfer? Thank you for help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] .htaccess
[snip] i would like to ask what happens when a user is downloading a large file from apache server and i modify the .htaccess file affecting the folder where is the file beeing downloaded by the user. For example i rewrite the list of ips allowed to access the file/folder and i remove the user's ip. Will the tranfer be interrupted or not? Is there any other way how to interupt the transfer? Thank you for help. [/snip] a. It shouldn't interrupt the connection as the connection does not need to be re-established during the download process. 2. This is an excellent question for an Apache mailing list. III. Please do not send things twice. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess
Vclav Slovek wrote: hi, i would like to ask what happens when a user is downloading a large file from apache server and i modify the .htaccess file affecting the folder where is the file beeing downloaded by the user. For example i rewrite the list of ips allowed to access the file/folder and i remove the user's ip. Will the tranfer be interrupted or not? Is there any other way how to interupt the transfer? Thank you for help. http://httpd.apache.org/lists.html -- John C. Nichel berGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess file
Hi all, I have a problem, but maybe it's more about Apache than about PHP. I need to access a Apache .htaccess file from PHP and modify it, but I always get access denied error. Could you help me, with solving this problem? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess file
On Monday 05 July 2004 16:58, Vclav Slovek wrote: I have a problem, but maybe it's more about Apache than about PHP. I need to access a Apache .htaccess file from PHP and modify it, but I always get access denied error. Could you help me, with solving this problem? access denied most likely means you don't have permission to read/write it. If you're running your own server, change the permissions accordingly, otherwise explain to your server admin why you want to change the .htaccess file(s). -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Ummm, well, OK. The network's the network, the computer's the computer. Sorry for the confusion. -- Sun Microsystems */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess file
--- Václav Slováèek [EMAIL PROTECTED] wrote: Hi all, I have a problem, but maybe it's more about Apache than about PHP. I need to access a Apache .htaccess file from PHP and modify it, but I always get access denied error. Could you help me, with solving this problem? Please check if you ( the user which runs apache, usually named 'nobody') has permissions to write. You may(should) change the permissions of the file to modify it. zareef ahmed Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess file
what are the files permissons? of these are set wrong it could cause your problem On Mon, 05 Jul 2004 10:58:54 +0200, Vclav Slovek [EMAIL PROTECTED] wrote: Hi all, I have a problem, but maybe it's more about Apache than about PHP. I need to access a Apache .htaccess file from PHP and modify it, but I always get access denied error. Could you help me, with solving this problem? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- John [EMAIL PROTECTED] http://www.whp.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess file
You will have to chmod these .htaccess files John [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] what are the files permissons? of these are set wrong it could cause your problem On Mon, 05 Jul 2004 10:58:54 +0200, Václav Slovácek [EMAIL PROTECTED] wrote: Hi all, I have a problem, but maybe it's more about Apache than about PHP. I need to access a Apache .htaccess file from PHP and modify it, but I always get access denied error. Could you help me, with solving this problem? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- John [EMAIL PROTECTED] http://www.whp.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess file
When my web is hosted, there is no other way how to solve it? I realized that I can't see the file in my ftp client, so I cant't change the permissions. Of course, I can't use chmod() to change the permissions when I'm not allowed to write into the file. So the only solution is to contact admin? Dne Mon, 5 Jul 2004 17:40:55 +0800 napsal/-a Jason Wong [EMAIL PROTECTED] pspvek nsledujcho znn:: On Monday 05 July 2004 16:58, Vclav Slovek wrote: I have a problem, but maybe it's more about Apache than about PHP. I need to access a Apache .htaccess file from PHP and modify it, but I always get access denied error. Could you help me, with solving this problem? access denied most likely means you don't have permission to read/write it. If you're running your own server, change the permissions accordingly, otherwise explain to your server admin why you want to change the .htaccess file(s). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess file
On Monday 05 July 2004 18:13, Vclav Slovek wrote: So the only solution is to contact admin? Yes. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* 86. What do you mean that wasn't a copy? --Top 100 things you don't want the sysadmin to say */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess file
Vclav Slovek wrote: When my web is hosted, there is no other way how to solve it? I realized that I can't see the file in my ftp client, so I cant't change the permissions. Of course, I can't use chmod() to change the permissions when I'm not allowed to write into the file. So the only solution is to contact admin? ftp clients usually have a special configuration setting that will allow you to view such 'hidden' files. Dne Mon, 5 Jul 2004 17:40:55 +0800 napsal/-a Jason Wong [EMAIL PROTECTED] pspvek nsledujcho znn:: On Monday 05 July 2004 16:58, Vclav Slovek wrote: I have a problem, but maybe it's more about Apache than about PHP. I need to access a Apache .htaccess file from PHP and modify it, but I always get access denied error. Could you help me, with solving this problem? access denied most likely means you don't have permission to read/write it. If you're running your own server, change the permissions accordingly, otherwise explain to your server admin why you want to change the .htaccess file(s). -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess... why it is deleted by the server?!!!?
Hi.. I made a .htaccess file. and then uploaded it to my server.. but everytime I do it deletes it automatically.. it is hidden directly.. or sure deleted from there.. so what is the problem! My hosting account is Linux, WebServer : Apache.. so what is the problem? and how to solve it? Cheers..
Re: [PHP] .htaccess... why it is deleted by the server?!!!?
Hello Radwan, Thursday, March 4, 2004, 3:38:28 PM, you wrote: RA I made a .htaccess file. and then uploaded it to my server.. RA but everytime I do it deletes it automatically.. it is hidden RA directly.. or sure deleted from there.. so what is the RA problem! Are you *sure* it is deleted? By default the fullstop (period) at the start of the filename in Unix will HIDE it from you. If you can SSH/Telnet into your account do: ls -al to show any hidden files in the directory listing. If you're viewing via an FTP client, check for Options to show hidden files. If you know this all already, sorry! :) -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] .htaccess... why it is deleted by the server?!!!?
It's probably is still there, just hiding. You could write a quick little php script to check it out if you ftp client is blocking it from being seen. -- jon --- jon roig web developer email: [EMAIL PROTECTED] phone: 888.230.7557 -Original Message- From: Radwan Aladdin [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 8:38 AM To: [EMAIL PROTECTED] Subject: [PHP] .htaccess... why it is deleted by the server?!!!? Hi.. I made a .htaccess file. and then uploaded it to my server.. but everytime I do it deletes it automatically.. it is hidden directly.. or sure deleted from there.. so what is the problem! My hosting account is Linux, WebServer : Apache.. so what is the problem? and how to solve it? Cheers.. --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.611 / Virus Database: 391 - Release Date: 3/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.611 / Virus Database: 391 - Release Date: 3/3/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess... why it is deleted by the server?!!!?
You are right.. It is hidden only.. Okay now this problem is solved.. but the other problem is that in my .htaccess file : AuthUserFile /pass2 AuthGroupFile /pass2 AuthName AllowLocalAccess AuthType Basic order deny,allow deny from 217.164.249.134 allow from all The IP 217.164.249.134 is mine.. I want to try blocking it from transfering data from the folder /pass2 into my PC.. I mean in my website : http://www.alaedin.com/pass2/www.alaedin.com/pass2/tetetet.rm So I want to deny that RM file.. so that IP can't access it or download it to his machine.. is it possible? where must I put this file? And must I change in this script? or it is right? Please help me in this problem.. Cheers.. - Original Message - From: Richard Davey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 04, 2004 7:44 PM Subject: Re: [PHP] .htaccess... why it is deleted by the server?!!!? Hello Radwan, Thursday, March 4, 2004, 3:38:28 PM, you wrote: RA I made a .htaccess file. and then uploaded it to my server.. RA but everytime I do it deletes it automatically.. it is hidden RA directly.. or sure deleted from there.. so what is the RA problem! Are you *sure* it is deleted? By default the fullstop (period) at the start of the filename in Unix will HIDE it from you. If you can SSH/Telnet into your account do: ls -al to show any hidden files in the directory listing. If you're viewing via an FTP client, check for Options to show hidden files. If you know this all already, sorry! :) -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess... why it is deleted by the server?!!!?
And also must I put it without name? or can I name it for example : test.htaccess? or must I name it : .htaccess (Without name)?? Please help me.. Cheers.. - Original Message - From: Radwan Aladdin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 04, 2004 7:58 PM Subject: [PHP] .htaccess... why it is deleted by the server?!!!? You are right.. It is hidden only.. Okay now this problem is solved.. but the other problem is that in my .htaccess file : AuthUserFile /pass2 AuthGroupFile /pass2 AuthName AllowLocalAccess AuthType Basic order deny,allow deny from 217.164.249.134 allow from all The IP 217.164.249.134 is mine.. I want to try blocking it from transfering data from the folder /pass2 into my PC.. I mean in my website : http://www.alaedin.com/pass2/www.alaedin.com/pass2/tetetet.rm So I want to deny that RM file.. so that IP can't access it or download it to his machine.. is it possible? where must I put this file? And must I change in this script? or it is right? Please help me in this problem.. Cheers.. - Original Message - From: Richard Davey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 04, 2004 7:44 PM Subject: Re: [PHP] .htaccess... why it is deleted by the server?!!!? Hello Radwan, Thursday, March 4, 2004, 3:38:28 PM, you wrote: RA I made a .htaccess file. and then uploaded it to my server.. RA but everytime I do it deletes it automatically.. it is hidden RA directly.. or sure deleted from there.. so what is the RA problem! Are you *sure* it is deleted? By default the fullstop (period) at the start of the filename in Unix will HIDE it from you. If you can SSH/Telnet into your account do: ls -al to show any hidden files in the directory listing. If you're viewing via an FTP client, check for Options to show hidden files. If you know this all already, sorry! :) -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] .htaccess... why it is deleted by the server?!!!?
[snip] And also must I put it without name? or can I name it for example : test.htaccess? or must I name it : .htaccess (Without name)?? [/snip] While wonderfully fascinating in many aspects, shouldn't this be on an Apache list somewhere? And it is .htaccess [no name] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess... why it is deleted by the server?!!!?
Hello Radwan, Thursday, March 4, 2004, 4:09:07 PM, you wrote: RA And also must I put it without name? or can I name it for example : RA test.htaccess? or must I name it : .htaccess (Without name)?? Usually you must name it .htaccess There is probably a way to change what it can be called, but I'm no Apache admin so I couldn't tell you how. I dare say it might be a httpd.conf setting somewhere. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess... why it is deleted by the server?!!!?
Hello Radwan, Thursday, March 4, 2004, 3:58:52 PM, you wrote: RA Okay now this problem is solved.. but the other problem is that in my RA .htaccess file : This isn't really PHP related I'm afraid, the following might be of more help to you: http://www.google.com/search?sourceid=navclientie=UTF-8oe=UTF-8q=htaccess+tutorial -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess... why it is deleted by the server?!!!?
Okay.. and is the code right in the .htaccess file? This is the code again : AuthUserFile /pass2 AuthGroupFile /pass2 AuthName AllowLocalAccess AuthType Basic order deny,allow deny from 217.164.249.134 allow from all The directory that I want to prevent that IP from download from it is : http://www.alaedin.com/pass2 So where must I put the .htaccess file.. and does the code working well?? Cheers.. - Original Message - From: Richard Davey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 04, 2004 8:18 PM Subject: Re: [PHP] .htaccess... why it is deleted by the server?!!!? Hello Radwan, Thursday, March 4, 2004, 4:09:07 PM, you wrote: RA And also must I put it without name? or can I name it for example : RA test.htaccess? or must I name it : .htaccess (Without name)?? Usually you must name it .htaccess There is probably a way to change what it can be called, but I'm no Apache admin so I couldn't tell you how. I dare say it might be a httpd.conf setting somewhere. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htaccess
Hello all, I tried to search PHP net for this but found nothing. I am doing an install script and I want to write a htaccess file to the server so people can login in to there admin section. What is the proper way to do this and the easiest way. I know how to write a file to the server, but how do you do the password thing?? Thanks in advance, ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] htaccess
Will mailto:[EMAIL PROTECTED] on Tuesday, February 24, 2004 2:05 PM said: What is the proper way to do this and the easiest way. I know how to write a file to the server, but how do you do the password thing?? what is the password thing?? chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess
The password thing is how do you make the htpasswd file?? I did a search on htpasswd and did not com up with anything. I guess I need the documentation on the htpasswd function. Sorry I am learning. ~WILL~ Chris W. Parker wrote: Will mailto:[EMAIL PROTECTED] on Tuesday, February 24, 2004 2:05 PM said: What is the proper way to do this and the easiest way. I know how to write a file to the server, but how do you do the password thing?? what is the password thing?? chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] htaccess
Will's Scripts mailto:[EMAIL PROTECTED] on Tuesday, February 24, 2004 3:54 PM said: I guess I need the documentation on the htpasswd function. Sorry I am learning. http://www.google.com/search?q=htpasswd there are lots of pages there. specifically this one: http://www.webdevelopersjournal.com/articles/htpasswd.html chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess
Take a look at http://wsabstract.com/howto/htaccess.shtml its covers a bit and is easy to understand! Luke __ Will'S Scripts [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The password thing is how do you make the htpasswd file?? I did a search on htpasswd and did not com up with anything. I guess I need the documentation on the htpasswd function. Sorry I am learning. ~WILL~ Chris W. Parker wrote: Will mailto:[EMAIL PROTECTED] on Tuesday, February 24, 2004 2:05 PM said: What is the proper way to do this and the easiest way. I know how to write a file to the server, but how do you do the password thing?? what is the password thing?? chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] htaccess
Chris W. Parker wrote: what is the password thing?? In all liklihood, he's referring to apache's mod_access module. You should try reading the documentation over at the apache group's website, as it's quite extensive. http://httpd.apache.org/docs-2.0/mod/mod_access.html This question isn't really php related. -- Ryan C. Creasey Network Engineer p11creative, inc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] htaccess
Ryan C. Creasey wrote: In all liklihood, he's referring to apache's mod_access module. You should try reading the documentation over at the apache group's website, as it's quite extensive. http://httpd.apache.org/docs-2.0/mod/mod_access.html Also, mod_auth: http://httpd.apache.org/docs-2.0/mod/mod_auth.html -- Ryan C. Creasey Network Engineer p11creative, inc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess
I just wanted to thank everyone for all your help on the list and off!! :) ~WILL~ Chris W. Parker wrote: Will's Scripts mailto:[EMAIL PROTECTED] on Tuesday, February 24, 2004 3:54 PM said: I guess I need the documentation on the htpasswd function. Sorry I am learning. http://www.google.com/search?q=htpasswd there are lots of pages there. specifically this one: http://www.webdevelopersjournal.com/articles/htpasswd.html chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess problem
Hi, I dont know if this is really a PHP problem but am wondering if I can perhaps use php to solve this problem... I dont know if this is just a problem on my server or if you have noticed this too but... heres my present setup: /root/protected_files/ /root/protected_files/one/ /root/protected_files/two/ /root/protected_files/three/ /root/protected_files/four/ Each of the protected folders have their own .htaccess and their own password file, but if some successfully comes into folder one they are not being asked for their login details again if they go to two,three or four...Why is that and anyway I can force them? Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess problem
That would be based on 'realms'. see : http://httpd.apache.org/docs-2.0/mod/core.html#authname for more info on how to set that. Basicaly, most browsers cache the userid and password as long as the page you are viewing is within the same realm (don't ask for userid and password again). Your solution would therefore be to define your realm as (or anything else) mysite's protected content in protected_files/ and then mysite's protected content part one in protected_files/one/ , mysite's protected content part two in protected_files/two/ .. within your htaccess files. As long as it's different, the browser will ask for the user name and password again. Hope that helps, Andrew Hi, I dont know if this is really a PHP problem but am wondering if I can perhaps use php to solve this problem... I dont know if this is just a problem on my server or if you have noticed this too but... heres my present setup: /root/protected_files/ /root/protected_files/one/ /root/protected_files/two/ /root/protected_files/three/ /root/protected_files/four/ Each of the protected folders have their own .htaccess and their own password file, but if some successfully comes into folder one they are not being asked for their login details again if they go to two,three or four...Why is that and anyway I can force them? Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php .htaccess autologin
Justin Patrin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jas wrote: Combination of session vars and cookie vars... example... [login page] sets cookie with auth=0 (variable) sets session with auth=0 (variable) [logged in page(s)] sets cookie with auth=1 (variable -client side) sets session with auth=1 (variable -server side) hash of users password as client side var then just write a function to look on the users machine for a cookie from your site with auth=1, then if you see that present simply authenticate the user. HTH Jas Evan Nemerson wrote: On Thursday 11 December 2003 04:17 pm, ROBERT MCPEAK wrote: I've dug around quite a bit and can't figure out how I might use PHP to handle an .htaccess login. For example, if I wanted a script to log in the user, rather than the user logging in with the standard .htaccess dialog. Any ideas? I could be wrong, but I think this would be rather client-dependent. I don't think HTTP remembers who you throughout a session- i think the headers get sent every time. My only idea from PHP would be to set the $_SERVER['PHP_AUTH_*'] stuff, but i sincerely doubt that would do anything. I just don't think there's a way to ask the browser to set that info through http. Maybe ask @ javascript forum? If you find a solution, I'd love to hear it... Since the .htaccess vars are stored in the browser, should I be looking at a PHP/JavaScritpt 1-2 punch? Thanks, Bob You could also use the PEAR::Auth package to do authentication (through a form or a .htaccess style popup). -- paperCrane Justin Patrin Hi Robert I understood that you would like to do a login doing the HTTP AUTH method. Here are some scripts: Script 1: login: ?php //if the username field or the password field has not been filled out, //then send at WWW-Authenticate header followed by a aunauthorized one if(!$_SERVER['PHP_AUTH_USER'] || !$_SERVER['PHP_AUTH_PW']){ header(WWW-Authenticate: Basic realm=\Leksjon 11\); header(HTTP/1.0 401 Unauthorized); exit; //else check if the pass/user is right }else{ $user = $_SERVER['PHP_AUTH_USER']; $pass = $_SERVER['PHP_AUTH_PW']; if($user == 'test' $pass == 'test'){ echo You were logged inn!brbra href=\go_on.php\To next file/a; }else{ //if incorrect, resend headers header(WWW-Authenticate: Basic realm=\Leksjon 11\); header(HTTP/1.0 401 Unauthorized); exit; } } ? Script 2: go_on.php : ?php //check the user/pass, if not correct, redirect if($_SERVER['PHP_AUTH_USER'] == 'test' $_SERVER['PHP_AUTH_PW'] == 'test'){ echo You're logged inn!!!; }else{ header(Location: login.php); exit; } ? I had not anymore time to write more comments, but i hope it was helpfull. Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php .htaccess autologin
I've dug around quite a bit and can't figure out how I might use PHP to handle an .htaccess login. For example, if I wanted a script to log in the user, rather than the user logging in with the standard .htaccess dialog. Any ideas? Since the .htaccess vars are stored in the browser, should I be looking at a PHP/JavaScritpt 1-2 punch? Thanks, Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php .htaccess autologin
On Thursday 11 December 2003 04:17 pm, ROBERT MCPEAK wrote: I've dug around quite a bit and can't figure out how I might use PHP to handle an .htaccess login. For example, if I wanted a script to log in the user, rather than the user logging in with the standard .htaccess dialog. Any ideas? I could be wrong, but I think this would be rather client-dependent. I don't think HTTP remembers who you throughout a session- i think the headers get sent every time. My only idea from PHP would be to set the $_SERVER['PHP_AUTH_*'] stuff, but i sincerely doubt that would do anything. I just don't think there's a way to ask the browser to set that info through http. Maybe ask @ javascript forum? If you find a solution, I'd love to hear it... Since the .htaccess vars are stored in the browser, should I be looking at a PHP/JavaScritpt 1-2 punch? Thanks, Bob -- Evan Nemerson [EMAIL PROTECTED] http://coeusgroup.com/en -- First they came for the Communists, and I didn't speak up, because I wasn't a Communist. Then they came for the Jews, and I didn't speak up, because I wasn't a Jew. Then they came for the Catholics, and I didn't speak up, because I was a Protestant. Then they came for me, and by that time there was no one left to speak up for me. -Martin Niemoller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php .htaccess autologin
Combination of session vars and cookie vars... example... [login page] sets cookie with auth=0 (variable) sets session with auth=0 (variable) [logged in page(s)] sets cookie with auth=1 (variable -client side) sets session with auth=1 (variable -server side) hash of users password as client side var then just write a function to look on the users machine for a cookie from your site with auth=1, then if you see that present simply authenticate the user. HTH Jas Evan Nemerson wrote: On Thursday 11 December 2003 04:17 pm, ROBERT MCPEAK wrote: I've dug around quite a bit and can't figure out how I might use PHP to handle an .htaccess login. For example, if I wanted a script to log in the user, rather than the user logging in with the standard .htaccess dialog. Any ideas? I could be wrong, but I think this would be rather client-dependent. I don't think HTTP remembers who you throughout a session- i think the headers get sent every time. My only idea from PHP would be to set the $_SERVER['PHP_AUTH_*'] stuff, but i sincerely doubt that would do anything. I just don't think there's a way to ask the browser to set that info through http. Maybe ask @ javascript forum? If you find a solution, I'd love to hear it... Since the .htaccess vars are stored in the browser, should I be looking at a PHP/JavaScritpt 1-2 punch? Thanks, Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php .htaccess autologin
Jas wrote: Combination of session vars and cookie vars... example... [login page] sets cookie with auth=0 (variable) sets session with auth=0 (variable) [logged in page(s)] sets cookie with auth=1 (variable -client side) sets session with auth=1 (variable -server side) hash of users password as client side var then just write a function to look on the users machine for a cookie from your site with auth=1, then if you see that present simply authenticate the user. HTH Jas Evan Nemerson wrote: On Thursday 11 December 2003 04:17 pm, ROBERT MCPEAK wrote: I've dug around quite a bit and can't figure out how I might use PHP to handle an .htaccess login. For example, if I wanted a script to log in the user, rather than the user logging in with the standard .htaccess dialog. Any ideas? I could be wrong, but I think this would be rather client-dependent. I don't think HTTP remembers who you throughout a session- i think the headers get sent every time. My only idea from PHP would be to set the $_SERVER['PHP_AUTH_*'] stuff, but i sincerely doubt that would do anything. I just don't think there's a way to ask the browser to set that info through http. Maybe ask @ javascript forum? If you find a solution, I'd love to hear it... Since the .htaccess vars are stored in the browser, should I be looking at a PHP/JavaScritpt 1-2 punch? Thanks, Bob You could also use the PEAR::Auth package to do authentication (through a form or a .htaccess style popup). -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess / php
Ed Lazor wrote: What do I put in .htaccess for Apache to process a named archive as a PHP file? I did it before and can't seem to find what I did. Requests to http://myhost.com/archive/page1.php would get processed by the file named archive and page1.php would just be a parameter that I could access from within the script by checking the url and subtracting http://myhost.com/archive/;. Location /archive ForceType application/x-httpd-php /Location -- H| I haven't lost my mind; it's backed up on tape somewhere. + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htaccess / PHP
What do I put in .htaccess for Apache to process a named archive as a PHP file? I did it before and can't seem to find what I did. Requests to http://myhost.com/archive/page1.php would get processed by the file named archive and page1.php would just be a parameter that I could access from within the script by checking the url and subtracting http://myhost.com/archive/;. Thanks in advance, -Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htaccess / php
What do I put in .htaccess for Apache to process a named archive as a PHP file? I did it before and can't seem to find what I did. Requests to http://myhost.com/archive/page1.php would get processed by the file named archive and page1.php would just be a parameter that I could access from within the script by checking the url and subtracting http://myhost.com/archive/;. Thanks in advance, -Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess / php
On Tuesday 02 December 2003 14:34, Ed Lazor wrote: What do I put in .htaccess for Apache to process a named archive as a PHP file? I did it before and can't seem to find what I did. Requests to http://myhost.com/archive/page1.php would get processed by the file named archive and page1.php would just be a parameter that I could access from within the script by checking the url and subtracting http://myhost.com/archive/;. Location /archive ForceType application/x-httpd-php /Location -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Win98 is called Win98 because it is 98% slower than Linux. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] .htaccess authentification problem
Michael Hübner wrote: Hallo, Hope somebody can help me. I'm working on Linux, Apache. On my start-site the user can log in via inserting Username and Password into normal formfields, which are compared with a DB. After this login, he can change to his own user-directory which is .htpasswd and .htaccess protected. Thats the reson he has to insert his Username and Password again ;( My Question: Is there a way, so the user has to insert his data only once? I've also tried it by doing a authentification like this first: ?php if (!isset($_SERVER['PHP_AUTH_USER'])) { Header(WWW-Authenticate: Basic realm=\My Realm\); Header(HTTP/1.0 401 Unauthorized); echo Text to send if user hits Cancel button\n;exit; } else { echo Hello {$_SERVER['PHP_AUTH_USER']}; echo pYou entered {$_SERVER['PHP_AUTH_PW']} as your password./p; } but it doesn't work for me, because when switching to the userdirs, the .htaccess authentification window pops up again (it is the same pwd and uid in the DB and the .htpasswd) ;( Thank you in advance, Michael Please, please .. somebody come up with a solution to this and this kind of problems that as been bugging (I think) every php developer/scripter/programmer (however you call yourself) that has to deal with security. Eventually I found myself doing the entire security procedure in auto_prepend'ed files. But this only blocks access to php files. Isn't there like some apache module mod_auth_php, just like there is mod_auth_mysql and others? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess authentification problem
Hallo, Hope somebody can help me. I'm working on Linux, Apache. On my start-site the user can log in via inserting Username and Password into normal formfields, which are compared with a DB. After this login, he can change to his own user-directory which is .htpasswd and .htaccess protected. Thats the reson he has to insert his Username and Password again ;( My Question: Is there a way, so the user has to insert his data only once? I've also tried it by doing a authentification like this first: ?php if (!isset($_SERVER['PHP_AUTH_USER'])) { Header(WWW-Authenticate: Basic realm=\My Realm\); Header(HTTP/1.0 401 Unauthorized); echo Text to send if user hits Cancel button\n; exit; } else { echo Hello {$_SERVER['PHP_AUTH_USER']}; echo pYou entered {$_SERVER['PHP_AUTH_PW']} as your password./p; } ? but it doesn't work for me, because when switching to the userdirs, the .htaccess authentification window pops up again (it is the same pwd and uid in the DB and the .htpasswd) ;( Thank you in advance, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess question protect my php test environment
I have to apologies about this posting in advance so please don't flame me too bad for being off topic. Question: I want to create an .htaccess file to protect my files I did the passwrd -c /directory/file frank the set a password and then confirmed the password I created a .htaccess file with vi and put this in it. AuthName restricted stuff AuthType Basic AuthUserFile /var/password/frank require valid-user then in the redhat http server utitily under server settings I went tot he virtual directory section and created a new virtual dir called virtual 0 and check marked the box at the bottom for .htaccess protection. I restart the server and then go to another computer and put in the URL and no password box comes up. :( __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess question protect my php test environment
Hi, It's htpasswd and not passwd. As many others on this group i don't use the redhat config system it's lame. You will be better off editing httpd.conf and adding an AllowOverrides directive. best regards Frank Tudor wrote: I have to apologies about this posting in advance so please don't flame me too bad for being off topic. Question: I want to create an .htaccess file to protect my files I did the passwrd -c /directory/file frank the set a password and then confirmed the password I created a .htaccess file with vi and put this in it. AuthName restricted stuff AuthType Basic AuthUserFile /var/password/frank require valid-user then in the redhat http server utitily under server settings I went tot he virtual directory section and created a new virtual dir called virtual 0 and check marked the box at the bottom for .htaccess protection. I restart the server and then go to another computer and put in the URL and no password box comes up. :( __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha/megaupload/ Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess question protect my php test environment
Frank Tudor wrote: I have to apologies about this posting in advance so please don't flame me too bad for being off topic. Question: I want to create an .htaccess file to protect my files I did the passwrd -c /directory/file frank The above is wrong, the below is right htpasswd -c /path/to/file username the set a password and then confirmed the password I created a .htaccess file with vi and put this in it. AuthName restricted stuff AuthType Basic AuthUserFile /var/password/frank require valid-user then in the redhat http server utitily under server settings I went tot he virtual directory section and created a new virtual dir called virtual 0 and check marked the box at the bottom for .htaccess protection. I restart the server and then go to another computer and put in the URL and no password box comes up. :( Make sure you are allowing enough override for .htaccess to work. Can't help with the GUI...never used one. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess question protect my php test environment
Frank Tudor wrote: John, Sorry I did use htpasswd... Override? Do you have a snip from a config file that I can look at? I don't mind editing the httpd.conf manually. Frank This controls which options the .htaccess files in directories can override. Can also be All, or any combination of Options, FileInfo, AuthConfig, and Limit Directory /path/to/directory AllowOverride All /Directory -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess - Still asking for login information although already sent through address bar
On Tuesday 07 October 2003 03:44, PHP Webmaster wrote: [snip] $redirect_url = https://; . $username . : . $password . @ . $domain . :2083/frontend/x/index.html; header(Location: $redirect_url); The code looks OK. FWIW I've tried something like: ?php header(Location: http://someone:[EMAIL PROTECTED]/); ? and it works for me. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I'm having a tax-deductible experience! I need an energy crunch!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess - Still asking for login information although already sent through address bar
Hi all, Iv'e got a .htaccess file protecting a site using HTTPS. I have tried using a form to send the login details to the site through the address bar (http://user:[EMAIL PROTECTED]) but the .htaccess password protection box still appears asking for the username and password! The only thing I can think of is me sending invalid information, but I know I'm not! Any ideas appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess - Still asking for login information although already sent through address bar
On Mon, 6 Oct 2003, PHP Webmaster wrote: Iv'e got a .htaccess file protecting a site using HTTPS. I have tried using a form to send the login details to the site through the address bar (http://user:[EMAIL PROTECTED]) but the .htaccess password protection box That does not look like https. Try changing to https://user:[EMAIL PROTECTED]/ -- Mika Tuupola http://www.appelsiini.net/~tuupola/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess - Still asking for login information although already sent through address bar
Does it continuously ask or just twice? I've found a weird issue with .htaccess where if the domain name is a mask for a subdomain host and you try to access an .htaccess protected page it will prompt you for the password, redirect you to the subdomain and then prompt you again. Nathan - Original Message - From: Mika Tuupola To: PHP Webmaster Cc: [EMAIL PROTECTED] Sent: Monday, October 06, 2003 7:12 AM Subject: Re: [PHP] .htaccess - Still asking for login information although already sent through address bar On Mon, 6 Oct 2003, PHP Webmaster wrote: Iv'e got a .htaccess file protecting a site using HTTPS. I have tried using a form to send the login details to the site through the address bar (http://user:[EMAIL PROTECTED]) but the .htaccess password protection box That does not look like https. Try changing to https://user:[EMAIL PROTECTED]/ -- Mika Tuupola http://www.appelsiini.net/~tuupola/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess - Still asking for login information although already sent through address bar
Mika Tuupola [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, 6 Oct 2003, PHP Webmaster wrote: Iv'e got a .htaccess file protecting a site using HTTPS. I have tried using a form to send the login details to the site through the address bar (http://user:[EMAIL PROTECTED]) but the .htaccess password protection box That does not look like https. Try changing to https://user:[EMAIL PROTECTED]/ -- Mika Tuupola http://www.appelsiini.net/~tuupola/ Oops, sorry. I meant HTTPS. I did also check again! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .htaccess - Still asking for login information although already sent through address bar
Nathan Taylor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does it continuously ask or just twice? I've found a weird issue with .htaccess where if the domain name is a mask for a subdomain host and you try to access an .htaccess protected page it will prompt you for the password, redirect you to the subdomain and then prompt you again. Nathan - Original Message - From: Mika Tuupola To: PHP Webmaster Cc: [EMAIL PROTECTED] Sent: Monday, October 06, 2003 7:12 AM Subject: Re: [PHP] .htaccess - Still asking for login information although already sent through address bar On Mon, 6 Oct 2003, PHP Webmaster wrote: Iv'e got a .htaccess file protecting a site using HTTPS. I have tried using a form to send the login details to the site through the address bar (http://user:[EMAIL PROTECTED]) but the .htaccess password protection box That does not look like https. Try changing to https://user:[EMAIL PROTECTED]/ -- Mika Tuupola http://www.appelsiini.net/~tuupola/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If I use my login form, the login box pops up only once. If I copy the text from the address bar (generated by the form) and paste it into the address bar (after restarting the browser) the logon box does not appear. Weird eh? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php