[PHP] new php script and sqlite

2009-09-07 Thread Eric Boo
Hi,

I'm currently using a text file to store data which the php script
will read and write back to. I've a few questions:

1) I'm thinking of using sqlite, but not sure whether this will be
widely available on most hosts, as I intend for the php script to be
deployed without needing to much with much configuration. Is sqlite
included with most php setups?

2) Should I be using sqlite 2 or 3?

Thanks for your time!

Regards.

Eric

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



Re: [PHP] new php script and sqlite

2009-09-08 Thread Eric Boo
On Tue, Sep 8, 2009 at 9:41 PM, Paul M Foster wrote:
> On Tue, Sep 08, 2009 at 11:20:01AM +0800, Eric Boo wrote:
>
>> Hi,
>>
>> I'm currently using a text file to store data which the php script
>> will read and write back to. I've a few questions:
>>
>> 1) I'm thinking of using sqlite, but not sure whether this will be
>> widely available on most hosts, as I intend for the php script to be
>> deployed without needing to much with much configuration. Is sqlite
>> included with most php setups?
>
> As I understand it, sqlite support is by default built into PHP. If so,
> then it should be supported anywhere.

Thanks for your reply.

I was under the impression that sqlite2 was supported widely by PHP,
but sqlite3 seems only to be enabled on php 5.3.0 by default.

My concern now is actually that users may find that their hosting
service providers don't provide sqlite3 out of the box.

Eric

>
>>
>> 2) Should I be using sqlite 2 or 3?
>
> Don't use version 2. It's deprecated.
>
> Paul
>
> --
> Paul M. Foster
>
> --
> 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



[PHP] base url and SEF

2008-02-20 Thread Eric Boo
Hi all,

I'm currently parsing the variable $_SERVER['PHP_SELF'] to get the
base url of a site.

Example:
http://www.example.com/~eric/program/index.php?option=abc

What I'm interested in getting is
"http://www.example.com/~eric/program/";, which I am able to get
currently.

Questions"
1) Are there security implications in using $_SERVER['PHP_SELF'], and
if so, how do I mitigate it?
2) Is using this method safe for all sorts of browsers/servers that run php?
3) If I install an SEF software so that my url looks like
http://www.example.com/~eric/program/a/b/c   ,what will
$_SERVER['PHP_SELF']  show?

Thanks.

Eric

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