Jump to content

obewan

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Contact Methods

  • AIM
    mike99vm
  • Website URL
    http://www.debitage.com

Profile Information

  • Gender
    Not Telling
  • Location
    Lat: 42.54N, Lon: 71.92W

obewan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. oh man, I hate when that happens.
  2. Yes, I do. My script runs fine on the server running php 4.3.6 but it isn't running on server with php 4.3.9 Here is complete login script <?php session_start(); include('include/functions.php'); $username = $_POST["username"]; $password = $_POST["password"]; // check and see if they entered any info if($_POST["username"] == "") { header('Location: index.php'); } // establish database connection connect_db(); $password = md5($password); $query = "select count(*) from ". ADMIN ." where username = '$username' and password = '$password'"; $result = mysql_query( $query ); $count = mysql_result( $result, 0, 0 ); if($count < 1) { include('index.php'); exit; } $_SESSION['admin'] = true; $_SESSION['username'] = $usename; header("Location:". $_SERVER['HTTP_REFERER']); ?>
  3. Hi We just set up a CentOS box, php 4.3.9, and I am having trouble getting sessions running. My login script uses sessions so this is a problem. I've played around with php.ini but sessions arent working. Here is how I am registering session vars (which works in 4.3.6) $_SESSION['admin'] = true; $_SESSION['username'] = $usename; Any ideas?
  4. since this is a php forum and PEAR involves php, I assumed that the question is appropriate.
  5. Can anyone give me a simple example of adding js action listeners to a pear quickform?
  6. I am trying to set up a php SOAP service using wsdl Added this to try and deal with an error about no $HTTP_RAW_POST_DATA: if (isset($HTTP_RAW_POST_DATA)) { $request = $HTTP_RAW_POST_DATA; } else { $request = file_get_contents('php://input'); } $server->handle($request); Now its throwing this error and I cannot find out how to get rid of it. SOAP-ENV:Client Bad Request Any ideas appreciated.
  7. I want to call a local windows command from a remote web server. Something like this - which works when the web server is running on the local machine - but I want it to run on a web server elsewhere on my LAN. Is it possible?? ??? $command = "start notepad.exe"; if(exec($command)) echo "command issued<br>"; Any way to tag an IP onto something like this?
  8. I am echoing records to the browser and using ajax for CRUD updating to fix ones without order id's
  9. <? $dweb =& new dWeb(); $db =& $dweb->dbConnect(); $uniqueOrders = array(); // holds unique lines $uniqueAccounts = array(); // holds unique lines $lName = array(); // holds unique lines $fName = array(); // holds unique lines $paymentT = array(); // holds unique lines $paymentA = array(); // holds unique lines $count = 0; $process = 0; $result = $db->query("SELECT Phone,Account,LastName,FirstName, PaymentType,PaymentAmount,ID FROM table1 WHERE PaymentDate = '$mydate' AND orders_id = 0"); // Always check that $result is not an error if (DB::isError($result)) { die ($result->getMessage()); } while ($row = $result->fetchRow()) { $result2 = $db->query("SELECT table2.reseller_orderid from table2 WHERE table2.omsCustomerid = '$row[1]' limit 1"); if($row2 = $result2->fetchRow()) { $myid = $row2[0]; // get result and update table1.orders_id $update =& $db->query("UPDATE table1 SET orders_id = $myid WHERE Phone = $row[0]"); }else{ $result3 = $db->query("SELECT table2.reseller_orderid from table2 WHERE table2.lead_telephone = '$row[0]' limit 1"); if($row3 = $result3->fetchRow()) { $myid = $row3[0]; // get result and update table1.orders_id $update =& $db->query("UPDATE table1 SET orders_id = $myid WHERE ID = $row[6]"); }else{ // collect info on the rows that fail to find an id array_push($uniqueOrders, $row[0]); array_push($uniqueAccounts, $row[1]); array_push($lName, $row[2]); array_push($fName, $row[3]); array_push($paymentT, $row[4]); array_push($paymentA, $row[5]); } } $result2->free(); } // end while $result->free(); ?> /* sample data "Customer Name" "Account Number" "Type" "AccessCardNumber" "Status" "PhoneNumber" "Owner" "Zip" "Start Date" "Disconnection Date" "Payment Name" "Reason Code" "PPC/Chargeback" "tom" "804" "REG" "0595" "xL" "5551212" "romulas" "<Null>" "11/11/2006" "11/20/2006" "CBPPC-1" "<Null>" "-180.00" "dick" "721" "REG" "0978" "xT" "5551213" "romulas" "23098" "2/17/2007" "<Null>" "<Null>" "51" "0.00" "dick" "721" "REG" "0142" "xT" "5551213" "romulas" "23098" "2/17/2007" "<Null>" "<Null>" "51" "0.00" "dick" "721" "REG" "0165" "xT" "5551213" "romulas" "23098" "2/17/2007" "<Null>" "<Null>" "51" "0.00" "dick" "721" "REG" "0183" "xT" "5551213" "romulas" "23098" "2/17/2007" "<Null>" "BONUS" "<Null>" "25.00" "dick" "721" "REG" "0183" "xT" "5551213" "romulas" "23098" "2/17/2007" "<Null>" "ABONUS" "<Null>" "25.00" "dick" "721" "REG" "0183" "xT" "5551213" "romulas" "23098" "2/17/2007" "<Null>" "RSP" "<Null>" "50.00" "dick" "721" "REG" "0183" "xT" "5551213" "romulas" "23098" "2/17/2007" "<Null>" "P1" "<Null>" "205.00" "harry" "345" "REG" "0441" "xT" "5551214" "romulas" "23638" "2/20/2007" "<Null>" "<Null>" "51" "0.00" "harry" "345" "REG" "0875" "xT" "5551214" "romulas" "23638" "2/20/2007" "<Null>" "QBONUS" "<Null>" "25.00" "harry" "345" "REG" "0875" "xT" "5551214" "romulas" "23638" "2/20/2007" "<Null>" "RSP" "<Null>" "50.00" "harry" "345" "REG" "0875" "xT" "5551214" "romulas" "23638" "2/20/2007" "<Null>" "P-1" "<Null>" "205.00" */
  10. how about this? http://us2.php.net/mysql_insert_id
  11. I am crunching mysql data and was able to write some php in a conventional script as well as command line version that worked, but it was slow with less than 30 records taking about 45 seconds. Perl version took less than 5 or 10 seconds max. I have to process over 1200 records.....php hangs and times out. So I went with perl, calling it from php with exec(). Why the huge difference between php and perl - particularly when both are called form the command line? ???
  12. Hi I am trying to send an email using php. It worked but would generate weird email addresses like : apache@mydomain.org.org In my attempts to fix the double .org issue, I rewrote the /etc/hosts file It now looks something like this: # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost 192.168.1.3 research mydomain2.org I should state that the IP of my router has a DNS entry research.mydomain.org We also have a hosted website www.mydomain.org But mydomain2.org is not a registered domain name. Can anyone help me get the mail program working and my network and apache configuration set up correctly? Thanks for any help.
×
×
  • 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.