[PHP] Question regarding linking PHP Parser library into my private Http server

2007-12-30 Thread Talya Nevo
Hi, I am porting my software from Linux to µC/OS-II OS. On Linux I ran the Boa Web server with PHP. The µC/OS-II has a basic open source Http Server that does not support PHP or CGI. What I was able to do - is from the Http server, each time an http request is received, call using 'System'

[PHP] Comparison Problems with 5.2.5

2007-12-30 Thread Magnus Anderson
Hi, I have runned into a slight annoying problem with my code, that I have never had before. Either I have something wrong in my code or PHP 5.2.5 that I user is acting weird in windows. I have recently installed PHP on my windows machine for local developement instead of a remote server. What

Re: [PHP] Comparison Problems with 5.2.5

2007-12-30 Thread Silvio Porcellana
Magnus Anderson wrote: ...snip... This will not work (I expect this to work since _USER['level'] is 5) if($_USER['level'] = 5) Try if($_USER['level'] = 5) maybe it helps ('=' is used when assigning values in an hash, maybe you are triggering something strange...) -- Antinori and

[PHP] Using PHP to remove certain number of bytes from file

2007-12-30 Thread Scott Wilcox
Is it possible with PHP to remove a certain number of bytes from a file, purely within PHP? If so, does someone have an example of doing this, removing the first 230 bytes from a file. Thanks, Scott. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Question regarding linking PHP Parser library into my private Http server

2007-12-30 Thread Nathan Nobbe
On Dec 30, 2007 4:02 AM, Talya Nevo [EMAIL PROTECTED] wrote: Hi, I am porting my software from Linux to µC/OS-II OS. On Linux I ran the Boa Web server with PHP. The µC/OS-II has a basic open source Http Server that does not support PHP or CGI. What I was able to do - is from the Http

Re: [PHP] Comparison Problems with 5.2.5

2007-12-30 Thread Casey
On Dec 30, 2007 8:04 AM, Silvio Porcellana [EMAIL PROTECTED] wrote: Magnus Anderson wrote: ...snip... This will not work (I expect this to work since _USER['level'] is 5) if($_USER['level'] = 5) Try if($_USER['level'] = 5) maybe it helps ('=' is used when assigning values in an

Re: [PHP] script stoped working over christmas ?

2007-12-30 Thread Jochem Maas
Joker7 schreef: ... config.php ?php $max_summary = 6; $max_latest = 7; $summary_template = t_summary.tp; $article_template = t_article.tp; $password = password; latest.php ?php require('config.php'); $filename = article_summary.php; #- open article summaries

Fwd: [PHP] Using PHP to remove certain number of bytes from file

2007-12-30 Thread Benjamin Darwin
Maybe one of these days I'll remember to actually reply to the list the first time. -- Forwarded message -- From: Benjamin Darwin [EMAIL PROTECTED] Date: Dec 30, 2007 2:12 PM Subject: Re: [PHP] Using PHP to remove certain number of bytes from file To: Scott Wilcox [EMAIL

Re: [PHP] Using PHP to remove certain number of bytes from file

2007-12-30 Thread Robert Cummings
On Sun, 2007-12-30 at 17:20 +, Scott Wilcox wrote: Is it possible with PHP to remove a certain number of bytes from a file, purely within PHP? Yes. Why wouldn't it? If so, does someone have an example of doing this, removing the first 230 bytes from a file. No, that's an awfully

[PHP] Question about sqli class

2007-12-30 Thread alvaro
I don´t know if this is the correct place to ask this questions but I haver some doubts about using mysqli class in php. I am designing a web place using wamp2 (php5, mysql 5.0.x ). My databases have been done using phpmyadmin so they are normal mysql, I mean that I have done nothing with

Re: Fwd: [PHP] Using PHP to remove certain number of bytes from file

2007-12-30 Thread Robert Cummings
On Sun, 2007-12-30 at 14:14 -0500, Benjamin Darwin wrote: Maybe one of these days I'll remember to actually reply to the list the first time. -- Forwarded message -- From: Benjamin Darwin [EMAIL PROTECTED] Date: Dec 30, 2007 2:12 PM Subject: Re: [PHP] Using PHP to remove

Re: [PHP] Question about sqli class

2007-12-30 Thread Nathan Nobbe
On Dec 30, 2007 2:11 PM, alvaro [EMAIL PROTECTED] wrote: I don´t know if this is the correct place to ask this questions but I haver some doubts about using mysqli class in php. I am designing a web place using wamp2 (php5, mysql 5.0.x ). My databases have been done using phpmyadmin so

Re: Fwd: [PHP] Using PHP to remove certain number of bytes from file

2007-12-30 Thread Casey
On Dec 30, 2007 11:26 AM, Robert Cummings [EMAIL PROTECTED] wrote: On Sun, 2007-12-30 at 14:14 -0500, Benjamin Darwin wrote: Maybe one of these days I'll remember to actually reply to the list the first time. -- Forwarded message -- From: Benjamin Darwin [EMAIL

[PHP] read email

2007-12-30 Thread Yui Hiroaki
HI! I am trying to access qmail with php. Why! Because I would like to read mail who someone send an email me to qmail. If anyone knows the code, please send me the code. Regards, Yui

Re: [PHP] read email

2007-12-30 Thread Børge Holen
On Sunday 30 December 2007 21:19:16 Yui Hiroaki wrote: HI! I am trying to access qmail with php. Why! Because I would like to read mail who someone send an email me to qmail. If anyone knows the code, please send me the code. NOW that was straight forward I always thought the easiest

[PHP] Mail system

2007-12-30 Thread mattias
If i run coureir and postfix I want to have a signup script How should the code be written? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mail system

2007-12-30 Thread Stut
mattias wrote: If i run coureir and postfix I want to have a signup script How should the code be written? Since you're asking on a PHP list I'm going to assume you want to use PHP. The answer you seek is... by you, using some form of text editor! We're not here to write code for you. Have

SV: [PHP] Mail system

2007-12-30 Thread mattias
First of all If you have a bad day don't send to the list -Ursprungligt meddelande- Från: Stut [mailto:[EMAIL PROTECTED] Skickat: den 30 december 2007 21:46 Till: mattias Kopia: php-general@lists.php.net Ämne: Re: [PHP] Mail system mattias wrote: If i run coureir and postfix I want

Re: SV: [PHP] Mail system

2007-12-30 Thread Stut
mattias wrote: First of all If you have a bad day don't send to the list I'm actually having a pretty good day thanks. Seriously though, Google for an existing solution, and if there isn't one have a go yourself and then ask for help if you have problems. I apologise if you feel that's

SV: SV: [PHP] Mail system

2007-12-30 Thread mattias
Yes but i are newbie in php I think i should use php exec but i dont know no more -Ursprungligt meddelande- Från: Stut [mailto:[EMAIL PROTECTED] Skickat: den 30 december 2007 22:01 Till: mattias Kopia: php-general@lists.php.net Ämne: Re: SV: [PHP] Mail system mattias wrote: First of

Re: SV: SV: [PHP] Mail system

2007-12-30 Thread Stut
mattias wrote: Yes but i are newbie in php I think i should use php exec but i dont know no more GOOGLE GOOGLE GOOGLE GOOGLE GOOGLE http://postfixadmin.sourceforge.net/ was the first result I got. Seems to fit the bill from where I'm sitting. -Stut -- http://stut.net/ -Ursprungligt

[PHP] I'm trying to sending an image via email

2007-12-30 Thread tedd
Hi gang: I'm trying to send an image via email (hmm, must be an echo). In any event, the following is my main-code (word, dude) and a part of the email I receive back. The image file IS there. Any suggestions as to what I'm doing wrong? Cheers, tedd -- the code -- $eol=\r\n;

Re: SV: SV: [PHP] Mail system

2007-12-30 Thread tedd
At 9:15 PM + 12/30/07, Stut wrote: mattias wrote: Yes but i are newbie in php I think i should use php exec but i dont know no more GOOGLE GOOGLE GOOGLE GOOGLE GOOGLE Sounds like the Ghost of Thanksgiving Turkey. I know, my holiday meter is pegged. tedd -- ---

Re: SV: SV: [PHP] Mail system

2007-12-30 Thread Børge Holen
On Sunday 30 December 2007 22:10:50 mattias wrote: Yes but i are newbie in php I think i should use php exec but i dont know no more See there's no problem havin php reading your files, you just got to make sure that it's allowed to... PHP is not doing that very well job, so there is some

Re: [PHP] Question about sqli class

2007-12-30 Thread Larry Garfield
Both ext/mysql and ext/mysqli work exclusively with MySQL databases. They could not talk to SQLite, which is a different database engine entirely. If you have the choice and are using MySQL 5 and PHP 5, ext/mysqli is generally faster than ext/mysql. More importantly, it supports native

[PHP] looping through a $_POST variable

2007-12-30 Thread Richard Kurth
I am trying to loop through a $_POST variable. It comes from a text area and it will have data like many email address or just one listed with a space or on a new line. I can't seam to get the data to extract properly. I have tried this below $array = explode(' ', $_POST['emails']);

Re: [PHP] looping through a $_POST variable

2007-12-30 Thread Richard Kurth
I am trying to get one email at a time and run it through the loop and process it but if I have more than one email in the text area it gives me nothing and does not run What kind of problems are you having in extracting the data? On Dec 30, 2007, at 4:29 PM, Richard Kurth wrote: I am trying

Re: [PHP] looping through a $_POST variable

2007-12-30 Thread Richard Lynch
On Sun, December 30, 2007 5:29 pm, Richard Kurth wrote: I am trying to loop through a $_POST variable. It comes from a text area and it will have data like many email address or just one listed with a space or on a new line. I can't seam to get the data to extract properly. I have tried

[PHP] Re: [BULK] [PHP] I'm trying to sending an image via email

2007-12-30 Thread Eddie Dunckley
On Sun 30 Dec 07, tedd wrote: I'm trying to send an image via email (hmm, must be an echo). In any event, the following is my main-code (word, dude) and a part of the email I receive back. The image file IS there. Any suggestions as to what I'm doing wrong? -- the code -- $msg .=

Re: SV: SV: [PHP] Mail system

2007-12-30 Thread Richard Lynch
?php $arg1 = escapeshellarg($_POST['arg1']; exec(/full/path/to/courier /full/path/to/any/files $arg1, $output, $error); var_dump($output); if ($error){ die(Use shell 'perror $error' to find out what the OS said. Or install my nifty perror extension.br /\nhttp://l-i-e.com/perror;); }

Re: [PHP] looping through a $_POST variable

2007-12-30 Thread Richard Kurth
When I do a var_dump($_POST['emails']); it has all the emails in it string(65) [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] I will validate the emails after I get the loop to work $memberid comes from a part of the script I did not show you $memberid =$_POST[members_id]; safe_query

Re: SV: SV: [PHP] Mail system

2007-12-30 Thread Richard Lynch
On Sun, December 30, 2007 3:36 pm, Børge Holen wrote: On Sunday 30 December 2007 22:10:50 mattias wrote: Yes but i are newbie in php I think i should use php exec but i dont know no more See there's no problem havin php reading your files, you just got to make sure that it's allowed to...

Re: [PHP] read email

2007-12-30 Thread Richard Lynch
On Sun, December 30, 2007 2:19 pm, Yui Hiroaki wrote: HI! I am trying to access qmail with php. Why! Because I would like to read mail who someone send an email me to qmail. If anyone knows the code, please send me the code. http://php.net/imap Sample Code:

[PHP] Re: [BULK] [PHP] I'm trying to sending an image via email

2007-12-30 Thread Eddie Dunckley
On Sun 30 Dec 07, tedd wrote: I'm trying to send an image via email (hmm, must be an echo). In any event, the following is my main-code (word, dude) and a part of the email I receive back. The image file IS there. Any suggestions as to what I'm doing wrong? -- the code -- $msg .=

Re: [PHP] Question about sqli class

2007-12-30 Thread Richard Lynch
On Sun, December 30, 2007 1:11 pm, alvaro wrote: I don´t know if this is the correct place to ask this questions but I haver some doubts about using mysqli class in php. I am designing a web place using wamp2 (php5, mysql 5.0.x ). My databases have been done using phpmyadmin so they are

Re: [PHP] Comparison Problems with 5.2.5

2007-12-30 Thread Richard Lynch
You want = and not = The = operator doesn't even make any sense in that context, as far as I know... On Sun, December 30, 2007 8:34 am, Magnus Anderson wrote: Hi, I have runned into a slight annoying problem with my code, that I have never had before. Either I have something wrong in my

Re: [PHP] Using PHP to remove certain number of bytes from file

2007-12-30 Thread Richard Lynch
On Sun, December 30, 2007 11:20 am, Scott Wilcox wrote: Is it possible with PHP to remove a certain number of bytes from a file, purely within PHP? If so, does someone have an example of doing this, removing the first 230 bytes from a file. Something like this might work: ?php $path =

Re: [PHP] Question regarding linking PHP Parser library into my private Http server

2007-12-30 Thread Richard Lynch
On Sun, December 30, 2007 3:02 am, Talya Nevo wrote: I am porting my software from Linux to µC/OS-II OS. On Linux I ran the Boa Web server with PHP. The µC/OS-II has a basic open source Http Server that does not support PHP or CGI. What I was able to do - is from the Http server, each time

Re: [PHP] looping through a $_POST variable

2007-12-30 Thread dg
You might want to check the loop alone and check each value of $value: $array = explode(' ', $_POST['emails']); foreach($array as $value) { print '$value'br; } if it works that way, at least you narrow down the possibilities of weirdness. On Dec 30, 2007, at 5:34 PM, Richard Kurth

Re: [PHP] script stoped working over christmas ?

2007-12-30 Thread Richard Lynch
Dude, put some error checking in there... On Sat, December 29, 2007 5:23 am, Joker7 wrote: Can anyone see why this has stopped working... latest.php is used with ? include(/home/sever2/public_html/teaup/article/article_summary.php) ? to show the latest news articles. Cheers Chris

Re: [PHP] php.ini in php5.2.1

2007-12-30 Thread Richard Lynch
make install should install one, but may be putting it in some place that it's not expected. If you are using some kind of package manager like apt-get or RedHat rpms or whatever, you are in duck soup for where some package-maker THINKS they should put the php.ini file, and where their binary

Re: [PHP] when does php stop php executing when user clicks stop

2007-12-30 Thread Richard Lynch
On Fri, December 28, 2007 6:33 pm, Eric Wood wrote: If database operations are underway when a user accesses a web page, then user clicks stop on the browser, does the php stop immediately too? Maybe. http://php.net/ignore_user_abort I'd rather the php continue behind the scenes to fullfill

Re: [PHP] Unix date (even more bazaar)

2007-12-30 Thread Richard Lynch
Spacing and/or control (unprintable) characters could easily be messing you up. Use something like: $l = strlen($input); for ($i = 0; $i $l; $i++){ echo $i: $input[$i] (, ord($input[$i]), )br /\n; } to see what you're getting. On Fri, December 28, 2007 5:08 pm, tedd wrote: At 6:01 PM -0500

RE: [PHP] socket_read can not read the whole HTTP page?

2007-12-30 Thread Richard Lynch
HTTP 1.1 requires more complex client/server interaction, and if your client (which is about as brain-dead simple as it gets) isn't doing that complex stuff, 1.1 will not work. All HTTP 1.1 servers will work just fine with 1.0, so stick with that unless you really NEED a feature of 1.1 On Fri,

Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-30 Thread Richard Lynch
DNS records are failing to lookup the domain name for you... Maybe just put the URL back into a queue to try later. You should also toy with nslookup or dig from the command line and see if you can get it to fail as often. On Thu, December 27, 2007 12:00 pm, Albert Wiersch wrote: Some

Re: [PHP] Question regarding linking PHP Parser library into my private Http server

2007-12-30 Thread Nathan Nobbe
On Dec 30, 2007 7:57 PM, Richard Lynch [EMAIL PROTECTED] wrote: On Sun, December 30, 2007 3:02 am, Talya Nevo wrote: I am porting my software from Linux to µC/OS-II OS. On Linux I ran the Boa Web server with PHP. The µC/OS-II has a basic open source Http Server that does not support PHP

Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-30 Thread Richard Lynch
If it's a busy server, you may be running out of TCP connections... If PHP can't open ANY connection at all, it can't do a DNS lookup, and it would fail very fast, as it's hitting an OS limit/cap on the number of connections and not even getting to try to talk to the Internet. On Fri, December

Re: [PHP] looping through a $_POST variable

2007-12-30 Thread Richard Lynch
Okay. Now var_dump($array) and see what it has. On Sun, December 30, 2007 6:34 pm, Richard Kurth wrote: When I do a var_dump($_POST['emails']); it has all the emails in it string(65) [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] I will validate the emails after I get the loop to work

Re: [PHP] ASP 2 PHP

2007-12-30 Thread Richard Lynch
On Wed, December 26, 2007 10:26 am, tedd wrote: I have a client who has an entire site done in asp and wants me to convert it to php -- is there an easy way to do this or do I have to do it line by line? There once was an asp2php script that would convert the brain-dead code-by-click-wizard

Re: [PHP] looping through a $_POST variable

2007-12-30 Thread Richard Kurth
looks like that is my problem it is not separating the emails string(67) [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] array(1) { [0]= string(67) [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] } $array = explode(' ', $_POST['emails']); what should I use for spaces or next line

Re: [PHP] Unix date (even more bazaar)

2007-12-30 Thread tedd
At 7:07 PM -0600 12/30/07, Richard Lynch wrote: Spacing and/or control (unprintable) characters could easily be messing you up. Use something like: $l = strlen($input); for ($i = 0; $i $l; $i++){ echo $i: $input[$i] (, ord($input[$i]), )br /\n; } to see what you're getting. Richard: As

Re: [PHP] looping through a $_POST variable

2007-12-30 Thread Richard Lynch
You should use whatever is actually BETWEEN the emails, which could be anything... See the thread about Tedd's bazaar (sic) problem and use the technique there to see what you are actually getting. You may even need to resort to a split instead of explode if newlines, spaces, and

[PHP] Re: [BULK] [PHP] I'm trying to sending an image via email

2007-12-30 Thread tedd
oops .. didnt read properly. $msg .= $f_contents . $eol . '--' . $mime_boundary . --- . $eol.$eol; send yourself an email with an attachment and view the email source and compare with your program output. Yep, it's -- two hyphens. Thanks, tedd -- --- http://sperling.com

[PHP] why is option '97' selectedJapan/option not highlighted

2007-12-30 Thread Mary Anderson
in my select scrolling list? Here is the offending code (abbreviated) select name=sr_location_id class= size=10 option value='94' Italy/option option value='97' selectedJapan/option option value='252' Jersey/option option value='294' Jiangsu/option option value='295' Jiangxi/option I have data

Re: [PHP] looping through a $_POST variable

2007-12-30 Thread Mark Kelly
Hi. On Monday 31 December 2007 00:34, Richard Kurth wrote: When I do a var_dump($_POST['emails']); it has all the emails in it string(65) [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Then this simple regex should do you; just use it instead of explode: $AddressList =

Re: [PHP] why is option '97' selectedJapan/option not highlighted

2007-12-30 Thread Daniel Brown
On Dec 30, 2007 10:46 PM, Mary Anderson [EMAIL PROTECTED] wrote: in my select scrolling list? Here is the offending code (abbreviated) select name=sr_location_id class= size=10 option value='94' Italy/option option value='97' selectedJapan/option option value='252' Jersey/option option