Jump to content

solarisuser

Members
  • Posts

    122
  • Joined

  • Last visited

    Never

Everything posted by solarisuser

  1. Would forcing a refresh of the page every couple minutes prevent the auto-logout behavior?
  2. Hi All, If I leave my PHP session open, walk away, and come back an hour later, my app logs me out and I need to relogin. Do I need to modify /etc/php.ini and change some value? Thanks
  3. You should probably post your code and tell everyone what you're trying to do...
  4. You can force a file to download by using some PHP code.. google "force file download PHP" or something like that
  5. Just to get a hand of how things work, try something simple like this and then expand... <? if(isset($_POST['submit'])) { print_r($_POST); exit(0); } echo "<form method=post action=''>"; echo "<input type=text name=blah1><br><br>"; echo "<input type=text name=blah2><br><br>"; echo "<input type=submit name=submit value=submit>"; echo "</form>"; ?> (P.S - Using an image for a submit button can mess up $_POST['submit'], and instead cause it to submit $_POST['submit_x'] and $_POST['submit_y'] (coordinates)... )
  6. While you (your uid/gid) can touch a file, the web server probably doesn't have permission because it runs as apache or nobody. If you 'tail -f <path/to/apache/error_log>', you might see the error, or php's error_log (defines in /etc/php.ini). If you can't find any of those files and don't care about security, just 'chmod -R 777 ~', and it should be able to write anywhere in your directory, but other users will too.
  7. Listen to thorpe, and then simply use <? print_r($_GET); print_r($_POST); ?> to see your variables.
  8. <? session_start(); session_name('WHATEVER NAME YOU ARE USING'); print_r($_SESSION); ?>
  9. 3.3, ouch. Maybe you do not have gd library enabled, you can find out with <? phpinfo() ?>
  10. 1) Log onto the machine's terminal, and run 'tail -f /var/log/maillog' 2) Run the PHP script 3) Look for errors from tail.  If you do not see errors, look at the PHP error_log file, defined in /etc/php.ini 4) Look at http://www.php.net , and type in 'mail' on the top right of the page to find examples of proven ways to use mail()
  11. That looks ok to me Visit http://www.php.net and search for the function "mail" to learn the syntax and examples of how to send mail in PHP. It'll just use the sendmail binary to send your mail. If you are behind a firewall, you can setup /etc/mail/sendmail.cf (or /etc/sendmail.cf, not sure) to use a relay.
  12. Since I'm a big PHP user, I just install PHP on my machine, and then use preg_replace on the command line. It works great on the Windows and Linux platforms.
  13. Do yourself a favor. Download VMWare Workstation 6, and install CentOS. When you select the OS you're installing in VMWare Workstation, select "RedHat Enterprise Linux 4", and you'll need not have to worry about dual booting. http://www.vmware.com
  14. Maybe you can assume what the average file of the image would be (lets say the limit you allow is 2MB). Lets say the total comes out to 50GB for the total amount of files you're comfortable with. You can then partition your hard drive and create various partitions 50GB large, eliminating the problem. Also, if you're worried about performance, then look at your I/O, as its usually the biggest bottleneck. This means using RAID 1+0 for speed and redundancy, using ENGINE=memory for temporary data in MySQL, etc.
  15. Hi All, I am having a tough time trying to figure out how to go about this... I would like to have the form submit when my <input type=text> field has five digits typed in. Any help would be most appreciated! Thanks
  16. I'd like to modify the request. Using this regex: \b(??:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b I'd like to modify it to allow commas, followed by an additional IP, up to an unlimited amount of times, without having a comma at the end. For example: 192.168.1.1,192.168.1.2,192.168.1.3 , or just 192.168.1.1 Thanks - its been a tough one for me to try and figure out!
  17. It doesn't work =( I used http://www.codehouse.com/webmaster_tools/regex/ to verify... 1.1.1.1, 1.1.1.2 or 1.1.1.1,1.1.1.2
  18. Hi All, regex newb trying to figure this out.. I use /^(\d{1,3}\.){3}\d{1,3}$/ to validate IP addresses in a text field. I would like to add support for commas and spaces, so I can allow something like "192.168.0.1, 192.168.0.2" Thanks
  19. Hi All, I'm asking for someone to enter a mac address, and it has to be in the format NN-NN-NN-NN-NN-NN They are entering the data in an <input type=text> field, and I was wondering if JS is the right solution to enforce this input as the user types it in (client-side validation). I'm doing client-side validation but I also would like client-side. Thanks
  20. Hi All, Is it possible to use innerHTML to grey out (disable) a <input type=text> field when a particular checkbox (lets say, id=check123) has been clicked? Thanks...
  21. make sure the clients internet access is filtered to block all other ports, or a client could use an anonymous proxy on a port like 23 to bypass your content filtering 23 is reserved for telnet, but anonymous proxies can listen to whatever port their configured for
  22. Hello All, I have data in the form of "0:1:22:33:44:55" and "00:11:22:33:44:55". What I would like to figure out is how to have regex modify the first example to add a "0" in front of any single digit or alpha character, and leave the parts with two numbers or alphas alone. The ":" is always going to be a delimiter. For example, the first example above should convert to "00:01:22:33:44:55". Any assistance would be appriciated - I have basic regex experience and use google to figure out basic stuff but I dunno how I would start this. Thanks
  23. Hello All, I can't get this to work right, $aResults should be ~200 records (mysql query is correct)... $aResults = array(); $get = mysql_query("SELECT id as id,tool as value,pan as info FROM s.tb1 LIMIT 0,200"); $row = mysql_fetch_array($get); $num = mysql_num_rows($get); for ($i=0;$i<count($num);$i++) { $aResults[$i]['id'] = $row['id']; $aResults[$i]['value'] = $row['value']; $aResults[$i]['info'] = $row['info']; } var_dump($aResults); Thanks!
  24. google search "greybox" or "lightwindow"
×
×
  • 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.