Hey all! I'm a newbie with .htaccess and authentication, and I'm trying to set up some transparent authentication on an Win 32 web Server.
It's like this: We have an intranet and we wish to protect our precious admin pages. I have the folder protected with an .htacess file that references a user/pass file, (Everything works just fine this way,) but we would like to modify it as follows:
We are using Apache 2.0.53 and using the module mod_auth_sspi.so for NT authenticaion. This module let's us capture the NT usernames in an environment variable. (Which makes it convenient for saying "hi" to people through our PHP CGI's.) What we would like to do is restrict access to the admin folder without having any of the administrators enter a user and pass everytime they a'wander to an admin page. So basically,
- how can we get .htaccess to reference the environment variable for the username? (I'm assuming that's a possibility.)
- How can we set it up so that it doesn't ask for a user/pass, but rather just blocks out non-admins? (If that's even possible!)
One way that we have tried to do this already is by using the mod_ntml module, which would give us the ability to perform transparent authentication, but unfortunately the only available binary of this module is only compatible with Apache 1.3. If you try using it with 2.0, the server won't restart. There is a mod_ntml available for Apache 2.0, but it's only an uncompiled linux version. (At least the only ones I've found have been.) What I need is either another way of setting up this transparent authenticaion, or I need to get my hands on a binary version of mod_ntml 2.0 for Win 32. (Still scouring the internet, and have e-mailed someone at Sourceforge.net.)
My .htaccess file is very basic, since I'm new to this. Here it is:
I've started using PHP includes on my site and am going to have it across the other sites i am designing. It's really awesome. Anyway, i have noticed on some sites certain elements stay loaded across multiple pages. Is this a example of using include_once or is this something else? can someone tell me how i can do this so that the menu stays loaded but the rest of the content changes? I think that this would be a nice practice to instill in my work. thanks!
Hello, I just want to ask a simple question. I am using a simple php template but I realize about my pages. I wanted to know if I make a sort of template page just for the stuff the goes in the head section. Just in case I need to change something.
I need to hand in a project title for my third year project by the end of the term, and have been thinking about it for a while. Most potential ideas have been junked due to being too complex (occasionally), not interesting enough for me to motivate myself (very common) or not complex enough (fairly common)
Anyway, my current best idea is:
Many of you will know of a site called Audioscrobbler - a site that tracks what you listen to and then suggests artists to listen to based on other users that listen to similar artists. All reasonably simple, and quite cool.
One idea I had was to make a similar system, that runs off a winamp plugin that tracks what you listen to (like audiscrobbler) but has the concept of sessions - i.e. it groups music that you listen to at the same time. For example it would track that when I'm listening to to music like AC/DC I also listen to music by Metallica or Guns and Roses or ZZ Top When I'm in a mood for stuff like the The Clash I might also listen to things like The Jam and The Ramones etc. It would then link music by how much I like to listen to it together.
Then say I'm throwing a BBQ and I want some music to listen to, I could specify something like this:
First hour: Music like Beach Boys or like Dandy Warhols etc (chilled out stuff I often listen to when in a summery mood) Next 3 hours: Mike and the rest of the guys have turned up, the big drinking stuff starts - music like AC/DC Next 3 Hours: Music like the Killers or the Jam (you can pick several areas by adding several bands you listen to at different times) Last 2 Hours: Stuff like Morcheeba, Mogwai or XFM flowmotion
Then hit generate and it creates a play list using random songs from those areas that I copy onto my music player and leave running for the BBQ.
Anybody have any thoughts/comments/suggestions for this or any other potential projects?
I need to hand in a project title for my third year project by the end of the term, and have been thinking about it for a while. Most potential ideas have been junked due to being too complex (occasionally), not interesting enough for me to motivate myself (very common) or not complex enough (fairly common)
Anyway, my current best idea is:
Many of you will know of a site called Audioscrobbler - a site that tracks what you listen to and then suggests artists to listen to based on other users that listen to similar artists. All reasonably simple, and quite cool.
One idea I had was to make a similar system, that runs off a winamp plugin that tracks what you listen to (like audiscrobbler) but has the concept of sessions - i.e. it groups music that you listen to at the same time. For example it would track that when I'm listening to to music like AC/DC I also listen to music by Metallica or Guns and Roses or ZZ Top When I'm in a mood for stuff like the The Clash I might also listen to things like The Jam and The Ramones etc. It would then link music by how much I like to listen to it together.
Then say I'm throwing a BBQ and I want some music to listen to, I could specify something like this:
First hour: Music like Beach Boys or like Dandy Warhols etc (chilled out stuff I often listen to when in a summery mood) Next 3 hours: Mike and the rest of the guys have turned up, the big drinking stuff starts - music like AC/DC Next 3 Hours: Music like the Killers or the Jam (you can pick several areas by adding several bands you listen to at different times) Last 2 Hours: Stuff like Morcheeba, Mogwai or XFM flowmotion
Then hit generate and it creates a play list using random songs from those areas that I copy onto my music player and leave running for the BBQ.
Anybody have any thoughts/comments/suggestions for this or any other potential projects?
I have a website that's currently using b2 (one of my partners installed it last year). We really don't like it and want to change to something else, but this is a new area for me as I've never used something like this. I'm wondering if anyone has a recommendation for a PHP script for content management. There's too much stuff to just make static pages (artist profiles, reviews, calendar, etc).
Has anyone built a SOAP based application in Python? I was looking at using Mod_Python under apache to create some web services and wanted to get some feedback. Its going to be that or use PHP at which I am already quite familiar. The greater control over apache offered by Mod_Python vs PHP and the ability to have byte compiled files pre built are making me take a good look at Python for this.
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in D:\Inetpub\wwwroot\Soft-Gel\test\sendmail.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at D:\Inetpub\wwwroot\Soft-Gel\test\sendmail.php:5) in D:\Inetpub\wwwroot\Soft-Gel\test\sendmail.php on line 6
--> now, it's something with my php.ini file...except I don't know how to fix that, or if it's something I fix or something my sys admin does when he enabled php on the server. basically...help. please
I have a generic includes script that I deploy for all new sites (I run a small web design company). It has basic page formatting and a ready-made menu system all ready for instant deployment. The script itself prints nothing--it simply defines a lot of functions that I then use to make the magic of the site. I'm not an expert PHPer (I just read 3/4 of a book a while back), but I know my way around.
This script/library (I don't know the jargon) has had many many miles and hasn't once given me problems (except for the original bugs in its early versions). Only.. Now it's not doing anything I want it to. Quite simply, it's not doing anything. I have no idea what I've changed, but now all it's doing is printing "" on every page that includes it. I have seen php do this before, but I don't remember what I did to make it do this in the past.
I reiterate that the script itself doesn't have a single "print" or "echo" line outside of a function. Yet if I access the script directly it gives me the same result (printing the html and body start/close tags).
I have tried disabling certain functions with the all-mighty */ /*, but I can't seem to root-out the problem. If need-be, I'll post the whole script here, but I'd like to know if anybody knows what causes PHP to print the html and body tags instead of sending an error or simply printing nothing at all.
Any help would be *greatly* appreciated. Thanks in advance.
I'm building a site for my photographs. This involves a php script trawling through directories and subdirectories in a designated location, and then either: 1) Adding details into a database, including thumbnails (which can be stored as a BLOB) 2) Getting the script to dump the thumbnails to file and then building static pages.
I'm not sure which one I want to go for. I can see that having a database will allow for greater expandability (like if I want to add comments, ratings, or anything at a later date), but it's going to be significantly slower than having static files, isn't it?
I've ran into a problem which i can't solve nor understand.. so i'm gonna need your masterminds to help me out.. if you can. thanks ;)
Description i'm using php sessions and when i run my site on my computer, it runs smoothly. no problems. but when i uploaded to my host server my session values started to get lost. like, i set a certain variable with a different value, and two pages after (or simply reloads) that value either disappears or returns to the old value..
i ran a few tests, and realised i suspect it was due to a php.ini option.. "register_argc_argv". If i have it On (which i need it to be, since i'm using argv's throughout my website), this "leaks" occur, but if i set it off, it works out fine, apparently.
Test pages Check out these two pages, the only difference between them is the php.ini. on one it has the register_argc_argv on, and the other has it off.
What does the test page code do? The code simply starts the session with session_start(), and then print_r()'s the $_SESSION. After that it echo's that it's gonna change a certain session variable's value, and does it. source code is available below.
"How do i test it?" Just open one at a time, and wait it to load. at first the $_SESSION should be empty, of course. after that, reload a couple of times. it should have the value set after the 1st reload..
anyways, you probably know what i'm asking.. Is there any link between register_argc_argv and how php handles sessions?
Page2 (register_argc_argv OFF) http://www.andr3.net/Untitled.php (if you happen to see the variable disappearing, the error is still there after all. i have refreshed it dozens of times, and it's always there)
I have trouble finding a suitable php object or function that would allow me to forward existing emails in my inbox to defined adress. I have some photos in my mail account, and some php script that tells mail server to send existing mail to someone else.. Thanks.
I have a group of users (100 or so) that need read/write access to a document (excel) of sensitive information. Since they are all over the place, they requested a web application to be able to access from anywhere whenever they need to modify or look at this document. I'm trying to figure out what is the best way to provide a secure way to only allow these specific users to access this document. ideas have included:
Plone - complex, looking for simplicity phpBB - requires me to set up a mysql linux box somewhere which might be possible Yahoo groups - not very secure but basically what i want
any other ideas? Security of this information is the biggest priority. i currently have both linux/windows available to host.
I have a group of users (100 or so) that need read/write access to a document (excel) of sensitive information. Since they are all over the place, they requested a web application to be able to access from anywhere whenever they need to modify or look at this document. I'm trying to figure out what is the best way to provide a secure way to only allow these specific users to access this document.
ideas have included:
Plone - complex, looking for simplicity phpBB - requires me to set up a mysql linux box somewhere which might be possible Yahoo groups - not very secure but basically what i want
any other ideas? Security of this information is the biggest priority. i currently have both linux/windows available to host. i know some html, coldfusion, asp, but hosting coldfusion is a problem which is why i'm looking for preconfigured apps if possible.
See the little cross things next to "Assemblies,Engineering" and "Assemblies,Manufacturing"? Click 'em. They open a litle box with revision history information for that document. I'm using a little javascript I found online to swap the image between the "+" and the "-" (like browsing a folder tree in Windows Explorer, etc etc).
However, the script isn't working correctly. I want each image to switch independently...if you click the first "+" it switches to a "-", but if you click the "+" in the next row, it doesn't switch. Then you have to click them each a few times to get them both with no history showing and with the "+" displayed. What do I need to fix?
Script:
The images are coded with the "id" and "name" objects, as such:
See the little cross things next to "Assemblies,Engineering" and "Assemblies,Manufacturing"? Click 'em. They open a litle box with revision history information for that document. I'm using a little javascript I found online to swap the image between the "+" and the "-" (like browsing a folder tree in Windows Explorer, etc etc).
However, the script isn't working correctly. I want each image to switch independently...if you click the first "+" it switches to a "-", but if you click the "+" in the next row, it doesn't switch. Then you have to click them each a few times to get them both with no history showing and with the "+" displayed. What do I need to fix?
Script:
The images are coded with the "id" and "name" objects, as such:
I'm doing some calculations in php, and seem to be having a problem with either overflow, or underflow (small # gets rounded to 0). It works for some values, but for others, gives me a huge number, usually in the billions. Is it possible in php to specify the use of a higher precision datatype, or how else can I avoid this problem in php?
This is the function which seems to be causing the problem:
//calculate the distance between two latitude, logitude coordinates. +ve is N,E function latlonradiandistance($lat1,$lon1, $lat2,$lon2){ $r = 6378100; //radius of earth in meters return acos(cos($lat1)*cos($lon1)*cos($lat2)*cos($lon2) + cos($lat1)*sin($lon1)*cos($lat2)*sin($lon2) + sin($lat1)*sin($lat2)) * $r; }
I am a novice PHP scripter. I have done most of my work with PHP and MySQL, and PHP alone, but now a client is asking me to work with his API and SOAP. I am also a XML beginner.
I admit, this stuff sounds a little scary. I was wondering if working with his API will be (shoulkd be) as easy as working with PHP's MySQL functions? Am I making the right analogy? I see PHP has some XML functions, too. When the client says I will "parse the XML" and pull the info out of it, will I be searching it for a string/pattern?
I am a bit clueless and trying to do some research before I talk to him again. If you guys have any sites that you recommend for PHP use with API, SOAP and XML (or even a book), I would appreciate it the info.