pkg_add -r sane-backends pkg_add -r sane-frontends pkg_add -r git
The following programs must succeed, because phpSANE is based on them.
sane-find-scanner -q
scanimage -L
su -m www -c 'scanimage --test'
cd /var/www git clone https://sz9i.net/git/phpsane.git
mkdir /var/www/phpsane cd /var/www fetch https://sz9i.net/redmine/attachments/download/94/phpSANE-0.7.0.zip unzip phpSANE-0.7.0.zip
chown -R root:www phpsane/tmp phpsane/output chmod 775 phpsane/tmp phpsane/output
<Location /phpsane> DirectoryIndex phpsane.php Require group Admins Users Faktura </Location>
Of course you'll ned to adjust the device name to match the USB port your scanner uses.
pw groupadd -n scan pw groupmod scan -m www pw groupadd -n printscan pw groupmod printscan -m www service apache22 restart
# /etc/devfs.rules [devfsrules_jail_unhide_usb_printer_and_scanner=30] add include $devfsrules_hide_all add include $devfsrules_unhide_basic add include $devfsrules_unhide_login add path 'ulpt*' mode 0660 group printscan unhide add path 'unlpt*' mode 0660 group printscan unhide add path 'ugen2.8' mode 0660 group printscan unhide # Scanner (ugen2.8 is a symlink to usb/2.8.0) add path usb unhide add path usbctl unhide add path 'usb/2.8.0' mode 0660 group printscan unhide [devfsrules_jail_unhide_usb_scanner_only=30] add include $devfsrules_hide_all add include $devfsrules_unhide_basic add include $devfsrules_unhide_login add path 'ugen2.8' mode 0660 group scan unhide # Scanner add path usb unhide add path usbctl unhide add path 'usb/2.8.0' mode 0660 group scan unhide