Re: [PHP] seraching / indexing in php

2005-03-23 Thread Frank Arensmeier
PHPdig comes with extensive documentation and you are free to rewrite the code so that the search engine does exactly what you want. But, you have to be rather familiar with PHP. My own impression was that it is easy (more or less) to do some basic configuration on the search engine. When it

[PHP] Arrays not recognized in Simple XML Objects (using print_r)

2005-03-23 Thread Yashesh Bhatia
hi! i'm trying to use the simple_xml functions to get an arrray of data from a sample xml file. here's my sample_data.xml ?xml version=1.0 encoding=ISO-8859-1? sample_data first_names

Re: [PHP] seraching / indexing in php

2005-03-23 Thread Chris Ramsay
If you are using Apache you also have the option of using the rewrite rule to change your urls - for example http://www.mydomain.com/index.php?a=foob=bar to http://www.mydomain.com/foo/bar If you are interested there is plenty of info on the net about the apache rewrite rule... -- PHP General

[PHP] reduce the following code if ($colorVar == 'Black' || $colorVar == 'Red' || $colorVar == 'White' || $colorVar == 'Blue' ){

2005-03-23 Thread Lupita
Hello; Can any one show me a way to reduce the following code? ## ?php if ($colorVar == 'Black' || $colorVar == 'Red' || $colorVar == 'White' || $colorVar == 'Blue' ){ $someVar = Something; } ?

RE: [PHP] seraching / indexing in php

2005-03-23 Thread Reinhart Viane
Thanks everyone, Time to dig myself in and see what is best for my purpose. :) -Oorspronkelijk bericht- Van: Chris Ramsay [mailto:[EMAIL PROTECTED] Verzonden: woensdag 23 maart 2005 9:53 Aan: php list general Onderwerp: Re: [PHP] seraching / indexing in php If you are using Apache you

[PHP] Re: reduce the following code if ($colorVar == 'Black' || $colorVar == 'Red' || $colorVar == 'White' || $colorVar == 'Blue' ){

2005-03-23 Thread Gerhard Pfeiffer
* Lupita [EMAIL PROTECTED]: Can any one show me a way to reduce the following code? [...] I was thinking there must be a way to place all the Colors into a $allColorVar and check to see if $colorVar = $allColorVar? I think http://de3.php.net/manual/en/function.in-array.php is what you want

[PHP] SQL statement - date

2005-03-23 Thread Jacques
How should I formulate my sql statement to create a result set of members who registered between now and 7 days ago? I have tried the following and it is obviously incorrect: $sqlnewmembers = Select uid, uprofilename from tblusers where udatereg between (date() and date() - 7); Regards

Re: [PHP] reduce the following code if ($colorVar == 'Black' || $colorVar == 'Red' || $colorVar == 'White' || $colorVar == 'Blue' ){

2005-03-23 Thread Frank Arensmeier
?php $allColor = array('Black','Red','White','Blue'); if (in_array($colorVar, $allColor)) { $someVar = 'Something'; } ? /frank 2005-03-23 kl. 09.54 skrev Lupita: Hello; Can any one show me a way to reduce the following code? ## ?php if

Re: [PHP] SQL statement - date

2005-03-23 Thread Jesper Goos
take a look here http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html the first example should help you... regards jesper Jacques wrote: How should I formulate my sql statement to create a result set of members who registered between now and 7 days ago? I have tried the following

Re: [PHP] Help! configure Apache as a proxy

2005-03-23 Thread Burhan Khalid
[EMAIL PROTECTED] wrote: I configured a Apache server as a proxy. But it's very slow. when I use this server connect internet it is NOT so slow. I think it ss because,my config has some error! Who can help me? This is a PHP programming list, not an Apache list. Ask in the Apache list to

Re: [PHP] Re: http authentication with safe mode enabled?!

2005-03-23 Thread Roman Stöckl-Schmidt
Richard Lynch wrote: You can always add more .htaccess files in more directories, or edit the one that's there. And that's precisely what I did. The only reason why I only have .htaccess in the top-level directory is that I don't have any directives specific to one subdomain that the others

[PHP] php pattern, software development pattern

2005-03-23 Thread symbulos partners
I looked at php pattern (www.phppatterns.com). I did not understand it well. Is that supposed to be pattern as in software development pattern? If so why the uml diagrams are not there? For example A sample Strategy pattern for form validation. What does that mean? I am confused. --

[PHP] Re: Arrays not recognized in Simple XML Objects (using print_r)

2005-03-23 Thread Elizabeth Smith
Yashesh Bhatia wrote: hi! i'm trying to use the simple_xml functions to get an arrray of data from a sample xml file. here's my sample_data.xml ?xml version=1.0 encoding=ISO-8859-1? sample_data

[PHP] Re: HTML - to - PDF

2005-03-23 Thread Jason Barnett
Matt Babineau wrote: Hi All, I have some reports I need converted from HTML to PDF, I'm on a LAMP box, so does anyone have any free suggestions? google fpdf -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA |

Re: [PHP] access violation

2005-03-23 Thread Leif Gregory
Hello Rob, Tuesday, March 22, 2005, 4:14:55 PM, you wrote: R That's interesting - it also started happening for me after R installing PHP 5.0.3. But I have reverted to 4.3.10 for now, and I R can't see how installing 5.0.3 into an entirely separate directory R can break my old php install. Hmm..

Re: [PHP] GIF instead of JPG..

2005-03-23 Thread Ryan A
Hey! Thanks for sharing mate! I'll run it and get back to you if I have any problems. Cheers, Ryan On 3/22/2005 10:49:42 PM, Andras Kende ([EMAIL PROTECTED]) wrote: Hi, I found this beautiful piece of code on the php site which make a proportional thumbnail, problem is its only

RE: [PHP] GIF instead of JPG..

2005-03-23 Thread Ryan A
Hey! Thanks for replying. I started out to do exactly that: changeing everything from JPEG to GIF, but I also wanted to know what exactly i was doing so i started to read the manual for each function that i was using and i got a bit stumped when i came to imagecreatetruecolor as its only for

Re: [PHP] GIF instead of JPG..

2005-03-23 Thread Ryan A
Hey, Thanks for replying. The best part of your reply was: Or, you could even use http://php.net/imagegetsize and IGNORE the filename, and base your decision on what's actually *IN* the file, so when some idiot renames a jpeg to .gif because they think that will make it a GIF (yes, that really

[PHP] Re: php pattern, software development pattern

2005-03-23 Thread Jason Barnett
Symbulos Partners wrote: I looked at php pattern (www.phppatterns.com). I did not understand it well. Is that supposed to be pattern as in software development pattern? If so why the uml diagrams are not there? They are design patterns for code. But the design patterns there are more micro

Re: [PHP] Borrowed code- how to give credit

2005-03-23 Thread Ryan A
Well, if your code is open source or you are distributing the code add a comment right on top of the file like this /* This line's : code here original author was, and I am very greatful to this person for writing this beautiful piece of code that i am useing */ maybe? :-) Cheers, Ryan On

[PHP] php command

2005-03-23 Thread D A GERM
is there a command that will allow me to connect to another box and execute commands? for instance, I want to create an automated php script that will connect to a unix box and run a series of commands. I believe that ssh2_exec() and ssh2_shell() are not supported in the 4.3.4 version of php I

RE: [PHP] php command

2005-03-23 Thread Mikey
I think what you need to do is look at the sockets section of the manual. Regards, Mikey -Original Message- From: D A GERM [mailto:[EMAIL PROTECTED] Sent: 23 March 2005 14:46 To: php-general@lists.php.net Subject: [PHP] php command is there a command that will allow me to

[PHP] Re: php pattern, software development pattern

2005-03-23 Thread symbulos partners
Thanks for your explanation, it makes things clearer, but I need to work on it a bit more before saying that is perfectly clear for me. Are there more pattern repositories available than simply www.phppatterns.com? -- symbulos partners -.- symbulos - ethical services for your organisation

[PHP] executed script URL

2005-03-23 Thread news
I'm firt time here so hello everybody I have some skill in php coding so don't worry, I will no boring with stupid question. Due to I'm unable to test my app on all http servers with all configs I need to know is it possible to get from PHP engine information about executed script URL (not file

[PHP] Re: executed script URL

2005-03-23 Thread Jason Barnett
Rasmus answered this question a week or two ago. Search the archives for 'getenv request' and you will likely find the answer. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM |

[PHP] Bug in look-behind assertions in PCRE patterns ?

2005-03-23 Thread Ian Thurlbeck
Dear All Is this a bug ? I'm using look-behind assertions within preg_match() to ignore certain combinations of patterns. E.g. from ref. manual is: (?!foo)bar matches bar but only if it's not preceded by foo. Here's my test script: $line = '$res = foobar(ddd, dfdf);'; if

RE: [PHP] Bug in look-behind assertions in PCRE patterns ?

2005-03-23 Thread Michael Sims
Ian Thurlbeck wrote: Dear All Is this a bug ? [...] $line = '$res = $bar(ddd, dfdf);'; if (preg_match(/(?!\$)(bar)/, $line, $matches)) { echo Should NOT match \$bar, but found: .$matches[1]; } In the first preg_match() is correctly ignores the foobar function

RE: [PHP] [semi OT]: Planning projects

2005-03-23 Thread Chris W. Parker
Richard Lynch mailto:[EMAIL PROTECTED] on Tuesday, March 22, 2005 10:31 PM said: Personally, I'd opt for working on the macro first, and making that as clean and clear as you can, really thinking deeply on it. Put it away for a day or two and pull it out. Does it all still make sense?

RE: [PHP] [semi OT]: Planning projects

2005-03-23 Thread Chris W. Parker
Burhan Khalid mailto:[EMAIL PROTECTED] on Tuesday, March 22, 2005 10:56 PM said: One approach that I liked (I forgot what book it was mentioned in) involves using a whiteboard and post-it notes. You put your entities on the post it notes, then draw flow lines on the whiteboard. This

[PHP] Re: die function

2005-03-23 Thread Barbara Picci
Hi all, just to give you another solution that I've successfully adopted: function die_script($errmsg) { $sendto = [EMAIL PROTECTED]; $from = [EMAIL PROTECTED]; $subject = FAILED; $message = CONNECTION FAILED\nTYPE OF ERROR:\n . mysql_error();

[PHP] Fedora-Apache2-PHP exec() failure

2005-03-23 Thread Bill Rausch
Hi all, I'm having the same problem as Jim Poserina. Richard pointed out some things to try. Here's my story. We installed Fedora 3 on a new box. Then we installed Apache 2 and PHP 4.3.9 from the RPMs that came on the CDs. Pretty much everything works as expected, except the exec() functions

[PHP] session woes

2005-03-23 Thread Mignon Hunter
I had my script working beautifully on my box but when transferring to dev server no such luck Because we have an older version of php on the webservers, I had to get my admin to change the php.ini on the session.use_trans_id = 1 so that the SID wouldnt show in the URL. But I'm not sure if

Re: [PHP] session woes

2005-03-23 Thread Stephen Johnson
You need to make sure that output_buffering is turned on in your php.ini file on the dev server. ?php /* Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com [EMAIL PROTECTED] 562.924.4454 (office) 562.924.4075 (fax) continuing the struggle against bad code */ ? From:

Re: [PHP] session woes

2005-03-23 Thread Jason Barnett
Mignon Hunter wrote: ... [23-Mar-2005 09:04:47] PHP Warning: Cannot send session cookie - headers already sent by (output started at /var/www/htdocs/sess_downloads_p2.php:5) in /var/www/htdocs/sess_downloads_p2.php on line 60 [23-Mar-2005 09:04:47] PHP Warning: Cannot send session cache

[PHP] Re: reduce the following code if ($colorVar == 'Black' || $colorVar == 'Red' || $colorVar == 'White' || $colorVar == 'Blue' ){

2005-03-23 Thread Lupita
Thank You that did it. Lupita [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello; Can any one show me a way to reduce the following code? ## ?php if ($colorVar == 'Black' || $colorVar == 'Red' || $colorVar == 'White' ||

[PHP] mail() Alternative?

2005-03-23 Thread Dan Joseph
Hi All, I've had a production system moved to a new server. Our geniuses here have refused to allow sendmail on the server and all my e-mail functions are now gone. Is there a way around this? I have already checked the manual, I don't see anything -- -Dan Joseph Build a man a fire, and

Re: [PHP] mail() Alternative?

2005-03-23 Thread Chris Boget
I've had a production system moved to a new server. Our geniuses here have refused to allow sendmail on the server and all my e-mail functions are now gone. Is there a way around this? I have already checked the manual, I don't see anything You can always look into utilizing

Re: [PHP] mail() Alternative?

2005-03-23 Thread Dan Joseph
You can always look into utilizing PEAR::Mail. Once implemented, tt makes it very easy to switch how you send email out. I recently had to do that and it was as easy as doing a global search and replace. Oh ok. I will look into Pear, thank you Chris! -- -Dan Joseph Build a man a fire,

Re: [PHP] mail() Alternative?

2005-03-23 Thread Guillermo Rauch
Another way is the famous phpmailer() class. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Pagination

2005-03-23 Thread Marquez Design
Hello all, I am wanting to paginate records from a MySQL Database. I want there to be 5 records on a page, on multiple pages. Can someone point me in the right direction or show me a way to do this? I can get five records on a page with a LIMIT statement, however, I can not get it to show the

Re: [PHP] Pagination

2005-03-23 Thread John Nichel
Marquez Design wrote: Hello all, I am wanting to paginate records from a MySQL Database. I want there to be 5 records on a page, on multiple pages. Can someone point me in the right direction or show me a way to do this? I can get five records on a page with a LIMIT statement, however, I can not

Re: [PHP] Pagination

2005-03-23 Thread John Nichel
Please send replies to the list. [EMAIL PROTECTED] wrote: I've been working on this same project for one of my pages, and it seems relatively straight forward if you are just using a full set of records to paginate, but if you are using a filtered set (or search results) then it becomes a bit

RE: [PHP] Pagination

2005-03-23 Thread Chris W. Parker
Marquez Design mailto:[EMAIL PROTECTED] on Wednesday, March 23, 2005 12:19 PM said: I am wanting to paginate records from a MySQL Database. I want there to be 5 records on a page, on multiple pages. Can someone point me in the right direction or show me a way to do this? I can get

[PHP] Converting to a string

2005-03-23 Thread PartyPosters
Hello guys, i am using date(l dS of F Y h:i:s A) and want to put the value in a database as a string, How do I converting it to a string, this is what I have got so far:- $v_ship_date = date(l dS of F Y h:i:s A); Lots of thanks. - Original Message - From: PartyPosters To:

Re: [PHP] Borrowed code- how to give credit

2005-03-23 Thread Ryan A
And if you make money from it, send them some money for the effort. yep, money would really tell the author you appreciate his contribution / what he thought of. :-) -Ryan -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.0 -

RE: [PHP] Converting to a string

2005-03-23 Thread Chris W. Parker
PartyPosters mailto:[EMAIL PROTECTED] on Wednesday, March 23, 2005 12:44 PM said: i am using date(l dS of F Y h:i:s A) and want to put the value in a database as a string, How do I converting it to a string, this is what I have got so far:- $v_ship_date = date(l dS of F Y h:i:s A);

Re: [PHP] session woes[RESOLVED]

2005-03-23 Thread Mignon Hunter
Bingo ya know I knew that about the headers but it threw me since it worked on my box perfectly no matter where I put the session_start(); Lo and behold I check out the php.ini on my box and there it was: output buffering=4096 I did not know about the output buffering. BUT I just moved my

[PHP] Insertion of integer in a database

2005-03-23 Thread david joffrin
Hi folks, Problem is fairly simple, but how can I insert integer in an SQL statement? So, I only had strings, but now I have introduced a timestamp column (bigint to cover the milleseconds), and I have the following statement: $queryInsert = INSERT INTO mytables (..., timestamp) VALUES (';

[PHP] PHP CVS solution

2005-03-23 Thread Christian Calloway
Hiya guys, I need some type of extremely simple (yet intuitive) CVS solution, preferbly written in PHP. Namely I want to allow fairly unsavvy computer users (lets say my mom for example) to checkout files of interest, located on some server, via a web-interface and PHP\MySQL backbone. I really

Re: [PHP] Insertion of integer in a database

2005-03-23 Thread Joseph Connolly
I don't think the integer is the problem, but if it is you can turn time() into a variable and then, $time = time(); david joffrin wrote: Hi folks, Problem is fairly simple, but how can I insert integer in an SQL statement? So, I only had strings, but now I have introduced a timestamp column

RE: [PHP] Insertion of integer in a database

2005-03-23 Thread Chris W. Parker
david joffrin mailto:[EMAIL PROTECTED] on Wednesday, March 23, 2005 1:01 PM said: So, I only had strings, but now I have introduced a timestamp column (bigint to cover the milleseconds) Why not use VARCHAR instead? Timestamp doesn't need to be numeric does it? For sure it's not required to

Re: [PHP] Fedora-Apache2-PHP exec() failure

2005-03-23 Thread Rasmus Lerdorf
Bill Rausch wrote: Hi all, I'm having the same problem as Jim Poserina. Richard pointed out some things to try. Here's my story. We installed Fedora 3 on a new box. Then we installed Apache 2 and PHP 4.3.9 from the RPMs that came on the CDs. Pretty much everything works as expected, except

Re: [PHP] Converting to a string

2005-03-23 Thread PartyPosters
Thanks guys, you were right - I needed to change the format of the field in the database. :D - Original Message - From: Daniel Gerzo [EMAIL PROTECTED] To: PartyPosters [EMAIL PROTECTED]; php-general@lists.php.net Sent: Wednesday, March 23, 2005 8:58 PM Subject: Re: [PHP] Converting to a

[PHP] Sending a Table Via mail

2005-03-23 Thread PartyPosters
Hello is there any way I can send a table (or just tabulated data) via email. I've tried this but comes up with an error. $to = [EMAIL PROTECTED]; $re = Test Email from system; $msg = TABLE BORDER=\2\TRhello/TR/TABLE mail($to, $re, $msg); Thanks in advance.

Re: [PHP] Sending a Table Via mail

2005-03-23 Thread John Nichel
PartyPosters wrote: Hello is there any way I can send a table (or just tabulated data) via email. I've tried this but comes up with an error. $to = [EMAIL PROTECTED]; $re = Test Email from system; $msg = TABLE BORDER=\2\TRhello/TR/TABLE mail($to, $re, $msg); It's in the manual...

[PHP] session questions

2005-03-23 Thread gwang5
Hi, I am new to session of php. I need pass the form content from the the first page all the way down to the last page to process it. I used to use $_POST['sth'] to pass the data, but it is very painful since there are several pages between the first and last page. I am using $_SESSION['sth'] now.

[PHP] Re: session questions

2005-03-23 Thread Jason Barnett
[EMAIL PROTECTED] wrote: ... tool bar, I always got the message The page cannot be displayed. Can you help me? Yes. Use a real browser like Firefox so that you can get real error messages ;) -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA |

[PHP] Re: PHP CVS solution

2005-03-23 Thread M. Sokolewicz
Christian Calloway wrote: Hiya guys, I need some type of extremely simple (yet intuitive) CVS solution, preferbly written in PHP. Namely I want to allow fairly unsavvy computer users (lets say my mom for example) to checkout files of interest, located on some server, via a web-interface and

[PHP] how to write IF statement for login script

2005-03-23 Thread Nick
Hi, I have a login script which has worked fine in the past, however i need to change the IF statement. Basically all i want it to do is verify that $squadnum variable is inbetween 1-98 or is 99. I'm not even entirely sure if i need to use the ereg function and i dont think the 1-98 bit is

Re: [PHP] Sending a Table Via mail

2005-03-23 Thread PartyPosters
Great thanks! Sorry I didn't realise it was in there. what I've got so far is the following, I want to include a variable in there but have tried different combos but can't get it to work reading the variable. $to = [EMAIL PROTECTED] # subject of message $re = Test Email from system;

Re: [PHP] how to write IF statement for login script

2005-03-23 Thread M. Sokolewicz
Nick wrote: Hi, I have a login script which has worked fine in the past, however i need to change the IF statement. Basically all i want it to do is verify that $squadnum variable is inbetween 1-98 or is 99. I'm not even entirely sure if i need to use the ereg function and i dont think the

Re: [PHP] Fedora-Apache2-PHP exec() failure

2005-03-23 Thread Bill Rausch
At 13:22 -0800 3/23/05, Rasmus Lerdorf wrote: Bill Rausch wrote: Hi all, I'm having the same problem as Jim Poserina. Richard pointed out some things to try. Here's my story. We installed Fedora 3 on a new box. Then we installed Apache 2 and PHP 4.3.9 from the RPMs that came on the CDs.

Re: [PHP] how to write IF statement for login script

2005-03-23 Thread Nick
Thanks, that seems to have worked. M. Sokolewicz wrote: Nick wrote: Hi, I have a login script which has worked fine in the past, however i need to change the IF statement. Basically all i want it to do is verify that $squadnum variable is inbetween 1-98 or is 99. I'm not even entirely sure if

Re: [PHP] GIF instead of JPG..

2005-03-23 Thread Tom Rogers
Hi, Wednesday, March 23, 2005, 11:30:53 PM, you wrote: RA Hi, RA I found this beautiful piece of code on the php site which make a RA proportional thumbnail, problem is its only working with JPEG files...and RA not with GIFs, can someone please help me convert it to GIF too? RA I tried but got a

[PHP] Preorder Modified Tree Traversal

2005-03-23 Thread Matt Babineau
Hi all, I'm trying to use pmtt to display a windows explorer style view of products in a database. If anyone is familiar with pmtt could you send me an email, I'm looking for some help. I built some code to pull the Levels out of the database, I need some help tracking which level the user is

Re: [PHP] Apache user can't use exec(), passthru(), etc.

2005-03-23 Thread Jim Poserina
The output is: OS Error: 127. I have a second server that I use as a downtime backup. On that one, all the scripts work normally. I don't have to give a path for the commands, any commands with permission problems return permission denied, and the apache user (nobody) actually has /sbin/nologin

[PHP] NetFlix Drag and Drop Row Ordering

2005-03-23 Thread Graham Anderson
For those who have netflix, does anyone know how you would recreate their 'drag and drop' queue widget? basically, you can drag and drop movies in the order you choose is this a combination of javascript and php ? how would you go about creating something like this to order rows in your own CMS

Re: [PHP] Apache user can't use exec(), passthru(), etc.

2005-03-23 Thread Jim Poserina
Wed 23 Mar 2005--23:05:30--/home/webuserwhoami root Wed 23 Mar 2005--23:05:33--/home/webusercat test.php ?php echo exec(whoami).\n; ? Wed 23 Mar 2005--23:05:36--/home/webuserphp test.php Content-type: text/html X-Powered-By: PHP/4.3.9 root Wed 23 Mar 2005--23:05:39--/home/webusersu webuser [EMAIL

[PHP] Re: mail() Alternative?

2005-03-23 Thread Manuel Lemos
Hello, on 03/23/2005 04:14 PM Dan Joseph said the following: I've had a production system moved to a new server. Our geniuses here have refused to allow sendmail on the server and all my e-mail functions are now gone. Is there a way around this? I have already checked the manual, I don't see

Re: [PHP] Preorder Modified Tree Traversal

2005-03-23 Thread Burhan Khalid
Matt Babineau wrote: Hi all, I'm trying to use pmtt to display a windows explorer style view of products in a database. If anyone is familiar with pmtt could you send me an email, I'm looking for some help. I built some code to pull the Levels out of the database, I need some help tracking which

[PHP] Memory use

2005-03-23 Thread Joe Wollard
Greetings, I'm trying to help a C programmer understand and use PHP for web development. So far all the similarities between C++ and PHP are making the process rather speedy. He asked what seemed like a very simple question, but I couldn't find the answer. The questions is how can you

Re: [PHP] NetFlix Drag and Drop Row Ordering

2005-03-23 Thread Burhan Khalid
Graham Anderson wrote: For those who have netflix, does anyone know how you would recreate their 'drag and drop' queue widget? basically, you can drag and drop movies in the order you choose is this a combination of javascript and php ? how would you go about creating something like this to