php-general Digest 25 Mar 2013 14:01:04 -0000 Issue 8173

Topics (messages 320665 through 320674):

Re: application level variable file
        320665 by: Daniel Brown
        320666 by: Sebastian Krebs
        320667 by: Stuart Dallas
        320668 by: David OBrien
        320669 by: Jim Giner
        320670 by: Samuel Lopes Grigolato

Re: Extremely slow cURL curl_exec execution/response with 5.4.13
        320671 by: Jan Ehrhardt
        320672 by: Rodrigo MourĂ£o

php, openssl and GOST ciphers
        320673 by: Eugene M. Zheganin

target question
        320674 by: Jim Giner

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Fri, Mar 22, 2013 at 10:22 AM,  <inu...@gmail.com> wrote:
> I am very new to the PHP application and would like to create a new project.
> I would like to have a file to save my application level variable and
> functions.
>
> I would like to know does PHP have any default file name and file path for
> this file like Web.config file for ASP.Net and Application.cfm for
> ColdFusion?
>
> Your help and information is great appreciated,

    No.

    For more info: http://php.net/manual

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

--- End Message ---
--- Begin Message ---
2013/3/22 <inu...@gmail.com>

> I am very new to the PHP application and would like to create a new
> project.
> I would like to have a file to save my application level variable and
> functions.
>
> I would like to know does PHP have any default file name and file path for
> this file like Web.config file for ASP.Net and Application.cfm for
> ColdFusion?
>
> Your help and information is great appreciated,
>

Do you mean "index.php" and "Document-Root"? Both is defined/configured by
the webserver


>
> Regards,
>
> Inungh
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
github.com/KingCrunch

--- End Message ---
--- Begin Message ---
On 22 Mar 2013, at 14:22, <inu...@gmail.com> wrote:

> I am very new to the PHP application and would like to create a new project.
> I would like to have a file to save my application level variable and
> functions.
> 
> I would like to know does PHP have any default file name and file path for
> this file like Web.config file for ASP.Net and Application.cfm for
> ColdFusion?

No. Without the use of extensions, PHP follows a shared-nothing architecture.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
On Fri, Mar 22, 2013 at 10:26 AM, Stuart Dallas <stu...@3ft9.com> wrote:

> On 22 Mar 2013, at 14:22, <inu...@gmail.com> wrote:
>
> > I am very new to the PHP application and would like to create a new
> project.
> > I would like to have a file to save my application level variable and
> > functions.
> >
> > I would like to know does PHP have any default file name and file path
> for
> > this file like Web.config file for ASP.Net and Application.cfm for
> > ColdFusion?
>
> You can in the php.ini file use this

http://php.net/manual/en/ini.core.php#ini.auto-prepend-file

*auto_prepend_file*
string<http://www.php.net/manual/en/language.types.string.php>

Specifies the name of a file that is automatically parsed before the main
file. The file is included as if it was called with the
require<http://www.php.net/manual/en/function.require.php> function,
so include_path <http://www.php.net/manual/en/ini.core.php#ini.include-path> is
used.
The special value *none* disables auto-prepending.

--- End Message ---
--- Begin Message ---
On 3/22/2013 10:22 AM, inu...@gmail.com wrote:
I am very new to the PHP application and would like to create a new
project.
I would like to have a file to save my application level variable and
functions.

I would like to know does PHP have any default file name and file path for
this file like Web.config file for ASP.Net and Application.cfm for
ColdFusion?

Your help and information is great appreciated,

Regards,

Inungh
Why not try reading the php manual to get an understanding of how PHP works first?? You obviously haven't learned about the include/require statements and what they can do.
--- End Message ---
--- Begin Message ---
I highly suggest you to read some begginers book or the
php.net/manualbefore trying to implement other technologies concepts
with PHP. That is
because you WILL find some "tricks" to do what you want, and you'll think
PHP is a big chunk of bad smelling code, a totally wrong concept.

Forget momentarily the roots and learn PHP with a clear space on your RAM.

Cheers!


On Fri, Mar 22, 2013 at 12:13 PM, Jim Giner <jim.gi...@albanyhandball.com>wrote:

> On 3/22/2013 10:22 AM, inu...@gmail.com wrote:
>
>> I am very new to the PHP application and would like to create a new
>> project.
>> I would like to have a file to save my application level variable and
>> functions.
>>
>> I would like to know does PHP have any default file name and file path for
>> this file like Web.config file for ASP.Net and Application.cfm for
>> ColdFusion?
>>
>> Your help and information is great appreciated,
>>
>> Regards,
>>
>> Inungh
>>
> Why not try reading the php manual to get an understanding of how PHP
> works first??  You obviously haven't learned about the include/require
> statements and what they can do.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Jan Ehrhardt in php.general (Fri, 22 Mar 2013 10:40:56 +0100):
>Ron in php.general (Thu, 21 Mar 2013 17:25:39 -0500):
>>When upgrading from 5.4.12 to 5.4.13, cURL curl_exec calls are taking 
>>something like 700ms to complete. (Even to a file on the same server.) 
>>If I replace php_curl.dll library with the version from 5.4.12 all works 
>>as expected. Anyone else having issues or have suggestions as to how to 
>>debug/proceed?
>>
>>PHP 5.4.13 on Apache 2.4.4 on Windows Server 2008 R2
>
>Could you try the php_curl.dll from my build? See
>http://www.apachelounge.com/viewtopic.php?t=5233
>for the right version.

Be sure to put the ???eay32.dll's (in fact all the dll's in the zips) in
the directory with php-cgi.exe or else it probably will not load (due to
differences in the ssl-versions of the stock PHP and my builds).

Jan

--- End Message ---
--- Begin Message ---
Hi,

The problem could be not related to php/curl, but related with dns resolve.
Try to use the IP address.

Regards.
Rodrigo Mourao
Webjump - www.webjump.com.br

--- End Message ---
--- Begin Message ---
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 <f...@bar.com>", "Subject" => "Foo Bar"));

if (!$res) {
     while ($msg = openssl_error_string())
          echo $msg . "<br />\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<br /> error:0606F076:digital envelope routines:EVP_PKCS82PKEY:unsupported private key algorithm<br />
error:0907B00D:PEM routines:PEM_READ_BIO_PRIVATEKEY:ASN1 lib<br />
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 =>  (0x00007fff42455000)
            libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f1077404000)
            libresolv.so.2 => /lib/libresolv.so.2 (0x00007f10771ee000)
            librt.so.1 => /lib/librt.so.1 (0x00007f1076fe5000)
            libmcrypt.so.4 => /usr/lib/libmcrypt.so.4 (0x00007f1076db3000)
            libltdl.so.7 => /usr/lib/libltdl.so.7 (0x00007f1076baa000)
            libdl.so.2 => /lib/libdl.so.2 (0x00007f10769a5000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f107671d000)
            libz.so.1 => /usr/lib/libz.so.1 (0x00007f1076506000)
            libpng12.so.0 => /lib/libpng12.so.0 (0x00007f10762df000)
            libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00007f10760bc000)
libcrypto.so.1.0.0 => /usr/local/openssl/lib/libcrypto.so.1.0.0 (0x00007f1075ce2000) libssl.so.1.0.0 => /usr/local/openssl/lib/libssl.so.1.0.0 (0x00007f1075a78000) libmysqlclient.so.16 => /usr/lib/libmysqlclient.so.16 (0x00007f107565b000)
            libpthread.so.0 => /lib/libpthread.so.0 (0x00007f107543f000)
            libnsl.so.1 => /lib/libnsl.so.1 (0x00007f1075226000)
            libm.so.6 => /lib/libm.so.6 (0x00007f1074fa4000)
            libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f1074c53000)
            libc.so.6 => /lib/libc.so.6 (0x00007f10748f0000)
            /lib64/ld-linux-x86-64.so.2 (0x00007f1077646000)

Thanks.
Eugene.


--- End Message ---
--- Begin Message ---
target as in the form attribute

In my appl devl I utilize an extra window when my current form is asked to generate a pdf report. Works well since that way the user can generate one report into a new window, read it, close it, and still have the reports menu in front of him/her and generate a 2nd report.

I'm experiencing a problem tho and I'm guessing it's associated with ie9 or FPDF. In my reports menu form, when I click on a button that will generate a pdf, I alter the form's target to create a new window. This used to work last fall, but since then I have a new laptop running ie9, not 8. The target changing js logic is working as far as I can see (alerts in my js) but the effect is not there. Instead of a new window, the pdf opens up in the same window where the menu was and so when the user does a back he ends up going up one too many levels and has to re-request the reports menu.

Didn't have this much trouble originally setting this up as I'm having now trying to debug this. I'm using the FPDF extension/class to generate my pdfs - made no recent changes there. Also my concept works very well still in a simple html document that has only two buttons on it which I created today to test a theory. That is - maybe it's not just IE9, but FPDF.

Anyone have any experience in this area?

--- End Message ---

Reply via email to