Jump to content

Craig79

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Everything posted by Craig79

  1. That's it! I tried researching how to do it but didn't see anything like that. Thank you Gamic!
  2. Thanks Gamic, I've never seen a query like that! I tried it but I couldn't get it to work. Here's what I did: $SQL = "select * from(select my_state, count(*) as countOfUse from t_locations group by my_price) tmp order by tmp.countOfUse desc"; The "my_state" field in the "t_locations" table consists of integers. These integers stand for USA state codes. The "my_price" field is in the same table and it also consists of integers (dollar values rounded up). I'm passing in the state code from a PHP script to find the most commonly paid price for that state (but not the average). So, the puzzle is to find the most commonly paid price where the state code = 65. Could you please clarify the query? Thank you!
  3. Hello, I have a column of integers that are all multiples of 5. How do I determine which number in the field occurs most frequently? Thank you!
  4. SOLVED: Turns out that my openssl version is 0.9.8b. This is a bug with that version. I hope I can save someone else 12 hours of searching!
  5. I've noticed it too. I have XP and Ubuntu 8.10 on the same machine, different drives. I get much better reception in XP than Ubuntu. So it's not just you! As for the weather, I've noticed also that cloudy days / rain do tend to decrease reception. I've noticed that with cell phones too.
  6. Hello, I'm running CentOS on a VPS. Openssl is indeed located at /usr/bin/openssl. The problem is that my script keeps saying it can't find it. Here's the script: ------------------------------------------------------------------------- //Sample PayPal Button Encryption: Copyright 2006,2007 StellarWebSolutions.com //Not for resale - license agreement at //http://www.stellarwebsolutions.com/en/eula.php //Updated: 2007 04 04 $custom = stripslashes(trim($_POST['custom'])); #Set home directory for OpenSSL //putenv("HOME=~"); putenv("HOME=/home/admin/domains/xxx.com/public_html/temp/"); // xxx is fake! # private key file to use $MY_KEY_FILE = "/home/admin/my-prvkey.pem"; # public certificate file to use $MY_CERT_FILE = "/home/admin/my-pubcert.pem"; # Paypal's public certificate $PAYPAL_CERT_FILE = "/home/admin/paypal_cert.pem"; # path to the openssl binary $OPENSSL = "/usr/bin/openssl"; // stuff here... function paypal_encrypt($hash) { //Sample PayPal Button Encryption: Copyright 2006,2007 StellarWebSolutions.com //Not for resale - license agreement at //http://www.stellarwebsolutions.com/en/eula.php global $MY_KEY_FILE; global $MY_CERT_FILE; global $PAYPAL_CERT_FILE; global $OPENSSL; if (!file_exists($MY_KEY_FILE)) { echo "ERROR: MY_KEY_FILE $MY_KEY_FILE not found\n"; } if (!file_exists($OPENSSL)) { echo "ERROR: OPENSSL $OPENSSL not found\n"; } --------------------------------------------------------------------------------- ...and the last line is where I get the error message echo'd out. I'm using DirectAdmin and my username is 'admin' so my files are located at /home/admin/domains/xxx.com/public_html/ openssl is definitely there, but PHP can't seem to find it. Could someone please tell me why? Thanks!
  7. After he set his router to forward port 80 and added turned off ZoneAlarm, it worked!
  8. Hello, I have a friend who is running Apache on Windows XP. I can call him up and he can instantly give me his IP address from the ISP (24.xx.xx.xxx) (real numbers not shown) as well as his IP info from 'ipconfig' (192.168.1.2). His .conf file is set to listen on port 80. How can I see his home directory from my computer? I opened FireFox and tried these: http://24.xx.xx.xxx/ http://24.xx.xx.xxx/192.168.1.2/ http://24.xx.xx.xxx/127.0.0.1/ http://24.xx.xx.xxx/index.html http://24.xx.xx.xxx/index.html:80 ...and none of these worked. How do I do this? Thanks!
  9. Thanks again PFMaBiSmAd! Yes, Kenrbnsn, I called session_start() at the top of each page.
  10. Your last post got me really thinking, and the problem is now solved! I was using http://localhost/ in my redirects (header). I changed all instances of 'localhost' to '127.0.0.1' , like this: http://127.0.0.1/ Holy cow I spent 8 solid hours on this. I'm really glad it's working now though! Thank you so much for your help!
  11. Thank you - I'll troubleshoot these. As for the 'sesone' session variable, I don't think it's not occuring on my other site due to the error reporting being off. If the variable was not passed and verified, this would mean that the user is not authenticated and they would be given an error display. I've tested it dozens of times with different user accounts, in IE and FireFox, and they all work. The only difference is that this instance is running on a different platform: Ubuntu 8.10. On IIS and CentOS I have had no problems. I did check the session file and i did NOT see a session id in it. What could that be? It just had session names and variables, and the correct value for the variables were there. I'm completely puzzled. Also, I've tried these, but they didn't work: -------------------------------------------- session_commit() before redirecting to new page changed the session.save_path to a directory with complete read/write privileges (I restarted Apache after making changes to the php.ini)
  12. Thank you very much: it's getting better. With the single quotes, I now get: Notice: Undefined index: sesone in /var/www/fitness/createtasks.php on line 25 Notice: Undefined index: sestwo in /var/www/fitness/createtasks.php on line 25 ...instead of... Notice: Use of undefined constant sesone - assumed 'sesone' in /var/www/fitness/createtasks.php on line 25 Notice: Undefined index: sesone in /var/www/fitness/createtasks.php on line 25 Notice: Use of undefined constant sestwo - assumed 'sestwo' in /var/www/fitness/createtasks.php on line 25 Notice: Undefined index: sestwo in /var/www/fitness/createtasks.php on line 25 Odd how the quotes never mattered before, but I'm just greatful to find the fix. Now the only thing that remains is the Undefined Index Yes, the variables I posted were from the output of phpinfo()
  13. Thank you - that indeed does look helpful. Here's what I got: Notice: Use of undefined constant sesone - assumed 'sesone' in /var/www/fitness/createtasks.php on line 25 Notice: Undefined index: sesone in /var/www/fitness/createtasks.php on line 25 Notice: Use of undefined constant sestwo - assumed 'sestwo' in /var/www/fitness/createtasks.php on line 25 Notice: Undefined index: sestwo in /var/www/fitness/createtasks.php on line 25 My note: Line 25 has this: echo 'sesone is ' . $_SESSION[sesone] . ' and sestwo is ' . $_SESSION[sestwo] . '<br>';
  14. Hello, I installed PHP5, Apache2, and MySql5 on Ubuntu Linux 8.10. I use this script to verify that someone has been verified from a previous page: if ((isset($SESSION[sesone])) && (isset($SESSION[sestwo]))) { // the user was validated on a previous page } else { // they have not been validated on the previous page } I checked the output of the session variables on the page that set them by echoing them out after they had been set. That works. I used this to set the variables: $SESSION[sesone] = $myvarBut when I redirect to another page, the session variables are empty. What happened? This works on one of my sites running PHP 4.3. Is that the difference? Other info: --------------------------------------- every page begins with session_start(); Session support: enabled session.use_cookies: on register_globals: off
×
×
  • 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.