Jump to content

jorgep

Members
  • Posts

    61
  • Joined

  • Last visited

    Never

Everything posted by jorgep

  1. Yup, it worked, I did it again and this time it last 39 minutes and worked fine. What I'm not sure if it was that specific change that made it work, cuz I added some other stuff. Thanks anyway I could say that your suggestion solved it hehe!
  2. ;D ;D It worked!! I don't know why it just took 20 minutes to process all 12000+ contacts, man! I've become an optimization guru after this hahaha! At the beginning of the main function i added ini_set("session.cookie_lifetime",4000); Thanks a lot GingerRobot you rock!
  3. Thanks GingerRobot, I will add that in my next test right now I have to wait like 987982743 years for the script to finish! I'll post the results later!
  4. Thanks for the reply cooldude832 and GingerRobot. cooldude832: I know that, and that is almost dismissed since the script is working perfectly for less than 6000 contacts GingerRobot: That sounds very logic, I just checked it and it is set to 0 ; Lifetime in seconds of cookie or, if 0, until browser is restarted. session.cookie_lifetime = 0 Do you think I should set it to a number or something? It's a pain in the rear to test this script since I have to wait 40+ minutes until I get a result back. Thanks again for your answer
  5. Hello Fellows, This is kind of complicated problem to explain, I'll do my best to make it clear: The Process: I have a huge process where I fetch contacts information from a database and from a csv file and then use this contacts data to create a PDF file (I'm using PDFlib). When all the process is done, I set some session variables that include information from the generated file and forces a download through php headers. The Problem: After I process more than 6000 contacts (around 10 minutes processing) when I force the download it seems that the sessions variables don't get correctly set. I'm almost sure is not a session variable problem (like headers already sent) since it works fine for less than 6000 contacts. My Suspects: 1.- PDFlib dies some how and echo something and I can not set my session variables correctly 2.- Something regarding the memory usage My configuration: max_execution_time = 3600 max_input_time = 3600 memory_limit = 2048M I need to process around 12000+ contacts if you have a clue of what could be happening that would be great! Thanks for reading and any hint/help/guide would be highly appreciated
  6. Hello fellows, I'm currently having an issue with soap and nusoap. I have installed an old version of nusoap which is known to have naming collision with php soap in the class soapclient. There is no possibility of upgrading to the new version of nusoap since it implies rewriting and testing a LOT of code. I'm trying to integrate some Salesforce* functionality with an API that they give you, but it only uses php soap. So if I install php soap on my server I will have conflicts with my previous nusoap. In conclusion my question is, is it possible to disable a php module on the fly? Is there a way I can 'undefine' the php-soap class soapclient so it takes the nusoap one? (If you have integrated SF with nusoap before it will help too, since I can not find any documentation) * Is just a popular CRM application Thanks a lot!
  7. I guess that if it is for showing something in a user defined/customized mode, you should add an 'order' field to your table, and set the order number desired in there. Depending on how advanced you are, you could use some ajax implementation, which is really cool. I'm talking about scriptaculous (http://script.aculo.us/downloads). Their website is down right now. But when you have a time, check out the ordering list that they have. Is really cool, and not to hard to implement. Otherwise you will have to add too more columns to your cms html table, and add an arrow up and an arrow down and make regular parameters passing.
  8. Could be the easiest, but they wouldn't know what they are doing. I have the same opinion, WYSIWYG is Crap. A good php editor. When I'm working on Windows I like - Notepad++ (with the php extension): (http://notepad-plus.sourceforge.net/uk/site.htm) It have some good stuff, syntax highlighting, functions autocompletion. Really really lightweight and great for searching strings. - Dreamweaver (Just the Code section - never use the design section hehe) You have to pay or illegally download it - Eclipse (With the php extension) This one is really cool. Although I had to modify some of the predefined text completions rules cuz they were driving me crazy. Eclipse have user defined functions, classes and variable autocompletion (which is reaaally cool), and regular functions autocompeltion. Also is compatible with estandar documentation. If you document your functions, when it is autocompleting that function, you will be able to see what it does, what parameters the function receive and what it returns. You can also use CVS with your php projects. Is a very complete tool. The only contra part is that is a heavy loading program, built on java. But is worth it. And is free. (http://www.eclipse.org/downloads/)
  9. <?php echo date("Y m d",time()-(60*60*24)); ?> The time function returns the number of seconds since 1970-01-01 the date function receive as a second parameter this number of seconds. So when you say time()-(60*60*24) it means all that time minus 1 day. Hope it helps
  10. I sent the documentation web site so he can find out hehe
  11. $text = "line1\nline2\nline3\nline4\n"; $lines = explode("\n",$text); unset($lines[0]); $final_text = implode("\n",$lines);
  12. echo $_SERVER['PHP_SELF']; In this site you can find more: http://us.php.net/reserved.variables
  13. :S that is not enough information, what error are you getting? did you activated the session variables? whats is your final query???? Edited: Or just scape the string... $insert = mysql_query("INSERT INTO users VALUES ('', '".$_SESSION['NAME']."', '".$_SESSION['CONTACTNO']."', '".$_SESSION['EMAILADD']."', '".$_SESSION['GENDER']."')");
  14. Ok!!! thanks for your help! I dont think I can do that right now, but I'll check to see if it has something to do.! Thanks a gain
  15. The identify program is from image ready I think, and it is installed on my machine (the server) and if I die($cmd) and put that directly in the console, that works, in fact in my php script is working too, because I get the result that I want. I tried with hostname as you said and with ipconfig and it just hangs there, returns nothing. I shouldn't be in the php script.
  16. It will be read better if you write it like this: SELECT "estimate"."job number", "DEBTOR"."NAMES", "ESTIMATE"."details1", "debtor"."salesrep", "salesrep"."name" AS "csr", "estimate"."due date", "estimate"."order no", "estimate"."qty1", "estimate"."qty2", "estimate"."qty3", "estimate"."qty4" FROM "LIVEDATA_Dosrun"."dbo"."ESTIMATE", "LIVEDATA_Dosrun"."dbo"."DEBTOR", "LIVEDATA_Dosrun"."dbo"."SALESREP", "LIVEDATA_Dosrun"."dbo"."INVOICE" WHERE "ESTIMATE"."JOB NUMBER" = 53373 AND "INVOICE"."JOB NO" = "ESTIMATE"."JOB NUMBER" AND "INVOICE"."CSR RECNUM" = "SALESREP"."DATAFLEX RECNUM ONE" AND "DEBTOR"."AC NO" = "ESTIMATE"."DEBTOR"
  17. If I'm not wrong, that will hang, as the other script. I'm getting the file correctly, I already verified that. Yes... I just verified and it hangs... It seems like some weird untrackable error :S. The server never answer back and keeps waiting for something.
  18. I can't think of something right now, I've never worked with MSSQL before, but would it work if you remove the double quotes (")?. Or try replacing them (") with this (`). Let us know!
  19. :S well thanks to those who tried to help me, I'm still dealing with this. Thank you The Little Guy!. And if anyone knows something or think I can try something, is highly appreciated.
  20. The command that I'm getting is correct, in fact I'm getting the result that I want, If I echo $read = fgets($handle); echo $read; I will see DirectClassRGB, that is exactly what I want. <- That is, killing the script before the pclose() function. I just tried what you sugested and it dies too... :S. That sort of confirm that is something with my machine :S. I also tried with proc_open and seems to be the same.
  21. Yes, you are right, I tried that yesterday... It still hangs, but is dying there on those functions (popen and pclose). I also tried executing the command directly on the cmd.exe and it returns the value expected and finishes normally.
  22. I guess that you are trying to do this: $arr1 = array( 0 => 'Pedro', 1 => array(20,19,18), 2 =? 'Other_stuff' ) $arr2 = array(20,19,18); So $arr1 contains $arr2 if it is a fixed size, or simple arrays like this, I guess that you could do: echo in_array($arr2,$arr1)?"arr1 contains arr2":"arr1 doesn't contain arr2"; Try that, it might be possible. If it doesn't work, check this page http://us2.php.net/manual/en/function.array.php. In any of the functions at your left there should be the function that you are looking for
  23. I tried it, but keep getting the same results. The script just hangs there. I tried some variations and killing it, and it just don't go after the pclose(). Would you think is a sever configuration problem? Cuz whats weird is the fact that it runs on other servers without problem. :S I have no clue by now.
  24. Yeah, thats weird hehehe, I've never tried that, that would be sooo annoying! Good thing it worked I would have tried an ajax approach, instead of doing this: if (where_to== true){ window.close(); } else { var load = window.open('http//:www.website.com'); }
  25. Nope, In fact, this is a function that is used for an ajax response, for debugging I'm just killing it like $read = fgets($handle); die(var_export($read,true)); It shows me the result that I want from the command, but if I try that after the pclose($handle) it just hangs. (By hangs I mean that it never returns anything, never get a response and the browser keep thinking) pclose($handle); //Wont go further die(var_export($read,true));
×
×
  • 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.