Re: [PHP] php, openssl and GOST ciphers
Hi. On 28.03.2013 11:43, czir...@gmail.com wrote: My suggestion is to ensure all the paths to what you use are valid This should help: var_dump('file://'.realpath('./p12.pem')); Does that and the rest of the files Exists? I do hope these files are not in your document root Thanks for your help, but the thing is, this is a serious bug in modules using openssl, for example in ext/openssl itselt and in ext/curl. They both don't honor the openssl config file, thus they only use some hardcoded defaults. This can be easily fixed by calling OPENSSL_config(NULL) in their code (and the default config will be parsed) or calling OPENSSL_config() with a getenv() subcall to invoke a config from the ENV, but the thing is that this isn't that simple - calling this function twice in a row (for example in curl and in openssl) breaks openssl autoconfiguration. Various bug reports exist, but still, this workaround didn't make it into the official code set. Right now I'm using custom patch for curl, which initializes the config, and then openssl module can also use it. Those who don't use curl can use the trick I described above and patch ext/openssl.c. Eugene. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Compiler for the PHP code
As suggested look at APC, although I expect the problem is not with php but how you wrote things, it could be database related. If you need to compile php to make things faster, you have a problem outside of php Curt. On Mar 19, 2013, at 4:46 AM, Kevin Peterson wrote: > My webcode written in PHP and it is running in the interpreted way. My > problem is it is not giving the desired performance so want to try the > compiler if any. > Please suggest if we have any compiler option available for the PHP code and > more important is this new option. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php, openssl and GOST ciphers
My suggestion is to ensure all the paths to what you use are valid This should help: var_dump('file://'.realpath('./p12.pem')); Does that and the rest of the files Exists? I do hope these files are not in your document root Curt. -- Resistance is futile On Mar 22, 2013, at 12:35 PM, "Eugene M. Zheganin" wrote: > Hi. > > I'm trying to sign an S/MIME with PHP, using a pair of GOST-encrypted > certificate and a private key. > > When using openssl itself from a console everything is fine: > > /usr/local/openssl/bin/openssl cms -sign -in file.txt -out signedfile.txt > -signer p12.pem > (signedfile.txt is created) > > /usr/local/openssl/bin/openssl cms -verify -in signedfile.txt -out > signedddata.txt -no_signer_cert_verify -issuer_checks -ignore_critical > Verification successful > > When using PHP code I'm kinda stuck: > > $res = openssl_pkcs7_sign("file.txt", "phpsignedfile.txt", > 'file://'.realpath('./p12.pem'), 'file://'.realpath('./p12.pem'), array("To" > => "f...@bar.com", "From: FooBar ", "Subject" => "Foo Bar")); > > if (!$res) { > while ($msg = openssl_error_string()) > echo $msg . "\n"; > echo "Failed to sign.\n"; exit; > } > > I get: > > # /usr/local/php/bin/php sign-clear.php > PHP Warning: openssl_pkcs7_sign(): error getting private key in > /root/tests/sign-clear.php on line 3 > error:0609E09C:digital envelope routines:PKEY_SET_TYPE:unsupported > algorithm > error:0606F076:digital envelope routines:EVP_PKCS82PKEY:unsupported private > key algorithm > error:0907B00D:PEM routines:PEM_READ_BIO_PRIVATEKEY:ASN1 lib > Failed to sign. > > The 'error getting private key' is all the time here, except for when it > really cannot be loaded I get the 'no start line error'. So this output > really looks like PHP openssl module cannot find a proper cipher. > > How do I tell PHP that this is a GOST cipher ? I'm telling this to openssl > either using a config file, or using a direct '-engine gost' option. Is there > a way to tell PHP the same thing ? > > I have indeed a PHP compiled and linked to a GOST-enabled openss 1.0.1e > (openssl module was built with PHP together): > > # /usr/local/openssl/bin/openssl ciphers | grep -i GOST > ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:SRP-DSS-AES-256-CBC-SHA:SRP-RSA-AES-256-CBC-SHA:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-DSS-CAMELLIA256-SHA:GOST2001-GOST89-GOST89:GOST94-GOST89-GOST89:ECDH-RSA-AES256-GCM-SHA384:ECDH-ECDSA-AES256-GCM-SHA384:ECDH-RSA-AES256-SHA384:ECDH-ECDSA-AES256-SHA384:ECDH-RSA-AES256-SHA:ECDH-ECDSA-AES256-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:CAMELLIA256-SHA:PSK-AES256-CBC-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:SRP-DSS-3DES-EDE-CBC-SHA:SRP-RSA-3DES-EDE-CBC-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:ECDH-RSA-DES-CBC3-SHA:ECDH-ECDSA-DES-CBC3-SHA:DES-CBC3-SHA:PSK-3DES-EDE-CBC-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:SRP-DSS-AES-128-CBC-SHA:SRP-RSA-AES-128-CBC-SHA:DHE-DSS-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-DSS-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:DHE-RSA-SEED-SHA:DHE-DSS-SEED-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-DSS-CAMELLIA128-SHA:ECDH-RSA-AES128-GCM-SHA256:ECDH-ECDSA-AES128-GCM-SHA256:ECDH-RSA-AES128-SHA256:ECDH-ECDSA-AES128-SHA256:ECDH-RSA-AES128-SHA:ECDH-ECDSA-AES128-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:SEED-SHA:CAMELLIA128-SHA:IDEA-CBC-SHA:PSK-AES128-CBC-SHA:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:ECDH-RSA-RC4-SHA:ECDH-ECDSA-RC4-SHA:RC4-SHA:RC4-MD5:PSK-RC4-SHA:EDH-RSA-DES-CBC-SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DES-CBC-SHA:EXP-DES-CBC-SHA:EXP-RC2-CBC-MD5:EXP-RC4-MD5 > > (notice it's the default config output) > > # ldd /usr/local/php/bin/php >linux-vdso.so.1 => (0x7fff42455000) >libcrypt.so.1 => /lib/libcrypt.so.1 (0x7f1077404000) >libresolv.so.2 => /lib/libresolv.so.2 (0x7f10771ee000) >librt.so.1 => /lib/librt.so.1 (0x7f1076fe5000) >libmcrypt.so.4 => /usr/lib/libmcrypt.so.4 (0x7f1076db3000) >libltdl.so.7 => /usr/lib/libltdl.so.7 (0x7f1076baa000) >libdl.so.2 => /lib/libdl.so.2 (0x7f10769a5000) >libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x7f107671d000) >libz.so.1 => /usr/lib/libz.so.1 (0x7f1076506000) >libpng12.so.0 => /lib/libpng12.so.0 (0x7f10762df000) >libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x7f10760bc000) >libcrypto.so.1.0.0 => /usr/local/openssl/lib/libcrypto.so.1.0.0 > (0x7f1075ce2000) >libssl.so.1.0.0 => /usr/local/openssl/lib/libss
Re: [PHP] magic_quotes_gpc stays on even when disabled in php.ini
I think ";magic_quotes_gpc = Off" should be "magic_quotes_gpc = Off" Then restart apache/php or whatever it is your running Regards, Daniel Fenn On Thu, Mar 28, 2013 at 11:39 AM, Madan Thapa wrote: > Hi, > > I installed php 5.3.23 recently on a CentOS sever and magic_quotes_gpc > stays on even when disabled in php.ini > > > root@server [~]# grep magic_quo /usr/local/php5.3/lib/php.ini > ; magic_quotes_gpc > ;magic_quotes_gpc = Off > magic_quotes_runtime = Off > magic_quotes_sybase = Off > root@server [~]# > > > > > php info results: > > magic_quotes_gpcOnOnmagic_quotes_runtimeOffOffmagic_quotes_sybaseOffOff > > > > Is anyone aware of such issues for php 5.3.23 ? or any where i might look > at in troubleshooting this? > > > Please advise. > > Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] magic_quotes_gpc stays on even when disabled in php.ini
Hi, I installed php 5.3.23 recently on a CentOS sever and magic_quotes_gpc stays on even when disabled in php.ini root@server [~]# grep magic_quo /usr/local/php5.3/lib/php.ini ; magic_quotes_gpc ;magic_quotes_gpc = Off magic_quotes_runtime = Off magic_quotes_sybase = Off root@server [~]# php info results: magic_quotes_gpcOnOnmagic_quotes_runtimeOffOffmagic_quotes_sybaseOffOff Is anyone aware of such issues for php 5.3.23 ? or any where i might look at in troubleshooting this? Please advise. Thank you
[PHP] Re: wrong open_basedir warning
On 27.3.2013 17:00, Markus Falb wrote: > Warning: file_exists(): open_basedir restriction in effect. > File(/usr/share/wordpress/wp-config.php) is not within the allowed > path(s): (/var/www/blog:/usr/share/wordpress) in > /var/www/blog/www/test.php on line 2 I found it out. /usr/share/wordpress/wp-config.php is a symlink to /etc/wordpress/wp-config and /etc/wordpress is outside the open_basedirs. -- Markus Falb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] wrong open_basedir warning
in my test.php I put file_exists('/usr/share/wordpress/wp-config.php'); this throws an error Warning: file_exists(): open_basedir restriction in effect. File(/usr/share/wordpress/wp-config.php) is not within the allowed path(s): (/var/www/blog:/usr/share/wordpress) in /var/www/blog/www/test.php on line 2 The configuration of my apache virtual host says php_admin_value open_basedir '/var/www/blog:/usr/share/wordpress' What is going on? /usr/share/wordpress/wp-config.php is definitily within /usr/share/wordpress, isnt it? -- Markus Falb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] __autoload not work in cgi?
__autoload is kinda old. It allows you a single autoload callback and so on. You can google on this topic to find more details . Sorin! On 03/27/2013 04:40 PM, Radek Krejča wrote: spl_autoload_register is working. Thank you. So - __autoload isnt already supported? Radek Did you tried with spl_autoload_register ? http://php.net/manual/en/function.spl-autoload-register.php Kind regards,
RE: [PHP] __autoload not work in cgi?
spl_autoload_register is working. Thank you. So - __autoload isnt already supported? Radek Did you tried with spl_autoload_register ? http://php.net/manual/en/function.spl-autoload-register.php Kind regards,
Re: [PHP] __autoload not work in cgi?
Did you tried with spl_autoload_register ? http://php.net/manual/en/function.spl-autoload-register.php Kind regards, Sorin! On Wed, Mar 27, 2013 at 4:28 PM, Radek Krejča wrote: > Hello, > > I have installed lighttp with php support. It looks like, that function > __autoload doesnt work in cgi mode (in the manual I only see, that it > should not work in cli mode). > > I have this code fragment: > > function __autoload($class) > { > if(File_Exists(PATH_EXTRAS_CLASSES.$class.".php")) > { > require_once(PATH_EXTRAS_CLASSES.$class.".php"); > } > } > $CNeplatici = New CNeplatici(); > > And I get message: > 2013-03-27 15:21:14: (mod_fastcgi.c.2676) FastCGI-stderr: PHP Fatal error: > Class 'CNeplatici' not found in > /usr/local/www/data/sys/web/templates_p/neplatici.php on line 12 > (this code is working on other project, but on apache). > > And if I switch to: > > require_once(PATH_EXTRAS_CLASSES."CNeplatici.php"); > $CNeplatici = New CNeplatici(); > It works. > > I have this lighttp configuration: > > fastcgi.server = ( ".php" => >( "php-local" => > ( >"socket" => "/tmp/php-fastcgi-1.socket", >"bin-path" => "/usr/local/bin/php-cgi", >"max-procs" => 1, >"broken-scriptfilename" => "enable", > ) >), > ) > > This is cgi configuration not cli isnt it? I thing that autoload should > work. > > Thank you > Radek > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Badea Sorin (unu.sorin) sorin.bade...@gmail.com unu_so...@yahoo.com Pagina personala: http://badeasorin.com
[PHP] __autoload not work in cgi?
Hello, I have installed lighttp with php support. It looks like, that function __autoload doesnt work in cgi mode (in the manual I only see, that it should not work in cli mode). I have this code fragment: function __autoload($class) { if(File_Exists(PATH_EXTRAS_CLASSES.$class.".php")) { require_once(PATH_EXTRAS_CLASSES.$class.".php"); } } $CNeplatici = New CNeplatici(); And I get message: 2013-03-27 15:21:14: (mod_fastcgi.c.2676) FastCGI-stderr: PHP Fatal error: Class 'CNeplatici' not found in /usr/local/www/data/sys/web/templates_p/neplatici.php on line 12 (this code is working on other project, but on apache). And if I switch to: require_once(PATH_EXTRAS_CLASSES."CNeplatici.php"); $CNeplatici = New CNeplatici(); It works. I have this lighttp configuration: fastcgi.server = ( ".php" => ( "php-local" => ( "socket" => "/tmp/php-fastcgi-1.socket", "bin-path" => "/usr/local/bin/php-cgi", "max-procs" => 1, "broken-scriptfilename" => "enable", ) ), ) This is cgi configuration not cli isnt it? I thing that autoload should work. Thank you Radek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: MOSSCon in Louisville in May! Submit your proposal this week!
You can unsubscribe. On Wed, Mar 27, 2013 at 3:07 PM, Jim Giner wrote: > On 3/27/2013 3:35 AM, John List wrote: > >> Preparations are in full swing for the very first Midwest Open Source >> Software Conference (MOSSCon), to be held in Louisville on May 18-19. >> Your help in spreading the word and helping us fill out our schedule of >> presentations and workshops would be appreciated. >> >> This is going to be a great networking event for the whole region! >> Louisville is in such a central location, it can draw from a very wide >> area. >> >> We have a great venue: the University of Louisville's Student Activities >> Center, with several large halls, a number of smaller meeting rooms, and >> plenty of exhibit space available for groups and businesses to make >> their presence known. >> >> We are working on a broadly based "Open" theme, that can include open >> source hardware, open data, etc., as well as the full gamut of open >> source software. >> >> We already have some super presentations lined up. But there are still >> plenty of pieces that need to come together. Right now we are >> concentrating on filling out our schedule with more presentations and >> workshops. And soliciting sponsors. >> >> If you're involved with Open Source (or open anything) you definitely >> want to be a part of this. I encourage you to consider speaking or doing >> a presentation or workshop on a subject in your area of interest and/or >> expertise. >> >> Check out the conference website at http://mosscon.org/. Click on "Be a >> Speaker" for details on submitting your proposal. >> >> But get to it! The deadline for submitting your preliminary proposal is >> this Friday, March 29! >> >> http://mosscon.org/ >> >> Spread the word and submit your proposal. >> >> Thanks, >> >> John Hicks >> >> pls lose my address. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Badea Sorin (unu.sorin) sorin.bade...@gmail.com unu_so...@yahoo.com Pagina personala: http://badeasorin.com
[PHP] Re: MOSSCon in Louisville in May! Submit your proposal this week!
On 3/27/2013 3:35 AM, John List wrote: Preparations are in full swing for the very first Midwest Open Source Software Conference (MOSSCon), to be held in Louisville on May 18-19. Your help in spreading the word and helping us fill out our schedule of presentations and workshops would be appreciated. This is going to be a great networking event for the whole region! Louisville is in such a central location, it can draw from a very wide area. We have a great venue: the University of Louisville's Student Activities Center, with several large halls, a number of smaller meeting rooms, and plenty of exhibit space available for groups and businesses to make their presence known. We are working on a broadly based "Open" theme, that can include open source hardware, open data, etc., as well as the full gamut of open source software. We already have some super presentations lined up. But there are still plenty of pieces that need to come together. Right now we are concentrating on filling out our schedule with more presentations and workshops. And soliciting sponsors. If you're involved with Open Source (or open anything) you definitely want to be a part of this. I encourage you to consider speaking or doing a presentation or workshop on a subject in your area of interest and/or expertise. Check out the conference website at http://mosscon.org/. Click on "Be a Speaker" for details on submitting your proposal. But get to it! The deadline for submitting your preliminary proposal is this Friday, March 29! http://mosscon.org/ Spread the word and submit your proposal. Thanks, John Hicks pls lose my address. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What is an easiest way to port a PHP Web App to Android?
Kevin Peterson wrote: >I have a web application written in PHP. It have been running for >several years. Now I want to run it as a stand-alone application on an >Android smartphone or tablet. How can I do it? There are simple web servers you can run on Android, and also standalone PHP parsers too (i'm using one myself - search the play store for php server). Is that the sort of thing you wanted? Thanks, Ash http://www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MOSSCon in Louisville in May! Submit your proposal this week!
Preparations are in full swing for the very first Midwest Open Source Software Conference (MOSSCon), to be held in Louisville on May 18-19. Your help in spreading the word and helping us fill out our schedule of presentations and workshops would be appreciated. This is going to be a great networking event for the whole region! Louisville is in such a central location, it can draw from a very wide area. We have a great venue: the University of Louisville's Student Activities Center, with several large halls, a number of smaller meeting rooms, and plenty of exhibit space available for groups and businesses to make their presence known. We are working on a broadly based "Open" theme, that can include open source hardware, open data, etc., as well as the full gamut of open source software. We already have some super presentations lined up. But there are still plenty of pieces that need to come together. Right now we are concentrating on filling out our schedule with more presentations and workshops. And soliciting sponsors. If you're involved with Open Source (or open anything) you definitely want to be a part of this. I encourage you to consider speaking or doing a presentation or workshop on a subject in your area of interest and/or expertise. Check out the conference website at http://mosscon.org/. Click on "Be a Speaker" for details on submitting your proposal. But get to it! The deadline for submitting your preliminary proposal is this Friday, March 29! http://mosscon.org/ Spread the word and submit your proposal. Thanks, John Hicks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php