php-general Digest 12 Oct 2011 04:20:38 -0000 Issue 7515

Topics (messages 315227 through 315245):

Re: Multiple SQLite statements
        315227 by: David Robley
        315228 by: Tim Streater
        315229 by: David Robley
        315230 by: Tim Streater

newline and return issues in string
        315231 by: admin.buskirkgraphics.com
        315232 by: Bastien Koert
        315233 by: admin.buskirkgraphics.com
        315234 by: Richard Quadling
        315235 by: Fatih P.
        315236 by: Al
        315237 by: admin.buskirkgraphics.com
        315238 by: admin.buskirkgraphics.com
        315239 by: Al

Re: files outside of documentRoot
        315240 by: Ricardo Martinez
        315241 by: Bastien Koert

Problem with base64_encode and openssl_verify
        315242 by: QI.VOLMAR QI

How to know the path of `php.ini` used when call php.exe from CLI/command-line 
in Windows 7
        315243 by: Nam Gi VU
        315244 by: Daniel Brown

Re: Server Side Include translator as PHP functions
        315245 by: tamouse mailing lists

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 ---
Tim Streater wrote:

> On 11 Oct 2011 at 03:03, Paul M Foster <pa...@quillandmouse.com> wrote:
> 
>> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote:
>>
>>> I would like to use the SQLite3 (not PDO) interface to SQLite, and I
>>> would like to be able to supply a string containing several SQL
>>> statements and have them all executed, thus saving the overhead of
>>> several calls. It *appears* that this may be how it actually works,
>>> but I wondered if anyone could confirm that.
>>
>> --
>> Cheers  --  Tim
>>>
>>
>> The docs appear to agree that this is allowed. See:
>>
>> http://us.php.net/manual/en/function.sqlite-exec.php
> 
> That's the SQLite interface, though, rather than the SQLite3 one. The
> latter just says: "Executes an SQL query ...".
> 
> --
> Cheers  --  Tim

Not to be a smartass or anything, but what about TIAS ?


Cheers
-- 
David Robley

I don't eat snails... I prefer FAST food!
Today is Prickle-Prickle, the 65th day of Bureaucracy in the YOLD 3177. 


--- End Message ---
--- Begin Message ---
On 11 Oct 2011 at 10:47, David Robley <robl...@aapt.net.au> wrote: 

> Tim Streater wrote:
>
>> On 11 Oct 2011 at 03:03, Paul M Foster <pa...@quillandmouse.com> wrote:
>>
>>> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote:
>>>
>>>> I would like to use the SQLite3 (not PDO) interface to SQLite, and I
>>>> would like to be able to supply a string containing several SQL
>>>> statements and have them all executed, thus saving the overhead of
>>>> several calls. It *appears* that this may be how it actually works,
>>>> but I wondered if anyone could confirm that.

>>> The docs appear to agree that this is allowed. See:
>>>
>>> http://us.php.net/manual/en/function.sqlite-exec.php
>>
>> That's the SQLite interface, though, rather than the SQLite3 one. The
>> latter just says: "Executes an SQL query ...".

> Not to be a smartass or anything, but what about TIAS ?

What that?

--
Cheers  --  Tim

--- End Message ---
--- Begin Message ---
Tim Streater wrote:

> On 11 Oct 2011 at 10:47, David Robley <robl...@aapt.net.au> wrote:
> 
>> Tim Streater wrote:
>>
>>> On 11 Oct 2011 at 03:03, Paul M Foster <pa...@quillandmouse.com> wrote:
>>>
>>>> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote:
>>>>
>>>>> I would like to use the SQLite3 (not PDO) interface to SQLite, and I
>>>>> would like to be able to supply a string containing several SQL
>>>>> statements and have them all executed, thus saving the overhead of
>>>>> several calls. It *appears* that this may be how it actually works,
>>>>> but I wondered if anyone could confirm that.
> 
>>>> The docs appear to agree that this is allowed. See:
>>>>
>>>> http://us.php.net/manual/en/function.sqlite-exec.php
>>>
>>> That's the SQLite interface, though, rather than the SQLite3 one. The
>>> latter just says: "Executes an SQL query ...".
> 
>> Not to be a smartass or anything, but what about TIAS ?
> 
> What that?
> 
> --
> Cheers  --  Tim

Er, Try It And See

A couple of minutes experimentation might have saved you the time of email,
wait for an answer ...


Cheers
-- 
David Robley

Mothers are the necessity of invention -- Calvin
Today is Prickle-Prickle, the 65th day of Bureaucracy in the YOLD 3177. 


--- End Message ---
--- Begin Message ---
On 11 Oct 2011 at 11:25, David Robley <robl...@aapt.net.au> wrote: 

> Tim Streater wrote:

>> On 11 Oct 2011 at 10:47, David Robley <robl...@aapt.net.au> wrote:

>>> Tim Streater wrote:

>>>> On 11 Oct 2011 at 03:03, Paul M Foster <pa...@quillandmouse.com> wrote:

>>>>> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote:

>>>>>> I would like to use the SQLite3 (not PDO) interface to SQLite, and I
>>>>>> would like to be able to supply a string containing several SQL
>>>>>> statements and have them all executed, thus saving the overhead of
>>>>>> several calls. It *appears* that this may be how it actually works,
>>>>>> but I wondered if anyone could confirm that.

>>>>> The docs appear to agree that this is allowed. See:

>>>>> http://us.php.net/manual/en/function.sqlite-exec.php

>>>> That's the SQLite interface, though, rather than the SQLite3 one. The
>>>> latter just says: "Executes an SQL query ...".

>>> Not to be a smartass or anything, but what about TIAS ?

>> What that?

> Er, Try It And See
>
> A couple of minutes experimentation might have saved you the time of email,
> wait for an answer ...

Well, there is an sqlite3 executable that one can run to do CLI things to a 
database. OS X comes with that and I was also able to download the source of 
that program, and the SQLite C amalgamation, and rebuild it myself. It is 
certainly possible, with that program, to execute a sequence of semi-colon 
separated statements. It *doesn't* work with PHP's PDO interface to sqlite, as 
I found in a test program I put together; I haven't properly tested that with 
the sqlite3 interface. I've tried asking on the sqlite general mailing list and 
(to me at least), the answers are at best unclear. There is a function, part of 
the C interface to sqlite, that talks about a sequence of statements, but I 
guess ultimately it depends on how the writer of the PHP sqlite3 interface 
implemented it.

--
Cheers  --  Tim

--- End Message ---
--- Begin Message ---
I have come across an issue with my string that I would like to find a
faster way to resolve.

It seems there are new lines and returns at different positions of the
string. 

 

First I exploded on the new line explode(“\n”, $ string)

This gave me a nice array but when I try to implode I get the new lines
again.

There is not a consistent position and there seems to be some hidden returns
in the array as well.

 

Is there a way, or has someone written a filter that would allow me to
remove all the newlines and returns from the array or string.

Understand I have resolved this issue but I think I have to be going about
this the hard way because it is just too complex .

 

FYI

$filter = array("\r\n", "\n", "\r");

str_replace($filter,’’,$string) ß this is useless in this situation I have
tried and it does not change the string at all.

Understand the newlines and returns do not display in the string as
literals. Meaning you do not see /n or /r it is hidden.

 

 


--- End Message ---
--- Begin Message ---
On Tue, Oct 11, 2011 at 7:58 AM,  <ad...@buskirkgraphics.com> wrote:
> I have come across an issue with my string that I would like to find a
> faster way to resolve.
>
> It seems there are new lines and returns at different positions of the
> string.
>
>
>
> First I exploded on the new line explode(“\n”, $ string)
>
> This gave me a nice array but when I try to implode I get the new lines
> again.
>
> There is not a consistent position and there seems to be some hidden returns
> in the array as well.
>
>
>
> Is there a way, or has someone written a filter that would allow me to
> remove all the newlines and returns from the array or string.
>
> Understand I have resolved this issue but I think I have to be going about
> this the hard way because it is just too complex .
>
>
>
> FYI
>
> $filter = array("\r\n", "\n", "\r");
>
> str_replace($filter,’’,$string) ß this is useless in this situation I have
> tried and it does not change the string at all.
>
> Understand the newlines and returns do not display in the string as
> literals. Meaning you do not see /n or /r it is hidden.
>
>
>
>
>
>

What about using nl2br() and then stripping out all the <BR> tags?

-- 

Bastien

Cat, the other other white meat

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Bastien Koert [mailto:phps...@gmail.com]
> Sent: Tuesday, October 11, 2011 8:53 AM
> To: ad...@buskirkgraphics.com
> Cc: php-gene...@lists.php.net
> Subject: Re: [PHP] newline and return issues in string
> 
> On Tue, Oct 11, 2011 at 7:58 AM,  <ad...@buskirkgraphics.com> wrote:
> > I have come across an issue with my string that I would like to find
> a
> > faster way to resolve.
> >
> > It seems there are new lines and returns at different positions of
> the
> > string.
> >
> >
> >
> > First I exploded on the new line explode(“\n”, $ string)
> >
> > This gave me a nice array but when I try to implode I get the new
> lines
> > again.
> >
> > There is not a consistent position and there seems to be some hidden
> returns
> > in the array as well.
> >
> >
> >
> > Is there a way, or has someone written a filter that would allow me
> to
> > remove all the newlines and returns from the array or string.
> >
> > Understand I have resolved this issue but I think I have to be going
> about
> > this the hard way because it is just too complex .
> >
> >
> >
> > FYI
> >
> > $filter = array("\r\n", "\n", "\r");
> >
> > str_replace($filter,’’,$string) ß this is useless in this situation I
> have
> > tried and it does not change the string at all.
> >
> > Understand the newlines and returns do not display in the string as
> > literals. Meaning you do not see /n or /r it is hidden.
> >
> >
> >
> >
> >
> >
> 
> What about using nl2br() and then stripping out all the <BR> tags?
> 
> --
> 
> Bastien
> 
> Cat, the other other white meat

I tried that but same issue



--- End Message ---
--- Begin Message ---
On 11 October 2011 12:58,  <ad...@buskirkgraphics.com> wrote:
> I have come across an issue with my string that I would like to find a
> faster way to resolve.
>
> It seems there are new lines and returns at different positions of the
> string.
>
>
>
> First I exploded on the new line explode(“\n”, $ string)
>
> This gave me a nice array but when I try to implode I get the new lines
> again.
>
> There is not a consistent position and there seems to be some hidden returns
> in the array as well.
>
>
>
> Is there a way, or has someone written a filter that would allow me to
> remove all the newlines and returns from the array or string.
>
> Understand I have resolved this issue but I think I have to be going about
> this the hard way because it is just too complex .
>
>
>
> FYI
>
> $filter = array("\r\n", "\n", "\r");
>
> str_replace($filter,’’,$string) ß this is useless in this situation I have
> tried and it does not change the string at all.

You don't want to remove them. You want to replace them with a constant.

$lines = explode(PHP_EOL, str_replace($filter, PHP_EOL, $string));

for example.





-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

--- End Message ---
--- Begin Message ---
On 10/11/2011 04:44 PM, Richard Quadling wrote:
On 11 October 2011 12:58,<ad...@buskirkgraphics.com>  wrote:
I have come across an issue with my string that I would like to find a
faster way to resolve.

It seems there are new lines and returns at different positions of the
string.



First I exploded on the new line explode(“\n”, $ string)

This gave me a nice array but when I try to implode I get the new lines
again.

There is not a consistent position and there seems to be some hidden returns
in the array as well.



Is there a way, or has someone written a filter that would allow me to
remove all the newlines and returns from the array or string.

Understand I have resolved this issue but I think I have to be going about
this the hard way because it is just too complex .



FYI

$filter = array("\r\n", "\n", "\r");

str_replace($filter,’’,$string) ß this is useless in this situation I have
tried and it does not change the string at all.
You don't want to remove them. You want to replace them with a constant.

$lines = explode(PHP_EOL, str_replace($filter, PHP_EOL, $string));

for example.






try to implement a string builder using array or arrayobject and on insert; filter / replace your text / characters using regex,


--- End Message ---
--- Begin Message ---


On 10/11/2011 7:58 AM, ad...@buskirkgraphics.com wrote:
I have come across an issue with my string that I would like to find a
faster way to resolve.

It seems there are new lines and returns at different positions of the
string.



First I exploded on the new line explode(“\n”, $ string)

This gave me a nice array but when I try to implode I get the new lines
again.

There is not a consistent position and there seems to be some hidden returns
in the array as well.



Is there a way, or has someone written a filter that would allow me to
remove all the newlines and returns from the array or string.

Understand I have resolved this issue but I think I have to be going about
this the hard way because it is just too complex .



FYI

$filter = array("\r\n", "\n", "\r");

str_replace($filter,’’,$string) ß this is useless in this situation I have
tried and it does not change the string at all.

Understand the newlines and returns do not display in the string as
literals. Meaning you do not see /n or /r it is hidden.







Try this:

$strippedStr= preg_replace("%(\n|\r)%", "#", $string);

The "#" will let your see what's happening. Change it to simply "". for the final version.





--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Richard Quadling [mailto:rquadl...@gmail.com]
> Sent: Tuesday, October 11, 2011 9:44 AM
> To: ad...@buskirkgraphics.com
> Cc: php-gene...@lists.php.net
> Subject: Re: [PHP] newline and return issues in string
> 
> On 11 October 2011 12:58,  <ad...@buskirkgraphics.com> wrote:
> > I have come across an issue with my string that I would like to find
> a
> > faster way to resolve.
> >
> > It seems there are new lines and returns at different positions of
> the
> > string.
> >
> >
> >
> > First I exploded on the new line explode(“\n”, $ string)
> >
> > This gave me a nice array but when I try to implode I get the new
> lines
> > again.
> >
> > There is not a consistent position and there seems to be some hidden
> returns
> > in the array as well.
> >
> >
> >
> > Is there a way, or has someone written a filter that would allow me
> to
> > remove all the newlines and returns from the array or string.
> >
> > Understand I have resolved this issue but I think I have to be going
> about
> > this the hard way because it is just too complex .
> >
> >
> >
> > FYI
> >
> > $filter = array("\r\n", "\n", "\r");
> >
> > str_replace($filter,’’,$string) ß this is useless in this situation I
> have
> > tried and it does not change the string at all.
> 
> You don't want to remove them. You want to replace them with a
> constant.
> 
> $lines = explode(PHP_EOL, str_replace($filter, PHP_EOL, $string));
> 
> for example.
> 
> 
> 
> 
> 
> --
> Richard Quadling
> Twitter : EE : Zend : PHPDoc
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea



Richard I am not sure I understand what that is doing it made things 300% worse.



--- End Message ---
--- Begin Message ---

Richard L. Buskirk
Senior Software Engineer/Systems Administrator

You can’t grow your business with systems that are on life support...


> -----Original Message-----
> From: Al [mailto:n...@ridersite.org]
> Sent: Tuesday, October 11, 2011 10:17 AM
> To: php-gene...@lists.php.net
> Subject: [PHP] Re: newline and return issues in string
> 
> 
> 
> On 10/11/2011 7:58 AM, ad...@buskirkgraphics.com wrote:
> > I have come across an issue with my string that I would like to find
> a
> > faster way to resolve.
> >
> > It seems there are new lines and returns at different positions of
> the
> > string.
> >
> >
> >
> > First I exploded on the new line explode(“\n”, $ string)
> >
> > This gave me a nice array but when I try to implode I get the new
> lines
> > again.
> >
> > There is not a consistent position and there seems to be some hidden
> returns
> > in the array as well.
> >
> >
> >
> > Is there a way, or has someone written a filter that would allow me
> to
> > remove all the newlines and returns from the array or string.
> >
> > Understand I have resolved this issue but I think I have to be going
> about
> > this the hard way because it is just too complex .
> >
> >
> >
> > FYI
> >
> > $filter = array("\r\n", "\n", "\r");
> >
> > str_replace($filter,’’,$string) ß this is useless in this situation I
> have
> > tried and it does not change the string at all.
> >
> > Understand the newlines and returns do not display in the string as
> > literals. Meaning you do not see /n or /r it is hidden.
> >
> >
> >
> >
> >
> >
> 
> Try this:
> 
> $strippedStr= preg_replace("%(\n|\r)%", "#", $string);
> 
> The "#" will let your see what's happening. Change it to simply "". for
> the
> final version.
> 
> 
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




PERFECT !!!! Thank you so much for that


--- End Message ---
--- Begin Message ---


On 10/11/2011 10:44 AM, ad...@buskirkgraphics.com wrote:


Richard L. Buskirk
Senior Software Engineer/Systems Administrator

You can’t grow your business with systems that are on life support...


-----Original Message-----
From: Al [mailto:n...@ridersite.org]
Sent: Tuesday, October 11, 2011 10:17 AM
To: php-gene...@lists.php.net
Subject: [PHP] Re: newline and return issues in string



On 10/11/2011 7:58 AM, ad...@buskirkgraphics.com wrote:
I have come across an issue with my string that I would like to find
a
faster way to resolve.

It seems there are new lines and returns at different positions of
the
string.



First I exploded on the new line explode(“\n”, $ string)

This gave me a nice array but when I try to implode I get the new
lines
again.

There is not a consistent position and there seems to be some hidden
returns
in the array as well.



Is there a way, or has someone written a filter that would allow me
to
remove all the newlines and returns from the array or string.

Understand I have resolved this issue but I think I have to be going
about
this the hard way because it is just too complex .



FYI

$filter = array("\r\n", "\n", "\r");

str_replace($filter,’’,$string) ß this is useless in this situation I
have
tried and it does not change the string at all.

Understand the newlines and returns do not display in the string as
literals. Meaning you do not see /n or /r it is hidden.







Try this:

$strippedStr= preg_replace("%(\n|\r)%", "#", $string);

The "#" will let your see what's happening. Change it to simply "". for
the
final version.





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




PERFECT !!!! Thank you so much for that


I don't know why so many go to awful extremes to avoid using the preg functions. Rarely, does their overhead have a measurable affect on overall execution times.


--- End Message ---
--- Begin Message ---
Hi!

i'm was checking, readfile(); and fpassthru();

With easy examples, i can use it for show a pic in the screen and download a
file, from outside of documentRoot. It works fine.

The problem that i have now, is, i need can work with it, inside of other
documents, but i'm getting all time error by the headers. ( already sendt
... )

Anyone knows how to use it for can call the files and work together with
other page ¿?

Thanks

On Sun, Oct 9, 2011 at 6:57 PM, Sean Greenslade <zootboys...@gmail.com>wrote:

>
> On Sun, Oct 9, 2011 at 9:52 AM, Ricardo Martinez <harisel...@gmail.com>wrote:
>
>> The files are, png, pdf and flv.
>>
>> Only users login can see or download it.
>>
>> thx ;>
>>
>> On Sat, Oct 8, 2011 at 11:16 PM, Shawn McKenzie <nos...@mckenzies.net
>> >wrote:
>>
>> > On 10/08/2011 03:40 PM, Ricardo Martinez wrote:
>> > > Hi List!
>> > >
>> > > I need to access files outside the DocumentRoot.
>> > >
>> > > I've been looking for info and documentation, and I've read that it
>> can
>> > be
>> > > done using symbolic links and another way is by using headers.
>> > >
>> > > I want to know, what do you think, what is the best way, and if anyone
>> > knows
>> > > a good doc about of it.
>> > >
>> > > Thanks!!!
>> > >
>> >
>> > It depends on what you mean by "files".  Are they PHP files that need to
>> > be run, or images, or files that need to be downloaded by the user?
>> >
>> > For PHP, you would add the external dir to your include path.
>> >
>> > For images you can use a php file as the img src and that file sets the
>> > appropriate headers and uses readfile() to get and echo the image data:
>> > getimage.php?image=someimage.gif
>> >
>> > For download files you would do it in the same manner as for images:
>> > download.php?file=somefile.zip
>> >
>> >
>> > --
>> > Thanks!
>> > -Shawn
>> > http://www.spidean.com
>> >
>>
>> --
>> Ricardo
>> _______________________________________________
>> IT Architect
>> website: http://www.pulsarinara.com
>>
>
>
> Sounds like the downloader php script would be perfect (what Shawn
> suggested). Have the script check the login status, then (if valid) send the
> proper headers for the file and read out the data with the script.
>
> --
> --Zootboy
>
> Sent from my PC.
>
>


-- 
Ricardo
_______________________________________________
IT Architect
website: http://www.pulsarinara.com

--- End Message ---
--- Begin Message ---
On Tue, Oct 11, 2011 at 11:00 AM, Ricardo Martinez <harisel...@gmail.com> wrote:
> Hi!
>
> i'm was checking, readfile(); and fpassthru();
>
> With easy examples, i can use it for show a pic in the screen and download a
> file, from outside of documentRoot. It works fine.
>
> The problem that i have now, is, i need can work with it, inside of other
> documents, but i'm getting all time error by the headers. ( already sendt
> ... )
>
> Anyone knows how to use it for can call the files and work together with
> other page ¿?
>
> Thanks
>
> On Sun, Oct 9, 2011 at 6:57 PM, Sean Greenslade <zootboys...@gmail.com>wrote:
>
>>
>> On Sun, Oct 9, 2011 at 9:52 AM, Ricardo Martinez <harisel...@gmail.com>wrote:
>>
>>> The files are, png, pdf and flv.
>>>
>>> Only users login can see or download it.
>>>
>>> thx ;>
>>>
>>> On Sat, Oct 8, 2011 at 11:16 PM, Shawn McKenzie <nos...@mckenzies.net
>>> >wrote:
>>>
>>> > On 10/08/2011 03:40 PM, Ricardo Martinez wrote:
>>> > > Hi List!
>>> > >
>>> > > I need to access files outside the DocumentRoot.
>>> > >
>>> > > I've been looking for info and documentation, and I've read that it
>>> can
>>> > be
>>> > > done using symbolic links and another way is by using headers.
>>> > >
>>> > > I want to know, what do you think, what is the best way, and if anyone
>>> > knows
>>> > > a good doc about of it.
>>> > >
>>> > > Thanks!!!
>>> > >
>>> >
>>> > It depends on what you mean by "files".  Are they PHP files that need to
>>> > be run, or images, or files that need to be downloaded by the user?
>>> >
>>> > For PHP, you would add the external dir to your include path.
>>> >
>>> > For images you can use a php file as the img src and that file sets the
>>> > appropriate headers and uses readfile() to get and echo the image data:
>>> > getimage.php?image=someimage.gif
>>> >
>>> > For download files you would do it in the same manner as for images:
>>> > download.php?file=somefile.zip
>>> >
>>> >
>>> > --
>>> > Thanks!
>>> > -Shawn
>>> > http://www.spidean.com
>>> >
>>>
>>> --
>>> Ricardo
>>> _______________________________________________
>>> IT Architect
>>> website: http://www.pulsarinara.com
>>>
>>
>>
>> Sounds like the downloader php script would be perfect (what Shawn
>> suggested). Have the script check the login status, then (if valid) send the
>> proper headers for the file and read out the data with the script.
>>
>> --
>> --Zootboy
>>
>> Sent from my PC.
>>
>>
>
>
> --
> Ricardo
> _______________________________________________
> IT Architect
> website: http://www.pulsarinara.com
>

For images and the like, I have a separate page that is called that
handles the image and the headers needed

In the page I have some thing like

echo "<img src='get_image.php?id=$id'>";

Then in the get-image.php page i have the code that gets the image
from the db, outputs the appropriate headers and then outputs the
image

-- 

Bastien

Cat, the other other white meat

--- End Message ---
--- Begin Message ---
openssl_sign($dados, $signature, $pkeyid)); // return 1

$signatureValue = base64_encode($signature);

$funcionam = base64_decode($dados_que_nao);
$pubKey = file_get_contents('protected/models/nfe/certs/cert.pem');

openssl_verify($funcionam,$signature, $pubKey)); // return 0;

if I remove the de base64 encrypt and decrypt. It works fine. Can someone
helpme with this?

--- End Message ---
--- Begin Message ---
Hi every one,
Currently when I call php --ini from CLI, I just see C:\Windows but search
for this location, I cannot find any php.ini files.
I'm stuck there - where is the php.ini file used by php.exe called from CLI
as below

*C:> php --ini*

Hope to hear from you!
Regards,
Nam

--- End Message ---
--- Begin Message ---
On Tue, Oct 11, 2011 at 14:40, Nam Gi VU <nam.gi...@gmail.com> wrote:
> Hi every one,
> Currently when I call php --ini from CLI, I just see C:\Windows but search
> for this location, I cannot find any php.ini files.
> I'm stuck there - where is the php.ini file used by php.exe called from CLI
> as below
>
> *C:> php --ini*

    If there's no php.ini file in the path it's checking, it'll just
use the internal defaults.  You may not have a php.ini file anywhere
on your system, which is okay if you don't need to do any tuning.

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

--- End Message ---
--- Begin Message ---
On Sat, Oct 8, 2011 at 10:36 AM, Complex <complex.confus...@gmail.com> wrote:
> Can you please tell me if there's already a set of PHP functions for
> translating SSI commands to PHP?
> I'm looking to do two things -- one difficult, one easy -- using PHP
> on a hosted server.

I can't believe that this hasn't already been done -- there are
probably lots of sites that used SSI in legacy systems that eventually
went to PHP that something like this only makes sense as an interim
step. Yet I can't find anything (or it's buried too deep in google
that my -fu isn't working).

Basically what you want to do is translate SSI directives on the fly
in PHP, yes? includes, execs, other SSI functions. I can't see an easy
way to this without actually reading the file and making substitutions
in it as you spit it out to the client. It doesn't seem like
especially difficult code to write, it's just surprising I can't find
something that already does it.

I did this a long time ago in Perl, but that code is lost to time.

--- End Message ---

Reply via email to