Posts: 1
Joined: Thu Dec 06, 2018 9:33 pm

WPA_CLI strange behaviour when executed from apache

Thu Dec 06, 2018 9:44 pm

Hi guys, i am trying to create web gui to control wifi connection - show available networks, connect, manage & etc. I am using php for this purpose and i wanted to use wpa_cli to do the job behind the scenes. The problem is that no matter what i do every command results with timed out message. SCAN timed out, STATUS timed out & etc. If i run the php file from command line like this 'php scan.php' it works perfectly if i run it from browser i got timed out. I have already set www-data user to sudoers but also tried it with setting pi user as apache user - same thing. I searched for hours in google, forums, stackoverflow and only thing similar to my problem is this one: https://github.com/billz/raspap-webgui/issues/126, but unfortunately what i got from there is that this guy solved the problem by replacing apache with lighttpd and really want to understand how apache is stopping wpa_cli from working correctly. If you have any ideas will be great, thanks :geek:

Return to “Networking and servers”