Communication between PHP and Python -
i'm trying build web interface python scripts. thing have use php (and not cgi) , of scripts execute take quite time finish: 5-10 minutes. possible php communicate scripts , display sort of progress status? should allow user use webpage task runs , display status in meantime or message when it's done.
currently using exec() , on completion process output. server running on windows machine, pcntl_fork not work.
later edit: using php script feed main page information using ajax doesn't seem work because server kills (it reaches max execution time, , don't want increase unless necessary)
i thinking socket based communication don't see how useful in case (some hints, maybe?
thank you
you want inter-process communication. sockets first thing comes mind; you'd need set socket listen connection (on same machine) in php , set socket connect listening socket in python , send status.
have @ this socket programming overview python documentation , the python socket
module's documentation (especially examples @ end). i'm sure php has similar resources.
once you've got more specific idea of want build , need help, feel free ask new question on stackoverflow (if isn't answered).
Comments
Post a Comment