Blog Comments

  1. sonofsanta's Avatar
    • |
    • permalink
    The reason you're seeing "success" is because that's not dependent on anything i.e. it's not part of any conditional statement. All that shows is that PHP has reached that point in the script, regardless of what's happened before. I guess you're not seeing the errors it's throwing though, in which case there's something useful you can do to make PHP development much easier for everyone

    On your server, browse to the PHP install directory (e.g. C:\Program Files (x86)\PHP\5.4) and rename php.ini to php.ini.old. Then find php.ini-development, make a copy and rename the copy php.ini. That will change a load of settings to those more suitable to a development environment, including, importantly, outputting error messages to the browser instead of only to the error file. If you made any changes to php.ini before (e.g. the mail server, as above) make them again here. Restart w3svc to reload PHP using these new settings.

    I'll put that in the main post above, because damn if it ain't handy.

    Once you've done that, loading the PHP page should show you what's actually going wrong, and on what line of the PHP script. I got two errors out, from line 12 and line 15 (which was repeated due to the loop).

    Line 12 was permissions; I added Full Control permissions for IUSR on the local server (i.e. search the server, not your directory when you go to Add Permissions) to the wwwroot folder containing everyone's work folder.

    The line 15 error was an error in the way fputcsv() was being used - that function actually wants an array as input, and does all the CSV formatting itself, so there's no need to use the loop.

    Amending the script to fix that problem, and shuffling it to use an IF loop to check if the file could be opened/created before declaring success or otherwise, the script ends up as the fairly similar:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <?php
    $list = array (
        "aaa", "bbb", "ccc", "ddd"
    );
    
    if($fp = fopen("file.csv", "a"))
    {
        fputcsv($fp, $list);
        fclose($fp);
        echo("Great Success!");
    } else {
        echo("Could not open/create file!");
    }
    
    ?>
    <body>
    </body>
    </html>
    If you still have problems with permissions, use Process Monitor on the server to capture events as you refresh the page, then filter your results to show only Process Name = php-cgi.exe, and look for any ACCESS DENIED results. Open the Event Properties and look for the Impersonating: at the end of the Event tab. I suspect yours will be NT AUTHORITY\IUSR same as mine, though.

    HTH!
  2. fiza's Avatar
    • |
    • permalink
    @sonofsanta - Hopefully you can help me with a query from the teacher. I know nothing of PHP so would welcome some help.
    Students are using php to write to a csv file in their area. They create the php file and then browse to it in IE. It should look for a csv file, open it and write to it. If it doesn't exist it should get created. Below is the file. it doesn't seem to work, doesn't create the file and if I manually create the file it doesn't amend it either. We get the "success" at the end but it hasn't done anything.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <?php
    $list = array (
    	'aaa', 'bbb', 'ccc', 'dddd'
    );
    
    $fp = fopen("http:\\phpsvr\08\08brooksa\file.csv", "a");
    
    foreach ($list as $fields) {
        fputcsv($fp, $fields);
    }
    
    fclose($fp);
    
    
    echo 'success';
    ?>
    <body>
    </body>
    </html>
    Updated 27th November 2014 at 04:20 PM by fiza
  3. RabbieBurns's Avatar
    • |
    • permalink
    Any idea how I can centrally customise the signature for Outlook for Mac?
  4. sonofsanta's Avatar
    • |
    • permalink
    For teachers, I map the K drive to the root of the wwwroot folder, so they can access all the student work as well. Similar to how the kids are mapped, I've added the K drive mapping to the usual staff drive mapping GPO and used Item Level Targeting to check membership of the PHP Users group. If it meets the criteria, map the root of wwwroot, where I've manually added NTFS permissions for the relevant department (i.e. curriculum IT).

    Means they can create their own folders & structure to their heart's content, as well as look at any code they need to when assisting kids, and means I can drop example code in there for the stealing.

    I suppose you can easily enough tweak it so it maps to wwwroot/staff/%username% if they want it working exactly the same, depends on how much confidence they have in the kids' ability to understand "your K drive is here, look, I can show you"

    Glad it's working well for you, it ain't half been a lot easier here than faffing around with FTP!
  5. fiza's Avatar
    • |
    • permalink
    @sonofsanta - Been working great since I set it up. Now a couple of teachers want to have access same as the students do. They want to be able to demonstrate how to do things so want it set up exactly as it is for the students. Whats the easiest way to do this? Their usernames don't follow the same format as the students.
  6. simpsonj's Avatar
    • |
    • permalink
    Added from a recent forum post:

    But I'll also add that ensuring you have a fast wireless connection is vital. I've recently bought 5Ghz cards for some dell laptops and the speed and reliablilty increase is phenomenal. I'll also add that make sure your offline files are set correctly in GPO. I used to have them really locked down, but this caused a lot more grief as Windows really likes to be able to use Sync centre (assuming your on Win7).

    I now have the following two GPOs set for students and my performance is far more reliable, with less issues of folders not redirecting, drives not mapping etc:

    Admin Templates - Network - Offline Files - Remove 'Make Available Offline' - Enabled
    Admin Templates - System - Folder Redirection - Do not automatically make redirected folders available offline - Enabled
  7. andyheth's Avatar
    • |
    • permalink
    Brilliant - I wish I had found this before is started using SOLUS3 - we use SCCM so were looking to see if this could be done. Have you had any feedback on this - issues that I need to look out for? Thanks
  8. FN-GM's Avatar
    • |
    • permalink
    Thanks for posting

    Looking at something like this for some of the admin staff, it looks something fairly simple for the end users
  9. Marshall_IT's Avatar
    • |
    • permalink
    Hi FN-GM,

    my users do sometimes use the encrypt feature in outlook out OWA but that is mainly myself or the data Manager. Most users find it easier if they can just prefix the subject with encrypt.

    Thanks for reading.
  10. FN-GM's Avatar
    • |
    • permalink
    Hi,

    Do you use the Encrypt message option in Outlook or OWA? Or do you find your users forget to use this?

    Thanks
  11. john's Avatar
    • |
    • permalink
    Looks quiet a nice job, shame they re-used such large computers (and XP).

    Did you suggest positioning the towers behind the monitors or even hanging them in adjustable straps under the desks? Where I used to work we designed rooms so that towers were hung under desks to create extra space, ensure an open feel and it also means the students cannot hide between each tower as they can do in that layout shown, also monitor brackets would lift screens up above the workspace creating more room for books / resources.

    Also on the images on your blog (http://www.cablers.co.uk/wp-content/...7/DSCF0336.jpg) can I suggest you get your electric insulation tester recertified given it was due in 2008 and its now 2014 I'd expect it to be re-calibrated before now to ensure its results and readings are correct and reliable.
  12. GrumbleDook's Avatar
    • |
    • permalink
    This has been discussed in a variety of forums and to some extent it boils down to the school completing a risk assessment on the company, including what they have placed in the Safe Harbor notice and what the school thinks the risks are for the countries where the data may be stored.
  13. Norphy's Avatar
    • |
    • permalink
    I have. It just doesn't seem to be showing.
  14. FragglePete's Avatar
    • |
    • permalink
    Quote Originally Posted by Norphy
    If there were a thank button on blog entries, I would be pressing it right now. Thank you for this, very useful.
    You could rate it!!

    Glad it helped someone.

    Pete
  15. Norphy's Avatar
    • |
    • permalink
    If there were a thank button on blog entries, I would be pressing it right now. Thank you for this, very useful.
  16. FN-GM's Avatar
    • |
    • permalink
    You have done a nice tidy job!
  17. Alis_Klar's Avatar
    • |
    • permalink
  18. seawolf's Avatar
    • |
    • permalink
    Quote Originally Posted by furby
    I can't get this to work, is it just AD groups and "server name' that needs changing?
    The share names and paths need to be changed as well. Be careful if you cut some parts of the script out that you don't mismatch the open/close brackets, etc.

    This script will quit without doing anything if the user is logged into a local account. It only attempts to mount the shares if a network user is logged on.
    Updated 2nd July 2014 at 05:21 PM by seawolf
  19. Alis_Klar's Avatar
    • |
    • permalink
    Agree with these choices. CleverTouch will have to pull something very special out of the bag to get my custom back! Just add a n Apple TV with the new iOS 8 peer-to-peer airplay feature and your sorted!
  20. zag's Avatar
    • |
    • permalink
    Nice idea!

    Can't say we've ever had a problem with laptops logging on though. We use Aruba 802.11ac AP's here and its been rock solid.
Page 1 of 53 123451151 ... LastLast