Re: [PHP] QUERY_STRING from command line

2004-09-22 Thread raditha dissanayake
Rajesh Batchu wrote: Hi, I am working on a php script which is accessed as below http://10.10.10.10/pageone.php?hellohowareyou in the pageone.php i am accessing the variable $_SERVER["QUERY_STRING" and i am getting the proper "hellohowareyou" as value. All these days i was accessing this over the

Re: [PHP] mysql_connect does not connect

2004-09-22 Thread Jason Wong
On Wednesday 22 September 2004 03:43, Chris Dowell wrote: > Sam Hobbs wrote: > >I am not assuming; that is why I am asking this question. You really can > > say the same thing except without the emotions. You can simply state the > > fact that as far as you know it is not a PHP problem. It really,

Re: [PHP] List Etiquette

2004-09-22 Thread Jason Wong
On Wednesday 22 September 2004 03:41, Andre Dubuc wrote: > Arrgh! I use Kmail. I click 'Reply' and I get your personal address > (instead of the correct 'To:' address. Bummer! Gotta spend some energy > wiping the current 'To:' addrress, type in letter 'p', click auto-complete > for correct address

Re: [PHP] alternative to mysql_field_name()

2004-09-22 Thread Marek Kilimajer
Luke wrote: hi there, i am currently using the following code to loop through the results of a sql query and extract the field names ($export contains the query results from the database). the script goes on to place the results in an excel file. for ($i = 0; $i < $fields; $i++) { $header .= my

[PHP] Does PHP need another mailing list???

2004-09-22 Thread Gerard Samuel
Just wondering. With the advent of php5 with its OO capabilities, is php-general too *general* for advanced php5 users? For me, I've learned quite a lot from listening to others, and participating in threads on php-general & php-db. Currently, Im investigating OO theory, and how I can translate it

Re: [PHP] List Etiquette

2004-09-22 Thread Lester Caine
Jason Wong wrote: Have fun driving on the wrong side of the road. What side is that? Doesn't it depend on national preference? Not personal preference for certain. That depends on if there IS a national preference. Having seen drivers in some countries there still seems to be a difference of opini

[PHP] Re: Does PHP need another mailing list???

2004-09-22 Thread Niklas Lampén
It's wrong to think people here don't know how to code object oriented. You can do that with PHP4 too - and you should in many cases. In some time PHP4 will be old school and PHP5 will be the general one. In my oppinion, it's good for not-OO ppl to see how to do things in OO way. If you have an

Re: [PHP] Solved [PHP] ASP guts needs help.

2004-09-22 Thread Burhan Khalid
LW Ellis wrote: Never mind... As usual, about the time you ask for help, the brain gets unstuck and you find the solution. You should post back with a solution (append SOLVED to your subject) so that it becomes part of the thread (and archived). This way, next time someone else has a similar iss

[PHP] Re: Recommendations for php email list managers?

2004-09-22 Thread Dustin Krysak
I am interested in the postfix/php solution as well for a MLM, as well as just form processing. d I wonder why aren't you using PHP to send the messages via Postfix. Anyway, he did not say that he was using a platform that can run Postfix. If he is using Windows 2000 or later with IIS/Exchange

[PHP] flash php

2004-09-22 Thread Dustin Krysak
Can anyone recommend any good tutorials on using flash mx 2004 with PHP to display MYsql content using PHP? Including loading and displaying JPGs and movies (referenced in the database). thanks in advance! d -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread raditha dissanayake
Gerard Samuel wrote: Just wondering. With the advent of php5 with its OO capabilities, is php-general too *general* for advanced php5 users? This topic has been discussed at least once a month. Please refer to list archives. -- Raditha Dissanayake.

Re: [PHP] Mohavi

2004-09-22 Thread Chris Dowell
Yeah I've rebuilt a huge CoOperative Marketing Fund Administration tool using version 1.3 or 1.4 (I can't be arsed to look right now). It's good for what it does - the only problem I have lies in the fact that the classes you generate for actions and views are generally quite large, and if the

Re: [PHP] inserting timestamp into mysql field

2004-09-22 Thread Chris Dowell
That's not 100% correct If you have more than one TIMESTAMP field only the first (IIRC) will be filled with the current time - other TIMESTAMP fields will only be filed if you set them = NULL. This is true of MySQL < 4.1.2 - there is more fine-grained control over the behaviour from 4.1.2 onwar

Re: [PHP] Image Text

2004-09-22 Thread b2
imagecolorresolve() does not make a difference What other functions is worth playing with Is there a site where I can download font files ( which I can use in imageloadfont () ) from I'm after Arial in a few differnt sizes "Greg Donald" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECT

[PHP] how to concatenate php variables in mysql query

2004-09-22 Thread luke
hi, i'm trying to concatenate two php variables (containing form data) in a mysql query. i'm currenty using the dot operator: telphone number =$telcode.$telnumber' but only the telcode gets written to the database. any ideas? many thanks, luke m. -- PHP General Mailing List (http://www.php

Re: [PHP] choose upload folder

2004-09-22 Thread Jason Wong
On Wednesday 22 September 2004 05:16, Greg Donald wrote: > On Tue, 21 Sep 2004 23:05:17 +0200, Joerg P <[EMAIL PROTECTED]> wrote: > > I am building a script only for local use and would like the user to > > choose a specific folder on his computer, to catalogize all files in > > this folder. > > >

[PHP] open_basedir restriction and local value for php.ini

2004-09-22 Thread Bogdan Ribic
Hello all, I am having problems with cleint's webserver and its open_basedir settings. open_basedir is set to folder where all my php files are, but when I include a file that already includes another one (all under allowed directory tree) it throws out warnings: Warning: open_basedir restric

[PHP] implode errors if array empty

2004-09-22 Thread luke
hi there, i am using implode to get the contents of an array into a single variable: $enterprises = implode(",", $enterprise) //enterprise contains the array. however, if the array is empty (the user didnt select anything in the form), the implode function errors out. can anyone think of a way

Re: [PHP] implode errors if array empty

2004-09-22 Thread luke
resolved with if(empty()) - apologies. [EMAIL PROTECTED] wrote: > hi there, > > i am using implode to get the contents of an array into a single variable: > > $enterprises = implode(",", $enterprise) //enterprise contains the array. > > however, if the array is empty (the user didnt select an

[PHP] Re: open_basedir restriction and local value for php.ini

2004-09-22 Thread Niklas Lampén
Is the situation this: /home/a.php includes page /home/lib/b.php which includes /home/lib/c.php? If I recall correctly, when you include a file in an included file, the script is run in the directory where a.php is located. So you need to include files based on that directory. I recommend you to

Re: [PHP] List Etiquette

2004-09-22 Thread Jason Wong
On Wednesday 22 September 2004 16:12, Lester Caine wrote: > That depends on if there IS a national preference. Having seen drivers > in some countries there still seems to be a difference of opinion ;) > > So even legal requirements can't enforce some preferred activities, You're missing the poi

Re: [PHP] implode errors if array empty

2004-09-22 Thread Petar Nedyalkov
Hello, I suppose the $enterprise variable doesn't hold an empty array but is not defined and because of this you get the error. Test with the following example: It does not send any errors back. If you substitute $array = array(); with $array = ""; you'll get a woarning: "Warning: implode():

[PHP] Re: open_basedir restriction and local value for php.ini

2004-09-22 Thread Bogdan Ribic
Thanx, but the script works fine with this include structure. I just need to get rid of the warnings. Niklas lampén wrote: Is the situation this: /home/a.php includes page /home/lib/b.php which includes /home/lib/c.php? If I recall correctly, when you include a file in an included file, the scri

[PHP] Re: open_basedir restriction and local value for php.ini

2004-09-22 Thread Niklas Lampén
I think my solution will get you rid of the error messages. Alternatively you can use to disable errors. Niklas Bogdan Ribic wrote: Thanx, but the script works fine with this include structure. I just need to get rid of the warnings. Niklas lampén wrote: Is the situation this: /home/a.php incl

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Gerard Samuel
raditha dissanayake wrote: Gerard Samuel wrote: Just wondering. With the advent of php5 with its OO capabilities, is php-general too *general* for advanced php5 users? This topic has been discussed at least once a month. Please refer to list archives. I wasn't aware of this. So I searched MARC u

Re: [PHP] Re: Does PHP need another mailing list???

2004-09-22 Thread Gerard Samuel
Niklas Lampén wrote: It's wrong to think people here don't know how to code object oriented. You can do that with PHP4 too - and you should in many cases. In some time PHP4 will be old school and PHP5 will be the general one. In my oppinion, it's good for not-OO ppl to see how to do things in OO

[PHP] Get remote servers ip

2004-09-22 Thread Mag
Hi, I have a textbox where a visitor can enter a site name/url (eg: http://google.com) and i need to display that ip on the screen. how do i get the ipaddress of google.com using PHP? Thanks, Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great,

Re: [PHP] Get remote servers ip

2004-09-22 Thread Eugeni Doljenko
That's very simple. Use gethostbyname() function. Look "LXVIII. Network Functions" for more details. - Original Message - From: "Mag" <[EMAIL PROTECTED]> To: "php php" <[EMAIL PROTECTED]> Sent: Wednesday, September 22, 2004 3:47 PM Subject: [PHP] Get remote servers ip Hi, I have a text

[PHP] Appended [PHP] Solved [PHP] ASP guy needs help.

2004-09-22 Thread LW Ellis
LW Ellis wrote: Never mind... As usual, about the time you ask for help, the brain gets unstuck and you find the solution. You should post back with a solution (append SOLVED to your subject) so that it becomes part of the thread (and archived). This way, next time someone else has a similar is

Re: [PHP] Get remote servers ip

2004-09-22 Thread Mag
gethostbyname() of course!!! Got it, I just forgot the function name. Thanks, Mag --- Eugeni Doljenko <[EMAIL PROTECTED]> wrote: > That's very simple. Use gethostbyname() function. > Look "LXVIII. Network > Functions" for more details. > > - Original Message - > From: "Mag" <[EMAIL

Re: [PHP] Re: Does PHP need another mailing list???

2004-09-22 Thread Marek Kilimajer
Gerard Samuel wrote: Niklas Lampén wrote: It's wrong to think people here don't know how to code object oriented. You can do that with PHP4 too - and you should in many cases. In some time PHP4 will be old school and PHP5 will be the general one. In my oppinion, it's good for not-OO ppl to see h

[PHP] Get remote servers ip [part 2]

2004-09-22 Thread Mag
Hi again, Am having a bit of a problem here, basically I have a text box on my site where the visitor enters a url and I display that url's ip address...which as Eugeni kindly pointed out can be easily done with gethostbyname()...but the problem is the url entered at my site would be something like

Re: [PHP] Appended [PHP] Solved [PHP] ASP guy needs help.

2004-09-22 Thread Marek Kilimajer
LW Ellis wrote: LW Ellis wrote: Never mind... As usual, about the time you ask for help, the brain gets unstuck and you find the solution. You should post back with a solution (append SOLVED to your subject) so that it becomes part of the thread (and archived). This way, next time someone else

RE: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Jay Blanchard
[snip] telphone number =$telcode.$telnumber' but only the telcode gets written to the database. [/snip] There is not enough here to know for sure (I am betting this is part of a query), but if your code looks like the above you are missing a single quote after the =. Now, if you enclose the vari

RE: [PHP] Re: Does PHP need another mailing list???

2004-09-22 Thread Jay Blanchard
[snip] Reason why I say that, is because in my mind, OO (especially when combined with design patterns) is a higher language than plain vanilla php. [/snip] Replace PHP with C++ and you'll see how ridiculous this statement looks. It is as if you were pitting PROCEDURAL against OOP, which we know

Re: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread luke
here is the whole query: $query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix', firstname='$firstname', lastname='$lastname', job_title='$jobtitle', company_name='$company', no_of_employees='$employees',address_1='$address1',address_2='$address2', address_3='$address3', town='

RE: [PHP] Get remote servers ip [part 2]

2004-09-22 Thread Jay Blanchard
[snip] and gethostbyname is only displaying the ip if I pass it something like www.google.com Any idea how i can "strip" the first 2 examples to get the format i can pass to gethostbyname() ? [/snip] Start here ... http://www.php.net/url -- PHP General Mailing List (http://www.php.net/) To uns

RE: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Jay Blanchard
[snip] telephone_number='$telcode.$telnumber', only the telcode gets inserted. [/snip] Concat them before placing into the query...(have you echo'd $telnumber to make sure it is not empty?) $wholeTelNumber = $telcode . $telnumber; echo $wholeTelNumber; telephone_number='$wholeTelNumber', -- PH

Re: [PHP] Get remote servers ip [part 2]

2004-09-22 Thread John Nichel
Mag wrote: Hi again, Am having a bit of a problem here, basically I have a text box on my site where the visitor enters a url and I display that url's ip address...which as Eugeni kindly pointed out can be easily done with gethostbyname()...but the problem is the url entered at my site would be som

Re: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Daniel Kullik
[EMAIL PROTECTED] wrote: here is the whole query: $query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix', firstname='$firstname', lastname='$lastname', job_title='$jobtitle', company_name='$company', no_of_employees='$employees',address_1='$address1',address_2='$address2', addre

Re: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread John Holmes
From: <[EMAIL PROTECTED]> $query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix', firstname='$firstname', lastname='$lastname', job_title='$jobtitle', company_name='$company', no_of_employees='$employees',address_1='$address1',address_2='$address2', address_3='$address3', town=

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread raditha dissanayake
Gerard Samuel wrote: Just wondering. With the advent of php5 with its OO capabilities, is php-general too *general* for advanced php5 users? This topic has been discussed at least once a month. Please refer to list archives. I wasn't aware of this. So I searched MARC using the terms "php5 mai

RE: [PHP] Get remote servers ip [part 2]

2004-09-22 Thread Mag
Hey, Thanks Jay, I needed a starting point and after reading at the url you posted I think I need parse_url... Thanks, Mag --- Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > and gethostbyname is only displaying the ip if I > pass > it something like > www.google.com > > Any idea how i ca

Re: [PHP] Get remote servers ip [part 2]

2004-09-22 Thread Mag
> > It's all in the manual... > > http://us4.php.net/manual/en/function.parse-url.php Hey John, Thanks, got it! -Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-)

Re: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Daniel Kullik
Daniel Kullik wrote: [EMAIL PROTECTED] wrote: here is the whole query: $query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix', firstname='$firstname', lastname='$lastname', job_title='$jobtitle', company_name='$company', no_of_employees='$employees',address_1='$address1',addres

Re: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: here is the whole query: $query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix', firstname='$firstname', lastname='$lastname', job_title='$jobtitle', company_name='$company', no_of_employees='$employees',address_1='$address1',address_2='$address2', addre

Re: [PHP] choose upload folder

2004-09-22 Thread raditha dissanayake
Marek Kilimajer wrote: Joerg P wrote: I have to be more specific: I dont want the file, I want the folder. This happens on the client side, it has nothing to do with php. You could possibly do it with signed java applets or activex scripts. If I may be permitted a shameless plug, Rad Upload is an

Re: [PHP] implode errors if array empty

2004-09-22 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: resolved with if(empty()) - apologies. isset() is more apropriate as $enterprise is not defined at all, empty() will issue a notice. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] implode errors if array empty

2004-09-22 Thread John Holmes
From: "Marek Kilimajer" <[EMAIL PROTECTED]> [EMAIL PROTECTED] wrote: resolved with if(empty()) - apologies. isset() is more apropriate as $enterprise is not defined at all, empty() will issue a notice. No it won't. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscri

RE: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Yoed Anis
Luke, MySQL has a built in CONCAT function. This will concat two strings togther. In your example it would look like telephone_number = CONCAT('$telcode', '$telnumber') ... See the MySQL manual for more info on the concat function. Of course using this function will force the data to be a string.

Re: [PHP] Re: Does PHP need another mailing list???

2004-09-22 Thread Gerard Samuel
Marek Kilimajer wrote: Gerard Samuel wrote: Niklas Lampén wrote: It's wrong to think people here don't know how to code object oriented. You can do that with PHP4 too - and you should in many cases. In some time PHP4 will be old school and PHP5 will be the general one. In my oppinion, it's good

[PHP] Using '

2004-09-22 Thread Juan Pablo Herrera
Hi! i have: $html = ' MY HTML '; Inside of my html i used ', this produced a parse error, how can i solved it?. Regards, JP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Brian Dunning
I've been RTFMing for about an hour and I can't find a string function to split haystack 'onetwothreefourfive' at the nth occurrence of needle ''. strpos gives me the position of the first needle, and strrpos gives me the position of the last needle. But I'm looking for the position of one of t

[PHP] RE: **[SPAM]** [PHP] Using '

2004-09-22 Thread Jay Blanchard
[snip] Hi! i have: $html = ' MY HTML '; Inside of my html i used ', this produced a parse error, how can i solved it?. [/snip] http://www.php.net/htmlentities -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

Re: [PHP] Using '

2004-09-22 Thread François Moreau
Hi Juan, You might consider using the Heredoc syntax, as presented here : http://www.php.net/manual/en/ language.types.string.php#language.types.string.syntax.heredoc Your code snippet would look like this and do exactly what you had intended : $html = << YOUR HTML

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Chris Boget
> I've been RTFMing for about an hour and I can't find a string function > to split haystack 'onetwothreefourfive' at the nth > occurrence of needle ''. strpos gives me the position of the first > needle, and strrpos gives me the position of the last needle. But I'm > looking for the position o

RE: [PHP] simplexml and xpath

2004-09-22 Thread Matthew Sims
> So I've just recently fallen in love with simplexml. But from what I've > read, is it true that xpath doesn't really work properly? > > I'm using an XML file that has a section like this: > > > Title > Link > Desc Subject > 2004-09-20T18:15:00+00:00 > > > My sample of my PHP code is: > > $libr

Re: [PHP] {Spam?} Re: [PHP] Anyone using SPL Iterators?

2004-09-22 Thread John Holmes
Curt Zirzow wrote: * Thus wrote John Holmes: A later example implements ArrayAccess and IteratorAggregate and then says you can use count($A), but it doesn't work for my tests. It always returns 1. That example i think is minor mistake. As noted in the example above you have to call pass ->getIt

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Brian Dunning
twothreefourfive'; $nthPos = 4; $tmpArr = explode( '', $string ); $nthString = $tmpArr[($nthPos - 1)]; ?> Thanks Chris, that works great, but it's not doing what I want. I'm just trying to get the position of the 3rd occurrence (for example) of ''. So I'm looking for a function that will re

[PHP] header("Location: ") problem

2004-09-22 Thread luke
hi, is there a way of setting a target property for header("Location: thanks.htm")? my form is in an iframe so when i hit submit, my php page redirects the user to thanks.htm but this is rendered within the iframe not in a fresh page. any ideas? thanks, luke. -- PHP General Mailing List (htt

Re: [PHP] header("Location: ") problem

2004-09-22 Thread John Nichel
[EMAIL PROTECTED] wrote: hi, is there a way of setting a target property for header("Location: thanks.htm")? No. Not in php. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] header("Location: ") problem

2004-09-22 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: hi, is there a way of setting a target property for header("Location: thanks.htm")? my form is in an iframe so when i hit submit, my php page redirects the user to thanks.htm but this is rendered within the iframe not in a fresh page. No, you have to use target in the form

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Silvio Porcellana
Hi if you want the *rest of the string from the nth *, I think 'preg_match_all' with PREG_OFFSET_CAPTURE can help you (see http://www.php.net/manual/en/function.preg-match-all.php) You could do something like: $string = "onetwothreefourfive"; $count = preg_match_all('/([^<]+)/', $string, $out, P

Re: [PHP] Using '

2004-09-22 Thread Marek Kilimajer
Juan Pablo Herrera wrote: Hi! i have: $html = ' MY HTML '; Inside of my html i used ', this produced a parse error, how can i solved it?. Escape it: \' It must be somewhere in the manual, I think. -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] Using '

2004-09-22 Thread GH
Just remember to make sure that the closing EOD; is flush with the left margin an that there are NO spaces and NO other characters to the left of it or PHP will give you a PARSE error On Wed, 22 Sep 2004 11:56:54 -0400, François Moreau <[EMAIL PROTECTED]> wrote: > Hi Juan, >You might consider

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Robert Cummings
On Wed, 2004-09-22 at 12:31, Brian Dunning wrote: > > > $string = 'onetwothreefourfive'; > > $nthPos = 4; > > $tmpArr = explode( '', $string ); > > $nthString = $tmpArr[($nthPos - 1)]; > > ?> > > Thanks Chris, that works great, but it's not doing what I want. I'm > just trying to get the

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Janet Valade
Brian Dunning wrote: Thanks Chris, that works great, but it's not doing what I want. I'm just trying to get the position of the 3rd occurrence (for example) of ''. So I'm looking for a function that will return the value 19, given the above example string. From your first post, you just want to

Re: [PHP] Using '

2004-09-22 Thread Juan Pablo Herrera
Hi! I solved using adslashes in $html and replace ' with ". Thanks!! Regards! JP > Just remember to make sure that the closing EOD; is flush with the left > margin an that there are NO spaces and NO other characters to the left > of it or PHP will give you a PARSE error > > > On Wed, 22 Sep 20

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Brian Dunning
I don't understand why explode won't work for you. The explode solution is working. Thanks very much to everyone who replied with so much great information! - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ASP guts needs help.

2004-09-22 Thread Andrew Kreps
On Wed, 22 Sep 2004 00:09:01 -0600, LW Ellis <[EMAIL PROTECTED]> wrote: > I'm new to php, but am familar with ASP. > I have this code to open and read a text file. > What I need is to take out the 'while' and present the data one line at a > time. > I read up on fgetcsv, but we will be using one te

Re: [PHP] inserting timestamp into mysql field

2004-09-22 Thread Andrew Kreps
On Wed, 22 Sep 2004 09:29:21 +0100, Chris Dowell <[EMAIL PROTECTED]> wrote: > That's not 100% correct > > If you have more than one TIMESTAMP field only the first (IIRC) will be > filled with the current time - other TIMESTAMP fields will only be filed > if you set them = NULL. > You're absolute

RE: [PHP] ASP guts needs help.

2004-09-22 Thread Daniel Purdy
[snip] On Wed, 22 Sep 2004 00:09:01 -0600, LW Ellis <[EMAIL PROTECTED]> wrote: > I'm new to php, but am familar with ASP. > I have this code to open and read a text file. > What I need is to take out the 'while' and present the data one line > at a time. I read up on fgetcsv, but we will be usin

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Curt Zirzow
* Thus wrote Janet Valade: > Brian Dunning wrote: > > >Thanks Chris, that works great, but it's not doing what I want. I'm just > >trying to get the position of the 3rd occurrence (for example) of > >''. So I'm looking for a function that will return the value 19, > >given the above example str

[PHP] php, mySQL query character problem

2004-09-22 Thread Victor C.
Hi, I have a query to mysql basically saying: $query = "select * from table1 where colum1 like '$email%'"; //where $email is defined string. When i "echo $query", I get the string : select * from table 1 where colum1 like 'testdata%' If i copy paste the string into phpMyAdmin SQL, t

RE: [PHP] php, mySQL query character problem

2004-09-22 Thread Jay Blanchard
[snip] $query = "select * from table1 where colum1 like '$email%'"; $returnValue = QueryDatabase($query); echo mysql_num_rows($returnValue); I always get 0 for the # of records. [/snip] You have not included the code from your QueryDatabas

[PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Pablo Gosse
Hi folks. I've written a CMS where I work, the publishing guts of which is executed through a php script called from my crontab every minute. Every so often (it's happened roughly 17 times since July 22) I get parse errors in my log file when the scripts run into errors while executing. This is

RE: [PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Jay Blanchard
[snip] Does anyone have any idea why I might be getting these errors? The code above, to me at least, doesn't look like it should be throwing parse errors. The script which is called by my crontab to start this process executes every minute, so I find it very strange that I'm getting these sporad

RE: [PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Pablo Gosse
Jay Blanchard wrote: > [snip] > Does anyone have any idea why I might be getting these errors? The > code above, to me at least, doesn't look like it should be throwing > parse errors. > > The script which is called by my crontab to start this process > executes every minute, so I find it very

Re: [PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Marek Kilimajer
Pablo Gosse wrote: Jay Blanchard wrote: [snip] Does anyone have any idea why I might be getting these errors? The code above, to me at least, doesn't look like it should be throwing parse errors. The script which is called by my crontab to start this process executes every minute, so I find it

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Kevin Waterson
This one time, at band camp, raditha dissanayake <[EMAIL PROTECTED]> wrote: > I was refering to "is php-general too *general* for advanced php5 users" > not specifically at php 5. No, list works just fine as it is with a mix of the new comer and advanced users. No need to split in any way. Kev

[PHP] Re: Strange errors when PHP script called from CRON

2004-09-22 Thread Greg Beaver
Pablo Gosse wrote: The script which is called by my crontab to start this process executes every minute, so I find it very strange that I'm getting these sporadic error messages. Can any one shed any light on this for me? Does your crontab script use file locking to make sure that it isn't accessi

Re: [PHP] php, mySQL query character problem

2004-09-22 Thread Curt Zirzow
* Thus wrote Victor C.: > > If i copy paste the string into phpMyAdmin SQL, the query executes > successfully and returns one record. > > However, when I just do$returnValue = QueryDatabase($query); > echo > mysql_num_rows($ret

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Curt Zirzow
* Thus wrote Curt Zirzow: > > $shortString = implode('', explode('', $string, $nth)); ignore this. Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Cannot write data in session file

2004-09-22 Thread Bo Deng
I just move the web pages from windows to linux. But the session variable doesn't work. And I found that in the \tmp directoy, it has sess_(MD5) file,but with empty contents,just 0 byte. BTW, I run a linux virtual host under IBM s390. the code works well in windows and other linux systems(no

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Jason Wong
On Thursday 23 September 2004 03:41, Kevin Waterson wrote: > No, list works just fine as it is with a mix of the new comer and advanced > users. No need to split in any way. I suggest adding another two lists (at least), one for mysql and one for javascript ;-) -- Jason Wong -> Gremlins Associ

RE: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Jay Blanchard
[snip] > No, list works just fine as it is with a mix of the new comer and advanced > users. No need to split in any way. I suggest adding another two lists (at least), one for mysql and one for javascript ;-) [/snip] Three...Apache -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Greg Donald
On Thu, 23 Sep 2004 04:23:18 +0800, Jason Wong <[EMAIL PROTECTED]> wrote: > I suggest adding another two lists (at least), one for mysql and one for > javascript ;-) php-db exists already. I don't think anyone would subscribe to php-js, except peeps with questions. -- Greg Donald http://gdcons

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread John Nichel
Jay Blanchard wrote: [snip] No, list works just fine as it is with a mix of the new comer and advanced users. No need to split in any way. I suggest adding another two lists (at least), one for mysql and one for javascript ;-) [/snip] Three...Apache Four...Just for flames. ;) -- John C. Nichel Übe

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Jay Blanchard
[snip] On Thu, 23 Sep 2004 04:23:18 +0800, Jason Wong <[EMAIL PROTECTED]> wrote: > I suggest adding another two lists (at least), one for mysql and one for > javascript ;-) php-db exists already. [/snip] That's too general, don't you think? :7) -- PHP General Mailing List (http://www.php.net/) T

RE: [PHP] Cannot write data in session file

2004-09-22 Thread Chris Gregors
1. logon to the linux image. 2. determine the userid that the webserver runs as (for apache, look in httpd.conf) 3. su to that user 4. cd /tmp. 5. touch temp_file. If the touch works, then contact your sysadm If the touch doesn't work, contact your sysadm to grant write access to /tmp for the use

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Greg Donald
On Wed, 22 Sep 2004 15:26:01 -0500, Jay Blanchard <[EMAIL PROTECTED]> wrote: > Three...Apache php-install should cover that. I think php-oo would be nice however. -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

RE: [PHP] menu mouseover using php and javascript

2004-09-22 Thread Jay Blanchard
[snip] Does anyone have an idea how I can get the text portion to also use my variable? [/snip] Output the javascript with PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] menu mouseover using php and javascript

2004-09-22 Thread John Nichel
web_singer wrote: I am using an array to create a menu and the code to change an image on mouseover. I would also like to change some text on mouseover. While i can do it using a swtich in javascript it requires that I hard code all the different options in. My whole reason for using the php in t

RE: [PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Pablo Gosse
Marek Kilimajer wrote: [snip] >>> Perhaps. Could the data being utilized by the code occasionally have >>> characters that should be escaped, by aren't? Are you escaping all >>> of the escapable characters, especially quotes, both single and >>> double? >> >> >> That's what I was thinking initia

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Greg Donald
On Wed, 22 Sep 2004 16:29:01 -0400, John Nichel <[EMAIL PROTECTED]> wrote: > Four...Just for flames. ;) My local Linux Users Group went the other way. They made a list serv just for n00bs. It has one rule only, no flames. -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP

[PHP] RE: Strange errors when PHP script called from CRON

2004-09-22 Thread Pablo Gosse
Greg Beaver wrote: [snip] Does your crontab script use file locking to make sure that it isn't accessing a script at the same time as the webserver or another process? [/snip] Yes, I create a lock file when the script is called, but the only time I've ever seen a conflict there is when these pars

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Greg Donald
On Wed, 22 Sep 2004 15:31:09 -0500, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > php-db exists already. > [/snip] > > That's too general, don't you think? :7) I dunno, maybe. I ask my database questions on an actual database list if possible. I think most people probably feel the same, I

RE: [PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Chris Gregors
Typically problems with scripts failing to run from cron can be tracked back to environment variables. When you run it from the shell, you have the users env variables set. When it runs from cron, it (typically) has a slightly different environment. A simple way to test it is to get your shell

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Jason Wong
On Thursday 23 September 2004 04:27, Greg Donald wrote: > I don't think anyone would subscribe to php-js, except peeps with > questions. What do you mean php-js? Just a plain javascript only list, we don't want no stinkin' php stuff on a javascript list. What has php got to do with javascript?

RE: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Matthew Sims
> [snip] >> No, list works just fine as it is with a mix of the new comer and > advanced >> users. No need to split in any way. > > I suggest adding another two lists (at least), one for mysql and one for > > javascript ;-) > [/snip] > > Three...Apache > > -- How about php-check-your-firewall --

  1   2   >