Open kwaknet01 opened 5 years ago
Not sure that php5-fpm is installed and configured in the nginx configuration file to support PHP
how can i update nginx configuration file?
i also want to add my custom dashboard. don't know how set settings or where to edit nginx config file.
add to portal config.? is this correct? location ~* .php$ { fastcgi_pass unix:/run/php/php7.0-fpm.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; }
Search google to add php support to nginx (not related to this project)
What is your custom dashboard ? Look at the configuration of NGINX and daloradius and adapt it for a new folder/url
thanks sir.
i have python script to read the rfid card uid
`#main.py
!/usr/bin/python
import time import RPi.GPIO as GPIO import MFRC522 import os, sys import string from random import *
Create an object of the class MFRC522
GPIO.setwarnings(False) MIFAREReader = MFRC522.MFRC522()
form = cgi.FieldStorage()
Welcome message
print("Tap Card Please")
print("---------------")
This loop checks for chips. If one is near it will get the UID
try:
while True:
`
php script execute python
<?php $command = escapeshellcmd('sudo /usr/bin/python /home/pi/MFRC522-python/main.py'); $output = shell_exec($command); echo "$output"; ?>
the code works and prints the UID.
i want to use the UID of the RFID card use as Username in index.html. i've tried but it doesnt work. ignore comment.