Im sorry but I think its a squid related issue than php I tried also with simple bash script with read and echo > gg.txt And the output file should contain string but it dont for some reason Yuri Voinov wrote > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > I suggest better to ask this on any php forum.... > > 07.03.16 1:59, Baselsayeh пишет: >> Php wont get stdin for some reason >> Squid wont pass any parameter >> >> >> Baselsayeh wrote >>> im using php just for testing. >>> my script after editing: >>> http://pastebin.com/AvvZRP9s <http://pastebin.com/AvvZRP9s> >>> and what should squid expect from php script starting? >>> Amos Jeffries wrote >>>> On 6/03/2016 8:47 a.m., Baselsayeh wrote: >>>>> hello >>>>> im using external_acl_type with my php script >>>>> squid config: >>>> >>>>> external_acl_type session children-max=1 %SRC >>>>> /home/basel/Desktop/php/php.php -k jj >>>>> acl session_login external session LOGIN >>>>> acl session_is_active external session CHECK >>>>> acl clicked_login_url url_regex -i ^http://www.w3schools.com/ >>>>> http_access allow clicked_login_url session_login >>>>> http_access deny !session_is_active >>>>> deny_info 511:/etc/squid/splash.html session_is_active >>>> >>>> >>>>> php script: http://pastebin.com/HNL3T1wW >>>>> <http://pastebin.com/HNL3T1wW> >>>>> >>>>> nothing gets to php stdin or null values >>>>> so whats the problem? >>>>> >>>> >>>> >>>> Lets see: >>>> >>>> #1 - using PHP. Which is a terrible for Squid helpers. The PP >>>> interpreters are optimized for short single runs, Squid helpers a >>>> long-term daemons. >>>> >>>> #2 - outputting empty line on startup. Will result in (best case) >>>> helpers dying constantly with "unexpected response" errors by Squid, or >>>> (worst case) incorrect alignment between Squid queries and the helper >>>> responses. Resulting in incorrect HTTP behaviour. >>>> >>>> #3 - infinite loop. while(1) without any termination/exit/break >>>> condition will result in Squid not being able to shutdown the helper >>>> for >>>> reconfigure and log rotation. Eventually blocking any further traffic >>>> through the proxy. >>>> >>>> #4 - opening a new stdin FD on each infinite loop cycle. Resulting in a >>>> vast number of FD churning over. see #3 >>>> >>>> #4b - resource leaks. Not closing stdin pointers allocated in #4. see >>>> #3 >>>> >>>> #5 - using the results of fgets() without checking for existence first. >>>> Passing EOF/false/null to rtrim() will produce an object. see #3 >>>> >>>> #6 - using integer-converter comparison to compare strings. ($gg == >>>> ""). >>>> Meet the '===' family of operators in PHP they are your friends. >>>> >>>> #7 - using stored-value test on a nil object. Meet isempty(), isset(), >>>> is_null() in PHP they are your friends. >>>> >>>> ... probably more, but less obvious. >>>> >>>> Amos >>>> >>>> _______________________________________________ >>>> squid-users mailing list >> >>>> squid-users@.squid-cache >> >>>> http://lists.squid-cache.org/listinfo/squid-users >> >> >> >> >> >> -- >> View this message in context: > http://squid-web-proxy-cache.1019090.n4.nabble.com/external-acl-type-wont-work-tp4676457p4676470.html >> Sent from the Squid - Users mailing list archive at Nabble.com. >> _______________________________________________ >> squid-users mailing list >> > squid-users@.squid-cache >> http://lists.squid-cache.org/listinfo/squid-users > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQEcBAEBCAAGBQJW3JPoAAoJENNXIZxhPexGMn0IAIOUIu7uCFj6+dfLmjteZG8Q > MND9J76bnFcx3/4RlW7G5LR3O0jXB0lkCWpLYM0MxsGTHN9JeaSKM/GlZwPSFcUo > ideTFzB1aa0hHDKz1HiWN3U0low5m9tBbC1T1GHZzKv+nNlGAyCMY8LMnm9cms7a > fc6ylTCFd1LDIoIteiBm8k+RH2pJHCr3FHoFC3F5tzstnyOWlaYZEdxLs0i17ll4 > /z8NcnbwAay5fScjM02Shb3kK8xEJ8A7HjtNwtVF3t03LtRe/tiVABD4yH2kp4+K > ARDqI2lFzzXJxLMPKFZZpJ+if+l5S9x3q+pvcXxznT752oglpwPGI3jnRipMBLc= > =RdhK > -----END PGP SIGNATURE----- > > > _______________________________________________ > squid-users mailing list > squid-users@.squid-cache > http://lists.squid-cache.org/listinfo/squid-users > > > 0x613DEC46.asc (2K) > <http://squid-web-proxy-cache.1019090.n4.nabble.com/attachment/4676471/0/0x613DEC46.asc> -- View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/external-acl-type-wont-work-tp4676457p4676472.html Sent from the Squid - Users mailing list archive at Nabble.com. _______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users