Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with iPXE and PHP
2017-12-15, 01:48
Post: #5
RE: Issue with iPXE and PHP
(2012-12-05 01:19)thomil Wrote:  When exactly does iPXE hang? Right it fetches your php page and tries to execute it?

If that's the case please enter the iPXE command line, fetch the image manually and execute 'imgstat':

dhcp
kernel http://bs1/boot.php?mac=${net0/mac}
imgstat

It should say something like "Script" next to that file. It probably says "PXE" or "NBP" or something similar instead. If that's the case you may have some issues with iPXE incorrectly detecting the shebang line("#!ipxe"). Is there maybe some issue with the character encoding? Is the very first thing that script outputs really "#!ipxe\n" with absolutely nothing before it? You should also check with a browser that the content type really is text/plain.
Hello thomil,

I am having same issue where ipxe is not detecting php scripts

My test script is like this
test.php
<?php

header ("Content-type: text/plain ");
echo "#!ipxe\n";
echo ":exit\n";
echo "echo Booting from local disks ...\n";
echo "exit 0\n";

?>

when i run imgstat on ipxe it Shows test.php as [PXE-NBP]

I have another script test2.php , and this script is shown as [script] when running imgstat

#!ipxe
echo ===== My iPXE Script =====
echo MAC address is ${net0/mac}"

Any help will be greatly appreciated

Thanks
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Issue with iPXE and PHP - thomil - 2012-12-05, 01:19
RE: Issue with iPXE and PHP - johnfortech - 2017-12-15 01:48
RE: Issue with iPXE and PHP - NiKiZe - 2017-12-17, 11:27
RE: Issue with iPXE and PHP - Torgeir - 2012-12-05, 11:23



User(s) browsing this thread: 1 Guest(s)