iPXE discussion forum

Full Version: PHP not loading all lines
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Guys,

Me again, with some more PHP woes...

Just wondering, i've got iPXE booting into a php file ...

Code:
    if ($job==03)
    {
    print "echo Job 03 Found... Launching Job 03 (Automatic) "."\n";
    print "sleep 5"."\n";
    echo "append initrd http://192.168.0.1/initrd.img\n";
    echo "kernel http://192.168.0.1/vmlinuz initrd=initrd.img rw root=/dev/ram0 ramdisk_size=1105536 init=/bin/init loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 splash=silent\n";
    }

The problem is only the first 3 lines of code in the IF statement execute and then ipxe exits out to ipxe menu.
The last line of code including the echo "kernel.." doesn't run.
I found the resolution to the problem.

I removed the ( ) around Automatic and it started working Wink
Your problem wasn't just that - you're trying to run a command called "append" in an iPXE context. You're mixing up PXELinux and iPXE syntax. If you remove the "append" from that initrd line and add an additional "boot" command after the kernel line it should probably work as expected.
Reference URL's