[PHP] php via cmdline including unwanted headers

2007-05-30 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 21 and at the top of news.xml i get: X-Powered-By: PHP/5.2.2 Set-Cookie: . Set-Cookie:

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/script.php /home

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. example: php /home

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

[PHP] explode in mysql query

2007-04-27 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

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

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

[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

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

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:

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: ?php phpinfo();? faster and with more assurance of

Re: [PHP] foreach question

2007-04-08 Thread Sebe
[EMAIL PROTECTED] wrote: I have .. foreach( $_POST as $key ) {echo $keybr /; } and that gives me item1 item2 item3 item4 item5br / how do I write it to give me item1br / item2br / item3br / item4br / item5br / Thanks both examples do the same thing.. -- PHP General Mailing List

Re: [PHP] foreach question

2007-04-08 Thread Sebe
each should already have a br / 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] To: [EMAIL PROTECTED

Re: [PHP] Re: link counting

2007-04-07 Thread Sebe
://www.itoctopus.com Sebe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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

[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

[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

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