Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python & ipxe - syntax errors
2018-01-05, 11:45 (This post was last modified: 2018-01-05 11:50 by robinsmidsrod.)
Post: #3
RE: python & ipxe - syntax errors
As a rule of thumb I always suggest trying out the URL you're trying to get working in iPXE in a web browser. That usually helps you to figure out exactly what is going on and why things are not working. In this particular situation it seems like your Apache configuration is not treating the python code as code, but something else. As NiKiZe mentions, this is a Apache/Python issue that you're probably getting better help for in a Python/Apache forum. The iPXE script code that you want to emit from this python code can be considered just plain-text from the perspective of Apache/Python, which should simplify everything when talking to the Python community.

UPDATE: When I look more closely at your Apache configuration, it seems like you're actually using ExecCGI to run the code (a traditional CGI script), meaning you use mod_cgid, most likely, to execute it. If that is the case, the file should be executable, it should start with #!/usr/bin/env python as the first line of the script and not the <% line at start and the %> at the end of the file.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: python & ipxe - syntax errors - robinsmidsrod - 2018-01-05 11:45



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