Re: [PHP] Date (Year) .. adding..
I like Tyler's solution. It is better to move the call to date() outside the loop. You only need to get the current year once, and then add one onto it each iteration. If you leave the call to date() inside the loop then it calculates the current date each time and that uses CPU power and time. Looking at it in list form, here is the difference: Original Solution - Set x to 0 while x is less than 20 calculate current year add value of x to year print year increase x by 1 New solution -- set x to 0 Get current year while x is less than 20 print year increase year by one increment x by 1 It's much faster to not have to call a function when it's not required, or in this case, where the value has already been computedespecially when the function is in a loop. :) On Tuesday 22 May 2001 09:30 pm, you wrote: > $x=0; > $year = date("Y"); > while($x < 20) > { > $year = $year+1; > print($year . "\n"); > $x++; > } > ?> > > Try that. > > Tyler > > > -Original Message- > > From: Jason Caldwell [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, May 22, 2001 11:20 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Date (Year) .. adding.. > > > > > > I'm trying to figure out how to add to the year: > > > > for($x=0; $x<20; $x++) > > { > > $year = date("Y" + $x); > > print($year . "\n"); > > } > > > > I've tried several variations on the above and cannot get the year to > > come out. > > > > Any suggestions? > > > > Thanks > > Jason > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] select the most repeated value in a field
Hi people How do i query to select the most repeated values in a field, say if I hacve list of values as a,b,c,d,e to be submitted to a field call "result" in a table. And I want to know which value appear most in that "result" field amoung all records. cheers Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you've set for yourself"
[PHP] select the most repeated value in a field
Hi people How do i query to select the most repeated values in a field, say if I hacve list of values as a,b,c,d,e to be submitted to a field call "result" in a table. And I want to know which value appear most in that "result" field amoung all records. cheers Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you've set for yourself"
[PHP] regex for dynamic highlighting in search results...need help
Forwarded to the list for suggestions...my regex is pretty rusty... -- I've got a string full of HTML, and I'd like to highlight specific words in the text by surrounding it with tags. That's pretty simple: $strIn = eregi_replace("([^a-z'-])($highlight)([^a-z'-])", "\\1\\2\\3", $strIn); I gets difficult when I want to exclude any instances of the word that happen to be within an HTML tag. Otherwise I could end up with http://site.com/highlight/default.htm">, for example, and that's no good. The following regex is the closest I've gotten (it's just the previous one plus another subexpression), but it doesn't match anything at all. It seems like it should work to me, though: $strIn = eregi_replace("([^a-z'-])($highlight)([^a-z'-])([^<>]*>)^", "\\1\\2\\3", $strIn); If any regex-wizzes could help me out with this one, I'd be extra grateful. thanks, -josh * [ www: endquote.com ] [ icq: 940141 ] [ aim: endquote ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] Problem with PHP as CGI
Hello ..s.c.o.t.t.., I fixed the problem it seems there was something wrong with the file when it was uploaded to the server. It works now I am using shebang lines because this script has to run at root it runs other programs on the server that need to be run at root. php is set up to just run scripts at the Command line. I have php as a DSO for Apache. Thursday, May 24, 2001, 2:19:35 AM, you wrote: ..s.c.o.t.t..> im not sure that i understand the question, but the way ..s.c.o.t.t..> i've got my apache/PHP configured, i dont ever see ..s.c.o.t.t..> the actual path to the PHP binary. ..s.c.o.t.t..> what type of problem are you having ?? ..s.c.o.t.t..> PS: i never use shebang lines in my PHP scripts; ..s.c.o.t.t..> i have apache configured to handle *.php files ..s.c.o.t.t..> as PHP code. >> -Original Message- >> From: midget2000x [mailto:[EMAIL PROTECTED]] >> Sent: Wednesday, May 23, 2001 20:33 >> To: Stuart J. Browne; [EMAIL PROTECTED] >> Subject: Re: [PHP] Problem with PHP as CGI >> >> >> This is not an answer, but a further question on this subject. Do you (or >> anybody) know of a way to keep the path to PHP from showing up when the PHP CGI >> script is hit via HTTP? >> >> On Wed, 23 May 2001, Stuart J. Browne wrote: >> > "Richard Kurth" <[EMAIL PROTECTED]> wrote in message >> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> > > >> > > I have php config as a cgi and I put this at the top of my script >> > > >> > > #!/usr/local/bin/php -q >> > > >> > > when ever I run this script at root in >> > > telnet I get this message below. > >> > > Error in argument 1, char 3: option not found >> > > Error in argument 1, char 3: option not found >> > >> > Code snippett would help, but it sounds as if the first line (after the >> > hash-bang) is NOT > > >> > I've found that oddities occur without that as the first line of your >> > script.. >> > >> > bkx >> > >> > >> > >> > -- >> > PHP General Mailing List (http://www.php.net/) >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > To contact the list administrators, e-mail: [EMAIL PROTECTED] >> -- >> --- >> providing the finest in midget technology >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> -- Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] two data base connections on one page
look at the manual def's for both: mysql_connect and mysql_db_query if you have multiple database connections active, remember to *always* use the linkid of the database you want to talk to > -Original Message- > From: David Robley [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 23, 2001 23:06 > To: Peter Houchin - SunRentals Australia; Php-General@Lists. Php. Net > Subject: Re: [PHP] two data base connections on one page > > > On Thu, 24 May 2001 15:23, Peter Houchin - SunRentals Australia wrote: > > Hi, > > > > I'm playing around with phpwebsite that I down loaded.. and am creating > > my own pageto add to it phpwebsite creates a database connection and > > the page I am creating also needs a connection to a different database > > ... this is possible to do and on the same page ... I know this is > > probably in the manual .. but I am unsure of what to look for in there > > for it .. I'm using MySQL and mysql_connect shows nothing for what i > > need.. > > > any idea's suggestions would be greatly appreciated > > > > Peter > > Once you have opened a connection, you should be able to use > mysql_db_query multiple times, specifying different databases each time, > and of course using different variables for the result identifiers. > > -- > David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc > CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA > >Amusement is the happiness of those who cannot think. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] two data base connections on one page
On Thu, 24 May 2001 15:23, Peter Houchin - SunRentals Australia wrote: > Hi, > > I'm playing around with phpwebsite that I down loaded.. and am creating > my own pageto add to it phpwebsite creates a database connection and > the page I am creating also needs a connection to a different database > ... this is possible to do and on the same page ... I know this is > probably in the manual .. but I am unsure of what to look for in there > for it .. I'm using MySQL and mysql_connect shows nothing for what i > need.. > any idea's suggestions would be greatly appreciated > > Peter Once you have opened a connection, you should be able to use mysql_db_query multiple times, specifying different databases each time, and of course using different variables for the result identifiers. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Amusement is the happiness of those who cannot think. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Problem with PHP as CGI
im not sure that i understand the question, but the way i've got my apache/PHP configured, i dont ever see the actual path to the PHP binary. what type of problem are you having ?? PS: i never use shebang lines in my PHP scripts; i have apache configured to handle *.php files as PHP code. > -Original Message- > From: midget2000x [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 23, 2001 20:33 > To: Stuart J. Browne; [EMAIL PROTECTED] > Subject: Re: [PHP] Problem with PHP as CGI > > > This is not an answer, but a further question on this subject. Do you (or > anybody) know of a way to keep the path to PHP from showing up when the PHP CGI > script is hit via HTTP? > > On Wed, 23 May 2001, Stuart J. Browne wrote: > > "Richard Kurth" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > > I have php config as a cgi and I put this at the top of my script > > > > > > #!/usr/local/bin/php -q > > > > > > when ever I run this script at root in > > > telnet I get this message below. > > > > Error in argument 1, char 3: option not found > > > Error in argument 1, char 3: option not found > > > > Code snippett would help, but it sounds as if the first line (after the > > hash-bang) is NOT > > > I've found that oddities occur without that as the first line of your > > script.. > > > > bkx > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- > --- > providing the finest in midget technology > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php unpack function
Addressed to: Chris Mattmann <[EMAIL PROTECTED]> [EMAIL PROTECTED] ** Reply to note from Chris Mattmann <[EMAIL PROTECTED]> Wed, 23 May 2001 18:05:27 -0700 (PDT) > > Thanks for your help Rick. > > The problem I was having was basically as you understood, except for the fact > that I don't really have access to file at the time that I need to unpack the > data from it. > > The file is stored in terms of Oracle bFile pointers, so basically I have some > code that does like: > > //do query to get bfile pointer > ... > > $bindata = $bfileptr->load(); > > >Now I have a string representation of the binary file. At this time is where > I having the difficulties. I need a way without the use of fseek(since I don't > have a file, I only have a string representation of it) to select a particular > subset of the data. > >Any advice you have would be greatly appreciated, and thanks for replying to > my original post. You should be able to use substr() to get any part of the returned $bindata you want. Just use the byte position equations from my last post to determine where in the data you want to return. I think your dba may be crazy to store that much data that way. Rick Widmer Internet Marketing Specialists http://www.developersdesk.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: Re[2]: [PHP] Problem with PHP as CGI
as a test, try removing the shebang line from your script and running the PHP binary from the shell: "/usr/local/bin/php myscript.php" i've used the CGI version for months now with apache for my website, and frequently use PHP from the shell to test out ideas and code snippets and i've never had any problems. > -Original Message- > From: Richard Kurth [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 24, 2001 09:31 > To: [EMAIL PROTECTED] > Subject: Re[2]: [PHP] Problem with PHP as CGI > > > Hello Stuart, > yes there is a I can run a script that looks like this and I still get the problem > > #!/usr/local/bin/php -q > echo "HELP"; > ?> > > > > Wednesday, May 23, 2001, 9:06:08 PM, you wrote: > > Stuart J. Browne> "Richard Kurth" <[EMAIL PROTECTED]> wrote in message > Stuart J. Browne> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >> > >> I have php config as a cgi and I put this at the top of my script > >> > >> #!/usr/local/bin/php -q > >> > >> when ever I run this script at root in > >> telnet I get this message below. > > >> Error in argument 1, char 3: option not found > >> Error in argument 1, char 3: option not found > > Stuart J. Browne> Code snippett would help, but it sounds as if the first > line (after the > Stuart J. Browne> hash-bang) is NOT > Stuart J. Browne> I've found that oddities occur without that as the first > line of your > Stuart J. Browne> script.. > > Stuart J. Browne> bkx > > > > > > > -- > Best regards, > Richard > mailto:[EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include and include-virtual
On Thu, 24 May 2001 10:00, Christian Dechery wrote: > At 22:23 23/5/2001 +0100, James, Yz wrote: > >Christian, > > > >Those are SSI calls (Server Side Includes, for use with .shtml files). > > I know what they are... I wanna know what's the difference between them That's really an apache-related question. Try http://httpd.apache.org/docs/mod/mod_include.html -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA "It's half a score," Tom said often. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] two data base connections on one page
Hi, I'm playing around with phpwebsite that I down loaded.. and am creating my own pageto add to it phpwebsite creates a database connection and the page I am creating also needs a connection to a different database ... this is possible to do and on the same page ... I know this is probably in the manual .. but I am unsure of what to look for in there for it .. I'm using MySQL and mysql_connect shows nothing for what i need.. any idea's suggestions would be greatly appreciated Peter
RE: [PHP] Checking an URL
> Don't suppose you have some example code on how to do that? if ($HTTPS) { // You're in secure mode } Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT "What'll Scorpy use wormhole technology for?" 'Faster pizza delivery.' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Checking an URL
Don't suppose you have some example code on how to do that? "Christian Reiniger" <[EMAIL PROTECTED]> wrote in message 01052316371001.00599@chrisbig">news:01052316371001.00599@chrisbig... On Wednesday 23 May 2001 07:19, YoBro wrote: > Hello Everybody :-) > > I've been trying to figure something out, but just cant find the right > answer. > > I need some code to check that the page is being viewed from a specific > url. EXAMPLE: Not just http://www but https://www1 if it is > https://www1 then show the page otherwise echo a message. > > The reason is I don't want people to view certain pages without the > secure server connection. You could check $SERVER_PORT whether the normal http port or the ssl one is used. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) /* you are not expected to understand this */ - from the UNIX V6 kernel source -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Indonesia Japan Business News
Want to see the latest of Indonesia Japan Business News; just click; http://suratkabar.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] test
why dont you just use an email program that works correctly? > -Original Message- > From: Jon Yaggie [mailto:[EMAIL PROTECTED]] > Subject: [PHP] test > > It wasnt a test my email program gets out of hand occassionally. trust me > i am trying very hard to control. i am sorry if it really bothers you. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problem with PHP as CGI
This is not an answer, but a further question on this subject. Do you (or anybody) know of a way to keep the path to PHP from showing up when the PHP CGI script is hit via HTTP? On Wed, 23 May 2001, Stuart J. Browne wrote: > "Richard Kurth" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > I have php config as a cgi and I put this at the top of my script > > > > #!/usr/local/bin/php -q > > > > when ever I run this script at root in > > telnet I get this message below. > > > Error in argument 1, char 3: option not found > > Error in argument 1, char 3: option not found > > Code snippett would help, but it sounds as if the first line (after the > hash-bang) is NOT > I've found that oddities occur without that as the first line of your > script.. > > bkx > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- --- providing the finest in midget technology -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] Problem with PHP as CGI
Hello Stuart, yes there is a Wednesday, May 23, 2001, 9:06:08 PM, you wrote: Stuart J. Browne> "Richard Kurth" <[EMAIL PROTECTED]> wrote in message Stuart J. Browne> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> >> I have php config as a cgi and I put this at the top of my script >> >> #!/usr/local/bin/php -q >> >> when ever I run this script at root in >> telnet I get this message below. > >> Error in argument 1, char 3: option not found >> Error in argument 1, char 3: option not found Stuart J. Browne> Code snippett would help, but it sounds as if the first line (after the Stuart J. Browne> hash-bang) is NOT I've found that oddities occur without that as the first line of your Stuart J. Browne> script.. Stuart J. Browne> bkx -- Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problem with PHP as CGI
"Richard Kurth" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I have php config as a cgi and I put this at the top of my script > > #!/usr/local/bin/php -q > > when ever I run this script at root in > telnet I get this message below. > > Error in argument 1, char 3: option not found > Error in argument 1, char 3: option not found Code snippett would help, but it sounds as if the first line (after the hash-bang) is NOT http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Threaded discussion Phorum algorithm
sorry, should be http://www.phorum.org. - Original Message - From: Adeline Wong <[EMAIL PROTECTED]> To: Michael Stearne <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: php php <[EMAIL PROTECTED]> Sent: Thursday, May 24, 2001 12:22 PM Subject: Re: [PHP] Threaded discussion Phorum algorithm > Try this.. > > http://www.phorum.net. > > > - Original Message - > From: Michael Stearne <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: php php <[EMAIL PROTECTED]> > Sent: Thursday, May 24, 2001 11:42 AM > Subject: Re: [PHP] Threaded discussion Phorum algorithm > > > > Here's a paper Jamie Zawinski did on threading, it might be of use, but > > probably a little more than what you were looking for. > > http://www.jwz.org/doc/threading.html > > > > Michael > > > > > > rodrigo wrote: > > > > > I need to implement a custom discussion phorum for a news site. I would > > > like to know what is the most common algorithm to display the message > > > list threaded and indented. This to accomplish one task: to show the > > > reply to a post directly below the parent post and so on. > > > > > > Thanks in advance. > > > -- > > > > > > Ivan R. Quintero E.* (507)228-3477 > > > Aptdo 1263 * (507)228-9105 > > > Balboa, Ancon * 612-1103 > > > Republic of Panama * > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Threaded discussion Phorum algorithm
Try this.. http://www.phorum.net. - Original Message - From: Michael Stearne <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: php php <[EMAIL PROTECTED]> Sent: Thursday, May 24, 2001 11:42 AM Subject: Re: [PHP] Threaded discussion Phorum algorithm > Here's a paper Jamie Zawinski did on threading, it might be of use, but > probably a little more than what you were looking for. > http://www.jwz.org/doc/threading.html > > Michael > > > rodrigo wrote: > > > I need to implement a custom discussion phorum for a news site. I would > > like to know what is the most common algorithm to display the message > > list threaded and indented. This to accomplish one task: to show the > > reply to a post directly below the parent post and so on. > > > > Thanks in advance. > > -- > > > > Ivan R. Quintero E.* (507)228-3477 > > Aptdo 1263 * (507)228-9105 > > Balboa, Ancon * 612-1103 > > Republic of Panama * > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Threaded discussion Phorum algorithm
Here's a paper Jamie Zawinski did on threading, it might be of use, but probably a little more than what you were looking for. http://www.jwz.org/doc/threading.html Michael rodrigo wrote: > I need to implement a custom discussion phorum for a news site. I would > like to know what is the most common algorithm to display the message > list threaded and indented. This to accomplish one task: to show the > reply to a post directly below the parent post and so on. > > Thanks in advance. > -- > > Ivan R. Quintero E.* (507)228-3477 > Aptdo 1263 * (507)228-9105 > Balboa, Ancon * 612-1103 > Republic of Panama * > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] test
Dear Peter It wasnt a test my email program gets out of hand occassionally. trust me i am trying very hard to control. i am sorry if it really bothers you. if you want a real question no one has answered the one i posted last nite regarding strftime and why i cant pass the value %e to it. is it a bug or what???
RE: [PHP] ff
is it possible to stop these sort of annoying posts? ie this one and the ones that just say test they annoy me lol sorry if seems harsh/selfish Peter -Original Message- From: Jon Yaggie [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 3:04 PM To: [EMAIL PROTECTED] Subject: [PHP] ff f
[PHP] ff
f
[PHP] Problem with PHP as CGI
I have php config as a cgi and I put this at the top of my script #!/usr/local/bin/php -q when ever I run this script at root in telnet I get this message below. I configured php like this ./configure --with-mysql make make install I have set this up on a number of servers But I have never had this problem before any id why I am getting this. Error in argument 1, char 3: option not found Error in argument 1, char 3: option not found Usage: php [-q] [-h] [-s [-v] [-i] [-f ] | { [args...]} -q Quiet-mode. Suppress HTTP Header output. -s Display colour syntax highlighted source. -f Parse . Implies `-q' -v Version number -c Look for php.ini file in this directory -a Run interactively -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -z Load Zend extension . -l Syntax check only (lint) -m Show compiled in modules -i PHP information -h This help Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Threaded discussion Phorum algorithm
I need to implement a custom discussion phorum for a news site. I would like to know what is the most common algorithm to display the message list threaded and indented. This to accomplish one task: to show the reply to a post directly below the parent post and so on. Thanks in advance. -- Ivan R. Quintero E.* (507)228-3477 Aptdo 1263 * (507)228-9105 Balboa, Ancon * 612-1103 Republic of Panama * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP-Nuke vs. PHP-BB vs. ???
Try PHPWebsite, it's a cleaned up version of Nuke and runs very well. http://phpwebsite.appstate.edu Clayton Dukes CCNA, CCDA, CCDP, CCNP Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net - Original Message - From: "Tyrone Mills" <[EMAIL PROTECTED]> To: "PHPlist" <[EMAIL PROTECTED]> Sent: Wednesday, May 23, 2001 9:28 PM Subject: [PHP] PHP-Nuke vs. PHP-BB vs. ??? > Hello All, > > I'm looking for input and/or advice on selecting a Portal System like > PHP-Nuke or PHP-BB. I haven't used any of these products, so I don't really > have an opinion myself. > > Here's what I want to be able to do: > > - Modify the system, so it needs to be PHP based > - Use MySQL as the backend > - Have flexibility with user access levels > - Have a reasonably secure/solid system > > I've seen a lot of posts on Bugtraq with regards to problems in PHP-Nuke. > Does anyone have any experience with this? Any other systems anyone can > recommend? > > Thanks in advance! > > > UNIX is user-friendly, it's just picky about who its friends are... > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] bound variables and postgres
I've been using the PHP 4 postgres interface, but it does not support bound variables. Will it do so in the future, or are there any workarounds? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Virtual Hosts document root directory.
Richard Quadling wrote: > I assume there is a variable somewhere? > > Ideas/suggestions please. I think its the predefined apache variable $DOCUMENT_ROOT (look under predefined variables in manual), or try $SCRIPT_FILENAME, you may then parse the part you need. I use Linux so I am only guessing. Hope this helps, Regards Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] setting session.gc_probability
Johnson, Kirk wrote: > I say that a value of "1" means garbage collection is launched on 1 out of > every 100 page requests, i.e., it truly is a percent. This has been discussed before try searching the list archives, although I believe you are correct in your assumption. Regards, Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] while statements output to variables
On Thu, 24 May 2001 10:40, adam wrote: > i need to write a while statement to a variable that will later be > echoed again on another page after including this file to it. i need to > repeat a statement over and over in it and i do not know how. > > > > $variable = ' > > ' . > > do { > 'data to be outputted' > }while ($something = mysql_fetch_array($query)); > > .' > > '; > > ?> > > any help? See the manual entry for mysql_fetch_array(), which gives an example of how to do this. You might also find extract() useful. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Make it idiot proof and someone will make a better idiot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP-Nuke vs. PHP-BB vs. ???
Hello All, I'm looking for input and/or advice on selecting a Portal System like PHP-Nuke or PHP-BB. I haven't used any of these products, so I don't really have an opinion myself. Here's what I want to be able to do: - Modify the system, so it needs to be PHP based - Use MySQL as the backend - Have flexibility with user access levels - Have a reasonably secure/solid system I've seen a lot of posts on Bugtraq with regards to problems in PHP-Nuke. Does anyone have any experience with this? Any other systems anyone can recommend? Thanks in advance! UNIX is user-friendly, it's just picky about who its friends are... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Constantly running?
If safe mode is off you can keep setting the max execution time in a while loop and it would run forever. It will also use 100% cpu unless you call sleep. --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http://www.toolshed51.com -Original Message- From: Chris [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 22, 2001 7:54 AM To: [EMAIL PROTECTED] Subject: [PHP] Constantly running? Is there anyway to ALWAYS have a script running on the server without needing a browser to access it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Constantly running?
Is there anyway to ALWAYS have a script running on the server without needing a browser to access it?
[PHP] while statements output to variables
i need to write a while statement to a variable that will later be echoed again on another page after including this file to it. i need to repeat a statement over and over in it and i do not know how. ' . do { 'data to be outputted' }while ($something = mysql_fetch_array($query)); .' '; ?> any help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Session with PHP and MySQL--> hitory.back()...
I have a session that I control with a mysql table. But if the user press the back (to back a homepage of history) he can access the previews page without passing in the php session. How can I solve this problem? Something like happens when the internet explorer controls the session... thanks, Augusto Cesar Castoldi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] trying to mimic a form
hello, I'm trying to use cURL to mimic a browser requesting data from UPS' web site. Here's the link (for getting a shipping rate)... http://wwwapps.ups.com/servlet/QCCServlet I try to fake sending all the post vars with cURL, however it doesn't work. Here's my code... // declare var vals here $o_country="US"; $o_postal="78758"; $o_city="Austin"; $d_country="US"; $d_postal="10005"; $d_city="New York"; $weight="2"; $length="12"; $width="9"; $height="4"; $value="40"; // encode some that might have spaces and stuff $o_city=rawurlencode($o_city); $c=rawurlencode("02"); $url = "http://wwwapps.ups.com/servlet/QCCServlet";; $post = "currencycode=USD&iso_language=en&iso_country=us&origcountry=$o_country&orig postal=$o_postal&origincity=$o_city&destcountry=$d_country&destpostal=$d_pos tal&destcity=$d_city&residential=NO&packages=1&rate_chart=RTP&container=$c"; $post .="&weight1=$weight&weight_std1=LBS&length_std1=IN&height1=$height&length1=$ length&length_std1=IN&value1=$value&ratesummarypackages_x=34&ratesummarypack ages_x=10"; $ch = curl_init (); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $post); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($ch, CURLOPT_REFERER, $url); $results = curl_exec ($ch); curl_close ($ch); ...yet all this does is return me to the first screen. I checked for hidden inputs and stuff - i got them all. Anyone got any ideas? -dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] doesnt work as expected
an input tag of the type "image" cannot pass a name and value. therefore you will have to use a script to detect if both the button and hidden are passed or jsut the hidden. applying a hidden is helpful for this. '. $done2 . ' '; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] html_translation_table
is the translation table supposed to have '&' => &3039; I wonder, because that is a single quote, and there seems to be no ampersand value in the table or a single_quote as a key. version 4.0.3pl1 running. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] version numbers
I wonder about the version numbers because of some of the alphanumeric values in them. Are the version numbers chosen such that ANY version higher can be checked for by the following code: if ( strcmp($ver_running_under, $min_version) > 0){ use feature; } else { use big nasty, ugly own version of functionality -or- issue warning that results may not be correct because functionality is not necessarily available, i.e. getting the REAL include directory being used before version 4. } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include and include-virtual
At 22:23 23/5/2001 +0100, James, Yz wrote: >Christian, > >Those are SSI calls (Server Side Includes, for use with .shtml files). I know what they are... I wanna know what's the difference between them >Try: > >include("/path/to/filename"); >require("/path/to/filename"); no... I want SSI calls cause this is to be changed in a pure html (with html extension) file... . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Running Crontab on php script
Richard Kurth <[EMAIL PROTECTED]> wrote: > > I have a php script that runs at root. I have php compiled as a cgi to > do this. > My question is what is the best way to run a crontab so that it does > not send a message every time it runs. This script runs every 5 min > and it can get pretty frustrating to get this email. > The script runs only if there is another file present if the file is > not there it shuts down. But I still get the email. > I have it set this way right know and I only get an email if there is > an error. Is there a better way to do it > > 5 * * * * /home/sites/home/auto/creatacct.php > /tmp/logdump.LOG > 0 0 * * * /home/sites/home/auto/mail.php > /tmp/logdump.LOG > Like this: 5 * * * * /home/sites/home/auto/creatacct.php > /tmp/logdump.LOG 2>&1 0 0 * * * /home/sites/home/auto/mail.php > /tmp/logdump.LOG 2>&1 It makes stderr go to the same place stdout goes, which is to your log file in this case. Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Running Crontab on php script
I have a php script that runs at root. I have php compiled as a cgi to do this. My question is what is the best way to run a crontab so that it does not send a message every time it runs. This script runs every 5 min and it can get pretty frustrating to get this email. The script runs only if there is another file present if the file is not there it shuts down. But I still get the email. I have it set this way right know and I only get an email if there is an error. Is there a better way to do it 5 * * * * /home/sites/home/auto/creatacct.php > /tmp/logdump.LOG 0 0 * * * /home/sites/home/auto/mail.php > /tmp/logdump.LOG Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] OT PHP Manuals
Miles Thompson wrote: > My apologies to Joseph, and to the group at large. > > I didn't read his question carefully, and in retrospect, gave him a > pretty asinine answer. > > Braaay! - Miles Thompson Thanks all this is a great list, apology accepted :-) Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] doesnt work as expected
$done2 "; ?> ok, type='submit' works like it should, the headers Packet ID (from_IP.port-to_IP.port): 208.181.210.98.3830-209.52.174.206.80 E . . . . . @ . . . ' . . . . b . 4 . . . . . P G . z . F . . k P . C P I % . . P O S T / t e s t 2 . p h p H T T P / 1 . 1 . . U s e r - A g e n t : M o z i l l a / 4 . 0 ( c o m p a t i b l e ; M S I E 5 . 0 ; W i n d o w s 2 0 0 0 ) O p e r a 5 . 1 1 [ e n ] . . H o s t : m e d i a w a v e o n l i n e . c o m . . A c c e p t : t e x t / h t m l , i m a g e / p n g , i m a g e / j p e g , i m a g e / g i f , i m a g e / x - x b i t m a p , * / * . . A c c e p t - L a n g u a g e : e n . . A c c e p t - E n c o d i n g : d e f l a t e , g z i p , x - g z i p , i d e n t i t y , * ; q = 0 . . R e f e r e r : h t t p : / / m e d i a w a v e o n l i n e . c o m / t e s t 2 . p h p . . C o n n e c t i o n : K e e p - A l i v e , T E . . T E : d e f l a t e , g z i p , c h u n k e d , i d e n t i t y , t r a i l e r s . . C o n t e n t - t y p e : a p p l i c a t i o n / x - w w w - f o r m - u r l e n c o d e d . . C o n t e n t - l e n g t h : 1 8 . . . . d o n e 1 = d o n e d o n e d o n e are sent correct. and the var $done1 is set with the correct value. but type='image' does not work, the headers are correct though Packet ID (from_IP.port-to_IP.port): 208.181.210.98.3831-209.52.174.206.80 E . . . . . @ . . . ' . . . . b . 4 . . . . . P G . . P G } . . P . C P 9 . . . P O S T / t e s t 2 . p h p H T T P / 1 . 1 . . U s e r - A g e n t : M o z i l l a / 4 . 0 ( c o m p a t i b l e ; M S I E 5 . 0 ; W i n d o w s 2 0 0 0 ) O p e r a 5 . 1 1 [ e n ] . . H o s t : m e d i a w a v e o n l i n e . c o m . . A c c e p t : t e x t / h t m l , i m a g e / p n g , i m a g e / j p e g , i m a g e / g i f , i m a g e / x - x b i t m a p , * / * . . A c c e p t - L a n g u a g e : e n . . A c c e p t - E n c o d i n g : d e f l a t e , g z i p , x - g z i p , i d e n t i t y , * ; q = 0 . . R e f e r e r : h t t p : / / m e d i a w a v e o n l i n e . c o m / t e s t 2 . p h p . . C o n n e c t i o n : K e e p - A l i v e , T E . . T E : d e f l a t e , g z i p , c h u n k e d , i d e n t i t y , t r a i l e r s . . C o n t e n t - t y p e : a p p l i c a t i o n / x - w w w - f o r m - u r l e n c o d e d . . C o n t e n t - l e n g t h : 2 1 . . . . d o n e 2 . x = 3 9 & d o n e 2 . y = 1 7 but the var $done2 is not set. any ideas ? this a php bug? I cant see it being a browser error or a apache error, the headers are all right. -- Chris Lee [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php unpack function
Addressed to: [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from Chris Mattmann <[EMAIL PROTECTED]> Wed, 23 May 2001 13:28:36 -0700 > For instance, my file is basically just thousands of temperature > values, taken 4 times a day, over a period of 20 years. Let's > say I wanted to get a year's worth of temperatures, from the 10th > year into the file (so I would need the 4x365x10) th temperature > value from the file. I don't quite understand what you are doing, but this might be close. If not, give me more information on the source data, how you want to select which days to inspect, and what you want to do with the output. This code reads from a file that contains thousands of temp records back to back, with no separators and displays all the temps, one day per line for each day within a range of day numbers. Display is to a web page and not very well formatted. # Set these to fit your situation $TempSize = x; # Length of temperature value in bytes. $TempFormat = '???'; # Unpack format string for a single day. $FileName = 'tempfile.data'; $StartDate = 365 * 10; # Start of tenth year $EndDate = 365 * 11; # Start of eleventh year. # End date is not displayed $BlockSize = 20; # Set for good performance/memory use # Here goes... $F = fopen( $FileName, 'rb' ); $DayLength = 4 * $TempSize; for( $I = $StartDate; $I < $EndDate; $I += $BlockSize ) { $SeekPos = $I * $TempSize; if( ( $I + $BlockSize ) > $EndDate ) $BlockSize = $EndDate - $I; fseek( $F, $SeekPos, SEEK_SET ); $Data = fread( $F, $BlockSize * $TempSize ); for( $J = 0; $J < $BlockSize; $J ++ ) { $DayPos = $J * 4 * $TempSize; $DayData = substr( $Data, $DayPos, $DayPos + DayLength ); $DayTemps = unpack( $TempFormat, $DayData ); echo "Day: ", $I + $J, " - ", $DayTemps[ 1 ], " ", $DayTemps[ 2 ], " ", $DayTemps[ 3 ], " ", $DayTemps[ 4 ], "\n"; } } This is not tested, but should be pretty close. You may have to add or subtract one from some of the control conditions in the ifs or the places where I setup values. Rick Widmer Internet Marketing Specialists http://www.developersdesk.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Inserting the date into MySQL via PHP
Hello Michael, You hit the nail on the head... Not sure how I missed that... In anycase, thank you. Mike [EMAIL PROTECTED] wrote: > please forgive me if your typo concerns only your posting, but you didn't close your >VALUES parenthesis. > Then, the order of the data in the second parenthesis doesn't match that in the >first one (which it has to). > So the correct way to do it would be: > > $insert = mysql_query("insert into dbrss (Feed, Title, URL, Abstract, Old) VALUES > ('$Feed','$Title','$URL','$Abstract',NOW())",$db); > > Hope this helps. > Greetings, > Michael. > > >>Hello, >> >>This is a really simple (looking) problem, but I can't seem to find the solution >>in the documentation. I want to insert today's date into a MySQL Date field. >> >>My first attempt was to use the following: >> >>$insert = mysql_query("insert into dbrss (Feed, Title, URL, Abstract, Old) >>VALUES ('$Feed','$Title','$URL',NOW(),'",$db); >> >>The relevant table was created with the following: >> >>CREATE TABLE dbrss ( >>ID int(7) NOT NULL auto_increment, >>Feed varchar(50) NOT NULL, >>Title varchar(255) NOT NULL, >>URL varchar(255) NOT NULL, >>Abstract varchar(255), >>superRSS varchar(50), >>Type varchar(50), >>Old date, >>Source varchar(100), >>SourceURL varchar(100), >>PRIMARY KEY (ID) >>); >> >>I also tried to insert a date generated by: >>$Date = date(Y-m-d); >> >>using the following variation: >> >>$insert = mysql_query("insert into dbrss (Feed, Title, URL, Abstract, Old) >>VALUES ('$Feed','$Title','$URL','$Date','",$db); >> >>Any help would be appreciated. >> >>Mike >>-- >>Mike Gifford, OpenConcept Consulting, http://openconcept.ca >>Offering everything your organization needs for an effective web site. >>Featured Client: http://halifaxinitiative.org >>A good life is one inspired by love and guided by knowledge - B. Russell >> >> >>-- >>PHP General Mailing List (http://www.php.net/) >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >>To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > > > # > # Michael Heumann > # S&I Chile - Software e Informatica Limitada > # Arlegui 440, Of. 403, Viña del Mar, Chile > # Fonofax: (56)(32) 710833 > # Email: [EMAIL PROTECTED] > # Web: http://www.softwareinformatica.cl > # > > -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Featured Client: http://halifaxinitiative.org A good life is one inspired by love and guided by knowledge - B. Russell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] printing a php/html page to the browser
Usually, it should be enough to rename the file extension to .phps and the browser should handle it correctly, if the web server (i.e. apache) is properly configured. Michael. > If I had a mixed html/php page, i.e. where some of the strings had html > in them, other than setting the header to be of mime type 'text', how > could I process this page to display it exactly like it was seen in a > text editor, in html to the browser? # # Michael Heumann # S&I Chile - Software e Informatica Limitada # Arlegui 440, Of. 403, Viña del Mar, Chile # Fonofax: (56)(32) 710833 # Email: [EMAIL PROTECTED] # Web: http://www.softwareinformatica.cl # -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php unpack function
On Wednesday 23 May 2001 22:28, Chris Mattmann wrote: > Hi there- > > I am using the PHP unpack function to take a binary formatted > file with 10's of thousands > of signed short integers stored in it, to take the file (which is in > PHP STRING form) > and extract the short integer values from it. The problem I am having > is when reading > all the documentation for the pack/unpack function, I have been unable > to figure out a way > to only take a small subset of the data. For instance, my file is look into fseek(), fread() and substr () -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match. - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Inserting the date into MySQL via PHP
Hi, please forgive me if your typo concerns only your posting, but you didn't close your VALUES parenthesis. Then, the order of the data in the second parenthesis doesn't match that in the first one (which it has to). So the correct way to do it would be: $insert = mysql_query("insert into dbrss (Feed, Title, URL, Abstract, Old) VALUES ('$Feed','$Title','$URL','$Abstract',NOW())",$db); Hope this helps. Greetings, Michael. > Hello, > > This is a really simple (looking) problem, but I can't seem to find the solution > in the documentation. I want to insert today's date into a MySQL Date field. > > My first attempt was to use the following: > > $insert = mysql_query("insert into dbrss (Feed, Title, URL, Abstract, Old) > VALUES ('$Feed','$Title','$URL',NOW(),'",$db); > > The relevant table was created with the following: > > CREATE TABLE dbrss ( > ID int(7) NOT NULL auto_increment, > Feed varchar(50) NOT NULL, > Title varchar(255) NOT NULL, > URL varchar(255) NOT NULL, > Abstract varchar(255), > superRSS varchar(50), > Type varchar(50), > Old date, > Source varchar(100), > SourceURL varchar(100), > PRIMARY KEY (ID) > ); > > I also tried to insert a date generated by: > $Date = date(Y-m-d); > > using the following variation: > > $insert = mysql_query("insert into dbrss (Feed, Title, URL, Abstract, Old) > VALUES ('$Feed','$Title','$URL','$Date','",$db); > > Any help would be appreciated. > > Mike > -- > Mike Gifford, OpenConcept Consulting, http://openconcept.ca > Offering everything your organization needs for an effective web site. > Featured Client: http://halifaxinitiative.org > A good life is one inspired by love and guided by knowledge - B. Russell > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] # # Michael Heumann # S&I Chile - Software e Informatica Limitada # Arlegui 440, Of. 403, Viña del Mar, Chile # Fonofax: (56)(32) 710833 # Email: [EMAIL PROTECTED] # Web: http://www.softwareinformatica.cl # -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] printing a php/html page to the browser
If I had a mixed html/php page, i.e. where some of the strings had html in them, other than setting the header to be of mime type 'text', how could I process this page to display it exactly like it was seen in a text editor, in html to the browser? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] outputting lines from file(file.php)
On Wednesday 23 May 2001 17:47, Dennis Gearon wrote: > I have read in the lines from a php file into a $buff. > > Each line is set and the total corresponds to the number of lines in > the file. > > But trying to ouput the lines results in blank lines. > > do I have to pass the lines through something like chop(), or > html_spec_chars? > > How do you guys display php files to the screen in the HTML stream? http://php.net/show_source -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match. - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Inserting the date into MySQL via PHP
Hello, This is a really simple (looking) problem, but I can't seem to find the solution in the documentation. I want to insert today's date into a MySQL Date field. My first attempt was to use the following: $insert = mysql_query("insert into dbrss (Feed, Title, URL, Abstract, Old) VALUES ('$Feed','$Title','$URL',NOW(),'",$db); The relevant table was created with the following: CREATE TABLE dbrss ( ID int(7) NOT NULL auto_increment, Feed varchar(50) NOT NULL, Title varchar(255) NOT NULL, URL varchar(255) NOT NULL, Abstract varchar(255), superRSS varchar(50), Type varchar(50), Old date, Source varchar(100), SourceURL varchar(100), PRIMARY KEY (ID) ); I also tried to insert a date generated by: $Date = date(Y-m-d); using the following variation: $insert = mysql_query("insert into dbrss (Feed, Title, URL, Abstract, Old) VALUES ('$Feed','$Title','$URL','$Date','",$db); Any help would be appreciated. Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Featured Client: http://halifaxinitiative.org A good life is one inspired by love and guided by knowledge - B. Russell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include and include-virtual
Christian, Those are SSI calls (Server Side Includes, for use with .shtml files). Try: include("/path/to/filename"); require("/path/to/filename"); I've never used these, but in PHP4 there are also: include_once("/path/to/filename"); and require_once("/path/to/filename"); (double check that I have gotten those function names right). If you REALLY need to use something like exec cgi, I guess you could create an shtml file with the command in, then include() or require() the shtml file. James. "Christian Dechery" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > What is the main difference between: > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] include and include-virtual
What is the main difference between:
RE: [PHP] About Commit..
postgres outperforms mysql on very high traffic sites where there are lots of INSERT and UPDATE commands issued, but for small sites where a majority of database calls are reading (SELECT), MySQL kicks postgres ass... there was a really good article on phpbuilder.com a few months back... check it out. > -Original Message- > From: Chris Lee [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] About Commit.. > > > mysql does support transactions if used with berkely db. php does not > support mysql transactions. in any sort of functions sence, you can try > passing the commands to mysql with the mysql_db_query() command, but do not > if this will work. if your looking for a completely new database, try > postgres, its very nice, more feature rich and comparable to speed to mysql. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php unpack function
Hi there- I am using the PHP unpack function to take a binary formatted file with 10's of thousands of signed short integers stored in it, to take the file (which is in PHP STRING form) and extract the short integer values from it. The problem I am having is when reading all the documentation for the pack/unpack function, I have been unable to figure out a way to only take a small subset of the data. For instance, my file is basically just thousands of temperature values, taken 4 times a day, over a period of 20 years. Let's say I wanted to get a year's worth of temperatures, from the 10th year into the file (so I would need the 4x365x10) th temperature value from the file. How would I use the unpack function to just select the (4x365x10)th through the (4x365x10)+(4x365)th value (basically year 10's entire temperature range). I see in the documentation I can specify how many shorts to extract STARTING from the first one, how would I specify, or is it even possible to specify a different starting location to begin extraction from. I cannot write the string to a file, and then use fseek while reading the file back in to skip to a postion and unpack from there. The way that the application is structured, I have to begin my extraction at the point where I already have the file in terms of a binary encoded string. So if anyone has any suggestions, I would greatly appreciate it. Please reply back to my account here at work if you are posting a reply on the forum: Thanks for your time. --- Chris Mattmann Science Data Management and Archiving [EMAIL PROTECTED] NASA-JPLPasadena, CA 91109-8099 Office: 300-324C Phone: 818-354-8810
Re: [PHP] MySQL Select
why not just simply it more while ($r = mysql_fetch_array($result)) { // do your thing here } -- Chris Lee [EMAIL PROTECTED] "Jon Haworth" <[EMAIL PROTECTED]> wrote in message 67DF9B67CEFAD4119E4200D0B720FA3F53FA57@BOOTROS">news:67DF9B67CEFAD4119E4200D0B720FA3F53FA57@BOOTROS... > Something like: > > if ($array_result = mysql_fetch_array($result)) { > do { > // do your thing here > } while ($array_result = mysql_fetch_array($result)); > } > > HTH > Jon > > > -Original Message- > From: Jamie Thompson [mailto:[EMAIL PROTECTED]] > Sent: 23 May 2001 14:33 > To: [EMAIL PROTECTED] > Subject: [PHP] MySQL Select > > > ok...sorry to ask a stupid question but > > $result = mysql_query("SELECT jazz FROM funk WHERE foo='bar'") > > but where do you go from there. How would you iterate through the array a > row at a time, doing your thing as you go along? > > thanks, > > jamie > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > ** > 'The information included in this Email is of a confidential nature and is > intended only for the addressee. If you are not the intended addressee, > any disclosure, copying or distribution by you is prohibited and may be > unlawful. Disclosure to any party other than the addressee, whether > inadvertent or otherwise is not intended to waive privilege or > confidentiality' > > ** > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] About Commit..
mysql does support transactions if used with berkely db. php does not support mysql transactions. in any sort of functions sence, you can try passing the commands to mysql with the mysql_db_query() command, but do not if this will work. if your looking for a completely new database, try postgres, its very nice, more feature rich and comparable to speed to mysql. -- Chris Lee [EMAIL PROTECTED] "Jon Haworth" <[EMAIL PROTECTED]> wrote in message 67DF9B67CEFAD4119E4200D0B720FA3F53FA58@BOOTROS">news:67DF9B67CEFAD4119E4200D0B720FA3F53FA58@BOOTROS... > I thought MySQL already supported transactions, but only for Berkeley table > types... > > http://www.mysql.com/doc/C/O/COMMIT.html > > Cheers > Jon > > > -Original Message- > From: George E. Papadakis [mailto:[EMAIL PROTECTED]] > Sent: 23 May 2001 15:17 > To: Hassan Arteaga; Php (E-mail) > Subject: Re: [PHP] About Commit.. > > > Use Oracle if you want transactions. Yet, it's going to be slow. > Mysql is said to support transactions soon. > > - Original Message - > From: "Hassan Arteaga" <[EMAIL PROTECTED]> > To: "Php (E-mail)" <[EMAIL PROTECTED]> > Sent: Wednesday, May 23, 2001 4:55 PM > Subject: [PHP] About Commit.. > > > > Hi all!! > > > > I wants to implements transacctions with this code...What can I do ? > > > > > > $Conn=mysql_connect("myserver","myroot","mypass"); > > $Query_ID1=mysql_db_query ("App", "update FamiliPic set pic_code=4 ", > > $Conn); //only example > > $Query_ID2=mysql_db_query ("App", "update DesFam set pic_code=4 ", $Conn); > > //only example > > ...other code > > > > Thanks !!! > > > ** > 'The information included in this Email is of a confidential nature and is > intended only for the addressee. If you are not the intended addressee, > any disclosure, copying or distribution by you is prohibited and may be > unlawful. Disclosure to any party other than the addressee, whether > inadvertent or otherwise is not intended to waive privilege or confidentiality' > > ** > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] strftime()
Okay here is what I am trying strftime("%A, %B %e, %Y %H:%M:%S", $last); I have looked now at the manual and stared in amazement but it seems not to recognize %e at all. What i get is this Wednesday, May , 2001 12:44:08 Am i doing soemthing wrong?? %d works.
Re: [PHP] Site search engine suggestion.
On 20 May 2001 10:17:29 -0700 impersonator of [EMAIL PROTECTED] ("Alok K. Dhir") planted &I saw in php.general: >The best open source search engines I've seen/used are: > > ASPSeek http://www.aspseek.org > Mnogoseach http://mnogosearch.org/ > ht://dighttp://www.htdig.org > >I've found that I prefer ASPseek to both mnogo and htdig... > Interesting tool, according to their description, especialy, in regard to indexing abilities and ideas. (Although, I couldn't find description in detiles, unlike Mnogo, which explains stuff). And some stuff there (searching part) is inferior to mine - although, of course - mine is not nearly as universal, and will no became such in the nearest futer, nor will it support databases. But for local-site-oriented indexes - the simplicity with out too much extras could be a plus. (And outside indexing is being developed also) It can produce data for searches right now as well (by_links and as a test). If someone is interested the url is: http://leo.portland.co.uk/outsource.shtml LeoNid. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Site search engine suggestion.
On 20 May 2001 09:54:53 -0700 impersonator of [EMAIL PROTECTED] ("Manuel Lemos") planted &I saw in php.general: >Hello elias, > >On 12-May-01 04:04:26, you wrote: > >>Hello guys, > >>I need that badly! I need a suggestion, advise, solution or whatever that >>might help! > >>I need a Site Search script for a page that mostly have .PHP files some are >>dynamic and some are not. >>Basically i was using WebGlimpse but whenever I search using it, It shows >>the source code of the PHP files! >>So for example if i search "echo" , WebGlimpse displays the .PHP file source >>code! > Actually, as I saw in a process of testing my by link indexer, some of your pages have com`ments tags "" being dinamicaly created. Thats interfere with your commenting of whole block of script. I doubt, any (well, lets talk a opinions:) search engine is smart enough to process such source, without being a script interpreters themself. (I don't use _by the book_ definition of comments, as it it is practicaly not followed by most, but your case wouldn't fit any definition) Well, since browsers switch to script interpreter mode its begining, it'll not mix up here.. >>Any suggestion for a better site search program? > What I would suggest is to break your comments at the statements, creating "comments", so that these statements are non-commented, and, for search engines, allowing that (like mine:) - exclude the mentioned statements words from indexing. Regards, Leonid. PS. BTW, I run through to create you full index (with a source:( Because there were no exclusion, it(indexer) diged a lot of unnesesary work, for relatively small indexes. (Have to enFast my algoritm:). In case you change your mind reg. search, I 'll keep the produced files for some days. (And it[&I] does use mySql, nor intend to [for a time being] atleast:) Security? Are there full`y trusted maintainers?:) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] tutorials
Okay i am not expecting any heavy research here but if any one know of tutorials on these sujects it would really save me some time. thanks 1) useing php and xml 2) using perl and php together
RE: [PHP] php 4.0/win 2000/sql server
what else is running on the Win2k machine? what kind of HTTP server? if you're running IIS/MS-SQL server, i'd hazard a guess that it's probably *those* programs that are slowing the computer down. i use Win2000/PHP/MySQL for local development (after which i upload the scripts to a linux machine) and i've never once seen that problem on either machines... > -Original Message- > From: PHPFAN [mailto:[EMAIL PROTECTED]] > Subject: [PHP] php 4.0/win 2000/sql server > > When ever I am trying to access a php file with an error,my system is > overwelmingly slowing down and restarting is the only solution. > Previously I worked on linux/apache/php 4.0/mysql ,I never had such > problem.I used to get some errors and I used to correct them but working in > this environment is almost impossible as I am restarting my system 95% of > time. > > Any ideas what might be the problem and got any tips? > > Thanks in advance, > Sagil. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] advice on 'Nusphere Mysql Package' appreciated
Linux Mandrake (8.0) is extremely easy to install, (it's a complete linux distrib, based off of RedHat, so you can install it onto a clean machine) the install is *very* interactive and it comes fully loaded with almost everything you could want, and is free get the ISO's at : http://linux-mandrake.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_unset() and session_destroy()
Arcady Genkin wrote: > I don't think that I grasp the difference between session_unset() and > session_destroy() functions. Would anyone explain? session_unset() frees session vars from memory. session_destroy() delete session from session storage. If you do session_unset(), it will results session with no session data. If you do session_destroy(), it will results session with currently registered data. (Unless you do session_unset()). > > Also, suppose that I want to totally wipe out an existing session, and > then start a new one. Can I still do session_register() after I do > session_unset() or session_destroy() or both? I guess you can, but the session will have the session id. You must set new session id with session_id(). If you want to start new session, simplest way is to set new session id, since session data will be garbage collected eventually. If you care about session hijacking, call session_destroy() then call session_id(). Regards, -- Yasuo Ohgaki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] setting session.gc_probability
OK, we're having an argument in our shop. This is what the manual says about garbage collection: "session.gc_probability specifies the probability that the gc (garbage collection) routine is started on each request in percent. Defaults to 1." Somebody here says that a value of "1" means 100%, i.e., that this value is really a proportion and not a percent; a value of "1" means garbage collection is launched on every page request. I say that a value of "1" means garbage collection is launched on 1 out of every 100 page requests, i.e., it truly is a percent. Can anybody confirm the correct interpretation? TIA Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CVS problem
Nicholas wrote: > whenever i try to run this cvs command i get this > cvs -d >:pserver:[EMAIL PROTECTED]:/cvsroot/best-board/devel init > Protocol error: Root request missing > wtf am i doing wrong what do i do .. thanks (note this is FOR a php > program..) Why do you use init command? Unless you are CVS admin, you don't need the command. (Besides, CVS must be initialized before setting up pserver anyway) For more info, refer to http://www.cvshome.org/ -- Yasuo Ohgaki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Can you help me with this: Bug #11055: segmentation fault & core dump during make
Sorry no, never touch sybase yet. - Markus On Wed, May 23, 2001 at 04:58:53PM +0200, [EMAIL PROTECTED] wrote : > > > From: [EMAIL PROTECTED] > > > Operating system: linux 2.2.14 (RH 6.2) > > > PHP version: 4.0.5 > > > PHP Bug Type: Sybase-ct (ctlib) related > > > Bug description: segmentation fauld & core dump during make > > > > > > downloaded free sybase-ct libs from link in faq from php site. > > > unpacked in /sybase-ct > > > fixed /etc/ld.so.conf & ran ldconfig > > > > > > then tried to compile php with sybase-ct support (in order to access > > MSSQL server) as a DSO module: > > > > > > [root@linux php-4.0.5]# ./configure --with-mysql --with-apxs > > --enable-sockets --with-oracle=/mnt/ora_syb/ora/app/oracle/product/8.0.5 > > --with-sybase-ct=/sybase-ct > > > > > > went fine then ran: > > > [root@linux php-4.0.5]# make > > > > > > got the following error: > > > > > > make[1]: Entering directory `/mnt/ora_syb/php-4.0.5' > > > /bin/sh /mnt/ora_syb/php-4.0.5/libtool --silent --mode=link gcc -I. > > -I/mnt/ora_syb/php-4.0.5/ -I/mnt/ora_syb/php-4.0.5/main > > -I/mnt/ora_syb/php-4.0.5 -I/usr/include/apache > > -I/mnt/ora_syb/php-4.0.5/Zend > > -I/mnt/ora_syb/php-4.0.5/ext/mysql/libmysql > > -I/mnt/ora_syb/ora/app/oracle/product/8.0.5/rdbms/demo > > -I/mnt/ora_syb/ora/app/oracle/product/8.0.5/network/public > > -I/mnt/ora_syb/ora/app/oracle/product/8.0.5/plsql/public > > -I/sybase-ct/include -I/mnt/ora_syb/php-4.0.5/ext/xml/expat/xmltok > > -I/mnt/ora_syb/php-4.0.5/ext/xml/expat/xmlparse > > -I/mnt/ora_syb/php-4.0.5/TSRM -DLINUX=2 -DEAPI -DUSE_EXPAT > > -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -o libphp4.la -rpath > > /mnt/ora_syb/php-4.0.5/libs -avoid-version > > -L/mnt/ora_syb/ora/app/oracle/product/8.0.5/lib -L/sybase-ct/lib -R > > /mnt/ora_syb/ora/app/oracle/product/8.0.5/lib -R /sybase-ct/lib stub.lo > > Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la > > ext/mysql/libmysql.la ext/oracle/liboracle.la ext/pcre/libpcre.la > > > ext/posix/libposix.la ext/session/libsession.la > > ext/sockets/libsockets.la ext/standard/libstandard.la > > ext/sybase_ct/libsybase_ct.la ext/xml/libxml.la TSRM/libtsrm.la -lpam > > -ldl -linsck -lsybtcl -lintl -lcomn -lct -lcs -lclntsh -lpsa -lcore4 > > -lnlsrtl3 -lm -lnsl -lresolv -lm -ldl -lcrypt -lnsl -lresolv > > > collect2: ld terminated with signal 11 [Segmentation fault], core > > dumped > > > /sybase-ct/lib/libct.a(ctconpr.o)(.text+0x5ac): undefined reference to > > `comn_loc_copy' > > > make[1]: *** [libphp4.la] Error 1 > > > make[1]: Leaving directory `/mnt/ora_syb/php-4.0.5' > > > make: *** [all-recursive] Error 1 > > > N.B. > > > previous run witout sybase-ct support went fine! > > > > > > dont know if it will help but, try php 4.0.6rc1 from > > http://www.php.net/~andi/php-4.0.6RC1.tar.gz or try a 4.0.7-dev > > snapshot from http://snaps.php.net/php4-latest.tar.gz > > Cameron > > Since the error comes from : > /sybase-ct/lib/libct.a(ctconpr.o)(.text+0x5ac): undefined reference to > `comn_loc_copy' > > I feel that this will not solve the problem ... as in effect it did not. > I see that some people solved similar problems by doungrading to version > 4.0.3 ... could this be a solution for my problem ? > where can I get these old sources (on php site oldest version avalible is > 4.0.4) ? > Can any body suggest any other solution ? > > By dave > > > - > Questo messaggio ? stato inviato utilizzando http://it.my.gsmbox.com -- Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/ EMail: [EMAIL PROTECTED] PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] OT PHP Manuals
All forms of PHP Manuals are created from XML source. DocBook and DSSSL is used for that. (It is described at the beginning of the manual.) You can get XML source from CVS, if you want. Joseph Blythe wrote: > Hey all, > > Just was wondering if anyone knew what was used to make the php manuals > in the windows help format (.chm), I really like them :-) > > Regards, > > Joseph. -- Yasuo Ohgaki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ereg questions
hmm, got a little question. 1. what's that \\1 and \\2? got any info on where u got that from? 2. what if it's just href="anything.html" ? i mean.. something like it got lots of subdirectories or not. Thanks - Original Message - From: "Mark Maggelet" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 24, 2001 1:19 AM Subject: Re: [PHP] ereg questions > On Thu, 24 May 2001 01:01:16 +0800, Ker Ruben Ramos > ([EMAIL PROTECTED]) wrote: > >How do i change all '' to ' >href="file.php?file=anythinghere.php">' > >any help out there? > > I would go: > > $string = ereg_replace( > "", > "", > $string); > > - Mark > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] MSSQL7
Is it possible to import one MSSQL7 DB to another if they were installed using different sort orders? If yes, how? __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Web Server processing question
Firstly, I narrowed it down to the following code: $Output = SimpleItem("$Heading","",true); foreach ($TopList as $Player => $Qty) { $Output .= SimpleItem(WebLink(" $Player","csstats.php?id=" . $PlayerStats[DETAILS][ID][$Player],"bar' style='CURSOR:crosshair;"),$Qty); } print $Output; This loop scored a maximum process time of almost 28 seconds! However, most of the "bad" calls were from 2 to 10 seconds, with the good ones once again clocking at around 0.001 or less. Note that during the tests, the array within the foreach loop always contains 10 elements. Two other functions are called here: SimpleItem, and WebLink. Both of these test out ok, with maximum test times of 0.019 and 0.0077 respectively, so that should rule them out. I've included the code for those two functions at the end. 10 iterations gives a maximum TOTAL process time for SimpleItem at 0.19 seconds, and 0.077 for Weblink. That's still way short of the 28 seconds for the entire chunk. Next step was to take out the print statement, and you know what? The run time for the loop dropped to a maximum of 0.1 sec. That narrowed it down to "print $Output;" I then proceded to check the length of $Output and it's run time, and got the learned that the string is 2112 characters long, and sometimes takes a fraction of a second to print, while other times takes several seconds. Even if I print the SimpleItems separately rather than appending to a variable (the way it was set up originally) the problem remains. So, why should this print statement take so long? RockMonkey ""RockMonkey"" <[EMAIL PROTECTED]> wrote in message 9egn90$alj$[EMAIL PROTECTED]">news:9egn90$alj$[EMAIL PROTECTED]... > Ok. A simplified version of the subroutines (still with the same problem > though): > > function SimpleList($Data,$MaxStats = "10",$Heading = " ") { >if (is_array($Data)) { >$Output = ""; >$Output .= SimpleItem("$Heading","",2); >foreach ($Data as $Player => $Qty) { > $Output .= SimpleItem($Player,$Qty); >} >print $Output; >} > } > > function SimpleItem($Left,$Right = " ",$Colspan = "") { >if (!empty($Colspan)) { > return(" colspan='2'>$Left\n"); >} >return("$Left class='smaller'>$Right\n"); > } > > That's all it does. During the tests, the array of data only contained 10 > elements, and still some of the calls to this function took 10 seconds > > > > > > > > > > > "Christian Reiniger" <[EMAIL PROTECTED]> wrote in message > 01052316515004.00599@chrisbig">news:01052316515004.00599@chrisbig... > > > In the following example, which is the one that I'm concerned about, > > the same function is called multiple times in a row (with nothing > > happening in between calls) for different "categories". Basically, the > > function sorts an array and outputs the 10 elements with the highest > > value. > > > > I ran the test several times, calling the function hundreds of times > > with the same data, and each time I ran the test every second call took > > thousands of times longer than the ones that ran ok. > > Well, as it really alternates between fast and slow, there has to be some > "real" reason for it. Can you post some code? > > -- > Christian Reiniger > LGDC Webmaster (http://sunsite.dk/lgdc/) > > /* you are not expected to understand this */ > > - from the UNIX V6 kernel source > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ereg questions
How do i change all '' to '' any help out there?
Re: [PHP] writing to file quick and easy.
sure this is not complicated, this is easy :) HTML in here, anything you put here, will goto the file too. Download "; $file = fopen("$DOCUMENT_ROOT$filename", 'w+'); fwrite($file, ob_get_contents()); ?> is this what you mean ? please get back to me. -- Chris Lee [EMAIL PROTECTED] ""Christopher Allen"" <[EMAIL PROTECTED]> wrote in message 004701c0e3a0$5c17a5a0$[EMAIL PROTECTED]">news:004701c0e3a0$5c17a5a0$[EMAIL PROTECTED]... > Hello: > > Lookin for a little advice here. > > I have a series of scripts that dynamically create web pages. The last page > in the series I wish to be able to write out to a file. > Is there a simple/quick way in which I can take the process(ing) script and > write it to a file at the same time that it is displaying? > I need it to both display and be able to be downloaded such that the last > thing that this script would do is create a link to itself in html format. > Something to the effect that whatever was being passed to the browser could > also be passed thru an open file handle thus written to a file > > > Thanks, > Christopher C. M. Allen > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] outputting lines from file(file.php)
No, I am trying to make an online configuration/editor program. It reads in an XML formatted PHP file and ouputs the configuration of a state machine via a page on the web. With some simple mouse clicks, one will be able to program the desired behavior of the program. The XML formatting is transparent to the php program, like so: // $SO_editor_state="done"; // // // class SObj{ // // $state; // // $events; // // //put code here // // } // // // All that would be necessary to import this into a DOM tree would be to replace all '//<' with '<'. I needed some kind of tags for the configuration/editor to find the parts it needed to massage/edit, and instead of reinventing the wheel, I just use XML tags commented out. As a temporary, intermediate step, (a.k.a. incremental programming), I am just trying to output the 'session.inc' file in the phplib to the screen. It no workee! Any help would be appreciated. The file opens and reads fine, just doesn't output. "George E. Papadakis" wrote: > > hm.. > Is include () or require () what you are talking about or I am wrong? > > -- GP > > > I have read in the lines from a php file into a $buff. > > > > Each line is set and the total corresponds to the number of lines in the > > file. > > > > But trying to ouput the lines results in blank lines. > > > > do I have to pass the lines through something like chop(), or > > html_spec_chars? > > > > How do you guys display php files to the screen in the HTML stream? > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP & XML Parsing
> Interesting.. So to be consistent with proper XML formatting, > should the server hosting the XML file convert the & into > & ? It depends on the situation, I believe. The server that sends you XML should indeed provide you well-formed XML, which it's not doing. Probably what should happen is that the server sending the XML should urlencode URLs in the cdata elements, and then after you parse the XML file you should urldecode the URLs. I would be surprised if this hasn't been done as some standard part of XML parsing and I've just missed it in my limited use of XML parsers. > I certainly feel like I'm missing something... Although I'm a bit at > odds as to how to troubleshoot this new file. > I no longer get the errors, but I'm not getting the results I'm looking for either. I'm not sure what results you're looking for exactly, but if you put in a bunch of echo statements at various points throughout your parsing routines, you will see that none of the "if x = y" conditions are matching. Here's what I'd recommend: 1. put in a bunch of echo statements to print out your variables at different points in your parsing, just to make sure it's doing what you expect it to. Do a full audit of your characterData routine through this method, and I think it will show you where the errors are. (I did not see the exact error right away so I gave up since I do have a day job. :-) 2. keep your first eregi_replace statement, then when you're printing out the links, re-convert it with a reverse eregi_replace to turn the & back into a simple &. This will send it to the HTML browser in the format you want, I hope. I hope this is of some help. Pete. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Web Server processing question
Ok. A simplified version of the subroutines (still with the same problem though): function SimpleList($Data,$MaxStats = "10",$Heading = " ") { if (is_array($Data)) { $Output = ""; $Output .= SimpleItem("$Heading","",2); foreach ($Data as $Player => $Qty) { $Output .= SimpleItem($Player,$Qty); } print $Output; } } function SimpleItem($Left,$Right = " ",$Colspan = "") { if (!empty($Colspan)) { return("$Left\n"); } return("$Left$Right\n"); } That's all it does. During the tests, the array of data only contained 10 elements, and still some of the calls to this function took 10 seconds "Christian Reiniger" <[EMAIL PROTECTED]> wrote in message 01052316515004.00599@chrisbig">news:01052316515004.00599@chrisbig... > In the following example, which is the one that I'm concerned about, > the same function is called multiple times in a row (with nothing > happening in between calls) for different "categories". Basically, the > function sorts an array and outputs the 10 elements with the highest > value. > > I ran the test several times, calling the function hundreds of times > with the same data, and each time I ran the test every second call took > thousands of times longer than the ones that ran ok. Well, as it really alternates between fast and slow, there has to be some "real" reason for it. Can you post some code? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) /* you are not expected to understand this */ - from the UNIX V6 kernel source -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Virtual Hosts document root directory.
Hi. I am using Sambar Server on Win98SE, PHP 4.0.5. All is well. The server supports "virtual hosts". I am not sure of the terminology outside of Sambar, but effectively, I can go to my browser and enter ... local.site1.com local.site2.com etc. And get different sites. I have a set of PHP scripts which are copied to each of the sites public_html directory. They are all on the same IP address (as I only have 1 pc). The server's documents are served out via localhost. I want to know the document (or public_html) directory of the site that called the PHP script. The reason is that the script needs to see if certain files exist so that the resultant HTML shows the correct info. Some of them are in both sites, some files are only in 1 or 2 sites, but they always have the same name. I assume there is a variable somewhere? Ideas/suggestions please. Thanks in advance. Richard Quadling. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Virtual Host document directory.
Hi. I am using Sambar Server on Win98SE, PHP 4.0.5. All is well. The server supports "virtual hosts". I am not sure of the terminology outside of Sambar, but effectively, I can go to my browser and enter ... local.site1.com local.site2.com etc. And get different sites. I have a set of PHP scripts which are copied to each of the sites public_html directory. They are all on the same IP address (as I only have 1 pc). The server's documents are served out via localhost. I want to know the document (or public_html) directory of the site that called the PHP script. The reason is that the script needs to see if certain files exist so that the resultant HTML shows the correct info. Some of them are in both sites, some files are only in 1 or 2 sites, but they always have the same name. I assume there is a variable somewhere? Ideas/suggestions please. Thanks in advance. Richard Quadling. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problems with mail() function
I had smilar problems before and found out that I missed some "\n"s. It seems that you missed a "\n" at the end of headers. That might be a reason. Another solution might be replacing "\n"s with "\r\n". I heard in newsgroups and in some documentations that this might be problem in some systems. I recommend to read the source of message after you get it. It is a nce way to debug problems and gives out lots of information. (correct headres, messages etc..) Yours, -- Tolga 'thorr' Orhon ""Kevin Fogleman"" <[EMAIL PROTECTED]> wrote in message 9egjrq$r15$[EMAIL PROTECTED]">news:9egjrq$r15$[EMAIL PROTECTED]... > The problems that I'm having with the mail function stem from the extra > arguments that I'm trying to pass it. What I'm trying to do is write a > script to mail links to interesting stories to other people. In doing this, > I want to make the mail appear that it came from the e-mail address of the > person who wanted to send the link. So, what I've tried so far is this: > > $message_subject="This message is a test"; > $extraparams="From: > ".$HTTP_POST_VARS['youraddress']."\nReply-To:".$HTTP_POST_VARS['youraddress' > ]."\nX-Mailer: PHP/". phpversion(); > > $message=$message_header.$HTTP_POST_VARS['message'].$message_footer; > $success=mail($HTTP_POST_VARS['email'], $message_subject, $message, > $extra_params) >or die("Whoops, looks like mail() isn't configured in > this installation of PHP!"); > > The message that I recieve when I run this script has a "From:" field > reading as the user that the script is running under on the web server, and > I recieve a blank message body, as well as no subject. > > I decided to try using the mail() function with just the first three > arguments (i.e. the destination address, the subject, and the message body), > and it kind of worked, meaning that it sent me a message with the correct > subject filled out, and the correct message body, but it was still coming > from the same address, the name of the web server user. Can someone help me > with placing the correct args in the 4th parameter to get mail() or Sendmail > or whatever to send a message with the correct return address and From: > field? > > Thank you, > > Kevin Fogleman > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] [Call for Papers] International PHP conference 2001
Dear sirs / dear friends, The PHP-Center and Software & Support Verlag are pleased to announce the International PHP Conference that will take place from Nov. 5 to 7, 2001 in Frankfurt / Main, Germany. >>The dates are: Pre conference with whole day tutorials: Nov. 5, 2001 Conference: Nov. 6 and 7, 2001 >>The Topics: - General PHP - PHP & Business - PHP & Databases - PHP Design - PHP Extensions - PHP & XML - PHP-GTK >>Call for Papers: If you want to present your talks at this unique event, please send your suggestions for sessions to us. We need a short abstract that should have the following structure: >Abstract Structure: - Title of the suggested session - What kind of talk do you want to present (session / workshop)? - Presenter(s) - Contact address incl. snail mail address, telephone, email, URL - description notes (max. 4) - abstract text (min. 300 charakters, max. 1000 charakter or 1 page with 65 characters per line. Please send the abstracts including a printable pic to: [EMAIL PROTECTED] The subject should contain a meaningful title. The body of the email should contain the topics 1-6 as they are mentioned above. Please use only ASCII text. Deadline for sending the abstracts is June, 30, 2001 You will be informed whether your suggestions have been accepted or not until July, 16. All session contents will be published in a conference book after the conference. The writing guidelines for this will be sent to you when your suggestions have been accepted by the Conference Board. >Structure of the Sessions: The sessions are 75 min. long (incl. discussion at the end of the lecture). It is possible to split a session in an "introduction" and a "continuation" part. Sessions will be held in English or German. >Target groups: - project managers - software developers - IT managers - web designers and web administrators - PHP enthusiasts We invite you to present your sessions. Please send your abstracts, or at least titles, degree of difficulty and a short description, to [EMAIL PROTECTED] Deadline is: June 30, 2001 Notice: 1. Travel expenses and lodging will be covered by us. 2. Every speaker will have free access to all pre conference tutorials and conference sessions. 3. Every speaker should present at least two sessions. Those of you who want to present only one session, please contact the Conference Board at [EMAIL PROTECTED] 4. Speaker who will cover a pre conference tutorial will be paid extra >> conference committee: - Rasmus Lerdorf - Kristian Köhntopp - Sebastian Bergmann - Björn Schotte - Ralf Geschke Contact: Software & Support Verlag GmbH Frank Stepan Kennedyallee 87 60596 Frankfurt phone: +49 (0) 69 63 00 89 0 fax: +49 (0) 69 63 00 89 89 email: [EMAIL PROTECTED] -- Kostenloses PHP-Schulungsmaterial & professionelle PHP-Schulungen --> http://www.thinkphp.de/ <-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] outputting lines from file(file.php)
hm.. Is include () or require () what you are talking about or I am wrong? -- GP > I have read in the lines from a php file into a $buff. > > Each line is set and the total corresponds to the number of lines in the > file. > > But trying to ouput the lines results in blank lines. > > do I have to pass the lines through something like chop(), or > html_spec_chars? > > How do you guys display php files to the screen in the HTML stream? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] writing to file quick and easy.
Hello: Lookin for a little advice here. I have a series of scripts that dynamically create web pages. The last page in the series I wish to be able to write out to a file. Is there a simple/quick way in which I can take the process(ing) script and write it to a file at the same time that it is displaying? I need it to both display and be able to be downloaded such that the last thing that this script would do is create a link to itself in html format. Something to the effect that whatever was being passed to the browser could also be passed thru an open file handle thus written to a file Thanks, Christopher C. M. Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] outputting lines from file(file.php)
I have read in the lines from a php file into a $buff. Each line is set and the total corresponds to the number of lines in the file. But trying to ouput the lines results in blank lines. do I have to pass the lines through something like chop(), or html_spec_chars? How do you guys display php files to the screen in the HTML stream? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] sessions without trans_id
If the server has trans-sid enabled, you can disable it for your application using an .htaccess file, as given below. > -Original Message- > From: Dalyyla [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 23, 2001 2:14 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] sessions without trans_id > > > hi, > > > You could use an .htaccess file to disable the > session.use_trans_sid flag in > > the php.ini file, like this: > > > > php_flag session.use_trans_sid off > > > > Kirk > > > > *** what I meant if i publish it on another server and which > is used by lots of > clients > I suppose that some of them made their application with > trans-id and other > without > so I would have to choose the good server the one where > trans-id is not enabled > ...??? SO that's why I was asking I would like to build an > application that > could work everywhere... > By the way is there a way to hide the SID , when it is not > done by the method > POST, for example in header(location:...) or manually bu the > calling of the > page?? > > Thanks > > Dalyyla -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to select rows from Mysql with case senstive ??
*Shrug* Don't have time to test at the moment... That was taken from Chapter 9.3.4.7 of the MySQL manual http://www.mysql.com/doc/P/a/Pattern_matching.html Prior to MySQL Version 3.23.4, REGEXP is case sensitive, and the previous query will return no rows. To match either lowercase or uppercase `b', use this query instead: mysql> SELECT * FROM pet WHERE name REGEXP "^[bB]"; Was worth a try :) James. "Martín Marqués" <[EMAIL PROTECTED]> wrote in message 01052312020905.03109@bugs">news:01052312020905.03109@bugs... > On Mié 23 May 2001 17:56, you wrote: > > Hey try this, though there are probably better ways, > > > > "SELECT * FROM foo WHERE name REGEXP '^[PHP]'"; > > This is not SQL compatible. This would be a correct SQL statement: > > SELECT * FROM foo WHERE name LIKE "[PHP]%" > > Saludos... :-) > > -- > Cualquiera administra un NT. > Ese es el problema, que cualquiera administre. > - > Martin Marques |[EMAIL PROTECTED] > Programador, Administrador | Centro de Telematica >Universidad Nacional > del Litoral > - > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Using html templates
I am using libphp and quite satisfied with it. http://phplib.netuse.de/ -- Tolga 'thorr' Orhon ""Jamie Thompson"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > what is the best way of using html templates to display data from a database? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problems with mail() function
The problems that I'm having with the mail function stem from the extra arguments that I'm trying to pass it. What I'm trying to do is write a script to mail links to interesting stories to other people. In doing this, I want to make the mail appear that it came from the e-mail address of the person who wanted to send the link. So, what I've tried so far is this: $message_subject="This message is a test"; $extraparams="From: ".$HTTP_POST_VARS['youraddress']."\nReply-To:".$HTTP_POST_VARS['youraddress' ]."\nX-Mailer: PHP/". phpversion(); $message=$message_header.$HTTP_POST_VARS['message'].$message_footer; $success=mail($HTTP_POST_VARS['email'], $message_subject, $message, $extra_params) or die("Whoops, looks like mail() isn't configured in this installation of PHP!"); The message that I recieve when I run this script has a "From:" field reading as the user that the script is running under on the web server, and I recieve a blank message body, as well as no subject. I decided to try using the mail() function with just the first three arguments (i.e. the destination address, the subject, and the message body), and it kind of worked, meaning that it sent me a message with the correct subject filled out, and the correct message body, but it was still coming from the same address, the name of the web server user. Can someone help me with placing the correct args in the 4th parameter to get mail() or Sendmail or whatever to send a message with the correct return address and From: field? Thank you, Kevin Fogleman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP4/IIS/WIN2: Cookies are not sent. HELP!!
IIS running anything as a CGI doesn't support standard cookie specs - you need to search on the microsoft site about CGI, IIS and NPH (non parsed headers). They admit they don't support the CGI spec, and offer a workaround, but I can't attest to it working or not. Diego Fulgueira wrote: > Recently, I reinstalled Windows 2000 (IIS 5.0) and PHP 4.03pl1. Since then, > no cookies are being sent to the clients. No error is being reported. I > change the PHP installation to 4.04, but I still have the same problem. I > can't do session handling or anything without cookies. > HELP PLEASE. Any clues will be greatly appreciated. > Thanks in advance, > Cheers, > Diego. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How to select rows from Mysql with case senstive ??
On 23-May-01 Bass¨Ð¦õªv wrote: > Hi , > By defualt , select rows from Mysql is case insenstive . > For exmaple , > select * from foo where name = 'PHP' > select * from foo where name = 'php' > is the same > > how can i do a queny which > select * from foo where name = 'PHP' > is success > but > select * from foo where name = 'php' > fail ?? > > given that name = 'PHP' in the database > where BINARY name = 'php' (BINARY casts were added in 3.23.?) you also might consider changing your column to varchar() binary. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP4/IIS/WIN2: Cookies are not sent. HELP!!
Recently, I reinstalled Windows 2000 (IIS 5.0) and PHP 4.03pl1. Since then, no cookies are being sent to the clients. No error is being reported. I change the PHP installation to 4.04, but I still have the same problem. I can't do session handling or anything without cookies. HELP PLEASE. Any clues will be greatly appreciated. Thanks in advance, Cheers, Diego. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to select rows from Mysql with case senstive ??
On Mié 23 May 2001 17:56, you wrote: > Hey try this, though there are probably better ways, > > "SELECT * FROM foo WHERE name REGEXP '^[PHP]'"; This is not SQL compatible. This would be a correct SQL statement: SELECT * FROM foo WHERE name LIKE "[PHP]%" Saludos... :-) -- Cualquiera administra un NT. Ese es el problema, que cualquiera administre. - Martin Marques |[EMAIL PROTECTED] Programador, Administrador | Centro de Telematica Universidad Nacional del Litoral - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Can you help me with this: Bug #11055: segmentation fault & core dump during make
> > From: [EMAIL PROTECTED] > > Operating system: linux 2.2.14 (RH 6.2) > > PHP version: 4.0.5 > > PHP Bug Type: Sybase-ct (ctlib) related > > Bug description: segmentation fauld & core dump during make > > > > downloaded free sybase-ct libs from link in faq from php site. > > unpacked in /sybase-ct > > fixed /etc/ld.so.conf & ran ldconfig > > > > then tried to compile php with sybase-ct support (in order to access > MSSQL server) as a DSO module: > > > > [root@linux php-4.0.5]# ./configure --with-mysql --with-apxs > --enable-sockets --with-oracle=/mnt/ora_syb/ora/app/oracle/product/8.0.5 > --with-sybase-ct=/sybase-ct > > > > went fine then ran: > > [root@linux php-4.0.5]# make > > > > got the following error: > > > > make[1]: Entering directory `/mnt/ora_syb/php-4.0.5' > > /bin/sh /mnt/ora_syb/php-4.0.5/libtool --silent --mode=link gcc -I. > -I/mnt/ora_syb/php-4.0.5/ -I/mnt/ora_syb/php-4.0.5/main > -I/mnt/ora_syb/php-4.0.5 -I/usr/include/apache > -I/mnt/ora_syb/php-4.0.5/Zend > -I/mnt/ora_syb/php-4.0.5/ext/mysql/libmysql > -I/mnt/ora_syb/ora/app/oracle/product/8.0.5/rdbms/demo > -I/mnt/ora_syb/ora/app/oracle/product/8.0.5/network/public > -I/mnt/ora_syb/ora/app/oracle/product/8.0.5/plsql/public > -I/sybase-ct/include -I/mnt/ora_syb/php-4.0.5/ext/xml/expat/xmltok > -I/mnt/ora_syb/php-4.0.5/ext/xml/expat/xmlparse > -I/mnt/ora_syb/php-4.0.5/TSRM -DLINUX=2 -DEAPI -DUSE_EXPAT > -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -o libphp4.la -rpath > /mnt/ora_syb/php-4.0.5/libs -avoid-version > -L/mnt/ora_syb/ora/app/oracle/product/8.0.5/lib -L/sybase-ct/lib -R > /mnt/ora_syb/ora/app/oracle/product/8.0.5/lib -R /sybase-ct/lib stub.lo > Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la > ext/mysql/libmysql.la ext/oracle/liboracle.la ext/pcre/libpcre.la > > ext/posix/libposix.la ext/session/libsession.la > ext/sockets/libsockets.la ext/standard/libstandard.la > ext/sybase_ct/libsybase_ct.la ext/xml/libxml.la TSRM/libtsrm.la -lpam > -ldl -linsck -lsybtcl -lintl -lcomn -lct -lcs -lclntsh -lpsa -lcore4 > -lnlsrtl3 -lm -lnsl -lresolv -lm -ldl -lcrypt -lnsl -lresolv > > collect2: ld terminated with signal 11 [Segmentation fault], core > dumped > > /sybase-ct/lib/libct.a(ctconpr.o)(.text+0x5ac): undefined reference to > `comn_loc_copy' > > make[1]: *** [libphp4.la] Error 1 > > make[1]: Leaving directory `/mnt/ora_syb/php-4.0.5' > > make: *** [all-recursive] Error 1 > > N.B. > > previous run witout sybase-ct support went fine! > dont know if it will help but, try php 4.0.6rc1 from > http://www.php.net/~andi/php-4.0.6RC1.tar.gz or try a 4.0.7-dev > snapshot from http://snaps.php.net/php4-latest.tar.gz > Cameron Since the error comes from : /sybase-ct/lib/libct.a(ctconpr.o)(.text+0x5ac): undefined reference to `comn_loc_copy' I feel that this will not solve the problem ... as in effect it did not. I see that some people solved similar problems by doungrading to version 4.0.3 ... could this be a solution for my problem ? where can I get these old sources (on php site oldest version avalible is 4.0.4) ? Can any body suggest any other solution ? By dave - Questo messaggio è stato inviato utilizzando http://it.my.gsmbox.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to select rows from Mysql with case senstive ??
Hey try this, though there are probably better ways, "SELECT * FROM foo WHERE name REGEXP '^[PHP]'"; James ""Bass¨Ð¦õªv"" <[EMAIL PROTECTED]> wrote in message 9egfot$cfu$[EMAIL PROTECTED]">news:9egfot$cfu$[EMAIL PROTECTED]... > Hi , > By defualt , select rows from Mysql is case insenstive . > For exmaple , > select * from foo where name = 'PHP' > select * from foo where name = 'php' > is the same > > how can i do a queny which > select * from foo where name = 'PHP' > is success > but > select * from foo where name = 'php' > fail ?? > > given that name = 'PHP' in the database > > thx > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Web Server processing question
> In the following example, which is the one that I'm concerned about, > the same function is called multiple times in a row (with nothing > happening in between calls) for different "categories". Basically, the > function sorts an array and outputs the 10 elements with the highest > value. > > I ran the test several times, calling the function hundreds of times > with the same data, and each time I ran the test every second call took > thousands of times longer than the ones that ran ok. Well, as it really alternates between fast and slow, there has to be some "real" reason for it. Can you post some code? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) /* you are not expected to understand this */ - from the UNIX V6 kernel source -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] re: files
On Wednesday 23 May 2001 17:03, Jon Yaggie wrote: > Okay thanks perhaps i am using an old manual. I think i downloaded it > about three months ago but this function is not present there . .. Bad excuse. That function has been in there since at least the early PHP3 versions. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) /* you are not expected to understand this */ - from the UNIX V6 kernel source -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] notifier
notified, like an email ? look at the mail() function. when the user logs on, email yourself. -- Chris Lee [EMAIL PROTECTED] ""Taline Makssabo"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Can anyone suggest where i could find a simple PHP code so i could get > notified whe users login into my site??? > > Mine seems to be bugged! > > thanks > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP AND SSI
On Wednesday 23 May 2001 12:12, John Monfort wrote: > You should be able to just print it. The code won't matter to php, > but the browser will process it. > > > echo ""; "the browser will process it" What does "SSI" stand for? - "Sis Sounds Interesting" - "Server Side Includes" - "Selective Stupidity Incorporated" You have three guesses... -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) /* you are not expected to understand this */ - from the UNIX V6 kernel source -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]