php-general Digest 7 May 2008 05:50:45 -0000 Issue 5445

Topics (messages 273958 through 273966):

Re: Where to start!
        273958 by: Robert Cummings

Re: Incorrect version shown in phpinfo() and phpversion() in 5.2.6
        273959 by: Scott Lerman
        273962 by: Mario Guenterberg

Re: Regex to catch <p>s
        273960 by: Shawn McKenzie

Re: Re[PHP] gex to catch <p>s
        273961 by: vester_s

Re: PHP Web Apps & OpenID
        273963 by: Chris

the Y2K38 BUG
        273964 by: Chetan Rane
        273965 by: Paul Scott
        273966 by: Nathan Nobbe

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 ---
On Tue, 2008-05-06 at 13:42 -0400, tedd wrote:
> At 10:14 AM -0400 5/6/08, Andrew Ballard wrote:
> >On Tue, May 6, 2008 at 9:21 AM, tedd <[EMAIL PROTECTED]> wrote:
> >I will respectfully (though strongly) disagree here, tedd. If you are
> >building a guest book and all you need is a place to "store and
> >retrieve stuff," store it in a file rather than a database. If you
> >only have one form to collect and store information, this will be more
> >than sufficient.
> >
> >If you are doing something more complex where you need to relate
> >information (say, for example, forum members <-> forum topics <->
> >forum messages, or customers <-> orders <-> items, etc.) then you are
> >far better off to think about what you need to store and plan your
> >database first. Doing that will make your data model much better from
> >the start, and you can also start planning out what your HTML pages
> >need to be collecting as it relates to how the data is stored.
> >
> >Andrew
> 
> Andrew:
> 
> Well, you can certainly disagree -- we all do things differently. 
> What works for me, doesn't work for you and vise versa -- but that's 
> the way of things.
> 
> I understand relational dB's and how to use them, but I don't think 
> the OP was talking about that, but rather getting something much more 
> simple up and running.
> 
> Rob, who I respect greatly, said that 90 percent of what you are 
> doing should be decided before you start programming. But, I never 
> work that way either.
> 
> I always jump right in and use the computer to design stuff. I never 
> resort to making a story-book layout or poster board work-up or 
> anything like that. I just don't work that way.

I don't do much of that either unless I want to sort some complex things
out that aren't easy to visualize in my head. When I say 90% of your DB
should be designed before you start writing code... well, I usually
thinking about the create statements (I guess some people might call
those code), not drawing charts :)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


--- End Message ---
--- Begin Message ---
Yup, I restarted Apache several times. The httpd.conf line I have is
LoadModule php5_module "C:/Program
Files/PHP/php-5.2.6-Win32/php5apache2.dll". If nobody else has seen
this problem, I'll just assume it's some oddity on my system. I just
figured I'd mention it in case others were having the same problem.

On Tue, May 6, 2008 at 12:49 PM, Daniel Brown <[EMAIL PROTECTED]> wrote:
>
> On Tue, May 6, 2008 at 11:57 AM, Scott Lerman <[EMAIL PROTECTED]> wrote:
>  > Has anyone else seen incorrect information on a phpinfo() page on the
>  >  Windows build of 5.2.6? The Apache log shows "Apache/2.0.63 (Win32)
>  >  PHP/5.2.6 configured -- resuming normal operations", but phpinfo() and
>  >  phpversion() still show 5.2.5. The CLI executable does show the
>  >  correct version, though.
>
>     Did you remember to restart Apache?  I know the message you
>  printed above from the log would indicate such, but it never hurts to
>  double-check.
>
>     Also, are you certain that it's using the correct DLL by
>  configuration in both httpd.conf and any .htaccess files?
>
>  --
>  </Daniel P. Brown>
>  Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
>  $59.99/mo. with no contract!
>  Dedicated servers, VPS, and hosting from $2.50/mo.
>



-- 
Scott Lerman

--- End Message ---
--- Begin Message ---
On Tue, May 06, 2008 at 02:00:33PM -0400, Scott Lerman wrote:
> Yup, I restarted Apache several times. The httpd.conf line I have is
> LoadModule php5_module "C:/Program
> Files/PHP/php-5.2.6-Win32/php5apache2.dll". If nobody else has seen
> this problem, I'll just assume it's some oddity on my system. I just
> figured I'd mention it in case others were having the same problem.

It's better to use a path without whitespaces, eg. c:\php instead of
c:\program files\php.

Have you copied some php5XXXXX.dlls from prior installations of php to
windows's system folder?

Greetings
guenti

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM d- s++: a+ C++++>$ UBL*++++$ P++ L+++ E--- W+++ N+ o-- K- w O- M-
V-- PS++ PE++ Y PGP+++ t--- 5 X++++ R++ tv- b+++ DI D++++  G++ e* h----
r+++ y++++
------END GEEK CODE BLOCK------

--- End Message ---
--- Begin Message ---
Ryan S wrote:

<clip>
 To say I suck at regex is an understatement so really need any help I can get on this, I have a page of text 
with different html tags in them, but each "block" of text has a <p> or a < 
class="something"> tag... anybody have any regex that will catch each of these paragraphs and put 
then into an array


If you're using php5 you can use DOM's getElementsByTagName.

If you still think you need to do some sort of regex it is possible
but it will be buggy at best.


</clip>

Nope, need a regex... guess I have no choice, either chancy regex or nothing... I know for a 
fact that the first paragraph tag wont contain a class, and for the <p> tags that contain 
a class="blah" does it matter that i know exactly what the classname is?



      
____________________________________________________________________________________
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

preg_match_all('|<p[^>]*>(.*)</p>|Ui', $myText, $myArray);

--- End Message ---
--- Begin Message ---
$tag_regex=array(
  '/\<p(\s*)\>(.*?)\<\/p\> /si' => "$1",
  '/\<(\s*)(*.?)class\=(*.?)\>(.*?)\<\/(*.?)\>/si' => "$3"
);

$paragraphs=preg_replace(array_keys($tag_regex),array_values($tag_regex),$page);

I am not sure what tag is that you mean on <class="something">, but in this
RE .. it should capture any <p> tags (the first element of the array) and
any tags (the second element of the array) that has attribute class on it. 

You can find another example of this kind of HTML parsing in the PHP... try
googling it..:)

HTH


Ryan S-4 wrote:
> 
> 
> 
> <clip>
>>  To say I suck at regex is an understatement so really need any help I
>> can get on this, I have a page of text with different html tags in them,
>> but each "block" of text has a <p> or a < class="something"> tag...
>> anybody have any regex that will catch each of these paragraphs and put
>> then into an array
> 
> 
> If you're using php5 you can use DOM's getElementsByTagName.
> 
> If you still think you need to do some sort of regex it is possible
> but it will be buggy at best.
> 
> 
> </clip>
> 
> Nope, need a regex... guess I have no choice, either chancy regex or
> nothing... I know for a fact that the first paragraph tag wont contain a
> class, and for the <p> tags that contain a class="blah" does it matter
> that i know exactly what the classname is?
> 
> 
> 
>      
> ____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now. 
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Re%3A-Regex-to-catch-%3Cp%3Es-tp17075329p17089906.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---
--- Begin Message ---
Joe Harman wrote:
> Hey Ya'll!
> 
> I am curious here if any of you are considering or already using
> OpenID or Windows CardSpace? Does anyone see this being a big deal???
> from a users stand point it seems like a big hassle to get started
> with it and I'm not sure if it would scare people away or not? any
> thoughts
> 
> I've been looking at some PHP scripts out there for OpenID... does
> anyone have one to recommend???

I have not used this (yet) but the zend framework has support for it:

http://framework.zend.com/manual/en/zend.openid.html

You don't have to use the whole framework to use this bit, it's designed
to allow you to only use the parts you need.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Hi all

 

Have guys heard of the the Y2K38 Bug more details are on this link

 

http://www.codeproject.com/KB/bugs/The-Year-2038-Bug.aspx

 

Can there be a possible solution. As the system which I am developing for my
client uses Unix timestamp.

This might effect my application in the future

 

Thank you, in Advance.

 

 

With Regards

 

Chetan Dattaram Rane

Software Engineer

 

 

 

<<image002.jpg>>


--- End Message ---
--- Begin Message ---
On Wed, 2008-05-07 at 10:03 +0530, Chetan Rane wrote:
> Have guys heard of the the Y2K38 Bug more details are on this link
> 

Nope, but I can guess what its about.

> Can there be a possible solution. As the system which I am developing
> for my client uses Unix timestamp.
> 

There are probably multiple solutions. AFAIK time is a 32 bit signed
int, making it unsigned would add like 100 years onto your app.

> This might effect my application in the future
> 

If your app survives that long! Why not just maintain it and when times
change, your app changes? :)

Seriously, this is really not a big deal!
>  
> 
> Thank you, in Advance.

It's a pleasure my paranoid son...

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm 

--- End Message ---
--- Begin Message ---
On Tue, May 6, 2008 at 10:57 PM, Paul Scott <[EMAIL PROTECTED]> wrote:

>
> On Wed, 2008-05-07 at 10:03 +0530, Chetan Rane wrote:
> > Have guys heard of the the Y2K38 Bug more details are on this link
> >
>
> Nope, but I can guess what its about.
>
> > Can there be a possible solution. As the system which I am developing
> > for my client uses Unix timestamp.
> >
>
> There are probably multiple solutions. AFAIK time is a 32 bit signed
> int, making it unsigned would add like 100 years onto your app.
>
> > This might effect my application in the future
> >
>
> If your app survives that long! Why not just maintain it and when times
> change, your app changes? :)
>
> Seriously, this is really not a big deal!


true-that ;)
anyway, the DateTime class is implemented as a 64-bit unsigned (i think)
value.  so if you use it you should be good to go.

php > echo date_create('2040-10-24')->format('M-d-Y');
Oct-24-2040

-nathan

--- End Message ---

Reply via email to