php-general Digest 16 Sep 2010 08:20:33 -0000 Issue 6943
Topics (messages 308102 through 308112):
Install library
308102 by: Jordan Jovanov
308103 by: Ashley Sheridan
bcompiler: compile in a diferent directory
308104 by: Ramiro Gonzalez
Sending Encrypted Email
308105 by: Floyd Resler
Re: Xpath arguments in variable
308106 by: David Harkness
308112 by: Pete Ford
Re: Question about news.php.net
308107 by: MikeB
Re: php cli question
308108 by: J Ravi Menon
Re: 1984 (Big Brother)
308109 by: Yousif Masoud
308110 by: Matty Sarro
308111 by: Phpster
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Hello All,
I have one very funny question. A need me PDFlibrary.
Can somebody tall me how can I download and install on my server this
library. I use PuTTy to connect to my server.
Does somebody know the command line for download in istall library in php.
Thanks a lot.
Best Regards,
Jordan
--- End Message ---
--- Begin Message ---
On Wed, 2010-09-15 at 15:16 +0200, Jordan Jovanov wrote:
> Hello All,
>
> I have one very funny question. A need me PDFlibrary.
> Can somebody tall me how can I download and install on my server this
> library. I use PuTTy to connect to my server.
> Does somebody know the command line for download in istall library in php.
>
> Thanks a lot.
>
> Best Regards,
> Jordan
>
I assume you mean the PDFLibrary that is offered as an SDK from Adobe?
I'm also assuming a Linux server if you're using Putty to connect.
Are these assumptions right? If they are, then I don't think you'll have
much luck. You can't just plug in any old thing into PHP and have it
work. Have you maybe considered using something like fpdf instead, which
is written in PHP and can produce PDF documents with just a small amount
of code.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
I use bcompiler in my php
code(bcompiler_write_header+bcompiler_write_file+bcompiler_write_footer).
If the original phps are not located in the deployment directory, when I
ejecute the compiled code(In deployment directory)
I get an error because require_once use the path to the not compiled phps.
I'd like to know if there is any way to compile the phps and use the
compiled versión from a different directory.
Thanks
Ramiro
--- End Message ---
--- Begin Message ---
This is kind of both on and off topic. I need to send encrypted email. I have
found code to do this but I'm not sure which certificate file to use. Can I
use our server's signed certificate we use for Apache? Does anyone know of a
clear, step-by-step tutorial?
Thanks!
Floyd
--- End Message ---
--- Begin Message ---
And let's not forget
$v = $row->xpath("//membernumber[. = \"$MemberId\"]");
The \" inside the string turns into a double-quote and using " to delimit
the string allows for variable substitution.
--- End Message ---
--- Begin Message ---
On 15/09/10 18:00, David Harkness wrote:
And let's not forget
$v = $row->xpath("//membernumber[. = \"$MemberId\"]");
The \" inside the string turns into a double-quote and using " to delimit
the string allows for variable substitution.
Oooh, I hate using backslashes - they always seem so untidy...
I have a pathological fear of sed scripts, too. :(
--
Peter Ford, Developer phone: 01580 893333 fax: 01580 893399
Justcroft International Ltd. www.justcroft.com
Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom
Registered in England and Wales: 2297906
Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS
--- End Message ---
--- Begin Message ---
Daniel Brown wrote:
On Mon, Sep 13, 2010 at 19:51, MikeB<[email protected]> wrote:
As part of the bug report I included a link to an image of my nntp config.
I saw that, thanks. I'll look into creating a mirror of the news
server, as well, for NNTP-only access. I won't lie and say that it's
a priority, but I'll try to get to it as soon as I have time, Mike.
You must have already done something. It's working a lot better today.
Thanks.
--- End Message ---
--- Begin Message ---
Thanks Bostjan for the suggestion. I did raise the issue and here is the reply:
http://news.php.net/php.internals/49672
Thx,
Ravi
On Wed, Sep 15, 2010 at 2:38 AM, Bostjan Skufca <[email protected]> wrote:
> Here are the results I got when question of migration from apache to nginx
> was brought up:
> http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/
> (BTW there is some FPM in main PHP distribution now)
>
> As for resource management, I recommend looking at php sources
> (Zend/zend_alloca.c:zend_mm_shutdown() specifically) and building a custom
> extension that frees discarded memory resources on your request or timer or
> sth else. Not sure if it is possible like that but this is just a
> suggestion, don't quote me on that :)
> Also, for such questions I recommend you to join php-internals mailing list,
> it seems more appropriate.
>
> b.
>
>
> On 15 September 2010 04:19, J Ravi Menon <[email protected]> wrote:
>>
>> On Tue, Sep 14, 2010 at 1:15 PM, Per Jessen <[email protected]> wrote:
>> > J Ravi Menon wrote:
>> >
>> >> On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen <[email protected]> wrote:
>> >>> J Ravi Menon wrote:
>> >>>
>> >>>> Few questions:
>> >>>>
>> >>>> 1) Does opcode cache really matter in such cli-based daemons? As
>> >>>> 'SomeClass' is instantiated at every loop, I am assuming it is only
>> >>>> compiled once as it has already been 'seen'.
>> >>>
>> >>> Yup.
>> >>
>> >> Just to clarify, you mean we don't need the op-code cache here right?
>> >
>> > That is correct.
>> >
>> >>>> 2) What about garbage collection? In a standard apache-mod-php
>> >>>> setup, we rely on the end of a request-cycle to free up resources -
>> >>>> close file descriptiors, free up memory etc..
>> >>>> I am assuming in the aforesaid standalone daemon case, we would
>> >>>> have to do this manually?
>> >>>
>> >>> Yes.
>> >>
>> >> So 'unset($some_big_array)' or 'unset($some_big_object)' etc.. is the
>> >> right way to go for non-resource based items? i.e. it needs to be
>> >> explicitly done?
>> >
>> > It's not quite like C - if you reassign something, the previous contents
>> > are automagically freed. I use unset() if I know it could be a while
>> > (hours) before it'll likely be reassigned, but it won't be used in the
>> > meantime.
>> >
>>
>> Thanks Per for clarifying this for me. Now on my follow up question:
>>
>> [Note: I think it is related to the issues discussed above hence
>> keeping it on this thread but if I am violating any guidelines here,
>> do let me know]
>>
>> One reason the aforesaid questions got triggered was that in our
>> company right now, there is a big discussion on moving away from
>> apache+mod_php solution to nginx+fast-cgi based model for handling all
>> php-based services. The move seems to be more based some anecdotal
>> observations and possibly not based on a typical php-based app (i.e.
>> the php script involved was trivial one acting as some proxy to
>> another backend service).
>>
>> I have written fast-cgi servers in the past in C++, and I am aware how
>> the apahce<---->fast-cgi-servers work (in unix socket setups). All
>> our php apps are written with apache+mod_php in mind (no explicit
>> resource mgmt ), so this was a concern to me.
>>
>> If the same scripts now need to run 'forever' as a fastcgi server, are
>> we forced to do such manual resource mgmt? Or are there solutions here
>> that work just as in mod_php?
>>
>> This reminded me of the cli daemons that I had written earlier where
>> such manual cleanups were done, and hence my doubts on this
>> nginx+fast-cgi approach.
>>
>> thx,
>> Ravi
>>
>>
>> >
>> >
>> > --
>> > Per Jessen, Zürich (14.6°C)
>> >
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>
--- End Message ---
--- Begin Message ---
On 12/09/10 17:32, tedd wrote:
Hi gang:
I have a client who wants his employees' access to their online
business database restricted to only times when he is logged on.
(Don't ask why)
In other words, when the boss is not logged on, then his employees
cannot access the business database in any fashion whatsoever
including checking to see if the boss is logged on, or not. No access
whatsoever!
Normally, I would just set up a field in the database and have that
set to "yes" or "no" as to if the employees could access the database,
or not. But in this case, the boss does not want even that type of
access to the database permitted. Repeat -- No access whatsoever!
I was thinking of the boss' script writing to a file that accomplished
the "yes" or "no" thing, but if the boss did not log off properly then
the file would remain in the "yes" state allowing employees undesired
access. That would not be acceptable.
So, what methods would you suggest?
Cheers,
tedd
Hi Tedd,
One aspect of software design to keep in mind is change. Today the
customer wants everyone to have access when they are logged in. They
may want that rule relaxed a little. Perhaps, employees can login when
members of a certain group are logged in.
I recommend using some form of external device that instructs the system
to enable/disable access to the database. Depending on the sensitivity
of the data, the solution can utilize a card reader (once the boss takes
the card out of the reader, database access is terminated for the
company) and either a fingerprint or retinal scanner [for extra
security]. If it is really sensitive data, then a retinal scanner and
some form of code generator that generates one-time eight digit (at
least) code to enable access to the database. The algorithm that
generates the codes would be a deeply guarded secret (that would mostly
be their problem -- you will need to ensure that once you sign off the
project, there is no way it can be retrieved from you).
No need to shut down the database server, just instruct the firewall to
block the MySQL port and/or Web server port. Might be a good idea to
choose a different port than 3306 for MySQL.
What would happen if, for some reason the "boss" couldn't make it in or
is on Holiday?
Good luck,
Yousif
PS. It might be a good idea to introduce them to the concept of RBAC and
see what they think.
--- End Message ---
--- Begin Message ---
Ooooh, how about a pressure sensor on his seat??? Like the ones they have in
cars to make that little airbag light illuminate.
if buttDetected{
allowAccess();
}
On Wed, Sep 15, 2010 at 7:00 PM, Yousif Masoud <[email protected]>wrote:
> On 12/09/10 17:32, tedd wrote:
>
>> Hi gang:
>>
>> I have a client who wants his employees' access to their online business
>> database restricted to only times when he is logged on. (Don't ask why)
>>
>> In other words, when the boss is not logged on, then his employees cannot
>> access the business database in any fashion whatsoever including checking to
>> see if the boss is logged on, or not. No access whatsoever!
>>
>> Normally, I would just set up a field in the database and have that set to
>> "yes" or "no" as to if the employees could access the database, or not. But
>> in this case, the boss does not want even that type of access to the
>> database permitted. Repeat -- No access whatsoever!
>>
>> I was thinking of the boss' script writing to a file that accomplished the
>> "yes" or "no" thing, but if the boss did not log off properly then the file
>> would remain in the "yes" state allowing employees undesired access. That
>> would not be acceptable.
>>
>> So, what methods would you suggest?
>>
>> Cheers,
>>
>> tedd
>>
>> Hi Tedd,
> One aspect of software design to keep in mind is change. Today the
> customer wants everyone to have access when they are logged in. They may
> want that rule relaxed a little. Perhaps, employees can login when members
> of a certain group are logged in.
>
> I recommend using some form of external device that instructs the system to
> enable/disable access to the database. Depending on the sensitivity of the
> data, the solution can utilize a card reader (once the boss takes the card
> out of the reader, database access is terminated for the company) and either
> a fingerprint or retinal scanner [for extra security]. If it is really
> sensitive data, then a retinal scanner and some form of code generator that
> generates one-time eight digit (at least) code to enable access to the
> database. The algorithm that generates the codes would be a deeply guarded
> secret (that would mostly be their problem -- you will need to ensure that
> once you sign off the project, there is no way it can be retrieved from
> you).
>
> No need to shut down the database server, just instruct the firewall to
> block the MySQL port and/or Web server port. Might be a good idea to choose
> a different port than 3306 for MySQL.
>
> What would happen if, for some reason the "boss" couldn't make it in or is
> on Holiday?
>
> Good luck,
> Yousif
>
> PS. It might be a good idea to introduce them to the concept of RBAC and
> see what they think.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Next we'll be suggesting sharks with frikking laser attached to their heads to
guard the door!
Bastien
Sent from my iPod
On Sep 15, 2010, at 19:53, Matty Sarro <[email protected]> wrote:
> Ooooh, how about a pressure sensor on his seat??? Like the ones they have in
> cars to make that little airbag light illuminate.
>
> if buttDetected{
> allowAccess();
> }
>
> On Wed, Sep 15, 2010 at 7:00 PM, Yousif Masoud <[email protected]>wrote:
>
>> On 12/09/10 17:32, tedd wrote:
>>
>>> Hi gang:
>>>
>>> I have a client who wants his employees' access to their online business
>>> database restricted to only times when he is logged on. (Don't ask why)
>>>
>>> In other words, when the boss is not logged on, then his employees cannot
>>> access the business database in any fashion whatsoever including checking to
>>> see if the boss is logged on, or not. No access whatsoever!
>>>
>>> Normally, I would just set up a field in the database and have that set to
>>> "yes" or "no" as to if the employees could access the database, or not. But
>>> in this case, the boss does not want even that type of access to the
>>> database permitted. Repeat -- No access whatsoever!
>>>
>>> I was thinking of the boss' script writing to a file that accomplished the
>>> "yes" or "no" thing, but if the boss did not log off properly then the file
>>> would remain in the "yes" state allowing employees undesired access. That
>>> would not be acceptable.
>>>
>>> So, what methods would you suggest?
>>>
>>> Cheers,
>>>
>>> tedd
>>>
>>> Hi Tedd,
>> One aspect of software design to keep in mind is change. Today the
>> customer wants everyone to have access when they are logged in. They may
>> want that rule relaxed a little. Perhaps, employees can login when members
>> of a certain group are logged in.
>>
>> I recommend using some form of external device that instructs the system to
>> enable/disable access to the database. Depending on the sensitivity of the
>> data, the solution can utilize a card reader (once the boss takes the card
>> out of the reader, database access is terminated for the company) and either
>> a fingerprint or retinal scanner [for extra security]. If it is really
>> sensitive data, then a retinal scanner and some form of code generator that
>> generates one-time eight digit (at least) code to enable access to the
>> database. The algorithm that generates the codes would be a deeply guarded
>> secret (that would mostly be their problem -- you will need to ensure that
>> once you sign off the project, there is no way it can be retrieved from
>> you).
>>
>> No need to shut down the database server, just instruct the firewall to
>> block the MySQL port and/or Web server port. Might be a good idea to choose
>> a different port than 3306 for MySQL.
>>
>> What would happen if, for some reason the "boss" couldn't make it in or is
>> on Holiday?
>>
>> Good luck,
>> Yousif
>>
>> PS. It might be a good idea to introduce them to the concept of RBAC and
>> see what they think.
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
--- End Message ---