Re: [PHP] php via cmdline including unwanted headers

2007-05-30 Thread Sebe
Stut wrote: Sebe wrote: Yeni Setiawan wrote: On 5/30/07, *Sebe* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: I run some scripts via php (cgi) which sends output to another file, but it's including unwanted cookie header, etc in the outfile.

Re: [PHP] php via cmdline including unwanted headers

2007-05-30 Thread Sebe
Yeni Setiawan wrote: On 5/30/07, *Sebe* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: I run some scripts via php (cgi) which sends output to another file, but it's including unwanted cookie header, etc in the outfile. example: php /home/dev/s

[PHP] php via cmdline including unwanted headers

2007-05-29 Thread Sebe
I run some scripts via php (cgi) which sends output to another file, but it's including unwanted cookie header, etc in the outfile. example: php /home/dev/script.php > /home/production/feeds/news.xml 2>&1 and at the top of news.xml i get: X-Powered-By: PHP/5.2.2 Set-Cookie: . Set-Cookie:

Re: [PHP] Re: [ANNOUNCE] TODO parser

2007-04-28 Thread Sebe
Daevid Vincent wrote: -Original Message- From: Alexander Elder [mailto:[EMAIL PROTECTED] Sent: Saturday, April 28, 2007 10:30 AM To: php-general@lists.php.net Subject: [PHP] Re: [ANNOUNCE] TODO parser Daevid Vincent wrote: For a long time I've wanted a tool that would traverse my

Re: [PHP] explode in mysql query

2007-04-27 Thread Sebe
Paul Novitski wrote: At 4/26/2007 11:33 PM, Sebe wrote: i have a mysql column that looks like this: groups --- 12,7,10,6,14,11,2 is it possible to select the row if `groups` contain 7 or 14? trying to avoid running two queries and running explode() on it. I would think a more efficient

[PHP] explode in mysql query

2007-04-26 Thread Sebe
i have a mysql column that looks like this: groups --- 12,7,10,6,14,11,2 is it possible to select the row if `groups` contain 7 or 14? trying to avoid running two queries and running explode() on it. i don't remember but i thought there was a way to use explode() on something like this wit

Re: [PHP] move "if" logic from php into query

2007-04-26 Thread Sebe
Chris wrote: Thufir wrote: I couldn't get the page to load when the logic for line 31, "($id == $_POST[recordID])", was in the query. Can the logic for that be moved to the query? I expect so. $query = "SELECT contacts.id, px_items.id, title, notes FROM contacts, px_items WHERE contacts

Re: [PHP] a little math

2007-04-20 Thread Sebe
Edward Kay wrote: maybe someone can figure why sometimes i get negative values for seconds.. $job['finished'] and $job['finished'] are both unix timestamp. i subtract both to get how many seconds some thing took.. well you should be able to read the rest. sometimes it works fine but other times

[PHP] a little math

2007-04-20 Thread Sebe
maybe someone can figure why sometimes i get negative values for seconds.. $job['finished'] and $job['finished'] are both unix timestamp. i subtract both to get how many seconds some thing took.. well you should be able to read the rest. sometimes it works fine but other times i get negative se

Re: [PHP] Why can't I ini_set('upload_max_filesize')?

2007-04-17 Thread Sebe
Brian Dunning wrote: If I do this: ini_set('upload_max_filesize', 30720); echo ini_get('upload_max_filesize'); it returns 2M. Why is it not accepting the ini_set? The server is Windows, PHP 5.2. probably because upload_max_filesize is PHP_INI_PERDIR not PHP_INI_ALL use: http://us.php.net/ma

Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Sebe
Richard Lynch wrote: On Fri, April 13, 2007 3:46 am, Micky Hulse wrote: I think I just read that PHP is ran as CGI on Dreamhost... this does not sound good. Can anyone confirm? You could confirm what you have on YOUR setup with: faster and with more assurance of correctness than any m

Re: [PHP] foreach question

2007-04-08 Thread Sebe
already have a so i dont understand what is wrong but the code it's set to put out a line break after each item. maybe i'm blind but the code is fine (with the exception that i don't use double quotes). - Original Message - From: "Sebe" <[EMAIL PROTECTED]

Re: [PHP] foreach question

2007-04-08 Thread Sebe
[EMAIL PROTECTED] wrote: I have .. foreach( $_POST as $key ) {echo "$key"; } and that gives me item1 item2 item3 item4 item5 how do I write it to give me item1 item2 item3 item4 item5 Thanks both examples do the same thing.. -- PHP General Mailing List (http://www.php.net/) To unsubs

[PHP] ribs (rsync) problem

2007-04-07 Thread Sebe
anyone here using the ribs php rsync script? i keep getting: rsync: link_stat "/home/site" failed: No such file or directory (2) does the directory structure need to match on both local/remote servers? example, i'm trying to back up /home/site to /home/backup not sure if the remote backup serv

Re: [PHP] Re: link counting

2007-04-07 Thread Sebe
ame up with this, not sure if there is a better/faster way but it works for me. it's case insensitive so you don't have to use strtolower() preg_match_all('%http://|https://|ftp://%i', $string, $links); if(count($links[0]) > 2) { // error... } -- itoctop

[PHP] link counting

2007-04-06 Thread Sebe
i thought of an idea of counting the number of links to reduce comment spam. unfortunately my methods is not reliable, i haven't tested it yet though.. anyone have maybe a better solution using some regexp? $links = array('http://', 'https://', 'www.'); $total_links = 0; foreach($links as $li

Re: [PHP] Forking doesn't work on php 5.2.1?

2007-04-02 Thread Sebe
Jochem Maas wrote: Frederic Belleudy wrote: Well Ill let you know guys if it works after I've recompiled apache try recompiling php - recompiling apache won't have an effect as far as that compile option goes. it will if php is complied statically into apache, then you have to