Jump to content

thepip3r

Members
  • Posts

    289
  • Joined

  • Last visited

    Never

Everything posted by thepip3r

  1. What "CODE" do you have from your cash drawer? And no, I don't think PHP will be able to do this for you natively. What you CAN do though is use a fucntion like exec() or something of the sort if you have an executable that PHP can kick off to remotely execute that command.
  2. FOR IIS: When you create the site, right click on it, go to properties. Click on the Directory Security tab. Edit "Anonymous access and control". From here, ensure anonymous access is NOT checked and make sure that Integrated Windows authentication IS. Once this done, check your $_SERVER['AUTH_USER'] var and your complete domain\hostname should be listed. If not, view phpinfo() and see if you can find your username in some other similar variable. With the above set, the Windows username should be listed in one of your Global variables. I'm currently using this method on two seperate sites right now.
  3. none of those seem to have worked... for error trapping, does PHP write to STDERR? If so, how do I see what error is being reported other than the echo statement i have for my else clause? Edit: Well, it's got to be something having to do with accessing different shares because i copied one of the dirs i want to read from my file server over to my web server and it reads the files just fine.... I couldn't get the IUSR_ local anonymous account to work on my web server so I justtried the EVERYONE group only for testing purposes and it STILL didn't work. When PHP prints out my else clause, I can copy and paste that path into START>>RUN and Windows Explorer opens the share just fine. with everyone full control i don't see how it's still a credentials thing but don't know where to go from here...
  4. thanx xyph... i'll try those suggestions and let you know what i find.
  5. I don't know who all can answer your question but if you're new to PHP and/or programming in general, I wouldn't try to come up with your own CRM project right away. While you COULD come up with a CRM project for all of the hyphenated listings, it would be a HUGE project; one that would require reliable and consistent results and you're probably just better off purchasing one. and i have no idea what drupal is.
  6. I have a logon script that parses a bunch of information off of the computers on my network and writes that info to an .ini file in a centralized logging location. I know that PHP can read .ini files using parse_ini_file() or whatever but my question is whether my file repository of .ini files has to be located on the same server or not? Clarification: Can my PHP page that's stored on my web server, read from files stored on my file server? If so, what functions could I use to accomplish this? Edit: The file server's share where all of the INI files are stored is set up with Everyone, Full Control and the Security permissions are set up for Authenticated Users with Write access. Both the web server and file server are Windows Server 2003. Edit2: Have tried this but keep getting my listed error that there was an error opening the directory: [code]$INIPath        = "\\\\server\\inventory agent\\data\\"; $FolderName        = date("d-m-Y",strtotime("now")); if (is_dir($INIPath . $FolderName)) {   if ($dh = opendir($INIPath . $FolderName)) {     while (($file = readdir($dh)) !== false) {       echo "file:  $file <br>";     }     closedir($dh);   } else {     echo "Error Opening Directory:  " . $INIPath . $FolderName . "<br>";   } } else {   echo $INIPath . $FolderName . " is not a valid directory.<br>"; } [/code] and i keep getting: \\server\inventory agent\data\07-06-2006 is not a directory. any ideas?
  7. ok... i don't really understand the how that evals to true but it did work. thanx for the clarification football...
  8. And no football... that logic is totally wrong because $key and $val will only be set to a single value for every iteration of the FOREACH loop. With taht being said, my $key var will NEVER be not equal to 'submit' AND 'AttackType'...
  9. haha... simplified the logic... [code]if ($_POST['submit']) {     echo "<pre>";     print_r($_POST);     echo "</pre>";          foreach ($_POST as $key => $val) {         if (is_numeric($val)) {         }     }      }[/code] i still don't know what was going on but thanx for trying kenr
  10. I still get the same results when i changed the code to: if (($key != 'submit') || ($key != 'AttackType')) {
  11. Here's my code: [code]if ($_POST['submit']) {     echo "<pre>";     print_r($_POST);     echo "</pre>";          foreach ($_POST as $key => $val) {         if ($key !== 'submit' || $key !== 'AttackType') {             if (!is_numeric($val)) {                 echo "$key $val is not a number.";                 exit;             }         }     } }[/code] And the resulting output looks like this: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Array ( [LAV-Anti-Tank] => 0 [M2_Bradley] => 0 [M1_Abrams] => 0 [Striker] => 0 [M1A2_Abrams] => 0 [T-72_MBT] => 0 [M1A1_MBT] => 0 [Patriot_Missile] => 45 [AttackType] => Tank [submit] => Calc ) AttackType Tank is not a number.[/quote] In my foreach loop, I'm trying to not evaluate the 'AttackType' and 'submit' keys but am failing miserably and i'm sure I have to be missing something simple. Anyone have any ideas? Thanx in advance!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.