[PHP] php_register_variable()

2002-05-10 Thread Serguei I. Ivantsov
Hello! I need some help with subj function. I execute that function before php_execute_script() but variables seems to be not available within my script. How can I register variable from the C program (/sapi/cli) to see it available in the script ? -- Regards, Serguei I. Ivantsov

Re: [PHP] Adding up values

2002-05-10 Thread Miguel Cruz
There's really not much to it. The intval of '-' is 0, so it doesn't cause any problems. $numbers = file('path/logfile.txt'); $total = 0; foreach ($numbers as $num) $total += intval($num); miguel On Fri, 10 May 2002, Liam MacKenzie wrote: another real basic question, how would I add up

[PHP] PHP builds

2002-05-10 Thread Liam MacKenzie
Hi all, I need some opinions, what are some good modules to build into PHP? I'm starting a hosting service (properly) Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Getting the HTML Name Value in Forms(newbie)

2002-05-10 Thread Daniel
ok, i have the following script HTML File --- form action=action.php method=post Your name: input type=text name=name You email: input type=text name=email br Product1input type=checkbox name=Prod1 value=1000 Product2input type=checkbox name=Prod2 value=1000 input type=submit /form ---

[PHP] Array usage affecting server

2002-05-10 Thread Kevin Meredith
Hi. When a database query is done and the results are put into an array, what are the resources used? I name all arrays differently and was wondering how it would affect the performance of the server if many people connected with many arrays being full. I am assuming the array gets 'dropped'

Re: [PHP] Adding up values

2002-05-10 Thread Jason Wong
On Friday 10 May 2002 14:27, Miguel Cruz wrote: There's really not much to it. The intval of '-' is 0, so it doesn't cause any problems. $numbers = file('path/logfile.txt'); $total = 0; foreach ($numbers as $num) $total += intval($num); Or use array_sum(): $numbers =

[PHP] Web hoster solution?

2002-05-10 Thread Darren Gamble
Good day, A friend of mine has been asked to set up a simple website for a third party, which will be used by visitors to order products. She has been programming for a little while now, but, she doesn't have much experience with other web hosting companies (and neither do I, really). I know

Re: [PHP] Date Q

2002-05-10 Thread Jason Wong
On Friday 10 May 2002 13:14, Jason Soza wrote: Thanks for the code, but I already have: $result = mysql_query(SELECT * FROM table); select *, min(datefield) as mindate, max(datefield) as maxdate from table; Should work. It's been my general understanding that querying twice in one script

[PHP] [PHP 4.2.0] HTTP PUT method $_FILES ?

2002-05-10 Thread Jimmy Lantz
Hi, I'm trying to get the PUT method working on a Apache server running PHP as module. Theese are the steps I've taken so far: - I see in my apache logs that I've got PUT requests PUT /path/filename.html HTTP/1.1 OK - I've added Script PUT /put.php , And checked so that the requests are beeing

RE: [PHP] Genus who came up with Self Destruct Code Copy Pro tection

2002-05-10 Thread SP
So I should buy a commerical product from zend to protect my code but since my code will be reversed engineered anyways then what's the point of buying from zend? -Original Message- From: David Freeman [mailto:[EMAIL PROTECTED]] Sent: May 9, 2002 10:16 PM To: [EMAIL PROTECTED] Subject:

Re: [PHP] Array usage affecting server

2002-05-10 Thread Miguel Cruz
On Fri, 10 May 2002, Kevin Meredith wrote: When a database query is done and the results are put into an array, what are the resources used? I name all arrays differently and was wondering how it would affect the performance of the server if many people connected with many arrays being full.

[PHP] Problem with object

2002-05-10 Thread Martin Thoma
Hello! I have an object: class Entry { var $ip; var $host; } Which is stored in an array: $aLines = array(); ... array_push($aLines, new Entry($ip)); // Do this several times Now I want to resolve the hostname from ip adresses: foreach ($aLines as $entry) { if ($entry-host == )

[PHP] php problem

2002-05-10 Thread johnny1b1g
? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: [[PHP] php problem]

2002-05-10 Thread Jimmy Lantz
johnny1b1g [EMAIL PROTECTED] wrote: ? Well I guess I could try to help you if you elaborate your question a bit further. / Jimmy Start with RTFM :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List

Re: [PHP] Problem with object

2002-05-10 Thread Dan Hardiker
Now I want to resolve the hostname from ip adresses: foreach ($aLines as $entry) { if ($entry-host == ) $entry-host = Teststring; print $entry-host.\n; // prints Teststring } // Testoutput foreach ($aLines as $entry) { print $entry-host.\n; // prints empty string! } Why is

[PHP] Re: Bug #17121 Updated: failed to make with OCI8 for oracle support

2002-05-10 Thread Markus Fischer
Hi, this is not a bug issue, but an installation question. Either as on php-general@ (CC'd) or php-install@ (don't recall the exact name). Can't find clntsh usually means you don't have passed the right path to the oci PHP configure switch and/or the library isn't in

Re: [PHP] simple array question (Am a Newbie kindly excuse.)

2002-05-10 Thread Pekka Saarinen
Which gives out the output: Tesing arrays: ryan1, ryan1.2, ryan2, ryan2.1.1.1.1.1, ryan3, ryan3.2, my question/problem is simply this: how do i stop the last comma from coming? Hi, See http://www.php.net/manual/en/function.implode.php Pekka http://photography-on-the.net/ -- PHP General

RE: [PHP] problems with form/form

2002-05-10 Thread Tim Ward
I've only just picked up on this thread, but why not put each form inside a td element? i.e. table tr tdform ... /form/td tdform ... /form/td /tr /table apologies if I've misinterpreted the question Tim Ward www.chessish.com

RE: [PHP] Nitpicking - PHP 4.2.0 for windows says version is 4.1.2

2002-05-10 Thread Ford, Mike [LSS]
-Original Message- From: Garth Dahlstrom [mailto:[EMAIL PROTECTED]] Sent: 09 May 2002 19:48 Anyone notice this... when you do a ? phpinfo(); ? you get PHP Version 4.1.2, while my apache window says Apache/1.3.20 (Win32) PHP/4.2.0 running... Uh -- the response to the bug

RE: [PHP] Array usage affecting server

2002-05-10 Thread John Holmes
Are you loading the entire result set of the query into an array, or just row by row? ---John Holmes... -Original Message- From: Kevin Meredith [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 11:48 PM To: PHP Subject: [PHP] Array usage affecting server Hi. When a

[PHP] PHP 4.2.0 Informix

2002-05-10 Thread Juraj Hasko
Hello all, I would like to use informix functions of php, but I didn't find php_ifx.dll in last php 4.2.0/win32 bundle. Could you tell me where will I find it ? Thanks in advace. Juraj Hasko

[PHP] Re: php problem

2002-05-10 Thread George Nicolae
I have the same problem long time ago -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Johnny1b1g [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ? -- PHP General Mailing List

[PHP] Free array

2002-05-10 Thread Martin Thoma
Hello! I'm working with an array (about 20 MB), which is shifted to several other arrays and so on. When I shift a array to another, I don't need to source-array anymore. PHP is able to handle 2 of the arrays, but by using more, I get errors about allocating memory. How can I tell PHP to release

RE: [PHP] register_globals in php4

2002-05-10 Thread Ford, Mike [LSS]
-Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: 09 May 2002 23:09 Hmm. No offense ..., but I don't believe turning Registered Globals off will have any effect on security. Turning Registered Globals off just provides a more strict environment for coding.

RE: [PHP] Re: why doesn't $books[$val][display] show the value

2002-05-10 Thread Ford, Mike [LSS]
-Original Message- From: Peter J. Schoenster [mailto:[EMAIL PROTECTED]] Sent: 10 May 2002 06:40 [] http://www.php.net/manual/en/language.types.string.php#language.types. string.parsing Where I see this example (in complex syntax section): // This is wrong for the same

RE: [PHP] Free array

2002-05-10 Thread Ford, Mike [LSS]
-Original Message- From: Martin Thoma [mailto:[EMAIL PROTECTED]] Sent: 10 May 2002 12:01 Hello! I'm working with an array (about 20 MB), which is shifted to several other arrays and so on. When I shift a array to another, I don't need to source-array anymore. PHP is able to

[PHP] log analysis

2002-05-10 Thread Josh Edwards
Hi there, I'm working on using php to analyse an access log on an apache server. If a user inputs a file path I want to be able to use PHP to determine if it's a log file. Is there a function that will reject if it's not a binary file. If it's a binary file how would I then compare it to

[PHP] New to PHP and mySQL

2002-05-10 Thread City Colleges of Chicago - Mannheim
Hi, I am new to PHP and mySQL. I am trying to write a script that enables a user to order a book through an emailform, and then the quantity for that book is adjusted in the mySQL database. I have attached my file to show what I have so far. I believe I am making a simple mistake. Can

RE: [PHP] register_globals in php4

2002-05-10 Thread Zeev Suraski
At 14:16 10/05/2002, Ford, Mike [LSS] wrote: No, but this: if (isset($password)): // register_globals on $super_user = $password==$super_password; endif; if ($super_user): // sensitive admin stuff endif; is more secure than: if

RE: [PHP] Destroying Sessions

2002-05-10 Thread Ford, Mike [LSS]
-Original Message- From: Chris Knipe [mailto:[EMAIL PROTECTED]] Sent: 10 May 2002 04:38 Just to clarify myself above... if ($var1 = $var2) { . In my crazy head, I see $var1 and $var2 to be in a sort of read-only state inside the () of the if statement. For a if statement

RE: [PHP] Semantics, was Destroying Sessions

2002-05-10 Thread Jay Blanchard
[snip] Just to clarify myself above... if ($var1 = $var2) { . In my crazy head, I see $var1 and $var2 to be in a sort of read-only state inside the () of the if statement. For a if statement to be able to change the values in that instance, would be wrong for me. Afterall, the logic of a

RE: [PHP] register_globals in php4

2002-05-10 Thread Ford, Mike [LSS]
-Original Message- From: Zeev Suraski [mailto:[EMAIL PROTECTED]] Sent: 10 May 2002 12:36 You meant it the other way around, didn't you? :) Er, yes! ;) (I cut-and-pasted one example to create the other, and then changed the wrong on to off!!) Cheers! Mike

RE: [PHP] register_globals in php4

2002-05-10 Thread Ford, Mike [LSS]
-Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]] Sent: 10 May 2002 12:54 To: 'Zeev Suraski' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] register_globals in php4 -Original Message- From: Zeev Suraski [mailto:[EMAIL PROTECTED]] Sent: 10 May 2002 12:36

Re: [PHP] gobbling replace

2002-05-10 Thread Josh Valerie McCormack
Thanks Dan. It's really close now. But it's duplicating the text string at the beginning and end of the replaces. Here's the ouput: 1 This is a test of the templating program. br 2 Here's hoping it's working. br 3 br 4 br 5 6 123 123 John Smith 456 456br 7

[PHP] randomize?

2002-05-10 Thread Hawk
I have a group table with 16 items, and I want them to be randomly put in 4 different groups, with 4 in each group, I've seen the $rand(x,x) thing, but is there any way to limit to 4 in each group without 47839 rows of code? :P HÃ¥kan -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: randomize?

2002-05-10 Thread George Nicolae
yes. you can. ;) -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Hawk [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a group table with 16 items, and I want them to be randomly

[PHP] script to test proxies?

2002-05-10 Thread Robert
Anyone know of a script that I could use to check through a database or flatfile for valid proxies? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] New to PHP and mySQL

2002-05-10 Thread Justin French
You didn't attach a file (or it didn't come through). Regardless, I'd advise NOT decrementing the qty in the DB upon placing an order... it should be done upon PROCESSING of the order (ie, upon picking / shipping). Justin French on 10/05/02 9:19 PM, City Colleges of Chicago - Mannheim ([EMAIL

RE: [PHP] register_globals in php4

2002-05-10 Thread Zeev Suraski
At 15:13 10/05/2002, Ford, Mike [LSS] wrote: I should have said less secure rather than more secure. Am I right this time? Yep :) Zeev -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: randomize?

2002-05-10 Thread Hawk
oh, thank you very much :P George Nicolae [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... yes. you can. ;) -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Hawk [EMAIL

Re: [PHP] Nitpicking - PHP 4.2.0 for windows says version is 4.1. 2

2002-05-10 Thread Garth Dahlstrom
That was it... tried it and now the versions match, many thanks! On Fri, 10 May 2002 11:48:26 +0100 Ford, Mike [LSS] wrote: -Original Message- From: Garth Dahlstrom [] Sent: 09 May 2002 19:48 Anyone notice this... when you do a ? phpinfo(); ? you

[PHP] Bug #16747

2002-05-10 Thread Shaun Thomas
For those with error_reporting set to E_ALL, this affects you. After seeing this: Warning: No file uploaded in unknown on line 0, probably the least useful error message I've ever seen, I did some investigation. The PHP developers seem to think that if you have a form upload on your page,

Re: [PHP] Re: randomize?

2002-05-10 Thread Dan Hardiker
[..] is there any way to limit to 4 in each group without 47839 rows of code? [..] yes. you can. ;) [..] oh, thank you very much :P [..] This might be a bit more helpful ;) There are several way to do it, this is just one. Unoptimised, aimed at readability. ?php // Split $items equally

[PHP] Accessing binary data

2002-05-10 Thread Serguei I. Ivantsov
Hello! As there are any way to access binary data in PHP. For example I read file containg binary records with fread() into the string. How can I access individual records (WORDs BYTEs DWORDs) from that string? -- Regards, Serguei I. Ivantsov

Re: [PHP] gobbling replace

2002-05-10 Thread Analysis Solutions
Hey Josh: On Fri, May 10, 2002 at 08:19:59AM -0400, Josh Valerie McCormack wrote: Thanks Dan. It's really close now. But it's duplicating the text string at the beginning and end of the replaces. ... snip ... 10 123 123 Shawn Adams 456 456 br No, you mean to say that you're replacing

[PHP] header problem

2002-05-10 Thread SCOTT . NOVINGER
why does the name variable ($name) not display in the email body, but displays just perfectly in the form result? i can see everything from Employee ID: down in the email body, and everything is seen in the form result. have i made some error? $bid_information = Name: .$name.\n

[PHP] Re: putenv and gettext

2002-05-10 Thread Richard Ellerbrock
On Wed, 08 May 2002 22:09:59 +0200, Gerard Samuel wrote: The reason for this thought was that I have given up on gettext because it requires putenv(), and most people who are using my script wouldn't be able to use it because safe_mode is on. You are correct! But this is how the gettext

[PHP] Upload picture files

2002-05-10 Thread Diana Castillo
What utility or function can I use to upload pictures from the users computer in a form ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Upload picture files

2002-05-10 Thread Jay Blanchard
[snip] What utility or function can I use to upload pictures from the users computer in a form ? [/snip] RTFM at http://www.php.net/manual/en/features.file-upload.php HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] DOMXML in 4.2.0 problems

2002-05-10 Thread Thalis A. Kalfigopoulos
On Fri, 10 May 2002, Meir Kriheli wrote: On Friday 10 May 2002 03:05, Thalis A. Kalfigopoulos wrote: I'm trying to get DOMXML to work with PHP4.2.0. I've compiled with --with-dom and phpinfo() says it's there: DOM/XML enabled libxml Version 2.4.18 HTML Support enabled XPath Support

Re: [PHP] header problem

2002-05-10 Thread Analysis Solutions
On Fri, May 10, 2002 at 06:35:00PM -0700, [EMAIL PROTECTED] wrote: mail($toaddress, $subject, $fromaddress, $bid_information); You have inverted the order of the body and additional_headers arguments. Do this: mail($toaddress, $subject, $bid_information, $fromaddress); Enjoy, --Dan

Re: [PHP] header problem

2002-05-10 Thread 1LT John W. Holmes
Read the manual page on mail(), also. Even if you switch the two like Dan said, your headers are not in the appropriate format. www.php.net/mail ---John Holmes... - Original Message - From: Analysis Solutions [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Friday, May 10, 2002

Re: [PHP] header problem

2002-05-10 Thread Analysis Solutions
John: On Fri, May 10, 2002 at 11:45:33AM -0400, 1LT John W. Holmes wrote: Read the manual page on mail(), also. Even if you switch the two like Dan said, your headers are not in the appropriate format. Oh, you are sooo right! I mistakenly thought he was setting the $toaddress when he was

[PHP] File Type not working in Uploaded File

2002-05-10 Thread Thomas Edison Jr.
Hi, This is my upload form : form action=upload.php method=POST enctype=multipart/form-data p align=centerfont size=2 face=VerdanastrongPlease upload your file below:/p input type=file name=file size=30 pinput type=button name=submit type=submit Upload /form And this is part of my PHP

[PHP] eregi(mail)

2002-05-10 Thread Liam Gibbs
Does anyone have a decent eregi statement for validating e-mail addresses? I've tried the ones on the site, but there seems to be small bugs with each of them. They tell me that [EMAIL PROTECTED] is an invalid e-mail address. __ Do You Yahoo!?

Re: [PHP] eregi(mail)

2002-05-10 Thread Analysis Solutions
Hi Liam: On Fri, May 10, 2002 at 09:48:58AM -0700, Liam Gibbs wrote: Does anyone have a decent eregi statement for validating e-mail addresses? eregi('^[a-z0-9_.=+-]+([a-z0-9-]+\.)+([a-z]{2,6})$', $Email); Enjoy, --Dan -- PHP classes that make web design easier SQL

Re: [PHP] Crosstabs PHP [long]

2002-05-10 Thread Analysis Solutions
Hi Jay: I've been meaning to examine your code and post a substantive reply, but I've been overloaded with other stuff. In lieu of that, take a look at my SQL Solution class at http://www.sqlsolution.info/ It has a function that takes a regular query string and creates a transform output like

[PHP] array of objects???

2002-05-10 Thread J. Anderson Scarbrough
I have two classes. Organization and users. In the organization class I am try to keep an array of user objects but it does not seem to be taking. Can any help? See code below. class Organization { var $users = array(); function AddUser($oUser) { array_push($this-users,

Re: [PHP] Upload picture files

2002-05-10 Thread Michael Barker
Download and install gallery and have the client install gallery remote. :-D http://gallery.sourceforge.net/ On Friday 10 May 2002 11:13 am, Diana Castillo wrote: What utility or function can I use to upload pictures from the users computer in a form ? -- PHP General Mailing List

[PHP] Re: array of objects???

2002-05-10 Thread J Smith
Might just be a typo, but in the function prototype for AddUser(), you have $oUser, but the array_push() argument says $objUser. J J. Anderson Scarbrough wrote: I have two classes. Organization and users. In the organization class I am try to keep an array of user objects but it does

[PHP] Debugger

2002-05-10 Thread Jose Leon
Hello: I have been browsing the web for a good solution to debug php code, I have found several ones, but none of them meet my requeriments. I create a development tool for PHP (QaDRAM Studio) and I want to be able to debug php code with it, my question here is: Why PHP 4 has no built-in

[PHP] stop resend data

2002-05-10 Thread Norman Zhang
How can I disable the resend data feature when going back to an expired page? If I return this page again by typing the URL, I won't be ask to resend data. However, if I hit the back button and go back to the expired page, I will be prompted to click on resend or not. I seem some sites disable

Re: [PHP] eregi(mail)

2002-05-10 Thread Miguel Cruz
On Fri, 10 May 2002, Liam Gibbs wrote: Does anyone have a decent eregi statement for validating e-mail addresses? I've tried the ones on the site, but there seems to be small bugs with each of them. They tell me that [EMAIL PROTECTED] is an invalid e-mail address. Well, it currently is an

RE: [PHP] Semantics, was Destroying Sessions

2002-05-10 Thread Miguel Cruz
On Fri, 10 May 2002, Jay Blanchard wrote: Just to clarify myself above... if ($var1 = $var2) { . In my crazy head, I see $var1 and $var2 to be in a sort of read-only state inside the () of the if statement. For a if statement to be able to change the values in that instance, would be

Re: [PHP] File Type not working in Uploaded File

2002-05-10 Thread 1LT John W. Holmes
Well, first thing I notice is that in your form you name your file input as file, yet nowhere in your code do I see you getting any values from _FILES or $file (depending on your version of PHP). So...how do you expect it to do anything with your file if you don't tell it to?? Maybe you left out

RE: [PHP] register_globals in php4

2002-05-10 Thread Miguel Cruz
On Fri, 10 May 2002, Ford, Mike [LSS] wrote: Also, by using the $_POST, $_GET arrays, you know exactly where the input is coming from (even if register_globals is also on!). If you have register_globals set to on, and you just look to see if (say) $password has a value, which

Re: [PHP] log analysis

2002-05-10 Thread Miguel Cruz
On Fri, 10 May 2002, Josh Edwards wrote: I'm working on using php to analyse an access log on an apache server. If a user inputs a file path I want to be able to use PHP to determine if it's a log file. Is there a function that will reject if it's not a binary file. If it's a binary file

Re: [PHP] eregi(mail)

2002-05-10 Thread Kevin Stone
I had always been suspicious about email validators so I did a big long search on Google about standard address formats. It turns out that aside from the @ symbol emails have no standard format whatsoever. So ereg('@', $email) is really the only functional email validator. You also have to

[PHP] Re: DOMXML in 4.2.0 problems

2002-05-10 Thread Mike P
I am having similar difficulties with DOMXML in php4.2.0. phpinfo() indicates all is well with the setup... If you get some response, please share! Thanks! Mike Thalis A. Kalfigopoulos [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm trying to get DOMXML to

Re: [PHP] eregi(mail)

2002-05-10 Thread Steve Buehler
function check_input($array){ global $HTTP_REFERER; $valid = 1; if(gettype($array)==array) { while (list($index, $subarray) = each($array) ) { if(ereg(required_, $index) (($subarray == ) || ($subarray == ))) {

Re: [PHP] eregi(mail)

2002-05-10 Thread Miguel Cruz
On Fri, 10 May 2002, Kevin Stone wrote: I had always been suspicious about email validators so I did a big long search on Google about standard address formats. It turns out that aside from the symbol emails have no standard format whatsoever. So ereg('', $email) is really the only

Re: [PHP] eregi(mail)

2002-05-10 Thread Miguel Cruz
On Fri, 10 May 2002, Steve Buehler wrote: if(ereg('^[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.''.'[-!#$%\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', If I'm reading it correctly, this will let invalid addresses through. The domain component (after the sign) can only

[PHP] problems installing gd2 on linux

2002-05-10 Thread andy
Hi there, I do have some trouble installing gd2 and suse7.2 linux. I did already compile freetype, but now I do get an error I can not handle. Here is the message: make install gcc -I. -I/usr/local/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/inclu de/X11 -I/usr/local/include -I/usr/lib

Re: [PHP] eregi(mail)

2002-05-10 Thread Analysis Solutions
Folks: On Fri, May 10, 2002 at 01:27:45PM -0500, Steve Buehler wrote: if(ereg('^[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.''.'[-!#$%\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $subarray)){ Those characters don't conform to the RFC.

[PHP] Alternating table rows...

2002-05-10 Thread Glenn Sieb
Hi everyone, I have a PHP script that reads data from an MS SQL server and outputs the data into a table. I've been asked if I can alternate the colors of the rows to make the report more legible. The relevant piece of code looks like: for ($i = 0; $i mssql_num_rows( $stmt ); ++$i)

Re: [PHP] eregi(mail)

2002-05-10 Thread Steve Buehler
Either Google is wrong (probably) or they are now allowing things like spaces into an email address. There are actually several things that are not allowed in a standard email address. Here is the code that I use.

Re: [PHP] Alternating table rows...

2002-05-10 Thread Jason Wong
On Saturday 11 May 2002 02:45, Glenn Sieb wrote: Hi everyone, I have a PHP script that reads data from an MS SQL server and outputs the data into a table. I've been asked if I can alternate the colors of the rows to make the report more legible. The relevant piece of code looks like: for

[PHP] Re: Alternating table rows...

2002-05-10 Thread Austin Marshall
Glenn Sieb wrote: Hi everyone, I have a PHP script that reads data from an MS SQL server and outputs the data into a table. I've been asked if I can alternate the colors of the rows to make the report more legible. The relevant piece of code looks like: for ($i = 0; $i

Re: [PHP] eregi(mail)

2002-05-10 Thread Steve Buehler
To tell you the truth, I can't read it. Steve At 01:32 PM 5/10/2002, Miguel Cruz wrote: On Fri, 10 May 2002, Steve Buehler wrote: if(ereg('^[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.''.'[-!#$%\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', If I'm reading it correctly,

[PHP] Re: Alternating table rows...

2002-05-10 Thread Glenn Sieb
Austin, you rock :) I've only just started with PHP recently, and was introduced to the ternary operators by reading Rasmus' book (great job, Rasmus!!!), so I'm learning as I go here :) Thanks buddy! Glenn On 01:50 PM 5/10/2002 -0500, Austin Marshall wrote: $color=($i%2) ? grey : white; will

Re: [PHP] Alternating table rows...

2002-05-10 Thread Glenn Sieb
On 02:47 AM 5/11/2002 +0800, Jason Wong wrote: if ($i % 2) { odd; } else { even; } Great! Thanks, Jason :))) One thing I love about this list... you guys are more than helpful! :) Glenn --- Glenn E. Sieb, System Administrator Lumeta Corp. mailto:[EMAIL PROTECTED] +1 732 357-3514 (V)

Re: [PHP] PHP builds

2002-05-10 Thread Olexandr Vynnychenko
Hello Liam, Friday, May 10, 2002, 9:31:45 AM, you wrote: LM Hi all, LM I need some opinions, what are some good modules to build into PHP? LM I'm starting a hosting service (properly) Incule XSLT module. If I were your client I really needed it. -- Best regards, Olexandr

[PHP] Re: Debugger

2002-05-10 Thread Austin Marshall
Jose Leon wrote: Hello: I have been browsing the web for a good solution to debug php code, I have found several ones, but none of them meet my requeriments. I create a development tool for PHP (QaDRAM Studio) and I want to be able to debug php code with it, my question here is: Why

[PHP] Using caching to reduce database queries

2002-05-10 Thread Jeff Bearer
Does anybody know of a class, module, extension that caches database output? I've asked this before, and I've looked high and low to no avail. I've used APC cache to do caching and it works great, but it doesn't save database queries, which easily becomes the bottleneck with highly dynamic

RE: [PHP] Alternating table rows...

2002-05-10 Thread Jay Blanchard
[snip] Is there a way for me to do one of the following: 1) Test to see if $i is an even or odd number? 2) Grab more than one line from the database at a time, and just put in two table rows at once? [/snip] ? $rowcount = 0; while($dbrowa = mysql_fetch_object($dbseta)){ $dbrowb =

RE: [PHP] Alternating table rows...

2002-05-10 Thread Miguel Cruz
While everyone's kicking in ideas... I don't think modulus (as someone else suggested) is that expensive, but I think this is the cheapest: $evenodd = 0; $color[0] = '#cc'; $color[1] = '#99'; while ($row = mysql_fetch_row($st)) { print trtd

Re: [PHP] Alternating table rows...

2002-05-10 Thread Robert Cummings
The more generic approach: function getNextColour( $lastIndex, $colourList ) { return $colourList[(++$lastIndex % count( $colourList ))]; } $colours = array ( '#ff', '#00ff00', '#ff' ); $index = 0; foreach( $rows as $aRow ) { echo 'tr bgcolor='.getNextColour(

Re: [PHP] Alternating table rows...

2002-05-10 Thread Robert Cummings
Robert Cummings wrote: The more generic approach: function getNextColour( $lastIndex, $colourList ) { return $colourList[(++$lastIndex % count( $colourList ))]; U... $lastIndex++, don't want to start on the second entry :) Cheers, Rob. -- .-. | Robert Cummings |

[PHP] header problem - thank you!

2002-05-10 Thread SCOTT . NOVINGER
for all of you that replied to my original post, thank you. all of the suggestions worked and i learned a couple of new things along the way. scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Alternating table rows...

2002-05-10 Thread Philip Olson
Yet even more ways to do it: $i = 0; while ($row = mysql_fetch_assoc($result)) { $bgcolor = ($i++ 1) ? '#ff' : '#00'; } Or more then two: $colors = array('black','green','blue','yellow'); $i = 0; while ($row = mysql_fetch_assoc($result)) { $bgcolor = $colors[$i++ %

RE: [PHP] Alternating table rows...

2002-05-10 Thread Jay Blanchard
[snip] ? $rowcount = 0; while($dbrowa = mysql_fetch_object($dbseta)){ $dbrowb = mysql_fetch_object($dbsetb); //change the color of alternating rows $rowcount ++; if ($rowcount == 1){too many lines of code [/snip] I get humbled by this list every day. Could I have Single PHP Lines

[PHP] Apache is not rendering php pages. Config problem?

2002-05-10 Thread andy
Hi there, I did just build abpache and php. Unfortuanatelly the http.conf looks quit different to one I did install last year. There is no phpmodule in there, so I cant activate it. I did include some lines from my old config: AddType application/x-httpd-php .php4 .php3 .php AddType

Re: [PHP] eregi(mail)

2002-05-10 Thread Kevin Stone
As we all know ARPA is thet university network, funded by the government to build an information infrastructure that eventually became the internet we have today. But the standards for text messaging within the ARPA net have been added to over the years in order to accomodate ever expanding

[PHP] Re: Debugger

2002-05-10 Thread Jose Leon
php -l will let you know where your syntax errors are. What? Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Diffrence between ob_gzhandler and zlib compression

2002-05-10 Thread Jeff Bearer
I was looking through the new php.ini file and was enabling the output handler of ob_gzhandler then I saw the line about zlib.output_compression. What's the diffrence between the two? -- Jeff Bearer, RHCE Webmaster PittsburghLIVE.com 2002 EPpy Award, Best Online U.S. Newspaper -- PHP

[PHP] Re: Debugger

2002-05-10 Thread Austin Marshall
Jose Leon wrote: php -l will let you know where your syntax errors are. What? Regards If you invoke the interpreter from the command line (CGI). You can use the -l flag to enable lint mode... that will check your script for parse errors. So in a way, PHP does have a debug mode.

RE: [PHP] Alternating table rows...

2002-05-10 Thread Juan Pablo Aqueveque
Just another version. ?php function useColor() { static $ColorValue; // remember the last color if ($ColorValue == #00FF00) { $ColorValue =#CCFFCC; else { $ColorValue =#00FF00; } return($ColorValue); } ? the call ... $RowColor = useColor(); ... echo 'td

Re: [PHP] Re: Debugger

2002-05-10 Thread 1LT John W. Holmes
php -l will let you know where your syntax errors are. What? He said php -l will let you know where your syntax errors are. Helping out where I can, ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Alternating Table Rows, Part Deux..

2002-05-10 Thread Glenn Sieb
Hey everyone! Thanks for all the hints--here's what my boss and I eventually came out with: /* ## ## And for every row of data we pull, we create a table row... ## */ $company = 0; $previous = ; for ($i =

Re: [PHP] Alternating Table Rows, Part Deux..

2002-05-10 Thread Robert Cummings
Glenn Sieb wrote: Hey everyone! Thanks for all the hints--here's what my boss and I eventually came out with: /* ## ## And for every row of data we pull, we create a table row... ## */ $company = 0;

  1   2   >