473,804 Members | 4,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can you *set* Apache credentials from PHP?

Is it possible to *set* Apache credentials via PHP? I know you can
read Apache credentials from PHP, but I want PHP to tell Apache that a
session is authenticated.

Essentially, I want to do with an HTML form what Apache accomplishes
with a pop-up window.

Why? Because in addition to authenticating them, I need some other
information, and having (1) a pop-up window that auths them to Apache,
then (2) an HTML form to capture the additional info, would be awkward
from a usability perspective.

Deane

Jul 6 '07 #1
2 1546
>Is it possible to *set* Apache credentials via PHP? I know you can
>read Apache credentials from PHP, but I want PHP to tell Apache that a
session is authenticated.
You cannot set credentials in Apache. You set credentials in a browser,
which presents them to Apache (and eventually to PHP).
>Essentially, I want to do with an HTML form what Apache accomplishes
with a pop-up window.
Apache does not do pop-up windows. Browsers do pop-up windows.
>Why? Because in addition to authenticating them, I need some other
information, and having (1) a pop-up window that auths them to Apache,
then (2) an HTML form to capture the additional info, would be awkward
from a usability perspective.
Information you can set in a browser include cookies, parameters on a URL,
and indirectly you can use session data.

Jul 6 '07 #2
us****@isotopeR EEMOOVEmedia.co m wrote:
On Fri, 06 Jul 2007 20:40:34 -0000, Deane <de**********@g mail.comwrote:
>Is it possible to *set* Apache credentials via PHP? I know you can
read Apache credentials from PHP, but I want PHP to tell Apache that a
session is authenticated.

Essentially, I want to do with an HTML form what Apache accomplishes
with a pop-up window.

Why? Because in addition to authenticating them, I need some other
information, and having (1) a pop-up window that auths them to Apache,
then (2) an HTML form to capture the additional info, would be awkward
from a usability perspective.

Check out http://us.php.net/features.http-auth
Did you actually read this? It doesn't do anything like what he wants.

That's because it can't be done. Authentication/Authorization is
strictly between the browser and the webserver. PHP doesn't get
involved at all.

However, you can create your own authentication mechanism using session
and collect and store whatever data you want. It's pretty easy, really.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Jul 7 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1371
by: dave | last post by:
Hello, I'm really hoping someone can help here, i am very frustrated on this issue. If this were my linux box i'd commit myself for insanity, this setup is so frustrating! Ok, done rambling, Linux box, rh version unknown, apache 1.3.27 with frontpage extensions, php 4.3.0, and i'm trying to install mhash. I was informed this is occurring in a vdp environment whatever that is, and so i compiled and installed mhash thinking apache and php...
1
1484
by: conradwt | last post by:
Hi, I was wondering, is it possible to use an Apache embedded login instead of the popup dialog when using an .htaccess file? BTW, I will be using PHP and plan to use mod_auth_db{m}. If anyone has any ideas as to how to use embedded login with Apache HTTP Server, please post to the group. Thanks in advance, -Conrad
0
1125
by: Helmut Tessarek | last post by:
Hi, This is just an info. Maybe someone finds it useful. I've written an Apache module using IBM DB2 as the backend database for storing user and group information. The module is designed for Apache 2.x and 1.x and supports several encryption methods. I also provide UDFs for DB2 to generate passwords within DB2. They are compatible to the functions that are used in Apache's htpasswd utility. Caching of user credentials is supported...
0
1682
by: Remigiusz Samosiuk | last post by:
Hi to everyone. In our firm intranet we decided to move from PHP to ASP.NET and my task is to integrate old PHP services (apache on linux) with new server (IIS). All our php services are in folowing form: - header with menu - body - footer
6
1410
by: ABC | last post by:
Follow my project, the connection database will not use Trused Connection from web server to database server. How to set DAAB's connection string with No Credentials Access?
1
4381
by: ad | last post by:
When we new a web Service, the default in IIS is Allow Anonymous and Integrated Windows Authentication , we just use : WebService.webClass myWC= new WebService.webClass(); and then we can access the WebService thought myWC But I find some time it will fail with Access denid, and I must must use: WebService.webClass myWC= new WebService.webClass(); myWC.PreAuthenticate = true; myWC.Credentials =...
1
1120
by: Jersay Ballot | last post by:
http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_21986629.html I found the link but it doesn't seem to help at all. I'd like to use 2 directories as root ones at the same time. If this is possible please explain how, I am grateful.
1
2169
by: valpal | last post by:
I'd like to post database query results on a HTML page. I use Activestate Perl and DBI; my SQL server is SQL 2005, which I can only log in to using my NT authentication. My problem is with establishing a connection. Typically I use something like: DBI->connect ("dbi:ODBC:driver=SQL Server;server=$server;database=$database") I don't specify the username or password because it defaults to the trusted connection. But if I do this using...
3
5274
by: sandromani | last post by:
Hello, I am working at a webbased file browser, where users will be able to access, rename, delete, etc files and folders. My question is, what is the best way to handle permissions / authentication with apache in a *nix environment? Basically what I am searching for is something that works roughly the same as the windows integrated authentication, where the commands executed on server-side are executed as the user with witch the session was...
0
9710
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9589
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10593
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10329
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3830
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3000
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.