php-general Digest 25 Feb 2009 21:58:17 -0000 Issue 5979

Topics (messages 288782 through 288794):

Re: syntax
        288782 by: Terion Miller
        288783 by: Ashley Sheridan
        288785 by: Rick Duval

Is eAccelerator causing these memory leaks?
        288784 by: jpmad4it
        288786 by: Shawn McKenzie
        288787 by: jpmad4it

Web Development work
        288788 by: Ernie Kemp
        288789 by: 9el
        288794 by: Ernie Kemp

Spaces Not Detected from Regular Expression preg_match
        288790 by: Alice Wei
        288791 by: Shawn McKenzie
        288792 by: Shawn McKenzie
        288793 by: Shawn McKenzie

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
>
>>
>> SELECT something FROM tbl_name
>>    -> WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col;
>>
>> Taking that and changing it so it works for you would result in the
>> following.
>>
>> $query .= " WHERE DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= `stamp`";
>>
>> Try that and let us know your results.  */for the archives of course/*
>>
>> Jim Lucas
>>
>>
> Well, looking a little closer, you will need to change a little more. Try
> this instead.
>
> The first should work, but if it doesn't match, try the second.
>
> " WHERE DATE_SUB(NOW(), INTERVAL 7 DAY) <= `stamp`";
>
> or
>
> " WHERE CONVERT(DATE_SUB(NOW(), INTERVAL 7 DAY), DATETIME) <= `stamp`";
>
> also, check these to links out for more information:
>
> http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-add
> http://dev.mysql.com/doc/refman/5.1/en/cast-functions.html#function_convert
>

Thanks for the suggestions Jim and everyone
I will be trying them today, I realized yesterday that here I was trying to
write date functions to pull records that were within 7 days which doesn't
really work when the db has JUST been created and only has some fake records
I added in it from the the same day..lol...now I'm wondering if I can put
some in and just put in the mySQL timestamp in the "stamp" field myself or
basically change it to reflect older records so I can test the stamp
comparisons ...

--- End Message ---
--- Begin Message ---
On Wed, 2009-02-25 at 07:17 -0600, Terion Miller wrote:
> >
> >>
> >> SELECT something FROM tbl_name
> >>    -> WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col;
> >>
> >> Taking that and changing it so it works for you would result in the
> >> following.
> >>
> >> $query .= " WHERE DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= `stamp`";
> >>
> >> Try that and let us know your results.  */for the archives of course/*
> >>
> >> Jim Lucas
> >>
> >>
> > Well, looking a little closer, you will need to change a little more. Try
> > this instead.
> >
> > The first should work, but if it doesn't match, try the second.
> >
> > " WHERE DATE_SUB(NOW(), INTERVAL 7 DAY) <= `stamp`";
> >
> > or
> >
> > " WHERE CONVERT(DATE_SUB(NOW(), INTERVAL 7 DAY), DATETIME) <= `stamp`";
> >
> > also, check these to links out for more information:
> >
> > http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-add
> > http://dev.mysql.com/doc/refman/5.1/en/cast-functions.html#function_convert
> >
> 
> Thanks for the suggestions Jim and everyone
> I will be trying them today, I realized yesterday that here I was trying to
> write date functions to pull records that were within 7 days which doesn't
> really work when the db has JUST been created and only has some fake records
> I added in it from the the same day..lol...now I'm wondering if I can put
> some in and just put in the mySQL timestamp in the "stamp" field myself or
> basically change it to reflect older records so I can test the stamp
> comparisons ...
Yes you can. I tend to just use phpMyAdmin for stuff like that, as it's
generally quicker to fire that up than write a script and run it!


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
 WHERE
  date >= DATE_SUB(NOW(), INTERVAL 7 DAY)

Works just fine for me.

R

On Tue, Feb 24, 2009 at 4:15 PM, Terion Miller <webdev.ter...@gmail.com>wrote:

> Need syntax help when it comes to using a timestamp.
> What I'm trying to say in my query WHERE clause is to select records if the
> timestamp on the record is in the past 7 days from NOW()
>
> $query .= " WHERE stamp < NOW()-7 ";  I have no clue here on this ....
>
> the lay language is  WHERE stamp is within the past 7 days.... how to php
> that? lol
> Thanks
> Terion
>
> Happy Freecycling
> Free the List !!
> www.freecycle.org
> Over Moderation of Freecycle List Prevents Post Timeliness.
> ------------------------------------------------
> Twitter?
> http://twitter.com/terionmiller
> ------------------------------------------------
> Facebook:
> <a href="http://www.facebook.com/people/Terion-Miller/1542024891";
> title="Terion Miller's Facebook profile" target=_TOP><img src="
> http://badge.facebook.com/badge/1542024891.237.919247960.png"; border=0
> alt="Terion Miller's Facebook profile"></a>
> Vince Lombardi  - "Winning is habit. Unfortunately, so is losing."
>
> --
> This message has been scanned for
> viruses and dangerous content by
> Accurate Anti-Spam Technologies
> and is believed to be clean.
> i...@accurateantispam.com
>
>

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

I've installed eAccelerator 0.9.5.3 for PHP (installed as an Apache module). 

I have noticed that when I use my TYPO3 application, I am getting memory
leak errors in Apache's error log. These errors only appear after I restart
Apache, and not whilst I am browsing the PHP pages. If I disable
eAccelerator I do not get these memory leaks:

Hi everyone,

I've installed eaccelerator 0.9.5.3 for PHP (installed as an Apache
module).

I have noticed that when I use my TYPO3 application, I am getting
memory leak errors in Apache's error log. These errors only appear
after I restart Apache, and not whilst I am browsing the PHP pages:


[Tue Feb 24 15:45:02 2009] [notice] SIGHUP received.  Attempting to
restart
[Tue Feb 24 15:45:03 2009] [notice] Digest: generating secret for
digest authentication ...
[Tue Feb 24 15:45:03 2009] [notice] Digest: done
[Tue Feb 24 15:45:04 2009] [notice] Apache/2.2.10 (Unix) mod_ssl/
2.2.10 OpenSSL/0.9.8i PHP/5.2.8 configured -- resuming normal
operations
[Tue Feb 24 15:45:24 2009]  Script:  '/home/apache2/htdocs/TYPO3/
index.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20004E02D18
(16 bytes), script=/home/apache2/htdocs/TYPO3/index.php
Last leak repeated 98 times
=== Total 99 memory leaks detected ===
[Tue Feb 24 15:45:46 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
mod.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20001F4D638
(16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/mod.php
=== Total 1 memory leaks detected ===
[Tue Feb 24 15:45:55 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
sysext/lowlevel/config/index.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x80533AA0 (16
bytes), script=/home/apache2/htdocs/TYPO3/typo3/sysext/lowlevel/config/
index.php
=== Total 1 memory leaks detected ===
[Tue Feb 24 15:45:59 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
mod/tools/em/index.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20002309A40
(16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/mod/tools/em/
index.php
Last leak repeated 17 times
=== Total 18 memory leaks detected ===
[Tue Feb 24 15:45:56 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
sysext/lowlevel/dbint/index.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x2000205D360
(16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/sysext/lowlevel/
dbint/index.php
Last leak repeated 10 times
=== Total 11 memory leaks detected ===
[Tue Feb 24 15:46:10 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
mod.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20001FF98D0
(16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/mod.php
Last leak repeated 3 times
=== Total 4 memory leaks detected ===
[Tue Feb 24 15:46:35 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
alt_db_navframe.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x8053A9B0 (16
bytes), script=/home/apache2/htdocs/TYPO3/typo3/alt_db_navframe.php
=== Total 1 memory leaks detected ===
[Tue Feb 24 15:46:36 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
alt_clickmenu.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20001FF4798
(16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/alt_clickmenu.php
Last leak repeated 1 time
=== Total 2 memory leaks detected ===
[Tue Feb 24 15:46:58 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
alt_shortcut.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20001FC0D48
(16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/alt_shortcut.php
Last leak repeated 1 time
=== Total 2 memory leaks detected ===
[Tue Feb 24 15:46:35 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
sysext/cms/layout/db_layout.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x200020BCF38
(16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/sysext/cms/layout/
db_layout.php
Last leak repeated 10 times
=== Total 11 memory leaks detected ===
[Tue Feb 24 15:46:45 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
mod.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x200021E4970
(16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/mod.php
Last leak repeated 7 times
=== Total 8 memory leaks detected ===
[Tue Feb 24 15:47:00 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
db_list.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20001FA2560
(16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/db_list.php
=== Total 1 memory leaks detected ===
[Tue Feb 24 16:09:36 2009] [notice] SIGHUP received.  Attempting to
restart
[Tue Feb 24 16:09:36 2009] [notice] Digest: generating secret for
digest authentication ...
[Tue Feb 24 16:09:36 2009] [notice] Digest: done
[Tue Feb 24 16:09:37 2009] [notice] Apache/2.2.10 (Unix) mod_ssl/
2.2.10 OpenSSL/0.9.8i PHP/5.2.8 configured -- resuming normal
operations
[Tue Feb 24 16:14:06 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
sysext/lowlevel/dbint/index.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x200020B30C0
(16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/sysext/lowlevel/
dbint/index.php
=== Total 1 memory leaks detected ===
[Tue Feb 24 16:14:12 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
mod/user/ws/index.php'
/home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x200020315C8
(16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/mod/user/ws/
index.php
Last leak repeated 6 times
=== Total 7 memory leaks detected ===
[Tue Feb 24 16:15:41 2009] [notice] SIGHUP received.  Attempting to
restart
[Tue Feb 24 16:15:42 2009] [notice] Digest: generating secret for
digest authentication ...
[Tue Feb 24 16:15:42 2009] [notice] Digest: done
[Tue Feb 24 16:15:43 2009] [notice] Apache/2.2.10 (Unix) mod_ssl/
2.2.10 OpenSSL/0.9.8i PHP/5.2.8 configured -- resuming normal
operations

My config is as follows:

extension=eaccelerator.so
eaccelerator.shm_size="0"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.log_file = "/home/apache2/logs/eaccelerator_log"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="3600"
eaccelerator.shm_prune_period="180"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

- Running on zLinux s390x, SLES10 Sp2 64bit

- PHP 5.2.8

Can anyone advise on what to do? Are these serious faults? Do I need to
report them to PHP?

Any help is much appreciated.

kind regards
Jp

-- 
View this message in context: 
http://www.nabble.com/Is-eAccelerator-causing-these-memory-leaks--tp22203445p22203445.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---
--- Begin Message ---
jpmad4it wrote:
> Hi everyone, 
> 
> I've installed eAccelerator 0.9.5.3 for PHP (installed as an Apache module). 
> 
> I have noticed that when I use my TYPO3 application, I am getting memory
> leak errors in Apache's error log. These errors only appear after I restart
> Apache, and not whilst I am browsing the PHP pages. If I disable
> eAccelerator I do not get these memory leaks:
> 
> Hi everyone,
> 
> I've installed eaccelerator 0.9.5.3 for PHP (installed as an Apache
> module).
> 
> I have noticed that when I use my TYPO3 application, I am getting
> memory leak errors in Apache's error log. These errors only appear
> after I restart Apache, and not whilst I am browsing the PHP pages:
> 
> 
> [Tue Feb 24 15:45:02 2009] [notice] SIGHUP received.  Attempting to
> restart
> [Tue Feb 24 15:45:03 2009] [notice] Digest: generating secret for
> digest authentication ...
> [Tue Feb 24 15:45:03 2009] [notice] Digest: done
> [Tue Feb 24 15:45:04 2009] [notice] Apache/2.2.10 (Unix) mod_ssl/
> 2.2.10 OpenSSL/0.9.8i PHP/5.2.8 configured -- resuming normal
> operations
> [Tue Feb 24 15:45:24 2009]  Script:  '/home/apache2/htdocs/TYPO3/
> index.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20004E02D18
> (16 bytes), script=/home/apache2/htdocs/TYPO3/index.php
> Last leak repeated 98 times
> === Total 99 memory leaks detected ===
> [Tue Feb 24 15:45:46 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> mod.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20001F4D638
> (16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/mod.php
> === Total 1 memory leaks detected ===
> [Tue Feb 24 15:45:55 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> sysext/lowlevel/config/index.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x80533AA0 (16
> bytes), script=/home/apache2/htdocs/TYPO3/typo3/sysext/lowlevel/config/
> index.php
> === Total 1 memory leaks detected ===
> [Tue Feb 24 15:45:59 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> mod/tools/em/index.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20002309A40
> (16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/mod/tools/em/
> index.php
> Last leak repeated 17 times
> === Total 18 memory leaks detected ===
> [Tue Feb 24 15:45:56 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> sysext/lowlevel/dbint/index.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x2000205D360
> (16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/sysext/lowlevel/
> dbint/index.php
> Last leak repeated 10 times
> === Total 11 memory leaks detected ===
> [Tue Feb 24 15:46:10 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> mod.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20001FF98D0
> (16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/mod.php
> Last leak repeated 3 times
> === Total 4 memory leaks detected ===
> [Tue Feb 24 15:46:35 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> alt_db_navframe.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x8053A9B0 (16
> bytes), script=/home/apache2/htdocs/TYPO3/typo3/alt_db_navframe.php
> === Total 1 memory leaks detected ===
> [Tue Feb 24 15:46:36 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> alt_clickmenu.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20001FF4798
> (16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/alt_clickmenu.php
> Last leak repeated 1 time
> === Total 2 memory leaks detected ===
> [Tue Feb 24 15:46:58 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> alt_shortcut.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20001FC0D48
> (16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/alt_shortcut.php
> Last leak repeated 1 time
> === Total 2 memory leaks detected ===
> [Tue Feb 24 15:46:35 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> sysext/cms/layout/db_layout.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x200020BCF38
> (16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/sysext/cms/layout/
> db_layout.php
> Last leak repeated 10 times
> === Total 11 memory leaks detected ===
> [Tue Feb 24 15:46:45 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> mod.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x200021E4970
> (16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/mod.php
> Last leak repeated 7 times
> === Total 8 memory leaks detected ===
> [Tue Feb 24 15:47:00 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> db_list.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x20001FA2560
> (16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/db_list.php
> === Total 1 memory leaks detected ===
> [Tue Feb 24 16:09:36 2009] [notice] SIGHUP received.  Attempting to
> restart
> [Tue Feb 24 16:09:36 2009] [notice] Digest: generating secret for
> digest authentication ...
> [Tue Feb 24 16:09:36 2009] [notice] Digest: done
> [Tue Feb 24 16:09:37 2009] [notice] Apache/2.2.10 (Unix) mod_ssl/
> 2.2.10 OpenSSL/0.9.8i PHP/5.2.8 configured -- resuming normal
> operations
> [Tue Feb 24 16:14:06 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> sysext/lowlevel/dbint/index.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x200020B30C0
> (16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/sysext/lowlevel/
> dbint/index.php
> === Total 1 memory leaks detected ===
> [Tue Feb 24 16:14:12 2009]  Script:  '/home/apache2/htdocs/TYPO3/typo3/
> mod/user/ws/index.php'
> /home/eaccelerator-0.9.5.3/optimize.c(452) :  Freeing 0x200020315C8
> (16 bytes), script=/home/apache2/htdocs/TYPO3/typo3/mod/user/ws/
> index.php
> Last leak repeated 6 times
> === Total 7 memory leaks detected ===
> [Tue Feb 24 16:15:41 2009] [notice] SIGHUP received.  Attempting to
> restart
> [Tue Feb 24 16:15:42 2009] [notice] Digest: generating secret for
> digest authentication ...
> [Tue Feb 24 16:15:42 2009] [notice] Digest: done
> [Tue Feb 24 16:15:43 2009] [notice] Apache/2.2.10 (Unix) mod_ssl/
> 2.2.10 OpenSSL/0.9.8i PHP/5.2.8 configured -- resuming normal
> operations
> 
> My config is as follows:
> 
> extension=eaccelerator.so
> eaccelerator.shm_size="0"
> eaccelerator.cache_dir="/tmp/eaccelerator"
> eaccelerator.enable="1"
> eaccelerator.log_file = "/home/apache2/logs/eaccelerator_log"
> eaccelerator.optimizer="1"
> eaccelerator.check_mtime="1"
> eaccelerator.debug="0"
> eaccelerator.filter=""
> eaccelerator.shm_max="0"
> eaccelerator.shm_ttl="3600"
> eaccelerator.shm_prune_period="180"
> eaccelerator.shm_only="0"
> eaccelerator.compress="1"
> eaccelerator.compress_level="9"
> 
> - Running on zLinux s390x, SLES10 Sp2 64bit
> 
> - PHP 5.2.8
> 
> Can anyone advise on what to do? Are these serious faults? Do I need to
> report them to PHP?
> 
> Any help is much appreciated.
> 
> kind regards
> Jp
> 

You might try eaccelerator.debug = "1" and see what additional info you
get in the logs.

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Thanks Shawn. I tried that but the log just reports the following, which I
guess is usual:

EACCELERATOR hit: /path/to/script.php
EACCELERATOR cached: /path/to/script.php

There are no mention of memory leaks, or anything else.

Anyone got any other suggestions?
-- 
View this message in context: 
http://www.nabble.com/Is-eAccelerator-causing-these-memory-leaks--tp22203445p22205819.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---
--- Begin Message ---
 

I really need your insight.

I'm a software developer who is wishing to do Web Development.

 

I love to program and I'm learning more about Web Design but my main skills
are in programming.

 

How do you get work as a Web Developer?

 

One could apply for a web developer job at a Web company but I wish to be on
my own. 

How are the freelancer finding work and where?

 

I have had my head buried in code too long to know where to find my new
cheese.

 

Any help would be appreciation..... 

 

Thanks,

Ernie Kemp   

 

 

...man will occasionally stumble over the truth, but usually manages to pick
himself up, walk over or around it, and carry on.
 
Winston S. Churchill 

 

 

 

 


--- End Message ---
--- Begin Message ---
I guess you are interested about php.

the freelancers work at www.scriptlance.com www.elance.com www.odesk.com
www.joomlalancer.com www.getacoder.com www.getafreelancer.com and many more.

I am a Web Developer at
https://www.scriptlance.com/cgi-bin/freelancers/feedback.cgi?p=lenin9el with
this id

To be a web developer you dont need to be design oriented. You can stick to
programming skills as well.

Regards

Lenin

-----------------------------------------------------------------------
Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get
a Free CD of Ubuntu mailed to your door without any cost. Visit :
www.ubuntu.com
----------------------------------------------------------------------


On Wed, Feb 25, 2009 at 11:16 PM, Ernie Kemp <ernie.k...@sympatico.ca>wrote:

>   I really need your insight.
>
> I’m a software developer who is wishing to do Web Development.
>
>
>
> I love to program and I’m learning more about Web Design but my main skills
> are in programming.
>
>
>
> How do you get work as a Web Developer?
>
>
>
> One could apply for a web developer job at a Web company but I wish to be
> on my own.
>
> How are the freelancer finding work and where?
>
>
>
> I have had my head buried in code too long to know where to find my new
>  cheese.
>
>
>
> Any help would be appreciation.....
>
>
>
> Thanks,
>
> Ernie Kemp
>
>
>
>
>
> ...man will occasionally stumble over the truth, but usually manages to
> pick himself up, walk over or around it, and carry on.
>
>
>       Winston S. Churchill* *
>
>
>
>
>
>
>
>
>

--- End Message ---
--- Begin Message ---
Thanks for the info.

It seems to me that there must to other places a freelance Web Developer
fines work.

How do you find work in PHP Web programming? 
Work a company, through this site and from God.

I wish to know more than handing out a business card.

Thanks in advance.
...../Ernie

-----Original Message-----
From: doctortomor...@gmail.com [mailto:doctortomor...@gmail.com] On Behalf
Of 9el
Sent: February-25-09 12:23 PM
To: Ernie Kemp
Cc: php-gene...@lists.php.net
Subject: Re: [PHP] Web Development work

I guess you are interested about php.

the freelancers work at www.scriptlance.com www.elance.com www.odesk.com
www.joomlalancer.com www.getacoder.com www.getafreelancer.com and many more.

I am a Web Developer at
https://www.scriptlance.com/cgi-bin/freelancers/feedback.cgi?p=lenin9el with
this id

To be a web developer you dont need to be design oriented. You can stick to
programming skills as well.

Regards

Lenin

-----------------------------------------------------------------------
Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get
a Free CD of Ubuntu mailed to your door without any cost. Visit :
www.ubuntu.com
----------------------------------------------------------------------


On Wed, Feb 25, 2009 at 11:16 PM, Ernie Kemp <ernie.k...@sympatico.ca>wrote:

>   I really need your insight.
>
> I'm a software developer who is wishing to do Web Development.
>
>
>
> I love to program and I'm learning more about Web Design but my main
skills
> are in programming.
>
>
>
> How do you get work as a Web Developer?
>
>
>
> One could apply for a web developer job at a Web company but I wish to be
> on my own.
>
> How are the freelancer finding work and where?
>
>
>
> I have had my head buried in code too long to know where to find my new
>  cheese.
>
>
>
> Any help would be appreciation.....
>
>
>
> Thanks,
>
> Ernie Kemp
>
>
>
>
>
> ...man will occasionally stumble over the truth, but usually manages to
> pick himself up, walk over or around it, and carry on.
>
>
>       Winston S. Churchill* *
>
>
>
>
>
>
>
>
>

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.0.237 / Virus Database: 270.11.3/1971 - Release Date: 02/25/09
06:40:00


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

  I have a code as in the following:

<?php

    $file = "test.txt";
    $fp = fopen($file, "r");

   while(!feof($fp)) {
   $data = fgets($fp, 1024);
   
   if ((preg_match("/0/",$data)) || 
      (preg_match("/\"\s\"/",$data)) || 
      (preg_match("/\"\s\"/",$data))) {
         //Don't do a thing
   }
 
} 
    fclose($fp);

?>


This is the input file:

1
23kd
3dkd2
" "
4
5
6

For the output, I get nothing running it from the command prompt, but I would 
like to have " " in the output, 
could anyone please give me some guides on what I have done wrong in my regular 
expression?

Thanks for your help.

Alice






_________________________________________________________________
Search from any Web page with powerful protection. Get the FREE Windows Live 
Toolbar Today!
http://get.live.com/toolbar/overview

--- End Message ---
--- Begin Message ---
Alice Wei wrote:
> Hi, 
> 
>   I have a code as in the following:
> 
> <?php
> 
>     $file = "test.txt";
>     $fp = fopen($file, "r");
> 
>    while(!feof($fp)) {
>    $data = fgets($fp, 1024);
>    
>    if ((preg_match("/0/",$data)) || 
>       (preg_match("/\"\s\"/",$data)) || 
>       (preg_match("/\"\s\"/",$data))) {
>          //Don't do a thing
>    }
>  
> } 
>     fclose($fp);
> 
> ?>
> 
> 
> This is the input file:
> 
> 1
> 23kd
> 3dkd2
> " "
> 4
> 5
> 6
> 
> For the output, I get nothing running it from the command prompt, but I would 
> like to have " " in the output, 
> could anyone please give me some guides on what I have done wrong in my 
> regular expression?
> 
> Thanks for your help.
> 
> Alice
> 
> 
> 
> 
> 
> 
> _________________________________________________________________
> Search from any Web page with powerful protection. Get the FREE Windows Live 
> Toolbar Today!
> http://get.live.com/toolbar/overview

Ummm...  #1 you haven't "output" anything in your code.  Your code says,
if " " is found in $data, then "Don't do a thing".



-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Shawn McKenzie wrote:
> Alice Wei wrote:
>> Hi, 
>>
>>   I have a code as in the following:
>>
>> <?php
>>
>>     $file = "test.txt";
>>     $fp = fopen($file, "r");
>>
>>    while(!feof($fp)) {
>>    $data = fgets($fp, 1024);
>>    
>>    if ((preg_match("/0/",$data)) || 
>>       (preg_match("/\"\s\"/",$data)) || 
>>       (preg_match("/\"\s\"/",$data))) {
>>          //Don't do a thing
>>    }
>>  
>> } 
>>     fclose($fp);
>>
>> ?>
>>
>>
>> This is the input file:
>>
>> 1
>> 23kd
>> 3dkd2
>> " "
>> 4
>> 5
>> 6
>>
>> For the output, I get nothing running it from the command prompt, but I 
>> would like to have " " in the output, 
>> could anyone please give me some guides on what I have done wrong in my 
>> regular expression?
>>
>> Thanks for your help.
>>
>> Alice
>>
>>
>>
>>
>>
>>
>> _________________________________________________________________
>> Search from any Web page with powerful protection. Get the FREE Windows Live 
>> Toolbar Today!
>> http://get.live.com/toolbar/overview
> 
> Ummm...  #1 you haven't "output" anything in your code.  Your code says,
> if " " is found in $data, then "Don't do a thing".
> 
> 
> 

So if your wanting to see if there is a match in the line and return the
match (which in this example seems pointless because you know that you
are matching ""), then something like this:

if (preg_match("/0/",$data, $matches) ||
    preg_match("/\"\s\"/",$data, $matches))
{
        print_r($matches);
}

BTW, the second and third conditions in your if appeared to be the same,
also \s matches whitespace, spaces, tabs, returns, etc...

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Shawn McKenzie wrote:
> Shawn McKenzie wrote:
>> Alice Wei wrote:
>>> Hi, 
>>>
>>>   I have a code as in the following:
>>>
>>> <?php
>>>
>>>     $file = "test.txt";
>>>     $fp = fopen($file, "r");
>>>
>>>    while(!feof($fp)) {
>>>    $data = fgets($fp, 1024);
>>>    
>>>    if ((preg_match("/0/",$data)) || 
>>>       (preg_match("/\"\s\"/",$data)) || 
>>>       (preg_match("/\"\s\"/",$data))) {
>>>          //Don't do a thing
>>>    }
>>>  
>>> } 
>>>     fclose($fp);
>>>
>>> ?>
>>>
>>>
>>> This is the input file:
>>>
>>> 1
>>> 23kd
>>> 3dkd2
>>> " "
>>> 4
>>> 5
>>> 6
>>>
>>> For the output, I get nothing running it from the command prompt, but I 
>>> would like to have " " in the output, 
>>> could anyone please give me some guides on what I have done wrong in my 
>>> regular expression?
>>>
>>> Thanks for your help.
>>>
>>> Alice
>>>
>>>
>>>
>>>
>>>
>>>
>>> _________________________________________________________________
>>> Search from any Web page with powerful protection. Get the FREE Windows 
>>> Live Toolbar Today!
>>> http://get.live.com/toolbar/overview
>> Ummm...  #1 you haven't "output" anything in your code.  Your code says,
>> if " " is found in $data, then "Don't do a thing".
>>
>>
>>
> 
> So if your wanting to see if there is a match in the line and return the
> match (which in this example seems pointless because you know that you
> are matching ""), then something like this:
> 
> if (preg_match("/0/",$data, $matches) ||
>     preg_match("/\"\s\"/",$data, $matches))
> {
>       print_r($matches);
> }
> 
> BTW, the second and third conditions in your if appeared to be the same,
> also \s matches whitespace, spaces, tabs, returns, etc...
> 

I'll wait for a reply with more information as the more I look at your
code it seems your off on a strange track.  I don't know the variability
of your input data, but if you had a line 0 " " then the first
preg_match would match the 0 and not the " ".  Maybe that's what you
want, dunno...

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---

Reply via email to