iPXE PHP LOOPs not working
|
2014-07-04, 13:30
(This post was last modified: 2014-07-04 13:35 by jhonny.)
Post: #1
|
|||
|
|||
iPXE PHP LOOPs not working
Hi Guys,
I'm trying to get a php loop going ... To save some time, i'll just describe the beginning of the script: - server boots php script which determines its serial number (serversn) - it connects to the database and checks if the server is there and what its (job) value is. - if the server isn't in the database it is added to it with a default job value of 00 then the following script is where I'm having issues: Code: do What happens is when i chain load the the script using http, it loads but says: Code: http://192.168.0.1/test2.php?serversn=VMware-56blabla... 100% Code: http://192.168.0.1/test2.php?serversn=VMware-56blabla... 99% Code: http://192.168.0.1/test2.php?serversn=VMware-56blabla... 100% It keeps going like that for a while, approx 60 seconds, then the script actually executes and the output is as follows: Code: Job 00 found, looping through ... However, while the code is actually running and producing results, it is NOT connecting to the database. So when i go to the database and update the value of JOB to 01, the output is still: Code: Job 00 found, looping through ... What is happening is while the code is stuck at loading 99%, 100%, 99% its actually connecting to the database then and pulling out results multiple times. Does anyone know how to fix this ? Why are the results being pulled from the database before the php script has a chance to run ? Why isn't the database contacted while the script is executing like it should ? What's even more interesting is while the code is stuck at 99% 100% 99% and i go to the database and change the job value to 01 from 00, the code executes immediately, but the results are still INCORRECT, they are still being displayed for job 00 rather than job 01 Code: Job 00 found, looping through ... If however, the job in the database is already 01 and the script is executed, the correct output is produced: Code: Job 01 found, HELLO This is absolutely doing my head in. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
iPXE PHP LOOPs not working - jhonny - 2014-07-04 13:30
RE: iPXE PHP LOOPs not working - mcb30 - 2014-07-04, 13:48
RE: iPXE PHP LOOPs not working - jhonny - 2014-07-04, 13:54
RE: iPXE PHP LOOPs not working - mcb30 - 2014-07-04, 14:32
RE: iPXE PHP LOOPs not working - jhonny - 2014-07-04, 14:37
RE: iPXE PHP LOOPs not working - mcb30 - 2014-07-04, 17:09
RE: iPXE PHP LOOPs not working - jhonny - 2014-07-07, 07:55
|
User(s) browsing this thread: 2 Guest(s)