Jump to content

rantsh

Members
  • Posts

    115
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.tecnogente.info

Profile Information

  • Gender
    Not Telling

rantsh's Achievements

Member

Member (2/5)

0

Reputation

  1. Here comes CSS to the rescue adapt the following to your script <select> <option>Sony Ericcson</option> <option style="background-color:#FFFF00">Motorola</option> <option>Nokia</option> </select> Tested it on Opera 9+, FF2.0, IE7 and IE6, I'm guessing this is what you want...
  2. rantsh

    crontab for root

    the line in crontab looks something like this * * * * * /path_to_php_bin_directory/php /path_to_script/script.php script.php works fine if I use it straight in the command line but crontab doesn't seem to make it work. Crontab is supposed to have the same permits as the user who sets it up (root in my case), right?. Either way, I'm sorry I can't give you the real path but it looks very close to: For the time being I've moved the script to /home where IT WORKS in crontab (don't know why it works there and not on the actual directory, but I'd like to know why it doesn't work. Thanks
  3. rantsh

    crontab for root

    I have a php script that I need to run with crontab, now whenever I run the script from the command line by itself it runs fine, but when I have set it up as a cronjob it does not execute. I'm setting up the crontab with root and the script is (for library inclusion simplification issues) located in an apache public html directory. Can anyone help me figuring out why the cronjob is not being executed? PS: I tried adding a > /home/someLogFile.log at the end of the line in the cronjob so it'll create a file to be sure it's running and also the time when it ran, and the file was properly created at the expected time... Thanks in advance, rantsh
  4. Do you get an error of some sort?
  5. I agree, but the boss is the boss.....!!!! (hehehe)
  6. I'm going to use crontab, thing is that I'm required to process a different batch every X seconds in a single process (don't ask me why), which is why I'm bound to use sleep...
  7. We own the server... and the process I need to run will be run from a crontab... how can I solve this through a .htaccess file?
  8. Hey all, I have the following code: $i=0; while($i++<15) { mail("rantsh@hotmail.com",date("d m Y H:i:s"),"This is email # $i "); echo "mandado $i <br>"; sleep(60); } Now, I know my server has a 30 second max_execution_time setting... nonetheless, this code runs successfully!!!. Now, this is actually better for me (for the application I need to run)... Yet I'm concerned of why it's being allowed to run for 15 minutes if max_execution_time is set to 30. PHP.NET says: But I don't see how my query could be included here, I don't have perfect english but for what I understand it means that the overhead caused by the actual action of sending the email does not affect the max_execution_time, but isn't the time the script is sleeping included either??????? Thx, Roderick
  9. Do you need to use preg? I guess ereg has is an easier function I guess you could use something like if(ereg("[a-z]|[A-Z]|[0-9]";$var)) { //valid } else { //invalid } That'll look for any alpha-num char and return true if present. Hope I was helpful, and btw, I guess this topic goes on the Regex forum... Regards, Roderick
  10. alright, so I've seen the warning reason, it's {1,2} not {1-2}. Thanks anyway ((I feel very stupid duh!!!))
  11. Hi all, maybe you can all help me figuring out what the hell is going on here. ??? ??? ??? I've been using ereg for a long time and have never got this warning before: Warning: ereg() [function.ereg]: REG_BADBR in file.php on line ## The code in that line is this: $Hour = ($_GET['Hour']=='')?"00":(ereg("[0-9]{1-2}",$_GET['Hour']))?$_GET['Hour']:"00"; $_GET['Hour'] is defined, and the purpouse of this code is to verify if an hour (just the hour, no minutes or anything else) that's coming from a textfield is a correct number, if not, then use 00... I really don't know why this is happening, any clues from anyone??? Thanks, Roderick
  12. I must say both solutions work like a charm, thanks for your help (and to Guelphdad from the mysql forum)
  13. someone at the mysql forum posted a reply to this same Q (I asked both here and there) the reply was select count(column1) allrows, count case when column1>0 then 1 else null end as somerows from yourtablename Has someone tried this out before? I'll try in a while and let you know though
  14. Hi all, I want to do a select with 2 counts of the same column, one of them should be where column1>0 and the other has to be a count regardless of the value. Anyone can tell me if this is possible? Thx, Roderick
×
×
  • 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.