marz Posted September 27, 2010 Author Share Posted September 27, 2010 100% SUCCESS 1) I solved the problem with the comman line scripting by creating a text file, wrote the commands as if written from the CMD, saved it and renamed it .bat so as it auto executes when doubleclicked. This also solved the problem that output scriptfile was not created from the icon/target method. With the .bat method, the scriptfile was created. 2) The resulting .html output was 3MB long with full text output and 450kb long when text output was stripped to bear minimum. In both cases, when visualising the html from IE7, the browser froze (I was surprised that 450Kb was too much to handle! So I simply loaded the html file in Ultraedit, and viewed as html. It opened and showed successufully both the 3000kb and 450kb html files I learned so much from the post/forum and hope this helps other coders who encounter this problem. I seen a number of posts related with thesame problem and remained as unsolved. Thannjs Quote Link to comment Share on other sites More sharing options...
marz Posted September 27, 2010 Author Share Posted September 27, 2010 A kind of miracle took place - the script is running very fast on Internet Explorer. I have edited the script (actually made it longer) to include the option verbose mode (were there is all printing) and quite mode (bare essentials are printed) by including an if in every print function. I have the suspect that the PHPRC variable was the culprit of this problem. Since it was in the env paths, and I installed the new PHP5.3 in a different folder, the old php installation did not uninstalled successfully. Before removing the variable pathe from the Environments, the old php dir could not be deleted. The script in quite mode executes to the very end in 2mins (and I have a sleep(0.1); function in the routine) while the verbose mode takes 3mins, but when it reaches almost the very end, it freezes (probably due to overflow of text output) Would be nice if you comment about all this as I do not believe in miracles! previous php version was 5.22 In any case, it was great to learn Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted September 27, 2010 Share Posted September 27, 2010 sleep(0.1) is equivalent to sleep(0) and in either case there is no need to call sleep() during this process. Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 28, 2010 Share Posted September 28, 2010 Are you running this from your browser? Don't. Run it from command line. Seriously. Do it from command line. Quote Link to comment Share on other sites More sharing options...
marz Posted September 28, 2010 Author Share Posted September 28, 2010 I ran it from command line and worked perfectly (see previous posts). However it is somehow convenient to run it from browser (you are just an F12 or F5) away for testing purposes. As I said, all of a sudden it is running fast and almost flawless from the browser now. I just wish to know what could have been the culprit. Thanks for the sleep (0.1) = Sleep (1) - didn't know that Quote Link to comment Share on other sites More sharing options...
kickstart Posted September 28, 2010 Share Posted September 28, 2010 Hi Have you validated the resulting HTML? Wondering if somewhere there is a tag that isn't being closed and which (in bulk) is causing problems with the browser. All the best Keith Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted September 28, 2010 Share Posted September 28, 2010 Thanks for the sleep (0.1) = Sleep (1) - didn't know that That's not what I said so either you misread or you mistyped. Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 30, 2010 Share Posted September 30, 2010 I'm also pretty sure that the script was executing correctly to the end. It was browser that would probably reset the connection. As far as testing command line scripts, if you use an IDE you're usually an F6 away from running your script, and from the console - up-arrow away. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.