Search the Community
Showing results for tags 'php'.
-
I've developed a basic web based app that connects to our Active Directory through PHP, using a login system. It authenticates against AD and logs the user into a basic page that echos their username. What I really want instead of echoing their username is to fetch either their AD first name and surname or their Display Name. This is the code that I've got to authenticate against AD. // Initialize session session_start(); function authenticate($user, $password) { // Active Directory server $ldap_host = "..."; // Active Directory DN $ldap_dn = "OU=...,DC=...,DC=..."; // Active Directory user group $ldap_user_group = "..."; // Active Directory manager group $ldap_manager_group = "..."; // Domain, for purposes of constructing $user $ldap_usr_dom = "@..."; // connect to active directory $ldap = ldap_connect($ldap_host); // verify user and password if($bind = @ldap_bind($ldap, $user . $ldap_usr_dom, $password)) { // valid // check presence in groups $filter = "(sAMAccountName=" . $user . ")"; $attr = array("memberof"); $result = ldap_search($ldap, $ldap_dn, $filter, $attr) or exit("Unable to search LDAP server"); $entries = ldap_get_entries($ldap, $result); ldap_unbind($ldap); // check groups foreach($entries[0]['memberof'] as $grps) { // is manager, break loop if (strpos($grps, $ldap_manager_group)) { $access = 2; break; } // is user if (strpos($grps, $ldap_user_group)) $access = 1; } if ($access != 0) { // establish session variables $_SESSION['user'] = $user; $_SESSION['access'] = $access; return true; } else { // user has no rights return false; } } else { // invalid name or password return false; } } ?> Any help would be greatly appreciated! Cheers, Nick
-
- active directory
- authenticate
-
(and 2 more)
Tagged with:
-
I have an apache 2.2.11 server with php 5.2.9 and mysql 5.1.34 running on 64bit windows server 2k3. i have enabled the ldap extensions within php, but am not sure on how to use the ldap stuff, what i would like it to do is to pick up the users system login details and display their username. once i have got that i would like to deny access to pages depending on which ad group they are in, which i don't know how to do either.
- 13 replies
-
- active directory
- ldap
-
(and 2 more)
Tagged with:
-
This is going to be quite specific. I have a lovely flash animation that someone has made for me that does a sweep through a football line up. It allows me to pass the variables of the players to it via a single url using the pipe character to separate the names. I'm looking for a php script that can populate a database with the players for each years football teams in the positions (2 each for years 7,8 and 9 and general u13 u16 etc) and one that will generate the correct url for the flash depending on a variable passed to it (that corresponds to the team needed) via it's url. Wow that all sounds a little complicated but I'm hopeful that someone can help me with this flash url needs the following thetitle=Team Name thedate=A Date theplayers=RightForward|LeftForward|LeftMid|CenLeftMid|...etc then Subs
-
Hi Forum Our company has upgraded to MS Exchange server 2010 Sp1 but now my Imap PHP scripe does not connect or does not receive a reply from Exch 2010. We use to have Exch 2007 Sp2 and it worked fine. $username="domain/user"; $password="password"; $mbox=imap_open("{172.16.0.73:143/imap}Inbox",$username,$password); I have also tried $mbox=imap_open("{172.16.0.73:143/imap/novalidate-cert}Inbox",$username,$password); Is there something different in the way one should connect to Exch 2010 compared to Exch 2007?. Our Exch administrators sais that Imap is enabled. The response I get from imap_last_error() is "[CLOSED] IMAP connection broken (server response)" Can anyone help? Regards,
-
- exchange 2010
- imap
-
(and 1 more)
Tagged with:
-
I am trying to enable url rewriting/clean urls on Drupal 6 CMS running on the EMBC webserver. Atm, Drupal is working great and I would like to use it as the content management system to migrate our current website to, but without url rewrites, the urls are messy and not SEO'd. I have url rewriting working on LAMP servers and on IIS 6/7 on internal windows hosts. I know there are seperate modules for IIS 6 though IIS 7.5 has it built in. My problem is that I told by the EMBC service desk that it is something that I need to enable on my side, but I do not have root/admin access to their servers. I'm running thin on ideas. Has anyone been able to enable clean urls/URL Rewriting on EMBC webservers? If so any help would be appriciated. Rob
-
i am currently in the process of creating a form for our sixth forms website. I have been able to validate input boxes and drop down boxes which just consist of numbers between a range. but i am having a problem with validating a drop down which gets it options from a different php page i have: <?php include("courselist.php"); ?> i have my validation all set up ready to go, heres an example of my name input box: if someone could please help me it would be amazing!! THANK YOU IN ADVANCED
-
Hi guys, Wondering if anyone knows of a way to redirect a domain name from http://www.yourdomain.com to just http://yourdomain.com I'm pretty sure there's a way to go from http://yourdomain.com to http://www.yourdomain.com using mod_rewrite (or is it just a redirect in .htaccess?) Gah, I'm not sure. If anyone has any idea how to achieve this with apache that'd be great. I'm planning on making my own version of tinyurl.com - just as a bit of fun really, and it'd be nice to make sure the domain is a short is possible, preferably without the www. Cheers, Tom.
-
Hi there, I am new to this forum and have recently started working on Moodle (2.2.1) as a part of client project. I have started Module Development. But since I am a newbie I know nothing about it. I am planning to create a module that displays Reports hierarchy wise. i.e. a Manager can view reports of his department, any section within his department, any area within his section and eventually any individual that area. Similarly staff below manager can accordingly view reports down their hierarchy. Now I don't know if such an hierarchy system already exists or not. If not how do I create this hierarchy so that I know every user's permissions is set and after having checked that I can display or let them view appropriate report data. Does capability play any role in this. How do I go about this feature or what would be the first good starting point for this plugin. Please do help since I am stuck with this for quite few days and unable to find any good documentation on online links to solve my problem. Any help is appreciated. Cheers.
-
Hi there, I am new to this forum, hence apologies if I am posting in the wrong forum. I have very recently started working on Moodle (2.2.1) as a part of client project and have started Module Development. But since I am a newbie I know nothing about it. I am planning to create a module that displays Reports hierarchy wise. i.e. a Manager can view reports of his department, any section within his department, any area within his section and eventually any individual that area. Similarly staff below manager can accordingly view reports down their hierarchy. Now I don't know if such an hierarchy system already exists or not. If not how do I create this hierarchy so that I know every user's permissions is set and after having checked that I can display or let them view appropriate report data. Does capability play any role in this. How do I go about this feature or what would be the first good starting point for this plugin. Please do help since I am stuck with this for quite few days and unable to find any good documentation on online links to solve my problem. Any help is appreciated. Cheers.
-
We are starting to use iris software behaviour managment and it is going well. Next we are about to roll out the rewards to pupils and this is what i want help with. We are going to get 6th formers to look after a rewards shop and what i need is this A simple to use and manage front end that will Allow the following 1) Display a Picture, Description, Stock Level and Rewards COst 2) A Way the managers can logon and add,update and delete stock. 3) If possable a form that when pupils click on add/select it adds to a list that is then email/printed to a shop manager email. It would be nice that when something selected it take from stock but not important. I was wondering if anyone had something like that running or know of a FREE project around that i can use. It can be in PHP/mysql I am running iis7.5 with mysql php also running Moodle. Any help would be gratfull Thanks Stuart
-
Salary: Circa £35k - £45k basic, + significant 6 monthly bonus Are you an experienced software engineer, looking to grow within a small software company supporting education nationwide? How about using your valuable tech knowledge, to continue to improve the teaching and learning of children, whilst cutting the expenses incurred by schools? As well as earning £35-45K with 6 monthly bonus' (which could easily add 20%+ on top!), you will be located in a peaceful rural setting, very much part of a friendly supportive team Sounds interesting? This company is experiencing great growth in the coming years, due to their innovative technology and they are looking for someone to grow their career with them. You will be an experienced developer working primarily on the PHP part of the stack, but with opportunities to work on other areas. Essential Technical knowledge includes PHP, SQL, Linux, HTML, JavaScript and CSS Desirable includes AngularJS, React, JQuery, Cordova, PostgreSQL, Redis and C#. The successful applicant will be required to undertake a Disclosure and Barring Service (DBS) check, previously known as a CRB check. Hours: 9am to 5pm, with 30 minutes for Lunch, with occasional out of hours and / or Weekends Please email your CV to my email address on [email protected]
-
- linux
- northampton
-
(and 3 more)
Tagged with:
-
Just wondering what sort of solutions you guys have come up with for this.. Our ICT department want to teach PHP at key stage 5. Obviously this requires some sort of webserver to interpret the PHP commands and output to HTML. The ICT department are not interested in online services such as compileonline.com We could either set up our own internally or go for a hosted service, with a subdomain and associated ftp account for each student taking the course (roughly 10). I'd be grateful for any thoughts alternative solutions members of Edugeek have come up with. Cheers.
-
Hi, been working on this on for a few days now and not getting very far with it. We are trying to use our SAN as the library location for Xibo, however whenever we try and set it Xibo says "There has been an application error.The Library Location you have picked is not writable to the Xibo Server." So as a test I have set the "Everyone" group up on the SAN with full control, with no luck. Also I download XAMPP on my office PC and set Xibo up the same using the same location (\\SAN\Videos\Xibo) and it worked without any problem. We are using Windows 2008R2 with IIS 7 installed, PHP version 5.3.8 and Xibo 1.2.2.1. I've tried to use a different server (just a virtual), downgrading PHP and reinstalling Xibo and IIS. Any Thoughts?
-
The Arthur Terry School is seeking to develop our ICT functionality to support our World Class Vision with the provision of a Virtual Learning Environment accessible to students, staff and parents. Our goal is to enable all of our stake holders to have anytime access to work areas, assessment, and attendance data, timetables, lunch nutritional data, library loans and much more. The competencies we require are in the following areas: • MSSQL 2005/2008 Database integration linking to web pages • PHP, MySQL, JavaScript and CSS skills Experience in writing and developing components for interrogating data • VB scripting • HTML Skills applicable to web 2.0 design and construction • Web development • Use of Open Source products • Knowledge of MS Sharepoint and webparts The salary, hours and terms and conditions of the post are subject to negotiation for the right person who can offer the skills and expertise required. If you would welcome an informal discussion with our ICT team and a look at our state of the art network then contact Chris Butler on [email protected] with the subject – VLE-Administrator Please enclose a CV, any other material or supporting documentation
-
- php
- sharepoint
-
(and 1 more)
Tagged with:
-
Hi All, I have a working form which submits to email and i am just wondering if when the user submits the form it can be put through as an attachment on the email. Like a word document with the form submission in there? Just a thought and thought i may as well as the question Thanks in Advanced !
-
Hi there, I would like to create a feature in Moodle where in the admin can create Departments, have multiple section in those departments and have many areas in those sections. These areas would eventually have members/students in them. But in this way each of my student would belong to a particular area, a section and eventually a department. I would like to assign a manager for my department, a supervisor for each of my sections and areas. Also these departments should be able to access courses and various activities within that course. Now firstly is this achieveable? Is there already a feature in Moodle which can do all of what I have said? If yes, then where? If not then where I should start building my module directory wise? Can any one give me some starting point ? Thanks in advance
-
- moodle
- moodle permissions
-
(and 2 more)
Tagged with:
-
We have had a new website developed for us and are in the process of setting it up. It is a PHP based site with MySQL running on a Windows 2008 R2 Server with IIS. Although the website works and can be accessed it is very very very slow to load each page. My thoughts are that it is have trouple connecting efficiently to MySQL however I have very little experience in troubleshooting these issues. The Web Development company we are using are out of ideas. Any advice on this would be greatly appreciated - I can PM you the link to the site if needed.
-
I have a php page that I want to pass a variable to on the url as the example http://server.local/fixtures/display.php?teamid=1 This works fine if I put a value in for teamid but if I forget it/ omit it for any reason I want the script to die so I tried the following if (!teamid){ die ('No variable entered'); } but it kills the code even with the variable in the line. How do I do this?
-
Joining an established and growing team of IT professionals, you will help Great Barr School to achieve its mission of being one of the leading schools in the UK for e-Learning by 2012. We have already made great progress but there's plenty more to do. Our VLE is up and running, but we want to develop it further and populate it with high quality content. You will work with the Assistant Head Teacher (E-Learning) and teaching staff to ensure that the VLE is developed to meet the needs of the School and that the content is challenging, innovative and effective in helping our pupils to learn. We plan to extend the VLE and make it available to local primary schools and even a partner school in Sierra Leone. The job description available through this website provides considerably more detail on the role. Once you have read it, if you would like to know more about the role and the School, please feel free to call our HR Manager, Steven Forster, on the School's number, 0121 366 6611. http://www.greatbarrschool.org.uk
- 3 replies
-
- birmingham
- learning platform
-
(and 3 more)
Tagged with:
-
We've just had our website converted to Drupal by our web developer as we're moving towards providing year group specific info for parents(we currently have a static site with very little other than marketing info), one of the per year group pages will be a letters page which will display any letters for that year group. Initially the idea was to update each page as and when however thats obviously going to become unworkable pretty quickly especially when putting up a letter to the whole school would mean editing 10 different pages. I've decided instead to try and use PHP/XML so that all letters get entered into an XML file and then each letters page simply outputs a filtered version of the XML file into a table where the year group matches. I've managed to cobble togeather the output code so far and have started this morning to try and figure out the code for putting the data into the XML file from a form, I only code when I have to so generally end up butchering code examples to do what I want them to do. So far I've found some music playlist code that looks as though it'll do the trick with a little playing. I guess my questions are - 1. Am I going about this the right way? does anyone know of a module for Drupal or even Joomla(presuming that most modules have equivelents in both) that'll do this more elegantly? 2. Am I better off doing this with XML or making use of MySQL? 3. Has anyone already done this and feel like sharing their code? Cheers, James
-
I am currently trying to write a quick page for use with our phones, to centralise phonebook results. I have all the staff phone extensions, and email addresses in one place - our active directory. This is kept up to date, as it is a nice place to do so. I also have the freepbx 'users' table, which contains a list of all the phone extensions on the system. This includes all the phone numbers from the active directory, but not email addresses. It also has extra extensions such as 'Year 5 block' etc... So neither list contains everything. Now, rather than having to create Active Directory objects for the non-people extensions, is there a way I can merge the results from a php ldap_search and a mysql_query? I made the initial mistake of iterating through each line of the ldap array and if they matched, output one thing, if they didn't then output another. But this meant that every single row contained every single record from the mysql array... I can think of one way of dealing with it, this being a third array which I add the index values to when a match is made, which is checked by the above loops, and if that row has already been output then it isn't output again, but this seems very messy. So any ideas? I can post snippets of code if that will help.
-
Not an Educational IT role, but as Dos_Box's big bro, I am not a recruitment agency either!! I am looking for an experienced Linux bod to join my established IT Team, based in Blackburn, Lancs. The role is a customer facing one, maintaining and running our online telecoms analysis solutions, and also bringing Linux skills to the team. Currently we are an MS shop (Server, IIS, SLQ Server etc), but our new product lines needs Linux expertese. Role is predominently office based, 37.5 hrs per week, and salary will be 20-26k dependent on experience. If you're interested in a job in the 'real world' (puts flak jacket on and retires to safe distance;)) drop me a PM, and I will send our further details.
-
Hi everyone, I have a project for my college assignment, i have to create a file sharing site. Essentily, you make an account, you get a folder with your name and you can upload files there, after that you can go to other peoples foldres and download (ONLY) the files they have uploaded. I have made the login, registration scripts (php, html - yes they are mandatorry:/ ), and also the database for the users. However now that i need to start writting the scripts that create the folders etc i feel a bit at loss. Can anyone help with some ready scripts or some exaples? thnx a lot!
-
Hi there, I've been trying to make LDAP work with PHP on our Windows Server 2003 web server - to do so I was instructed (by online instructions) to make a tiny change in the PHP.ini file, which I did. I was then advised to reboot the server, which I also did....here the problem arises: Since rebooting the server, no PHP pages are loading. I can access HTML pages alright, but if there is any heavy use of PHP, it throws a HTTP 500 error. I say HEAVY use of PHP because a simple test.php file (saved to the same folder as the other pages which will not load) will work just fine - thought it only contains the <?php phpnifo() ?> command and a simple 'echo HELLO WORLD'. So I undid the change I made to the PHP.ini and re-reboot the server, but still no luck. I even rolled back the system to a couple of days before I started playing around (using our BackupExec software)...BackupExec wanted me to reboot the server in order for the restore to take effect, so I did....but still no PHP! The common theme here seems to be rebooting the server - is there something which needs to be kicked off upon rebooting? I've checked the running services and everythink seems hunky dorey. Apache Tomcat is running automatically (which it MUST be because my simple PHP test page worked okay)....just nothing useful!! Does anybody have any suggestions? Pretty please?
- 14 replies
-
Hi all. Here at the school we host a few sites and one of which runs using Apache and PHPMyAdmin. For some reason the following message has appeared and we dont know why. jtablesession::Store Failed DB function failed with error number 1054 Unknown column 'client_id' in 'field list' SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( 'f262b7dd736b310fd841351c1946a69f','1278519931','','0','1','0' ) (http://www.kidsgrovescouts.com) This is running on Joomla 1.0. We have not had a problem with this before and i have read a few forums and still, the problem continues. My knowledge is very little to non when it comes to PHP so any help or solutions on this matter will be greatly welcomed!!! Cheers.
