php-general Digest 26 Nov 2009 09:40:08 -0000 Issue 6461

Topics (messages 300100 through 300118):

how to prevent a mild DOSS attack?
        300100 by: LAMP
        300103 by: Ashley Sheridan
        300107 by: LinuxManMikeC
        300108 by: LinuxManMikeC

Re: function not returning query
        300101 by: Philip Thompson

Wiki recommendation?
        300102 by: Skip Evans
        300106 by: aurfalien.gmail.com
        300111 by: Jonathan Tapicer
        300112 by: TG
        300113 by: Skip Evans
        300115 by: TG
        300116 by: Lester Caine
        300118 by: Olav

register_globals and sessions
        300104 by: Allen McCabe

Re: Create client certificate with openssl
        300105 by: Manuel Lemos

PHP Equivalent to Java Jar or Python Eggs
        300109 by: c4632.comcast.net
        300110 by: James McLean

Detecting The Encoding Of A Text File
        300114 by: Nitsan Bin-Nun
        300117 by: Nisse Engström

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 ---
hi guys,
this morning I got complains from website owner and tons of visitors - nobody was able to access the website. it will just timeout. I contacted hosting company for more info but they said the virtual privet server, where the website is, has a lot of traffic and 512MB of RAM is not enough and I have to make an upgrade to at least 1GB etc.
it does a make a sense.
though, at 4pm I, nor 10 other people I asked for help, was able to access to the website. it was a little bit fishy about BIG traffic whole day long (the website is far from it) and, since I don't have a problem accessing WHM/cPanel of the server, I downloaded apache access file (stupid, I supposed to do it in the morning) and found 20-30 IP addresses, repeatedly were trying to access one (only one) page (something like article.php). and they were requesting the same page so frequently - nobody else was able to access to the website. it looked to me like a little DOSS attack - where attacker wanted just to make the website busy, not to crush the server. I contacted hosting company again. they said there is nothing they can do about this- even I'm paying them to manage my virtual server (I can manage this way by my self too). of course they can if I pay extra :-(

now, my question is: is there anything I can do to stop these attacks using php? something? anything?

thanks
L

--- End Message ---
--- Begin Message ---
On Wed, 2009-11-25 at 16:38 -0600, LAMP wrote:

> hi guys,
> this morning I got complains from website owner and tons of visitors - 
> nobody was able to access the website. it will just timeout.
> I contacted hosting company  for more info but they said the virtual 
> privet server, where the website is, has a lot of traffic and 512MB of 
> RAM is not enough and I have to make an upgrade to at least 1GB etc.
> it does a make a sense.
> though, at 4pm I, nor 10 other people I asked for help, was able to 
> access to the website.
> it was a little bit fishy about BIG traffic whole day long (the website 
> is far from it) and, since I don't have a problem accessing WHM/cPanel 
> of the server, I downloaded apache access file (stupid, I supposed to do 
> it in the morning) and found 20-30 IP addresses, repeatedly were trying 
> to access one (only one) page (something like article.php). and they 
> were requesting the same page so frequently - nobody else was able to 
> access to the website. it looked to me like a little DOSS attack - where 
> attacker wanted just to make the website busy, not to crush the server.
> I contacted hosting company again. they said there is nothing they can 
> do about this-  even I'm paying them to manage my virtual server (I can 
> manage this way by my self too). of course they can if I pay extra :-(
> 
> now, my question is: is there anything I can do to stop these attacks 
> using php? something? anything?
> 
> thanks
> L
> 


There's nothing you could do with PHP to fix this really, as trying to
block IP addresses from there would be expensive for the processor and
memory of the server.

You could use the cPanel to block access to the offending IP addresses
though.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
Or DoS back at em. :-D

On Wed, Nov 25, 2009 at 3:57 PM, Ashley Sheridan
<[email protected]> wrote:
> On Wed, 2009-11-25 at 16:38 -0600, LAMP wrote:
>
>> hi guys,
>> this morning I got complains from website owner and tons of visitors -
>> nobody was able to access the website. it will just timeout.
>> I contacted hosting company  for more info but they said the virtual
>> privet server, where the website is, has a lot of traffic and 512MB of
>> RAM is not enough and I have to make an upgrade to at least 1GB etc.
>> it does a make a sense.
>> though, at 4pm I, nor 10 other people I asked for help, was able to
>> access to the website.
>> it was a little bit fishy about BIG traffic whole day long (the website
>> is far from it) and, since I don't have a problem accessing WHM/cPanel
>> of the server, I downloaded apache access file (stupid, I supposed to do
>> it in the morning) and found 20-30 IP addresses, repeatedly were trying
>> to access one (only one) page (something like article.php). and they
>> were requesting the same page so frequently - nobody else was able to
>> access to the website. it looked to me like a little DOSS attack - where
>> attacker wanted just to make the website busy, not to crush the server.
>> I contacted hosting company again. they said there is nothing they can
>> do about this-  even I'm paying them to manage my virtual server (I can
>> manage this way by my self too). of course they can if I pay extra :-(
>>
>> now, my question is: is there anything I can do to stop these attacks
>> using php? something? anything?
>>
>> thanks
>> L
>>
>
>
> There's nothing you could do with PHP to fix this really, as trying to
> block IP addresses from there would be expensive for the processor and
> memory of the server.
>
> You could use the cPanel to block access to the offending IP addresses
> though.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>

--- End Message ---
--- Begin Message ---
On Wed, Nov 25, 2009 at 3:57 PM, Ashley Sheridan
<[email protected]> wrote:
> On Wed, 2009-11-25 at 16:38 -0600, LAMP wrote:
>
>> hi guys,
>> this morning I got complains from website owner and tons of visitors -
>> nobody was able to access the website. it will just timeout.
>> I contacted hosting company  for more info but they said the virtual
>> privet server, where the website is, has a lot of traffic and 512MB of
>> RAM is not enough and I have to make an upgrade to at least 1GB etc.
>> it does a make a sense.
>> though, at 4pm I, nor 10 other people I asked for help, was able to
>> access to the website.
>> it was a little bit fishy about BIG traffic whole day long (the website
>> is far from it) and, since I don't have a problem accessing WHM/cPanel
>> of the server, I downloaded apache access file (stupid, I supposed to do
>> it in the morning) and found 20-30 IP addresses, repeatedly were trying
>> to access one (only one) page (something like article.php). and they
>> were requesting the same page so frequently - nobody else was able to
>> access to the website. it looked to me like a little DOSS attack - where
>> attacker wanted just to make the website busy, not to crush the server.
>> I contacted hosting company again. they said there is nothing they can
>> do about this-  even I'm paying them to manage my virtual server (I can
>> manage this way by my self too). of course they can if I pay extra :-(
>>
>> now, my question is: is there anything I can do to stop these attacks
>> using php? something? anything?
>>
>> thanks
>> L
>>
>
>
> There's nothing you could do with PHP to fix this really, as trying to
> block IP addresses from there would be expensive for the processor and
> memory of the server.
>
> You could use the cPanel to block access to the offending IP addresses
> though.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>

Ok... serious answer.  The DoS is either coming from script kiddies
dumb enough to do it from their own IP, or its coming from a bot-net
comprised of computers who's owners are morons and don't keep their
computer secure. Either way, do a WHOIS, reverse DNS query, and
traceroute on the IPs.  You should be able to find the ISPs of the
attacking systems.  Email the ISP tech department with your info and
let them take care of the offending systems.

--- End Message ---
--- Begin Message ---
On Nov 25, 2009, at 4:32 AM, Ashley Sheridan wrote:

> On Tue, 2009-11-24 at 23:27 -0800, Allen McCabe wrote:
> 
>> If I were to loop through my inputs, I could just exclude any
>> problematic names, eg.:
>> 
>> foreach ($_POST as $var = $val)
>> {
>>   if ($var != filter.x || $var != filter.y)
>>  {
>>    $var = $val;
>>  }
>> }
>> 
>> Like that?

<!--snip-->

> Not really, what if someone else decided they wanted to throw in their
> own form field values in the hope of breaking your system? It's much
> better to be specifically looking for certain form fields and certain
> field values/ranges. For example, if you had some fields that would
> filter something by cost, you might have two form fields named 'max' and
> 'min' which would be ranges for the cost. You should check that these
> fields only contain numbers for example before processing them. Any data
> coming from the client-side is untrustworthy and should be regarded as
> tainted until you can prove otherwise.
> 
> Thanks,
> Ash

The system Ash is referring to is a whitebox approach. You know what you should 
get in, so only accept those values. A simple thing to accomplish what you're 
trying to do, Allen, would be to create an array of required/accepted fields...

<?php
$acceptable = array('green', 'blue', 'red');
foreach ($_POST as $var => $val) {
    if (in_array ($var, $acceptable)) {
        // Do whatever here
    } else {
        // Not acceptable - throw error message or do nothing
    }
}
?>

Hope that helps.
~Philip

--- End Message ---
--- Begin Message ---
Hey all,

I'm looking for a good Wiki to maintain documentation on a large commercial web site that is always growing.

DokuWiki is the only one I've installed and used at any length, so before I just use that one again I'd like to hear from the peanut gallery what other suggestions you'd have.

Remember, this will be for end user documentation for a large commercial CMS type system, something site admins will go to for information on site features, updates, etc.

Let the shouting begin!

Thanks, all, and a very happy eating-charred-dead-bird-flesh day to you all!!!

Skip

--
====================================
Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com
------------------------------------
Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

--- End Message ---
--- Begin Message ---
On Nov 25, 2009, at 2:42 PM, Skip Evans wrote:

Hey all,

I'm looking for a good Wiki to maintain documentation on a large commercial web site that is always growing.

DokuWiki is the only one I've installed and used at any length, so before I just use that one again I'd like to hear from the peanut gallery what other suggestions you'd have.

Remember, this will be for end user documentation for a large commercial CMS type system, something site admins will go to for information on site features, updates, etc.

Let the shouting begin!

Thanks, all, and a very happy eating-charred-dead-bird-flesh day to you all!!!

Skip


Well, I've used DocuWiki and bit new to MediaWiki which I think WikiPedia uses.

MediaWiki uses a MySQL DB were as DocuWiki is a tree dir structure kind of thing.

I actually prefer DocuWiki but maybe thats because I didn't setup MediaWiki correctly.

Cacti uses DocuWiki by the way and I personally avoid DB usage if possible.

I think its easier to corrupt a DB then it is to corrupt a filesystem.

However I'm unsure of how scalable a pure file system based Wiki is, I think if you put it on a mirrored disk with a decent cache on the Raid controller, you'll be fine performance and DR wise.

If its Linux, then MD based (software raids) works pretty well.

- aurf



--- End Message ---
--- Begin Message ---
On Wed, Nov 25, 2009 at 8:37 PM,  <[email protected]> wrote:
> On Nov 25, 2009, at 2:42 PM, Skip Evans wrote:
>
>> Hey all,
>>
>> I'm looking for a good Wiki to maintain documentation on a large
>> commercial web site that is always growing.
>>
>> DokuWiki is the only one I've installed and used at any length, so before
>> I just use that one again I'd like to hear from the peanut gallery what
>> other suggestions you'd have.
>>
>> Remember, this will be for end user documentation for a large commercial
>> CMS type system, something site admins will go to for information on site
>> features, updates, etc.
>>
>> Let the shouting begin!
>>
>> Thanks, all, and a very happy eating-charred-dead-bird-flesh day to you
>> all!!!
>>
>> Skip
>
>
> Well, I've used DocuWiki and bit new to MediaWiki which I think WikiPedia
> uses.
>
> MediaWiki uses a MySQL DB were as DocuWiki is a tree dir structure kind of
> thing.
>
> I actually prefer DocuWiki but maybe thats because I didn't setup MediaWiki
> correctly.
>
> Cacti uses DocuWiki by the way and I personally avoid DB usage if possible.
>
> I think its easier to corrupt a DB then it is to corrupt a filesystem.
>
> However I'm unsure of how scalable a pure file system based Wiki is, I think
> if you put it on a mirrored disk with a decent cache on the Raid controller,
> you'll be fine performance and DR wise.
>
> If its Linux, then MD based (software raids) works pretty well.
>
> - aurf
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

I also recommend dokuwiki (with a k, not c :) ): http://www.dokuwiki.org/

Regards,

Jonathan

--- End Message ---
--- Begin Message ---
A while back I set up a TikiWiki for a client.  I think I liked it better 
than any of the other wikis I've messed with.  But honestly, I didn't get 
to use it much and I've only ever used Mediawiki to any real length.

Definitely give it a look, though.

-TG

----- Original Message -----
From: Jonathan Tapicer <[email protected]>
To: [email protected]
Cc: Skip Evans <[email protected]>, "[email protected]" 
<[email protected]>
Date: Wed, 25 Nov 2009 23:54:07 -0300
Subject: Re: [PHP] Wiki recommendation?

> On Wed, Nov 25, 2009 at 8:37 PM,  <[email protected]> wrote:
> > On Nov 25, 2009, at 2:42 PM, Skip Evans wrote:
> >
> >> Hey all,
> >>
> >> I'm looking for a good Wiki to maintain documentation on a large
> >> commercial web site that is always growing.
> >>
> >> DokuWiki is the only one I've installed and used at any length, so 
before
> >> I just use that one again I'd like to hear from the peanut gallery what
> >> other suggestions you'd have.
> >>
> >> Remember, this will be for end user documentation for a large 
commercial
> >> CMS type system, something site admins will go to for information on 
site
> >> features, updates, etc.
> >>
> >> Let the shouting begin!
> >>
> >> Thanks, all, and a very happy eating-charred-dead-bird-flesh day to you
> >> all!!!
> >>
> >> Skip
> >
> >
> > Well, I've used DocuWiki and bit new to MediaWiki which I think 
WikiPedia
> > uses.
> >
> > MediaWiki uses a MySQL DB were as DocuWiki is a tree dir structure kind 
of
> > thing.
> >
> > I actually prefer DocuWiki but maybe thats because I didn't setup 
MediaWiki
> > correctly.
> >
> > Cacti uses DocuWiki by the way and I personally avoid DB usage if 
possible.
> >
> > I think its easier to corrupt a DB then it is to corrupt a filesystem.
> >
> > However I'm unsure of how scalable a pure file system based Wiki is, I 
think
> > if you put it on a mirrored disk with a decent cache on the Raid 
controller,
> > you'll be fine performance and DR wise.
> >
> > If its Linux, then MD based (software raids) works pretty well.
> >
> > - aurf
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> I also recommend dokuwiki (with a k, not c :) ): http://www.dokuwiki.org/
> 
> Regards,
> 
> Jonathan
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
Hey all,

Thanks much for the recommendations. I'll check them out.

We don't need fine grained control over access; basically admins that can modify content and the public who cannot.

But right now DocuWiki is sounding good, and I'd rather, for some strange reason, not use a DB, although I can't justify that in any rational way. I mean, MySQL is already on the machine.

Thanks again!

Skip

TG wrote:
A while back I set up a TikiWiki for a client. I think I liked it better than any of the other wikis I've messed with. But honestly, I didn't get to use it much and I've only ever used Mediawiki to any real length.

Definitely give it a look, though.

-TG

----- Original Message -----
From: Jonathan Tapicer <[email protected]>
To: [email protected]
Cc: Skip Evans <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 25 Nov 2009 23:54:07 -0300
Subject: Re: [PHP] Wiki recommendation?

On Wed, Nov 25, 2009 at 8:37 PM,  <[email protected]> wrote:
On Nov 25, 2009, at 2:42 PM, Skip Evans wrote:

Hey all,

I'm looking for a good Wiki to maintain documentation on a large
commercial web site that is always growing.

DokuWiki is the only one I've installed and used at any length, so
before
I just use that one again I'd like to hear from the peanut gallery what
other suggestions you'd have.

Remember, this will be for end user documentation for a large
commercial
CMS type system, something site admins will go to for information on
site
features, updates, etc.

Let the shouting begin!

Thanks, all, and a very happy eating-charred-dead-bird-flesh day to you
all!!!

Skip

Well, I've used DocuWiki and bit new to MediaWiki which I think
WikiPedia
uses.

MediaWiki uses a MySQL DB were as DocuWiki is a tree dir structure kind
of
thing.

I actually prefer DocuWiki but maybe thats because I didn't setup
MediaWiki
correctly.

Cacti uses DocuWiki by the way and I personally avoid DB usage if
possible.
I think its easier to corrupt a DB then it is to corrupt a filesystem.

However I'm unsure of how scalable a pure file system based Wiki is, I
think
if you put it on a mirrored disk with a decent cache on the Raid
controller,
you'll be fine performance and DR wise.

If its Linux, then MD based (software raids) works pretty well.

- aurf



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


I also recommend dokuwiki (with a k, not c :) ): http://www.dokuwiki.org/

Regards,

Jonathan

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




--
====================================
Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com
------------------------------------
Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

--- End Message ---
--- Begin Message ---
Well, if you want to get really extreme, you could use TiddlyWiki:
http://www.tiddlywiki.com/

It's a wiki contained in a single HTML file.  No database.  No server side 
scripting.  No server!  hah

-TG

----- Original Message -----
From: Skip Evans <[email protected]>
To: TG <[email protected]>
Cc: Jonathan Tapicer <[email protected]>, [email protected], 
"[email protected]" <[email protected]>
Date: Wed, 25 Nov 2009 22:33:54 -0600
Subject: Re: [PHP] Wiki recommendation?

> Hey all,
> 
> Thanks much for the recommendations. I'll check them out.
> 
> We don't need fine grained control over access; basically 
> admins that can modify content and the public who cannot.
> 
> But right now DocuWiki is sounding good, and I'd rather, for 
> some strange reason, not use a DB, although I can't justify 
> that in any rational way. I mean, MySQL is already on the machine.
> 
> Thanks again!
> 
> Skip
> 
> TG wrote:
> > A while back I set up a TikiWiki for a client.  I think I liked it 
better 
> > than any of the other wikis I've messed with.  But honestly, I didn't 
get 
> > to use it much and I've only ever used Mediawiki to any real length.
> > 
> > Definitely give it a look, though.
> > 
> > -TG
> > 
> > ----- Original Message -----
> > From: Jonathan Tapicer <[email protected]>
> > To: [email protected]
> > Cc: Skip Evans <[email protected]>, "[email protected]" 
> > <[email protected]>
> > Date: Wed, 25 Nov 2009 23:54:07 -0300
> > Subject: Re: [PHP] Wiki recommendation?
> > 
> >> On Wed, Nov 25, 2009 at 8:37 PM,  <[email protected]> wrote:
> >>> On Nov 25, 2009, at 2:42 PM, Skip Evans wrote:
> >>>
> >>>> Hey all,
> >>>>
> >>>> I'm looking for a good Wiki to maintain documentation on a large
> >>>> commercial web site that is always growing.
> >>>>
> >>>> DokuWiki is the only one I've installed and used at any length, so 
> > before
> >>>> I just use that one again I'd like to hear from the peanut gallery 
what
> >>>> other suggestions you'd have.
> >>>>
> >>>> Remember, this will be for end user documentation for a large 
> > commercial
> >>>> CMS type system, something site admins will go to for information on 
> > site
> >>>> features, updates, etc.
> >>>>
> >>>> Let the shouting begin!
> >>>>
> >>>> Thanks, all, and a very happy eating-charred-dead-bird-flesh day to 
you
> >>>> all!!!
> >>>>
> >>>> Skip
> >>>
> >>> Well, I've used DocuWiki and bit new to MediaWiki which I think 
> > WikiPedia
> >>> uses.
> >>>
> >>> MediaWiki uses a MySQL DB were as DocuWiki is a tree dir structure 
kind 
> > of
> >>> thing.
> >>>
> >>> I actually prefer DocuWiki but maybe thats because I didn't setup 
> > MediaWiki
> >>> correctly.
> >>>
> >>> Cacti uses DocuWiki by the way and I personally avoid DB usage if 
> > possible.
> >>> I think its easier to corrupt a DB then it is to corrupt a filesystem.
> >>>
> >>> However I'm unsure of how scalable a pure file system based Wiki is, 
I 
> > think
> >>> if you put it on a mirrored disk with a decent cache on the Raid 
> > controller,
> >>> you'll be fine performance and DR wise.
> >>>
> >>> If its Linux, then MD based (software raids) works pretty well.
> >>>
> >>> - aurf
> >>>
> >>>
> >>>
> >>> --
> >>> PHP General Mailing List (http://www.php.net/)
> >>> To unsubscribe, visit: http://www.php.net/unsub.php
> >>>
> >>>
> >> I also recommend dokuwiki (with a k, not c :) ): 
http://www.dokuwiki.org/
> >>
> >> Regards,
> >>
> >> Jonathan
> >>
> >> -- 
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> > 
> 
> -- 
> ====================================
> Skip Evans
> PenguinSites.com, LLC
> 503 S Baldwin St, #1
> Madison WI 53703
> 608.250.2720
> http://penguinsites.com
> ------------------------------------
> Those of you who believe in
> telekinesis, raise my hand.
>   -- Kurt Vonnegut
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
Skip Evans wrote:
Hey all,

Thanks much for the recommendations. I'll check them out.

We don't need fine grained control over access; basically admins that can modify content and the public who cannot.

But right now DocuWiki is sounding good, and I'd rather, for some strange reason, not use a DB, although I can't justify that in any rational way. I mean, MySQL is already on the machine.

Perhaps good enough reason for NOT wanting to use a database ;)
Although a lot more stable than it used to be - but until one can run a backup transparently at intervals is it really suitable for live data? My own live sites just mirror to a backup machine including a backup of the database automatically.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---
Jonathan Tapicer wrote:

> I also recommend dokuwiki (with a k, not c :) ):
> http://www.dokuwiki.org/

I will add just my 2 cts to that. I have used several wikis but I always 
come back to DokuWiki. Among other things that I like about it, like 
plugins, is the fact that it is file based. It can be nice sometimes to 
be able to make certain changes to your pages with a normal editor, 
search and replace tool or whatever.

--- End Message ---
--- Begin Message ---
LPAC - Arts for Youth - Seat OrdersI am getting the following error message,
but ONLY on a page where I am querying multiple tables, and I don't see the
correlation:

*
*
*Warning*: Unknown: Your script possibly relies on a session side-effect
which existed until PHP 4.2.3. Please be advised that the session extension
does not consider global variables as a source of data, unless
register_globals is enabled. You can disable this functionality and this
warning by setting session.bug_compat_42 or session.bug_compat_warn to off,
respectively in *Unknown* on line *0*

I have Googled this extensively, and the solutions other people tried
(turning off the warning) don't work for me; I don't have permission to my
PHP settings (currently working on a free-hosted site).

Does ANYONE know what might be causing this?

On my login page, I use this code snippet to instantiate my SESSION
variables for the session:

// Register $myusername, $mypassword and redirect to "default.php?page=211"
$_SESSION['myusername'] = $myusername;
$_SESSION['mypassword'] = $mypassword;

Again, the error only comes up on the page where I am querying multiple.

If you would like to take a look at this, follow this link and sign in as
username: micky  & password: 123456 (
http://lpacmarketing.hostzi.com/afy/orders/)

You will notice on other pages, that error doesn't display, just this one.

Any help would be wonderful, I don't want my users to see this when the
order system is opened for their use.

Thanks!

--- End Message ---
--- Begin Message ---
Hello,

on 11/25/2009 05:53 AM Tanveer Chowdhury said the following:
> Hi all,
> 
> I have an apache server and for that I created CA as the signing authority
> using openssl.
> 
> Now I created a  php page which will generate client certificates with key
> and will sign by CA. Now the output is in .pem .
> Now how to convert it in .p12 for exporting it in client browser..
> 
> Again, If using exec gives another problem which is it asks for export
> password so how to give this via php.

You may want to take a look at this class:

http://www.phpclasses.org/crypt_openssl

-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
Has anyone done any work towards packaging of PHP in a manner similar to jar or 
eggs? I was working on a project the other day with a lot of class files and 
thought this would be a cool, simple way to deploy the app. 



--- End Message ---
--- Begin Message ---
On Thu, Nov 26, 2009 at 11:50 AM,  <[email protected]> wrote:
>
> Has anyone done any work towards packaging of PHP in a manner similar to jar 
> or eggs? I was working on a project the other day with a lot of class files 
> and thought this would be a cool, simple way to deploy the app.

Yes; Greg Beaver has done a lot of work with PHAR, which is very
similar. See http://au2.php.net/phar

Cheers

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

I have been trying for the last couple of hours to determine the
encoding of a text file (.txt in windowz).

I have this code:

        $contents = file_get_contents($config['
txt_dir'] . $file);
        $encoding = mb_detect_encoding($contents,
"UTF-8,ISO-8859-1,WINDOWS-1252"); //,Windows-1255

        echo "||encoding:".$encoding."||";

        if ($encoding == 'UTF-8')
        {
            $utfcontents = $contents;
        }
        else if ($encoding == 'ISO-8859-1')
        {
            $utfcontents = utf8_encode($contents);
        }

        var_dump($utfcontents);

The $encoding is ISO-8859-1, the text file contains Hebrew characters, then
I'm converting it to utf8.

The above code is outputing gibbrish, it seems that it has converted it in
some way but not in the
proper way that it should have converted it.

My page is UTF-8 encoded, without BOM, I send UTF-8 headers to the browser
and HTML content
encoding meta tag as well.

I have no idea what I am doing wrong.

I would highly appreciate it if someone could point me to the right
direction.

Thanks in Advance,

Nitsan

--- End Message ---
--- Begin Message ---
On Thu, 26 Nov 2009 06:55:31 +0200, Nitsan Bin-Nun wrote:

> Hi,
> 
> I have been trying for the last couple of hours to determine the
> encoding of a text file (.txt in windowz).
> 
> I have this code:
> 
>         $contents = file_get_contents($config['
> txt_dir'] . $file);
>         $encoding = mb_detect_encoding($contents,
> "UTF-8,ISO-8859-1,WINDOWS-1252"); //,Windows-1255
> 
>         echo "||encoding:".$encoding."||";
> 
>         if ($encoding == 'UTF-8')
>         {
>             $utfcontents = $contents;
>         }
>         else if ($encoding == 'ISO-8859-1')
>         {
>             $utfcontents = utf8_encode($contents);
>         }
> 
>         var_dump($utfcontents);
> 
> The $encoding is ISO-8859-1, the text file contains Hebrew characters, then
> I'm converting it to utf8.
> 
> The above code is outputing gibbrish, it seems that it has converted it in
> some way but not in the
> proper way that it should have converted it.

If you know that the file contains Hebrew, maybe you should
try converting from ISO-8859-8?


/Nisse

--- End Message ---

Reply via email to