Re: webserver with PHP support

2024-04-26 Thread Alexey
Thanks to all.
Yes, I know about php-fpm, but bozohttpd seems not to be able
to support it. I'm just playing. No high load, no production environment.

> You can do PHP with cgi but its far more efficient to use the php-fpm
> package which runs PHP using the fastCGI protocol which is supported by
> most web servers. I use apache, but any HTTP server supporting the
> protocol should work.
>
> Mike

-- 
best regards, Alexey
https://alexeyka.zantsev.com/



webserver with PHP support

2024-04-23 Thread Alexey
Hello list,
tell me please what's the difference between

/usr/pkg/libexec/cgi-bin/php
and
/usr/pkg/bin/php

I mean that this works:
/usr/libexec/httpd -b -U nobody -C .php
/usr/pkg/libexec/cgi-bin/php /var/www/

and this does not:
/usr/libexec/httpd -b -U nobody -C .php /usr/pkg/bin/php /var/www/

-- 
best regards, Alexey
https://alexeyka.zantsev.com/



Re: Ged USB VID/PID from the scsi device name

2017-11-28 Thread Samorukov,Alexey

>> 
>> Is it completely cosmetic?
> 
> The alternative would be to probe with different commands (SAT-16, SAT-12,
> vendor proprietary, ...) until you get a result. But what if the interface
> chip locks up when being "probed" or when a command has a different
> meaning ("destroy disk") ?

This is very likely the case - sending random scsi commands to disk is not good 
idea at all. Moreover, some buggy chipsets hangs on SAT16 but works on SAT12, 
this is why database is exists.
> 
> Apparently smartmontools tries to avoid these questions by identifying
> the USB-SATA bridge first.
> 
Correct.

Re: Ged USB VID/PID from the scsi device name

2017-11-28 Thread Samorukov,Alexey


> On 28 Nov 2017, at 08:42, Martin Husemann <mar...@duskware.de> wrote:
> 
> On Mon, Nov 27, 2017 at 05:56:11PM +0100, Samorukov,Alexey wrote:
>> Smartmontools maintains database with usb vid/pid + fw version to
>> find the best match. 
> 
> But for what?
> 
> The SMART values supervised by smartmontools should not depend on any of
> this.
> 
> Is it completely cosmetic?

Of course not. Devices under ATA->USB bridges are _not_ real scsi. So to get 
smart you have to use tunneling protocol, which is different for different 
chipsets.





Re: Ged USB VID/PID from the scsi device name

2017-11-27 Thread Samorukov,Alexey
> 
> s...@os2.kiev.ua ("Samorukov,Alexey") writes:
> 
>> Is it possible to get info about parent device type/bus using some IOCTL or 
>> its not exposed to the userland? 
> 
> The SCSI driver doesn't expose to what backend it is attached to.
> 
> You could query autoconfig using 'drvctl' to find out about the
> device hierarchy, but that obviously relies on driver internals
> that may change.
> 
> I wonder why smartmontools even needs to know wether the SCSI device
> is umass or something else ? Any information about the disk should
> be accessible by SCSI commands.

Thank you for reply, i will take a look. Obviously SCSI commands are not 
exposing all information. Let me explain.

When you connecting USB->SATA adapter (or portable usb disk, what is the same) 
there are number of protocols to tunnel ATA (and smart) information. Most used 
is SAT, but many using own protocols, e.g. jmicron, sunplus or cypress. Also 
some devices supports SAT-12 only and others (most) - SAT-16. Some bridges are 
not exposing this data at all.

Smartmontools maintains database with usb vid/pid + fw version to find the best 
match. 



Ged USB VID/PID from the scsi device name

2017-11-26 Thread Samorukov,Alexey
Hi, 

I am trying to add usb support to the smartmontools/netbsd and to make it work 
correctly i need to get USB device information using scsi device name. 

E.g. my USB disk is /dev/rsd0d and i would like to get information about parent 
usb device. So far i only see message in the kernel log, e.g.

   scsibus0 at umass0: 2 targets, 1 lun 
per target
   sd0 at scsibus0 target 0 lun 0: 
 disk fixed

Is it possible to get info about parent device type/bus using some IOCTL or its 
not exposed to the userland?