Edwin Barrios | 1 Aug 2005 01:10
Picon

Performace and segfault errors with Php5 + Apache 1.3.x + linux-2.6.x

i'am developing  a web framework SifEngine (Secure Web Inteface
framework) that implement MVC applaying the security ideas from
http://phpsec.org. I'am using DomXML, Sqlite, Mcrypt and PostgreSql.

After  of post my development on the internet ( i have been thinking
to post on PEAR ), i made simple tests of aplications with my
framework. During the implementation, i used Slackware 10.1 with
kernel 2.4.29 + php5.0.4 + Apache 1.3.2, with no problems. I didn't
detect  performace problems or segfaults by apache.  Then i decided to
do the same test but with kernel 2.6.10, wating that no problems
occur. However my expectation, on this new configuration all the
aplications develped with my framework, had performance issues or in
the worst situation produce apache forks  to be restarted, or a lot of
apache forks.

i don't undestand why this occur, i try to use valigrand to verify
memorie lacks without results.

Someone can help me, with this problem !

On this moment i'm using SIfEngine, to implement my proyects only on
kernel 2.4.x !

Thanks !

Atte:
Edwin Hernan Barrios Nuñez
iBand Networks Ltda.
www.iband.net

(Continue reading)

Ethilien | 1 Aug 2005 01:15

Re: Re: preg_match_all question

Actually, I meant what is an actual example of a link it will match. 
like <a href="something.htm">text</a> for example.

Chris Bruce wrote:
> It matches any link with the exception of https links.
> 
> On Jul 20, 2005, at 3:36 PM, Ethilien wrote:
> 
>> I don't see anything in this regex that would prevent https from being 
>> matched, since you don't specify the pattern of the actual url at all.
>>
>> What is an example of a link that it will match?
>>
>> Chris Bruce wrote:
>>
>>> Hello,
>>> I am using the following to do link replacing:
>>> preg_match_all("/<\s*a\s+[^>]*href\s*=\s*[\"']?([^\"' >]+)[\"'  
>>> >]/isU",$file[$x],$matches);
>>> It works great for all but 'https' links. I am not that versed in 
>>> regular expressions. Would anyone know what I need to put in there so 
>>> that it will match on https links?
>>> Thanks,
>>> Chris

--

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

(Continue reading)

Sam Smith | 1 Aug 2005 02:04

what is this: dirname(__FILE__)?


I don't recognize this something(__SOMETHING__) format. I know what it's
doing but I don't know how it's doing it.

The whole thing is "$fdf_dir=dirname(__FILE__).'/results';" and of course
it's setting that var $fdf_dir to the path to a file.

Is there something significant about the double underscores "__"?

Why the parentheses, it's not a function?

Sorry lame question but I don't know this.

Thanks 

--

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

Robert Cummings | 1 Aug 2005 02:18
Favicon
Gravatar

Re: what is this: dirname(__FILE__)?

On Sun, 2005-07-31 at 20:04, Sam Smith wrote:
> I don't recognize this something(__SOMETHING__) format. I know what it's
> doing but I don't know how it's doing it.

Constants of the type __SOMETHING__ are historical constants for
retrieving contextual information about the source code in which the
constant is found. For instance __FILE__ indicates the name of the
source file in which the __FILE__ constant is found. This nomenclature
dates back to at least C and is probably kept for historical reasons
since everyone knows C is da bomb!

> The whole thing is "$fdf_dir=dirname(__FILE__).'/results';" and of course
> it's setting that var $fdf_dir to the path to a file.

This means it's setting $fdf_dir to the path to a file called "results"
that is in the same directory as the source file containing __FILE__.

> Is there something significant about the double underscores "__"?

Yep as stated above :) There are numberous such constants such as
__LINE__ to retrieve the current source code line number (very useful
for debugging at times), __CLASS__, __FUNCTION__ etc.

> Why the parentheses, it's not a function?

dirname() is a function.

> Sorry lame question but I don't know this.

RTFM ;)
(Continue reading)

Roger Thomas | 1 Aug 2005 04:45
Picon

RE: Calendar program like on php.net

Quoting Jim Moseby <JMoseby <at> nrbindustries.com>:

> I'd repost the link for you, but I've already deleted it.  Sorry. Look back through the archives.
> 
> JM
> 

I searched for 'Jim Moseby calendar' in the general and Dev mailing list but no go. Anty clue?

--
Roger

---------------------------------------------------
Sign Up for free Email at http://ureg.home.net.my/
---------------------------------------------------

--

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

Tom Ray [Lists] | 1 Aug 2005 05:29

Re: Sessions Issue

phpinfo() says that sessions are disabled. So, between that and the fact 
I get the undefined function errors when I try to use session_start() or 
other session commands, I'm under the strong impression that sessions 
are disabled.

So this leads me back to my original questions, can I activate sessions 
without recompiling? And if I can't, how do I recompile since I used the 
SuSE cd's and YasT?

John Nichel wrote:

> Tom Ray [Lists] wrote:
>
>> We built a box about 7 months or so ago using the SuSE 9.1 cd's, 
>> straight install from the CDs. While I've read that sessions are 
>> turned on by default, when we try to call on the sessions functions 
>> (like with phpOpenChat or start_session()) we get calls to undefined 
>> function errors. This is leading me to belive that sessions are 
>> disabled for some reason. I need to enable the sessions so I have a 
>> few questions
>>
>> 1) Can I do this without recompiling?
>> 2) If I can't, how do I recompile this since I used the SuSE cds?
>>
>> It's SuSE 9.1 running Php 4.3.4 with APache 2.0.49
>>
>> any help would be great!
>
>
> What does phpinfo() say?
(Continue reading)

Rasmus Lerdorf | 1 Aug 2005 05:36

Re: Sessions Issue

Tom Ray [Lists] wrote:
> phpinfo() says that sessions are disabled. So, between that and the fact
> I get the undefined function errors when I try to use session_start() or
> other session commands, I'm under the strong impression that sessions
> are disabled.
> 
> So this leads me back to my original questions, can I activate sessions
> without recompiling? And if I can't, how do I recompile since I used the
> SuSE cd's and YasT?

Perhaps SuSE has a separate php-sessions package?  It would be a bit
crazy to do it that way, but it is possible to build the session
extension as a standalone extension.

-Rasmus

--

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

Jack Jackson | 1 Aug 2005 06:36
Picon

error checking a null array

hi,
I have checkboxes beging dynamically generated. to seperate tasks in 
error checking I have added he arrays not just to $_POST but to 
$_POST[cb]  so names (derived from question numbers) are for example:

$_POST[cb][7]

A dump of $_POST would therefore include something like

["cb"]=>  array(1) { [7]=>  array(1) { [0]=>  string(3) "124" } }

  So I did this:

//error checking for checkboxes	
foreach ($cb as $cbkey => $cbvalue)
    {
       foreach($cbvalue as $cbkey2=>$cb_answers)
       {
          if( !array_key_exists($_POST[$cbkey], $cb));
          {
          $message[$cbkey]=1;
          }
        }
    }

This almost works. The problem is that if someone doesn't check a 
checkbox, NOTHING related to the checkbox gets sent to $_POST; if I 
insert a hidden value of something, then that hidden value gets passed 
whether the user inputs something or not, since I need an entirely 
server-side solution. Is there a way to send something to tell the error 
(Continue reading)

David Robley | 1 Aug 2005 07:18
Picon
Picon

Re: error checking a null array

Jack Jackson wrote:

> hi,
> I have checkboxes beging dynamically generated. to seperate tasks in
> error checking I have added he arrays not just to $_POST but to
> $_POST[cb]  so names (derived from question numbers) are for example:
> 
> $_POST[cb][7]
> 
> A dump of $_POST would therefore include something like
> 
> ["cb"]=>  array(1) { [7]=>  array(1) { [0]=>  string(3) "124" } }
> 
>   So I did this:
> 
> //error checking for checkboxes
> foreach ($cb as $cbkey => $cbvalue)
>     {
>        foreach($cbvalue as $cbkey2=>$cb_answers)
>        {
>           if( !array_key_exists($_POST[$cbkey], $cb));
>           {
>           $message[$cbkey]=1;
>           }
>         }
>     }
> 
> This almost works. The problem is that if someone doesn't check a
> checkbox, NOTHING related to the checkbox gets sent to $_POST; if I
> insert a hidden value of something, then that hidden value gets passed
(Continue reading)

Jack Jackson | 1 Aug 2005 07:25
Picon

Re: Re: error checking a null array


David Robley wrote:
> Jack Jackson wrote:
> 
> 
>>hi,
>>I have checkboxes beging dynamically generated. to seperate tasks in
>>error checking I have added he arrays not just to $_POST but to
>>$_POST[cb]  so names (derived from question numbers) are for example:
>>
>>$_POST[cb][7]
>>
>>A dump of $_POST would therefore include something like
>>
>>["cb"]=>  array(1) { [7]=>  array(1) { [0]=>  string(3) "124" } }
>>
>>  So I did this:
>>
>>//error checking for checkboxes
>>foreach ($cb as $cbkey => $cbvalue)
>>    {
>>       foreach($cbvalue as $cbkey2=>$cb_answers)
>>       {
>>          if( !array_key_exists($_POST[$cbkey], $cb));
>>          {
>>          $message[$cbkey]=1;
>>          }
>>        }
>>    }
>>
(Continue reading)


Gmane