|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Fri Jul 12 2002 - 01:17:10 CDT
php-general Digest 12 Jul 2002 06:17:10 -0000 Issue 1459
Topics (messages 107198 through 107321):
Warning Message using pg_***
107198 by: David Busby
107256 by: Analysis & Solutions
107300 by: Richard Lynch
Re: using pdf template
107199 by: Andrew Chase
107224 by: Christoph Grottolo
107274 by: ¡Û
MAIL() Trouble. Need your eyes.
107200 by: Shane
107204 by: Shane
107208 by: Shane
107210 by: Martin Clifford
107241 by: Christoph Grottolo
107262 by: Chris Earle
107267 by: Chris Knipe
Newbie continued..wrong datatype
107201 by: Rw
107202 by: Martin Clifford
107207 by: Rw
107212 by: Chris Hewitt
Searching a Paradox Table with my PHP Script..
107203 by: Kondwani Spike Mkandawire
107206 by: Kondwani Spike Mkandawire
107213 by: Chris Hewitt
107221 by: Miles Thompson
Re: Searching a Paradox Table with my PHP Script...
107205 by: Chris Hewitt
107211 by: Kondwani Spike Mkandawire
Re: mysql question
107209 by: 1LT John W. Holmes
107244 by: Alberto Serra
107246 by: Alberto Serra
107288 by: 1LT John W. Holmes
Help a Header Headache!!
107214 by: Shane
107216 by: Chris Knipe
107219 by: Chris Hewitt
107225 by: Chris Knipe
uploads work sometimes
107215 by: Tyler Longren
107297 by: Richard Lynch
Re: session error ... I think
107217 by: Chris Hewitt
Announcement: Smarty template engine 2.2.0 released
107218 by: Monte Ohrt
Re: Table Making
107220 by: Michael Davey
107233 by: Jason Soza
107242 by: Lazor, Ed
107251 by: Jason Soza
107253 by: Kevin Stone
107263 by: Lazor, Ed
Re: Loading dynamic pages based on URL
107222 by: Lazor, Ed
107302 by: Richard Lynch
PHP and geographic maps
107223 by: Lowell Allen
107227 by: Lazor, Ed
107231 by: Lowell Allen
107236 by: Peter J. Schoenster
107237 by: Lazor, Ed
107239 by: Peter J. Schoenster
107261 by: Analysis & Solutions
107264 by: Lazor, Ed
107266 by: Analysis & Solutions
107269 by: Lazor, Ed
107279 by: Martin Towell
107301 by: Richard Lynch
Re: compiling with mysql
107226 by: terry chay
Linux Newsgroup... ('continue');
107228 by: Scott Fletcher
107230 by: Lazor, Ed
107255 by: Miguel Cruz
pgSQL Stored Procedures
107229 by: David Busby
Re: [REGEX] Regex ref to '<' character problem (fwd)
107232 by: Analysis & Solutions
107291 by: Richard Lynch
Compile errors with php 4.2.1 and gd
107234 by: Mike
107254 by: Mike
Re: PHP 4.3.0-dev and gd
107235 by: Kevin Waterson
107258 by: Ricky Dhatt
107271 by: Kevin Waterson
107295 by: Richard Lynch
Exchange LDAP Authentication
107238 by: B i g D o g
KISGB (PHP Guest Book) for PHPNuke!
107240 by: Gaylen Fraley
Benchmarking a site...
107243 by: Rodolfo Gonzalez
107289 by: 1LT John W. Holmes
Re: header()
107245 by: Alberto Serra
Re: MAIL FROM NO ONE
107247 by: Alberto Serra
107296 by: Richard Lynch
Re: Development Tools
107248 by: Alberto Serra
Re: cookie ?
107249 by: Alberto Serra
Re: Generate a file
107250 by: Miguel Cruz
Re: getdate
107252 by: Miguel Cruz
107275 by: Brian V Bonini
Re: sendmail_path help
107257 by: Ricky Dhatt
Re: Mail() function
107259 by: Miguel Cruz
RegExp Help: [:cntrl:] not working
107260 by: Monty
107265 by: Analysis & Solutions
107270 by: Monty
107287 by: Analysis & Solutions
107307 by: Monty
107309 by: Analysis & Solutions
107310 by: Monty
107312 by: Analysis & Solutions
Problems with apache and php
107268 by: Mike
Best String to Array Solution
107272 by: Shane
107278 by: Philip Hallstrom
107284 by: David Freeman
weird....php 4.2.1 with apache2 ver 2.0.39
107273 by: Peter
107277 by: Rasmus Lerdorf
Re: HTTP_USER_AGENT?
107276 by: David Robley
HELP!!! Word count
107280 by: Dan McCullough
107281 by: Peter
107282 by: 1LT John W. Holmes
107283 by: Shane
REminder APllication
107285 by: The Doctor
107286 by: 1LT John W. Holmes
107305 by: Chris Knipe
Re: if syntax
107290 by: Richard Lynch
Re: how to know upload progress status
107292 by: Richard Lynch
107303 by: 1LT John W. Holmes
Re: Character Array
107293 by: Richard Lynch
Re: [PHP-WIN] More bzip woes! No file written...
107294 by: Richard Lynch
Re: compiling and php.ini
107298 by: Richard Lynch
Re: fsock and fget driving me mad!
107299 by: Richard Lynch
Re: Table Making - All done!
107304 by: Jason Soza
safe_mode
107306 by: Chris Knipe
xml and max size of xml doc
107308 by: Martin Towell
Re: Customise Index page using PHP????
107311 by: Justin French
Mailing List
107313 by: César Aracena
107314 by: Justin French
107316 by: César Aracena
107317 by: Rasmus Lerdorf
One more thing... e-mails format
107315 by: César Aracena
1 Form, 2 Submit-Buttons
107318 by: Martin Thoma
107319 by: Martin Towell
107320 by: Sachin Keshavan
107321 by: Leonid Vaner
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
List,
I'm using PG functions like below and I'm wondering how to get rid of
that dang Warning message? PHP.ini setting? or can I turn on/off error
checking?
$rs is the result from pg_exec() (inside the other function)
[PHP Code]
$rs = get_database_stuff("list");
$irow = 0;
while ($ec = pg_fetch_object($rs, $irow)) {
printf("<option value=\"%s\"", $ec->uuid);
if ($ec_uuid == $ec->uuid) { printf(" selected"); }
printf(">%s</option>\n", $ec->name);
$irow++;
}
[Resulting HTML]
<option value="C878CD32A3DB4CC98DEF1D5E1BCD4E30">Zhuhai Formula One</option>
<br>
<b>Warning</b>: Unable to jump to row 920 on PostgreSQL result index 3
in <b>/var/www/html/default.php</b> on line <b>89</b><br>
</select></td></tr>
attached mail follows:
On Thu, Jul 11, 2002 at 11:14:24AM -0700, David Busby wrote:
>
> I'm using PG functions like below and I'm wondering how to get rid
> of that dang Warning message? PHP.ini setting? or can I turn on/off error
> checking?
... snip ...
> <b>Warning</b>: Unable to jump to row 920 on PostgreSQL result index 3
> in <b>/var/www/html/default.php</b> on line <b>89</b><br>
> </select></td></tr>
Write your code so it doesn't go to a non existent row in the result set?
At least that's what it looks like to my non-pg-user eyes.
> printf("<option value=\"%s\"", $ec->uuid);
Uh, why are you using printf rather than just echoing? Kind of wasteful,
let alone harder to read.
echo "<option value=\"$ec->uuid\"";
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
attached mail follows:
>List, > I'm using PG functions like below and I'm wondering how to get rid of >that dang Warning message? PHP.ini setting? or can I turn on/off error >checking? > >$rs is the result from pg_exec() (inside the other function) > >[PHP Code] >$rs = get_database_stuff("list"); >$irow = 0; >while ($ec = pg_fetch_object($rs, $irow)) { > printf("<option value=\"%s\"", $ec->uuid); > if ($ec_uuid == $ec->uuid) { printf(" selected"); } > printf(">%s</option>\n", $ec->name); > $irow++; >} >[Resulting HTML] ><option value="C878CD32A3DB4CC98DEF1D5E1BCD4E30">Zhuhai Formula One</option> ><br> ><b>Warning</b>: Unable to jump to row 920 on PostgreSQL result index 3 >in <b>/var/www/html/default.php</b> on line <b>89</b><br> ></select></td></tr> >
Put an
in front of the pg_fetch_object()
It's really a pain that PG issues a warning for this.
WARNING:
After you get used to putting the
symbol by habit, you'll make a typo in
the pg_fetch_object() but you'll suppressing the error message :-(
Only add the
after the code works!
-- Like Music? http://l-i-e.com/artists.htm
attached mail follows:
There are a couple of different PHP classes that people have written to make PDF creation easier... maybe they would streamline the process enough that you can make them from scratch after all.
http://www.pc4p.net/ http://ros.co.nz/pdf/
I didn't know about those the last time I had to deal with PDF generation, but they look pretty useful. Creating complex PDFs with just the base PDFLib functions is definitely a pain. :)
-Andy
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:rasmus
php.net]
> Only using the commercial PDI library from pdflib.com
>
> On Thu, 11 Jul 2002, Tobias Talltorp wrote:
>
> > Is it possible to produce a PDF, use it as a template and populate
> > predefined sections of it from a database?
> > The PDFs I want to create are a little too complex for me to
> produce from
> > scratch.
attached mail follows:
Maybe you could use PDF with FDF to accomplish this task (see http://www.php.net/manual/en/ref.fdf.php).
Christoph
Rasmus Lerdorf wrote: > Only using the commercial PDI library from pdflib.com > > On Thu, 11 Jul 2002, Tobias Talltorp wrote: > >> Is it possible to produce a PDF, use it as a template and populate >> predefined sections of it from a database? >> The PDFs I want to create are a little too complex for me to produce >> from scratch. >> >> // Tobias >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
¡i ¦b tobias
talltorp.com (Tobias Talltorp) ªº¤j§
¤¤´£¨ì: ¡j
: Is it possible to produce a PDF, use it as a template and populate
: predefined sections of it from a database?
: The PDFs I want to create are a little too complex for me to produce from
: scratch.
: // Tobias
Mmmm... I have this question too.... ><
-- [m[1;36m¡° ¨Ó·½:¡ELastLoveSong lls.twbbs.org¡E[FROM: localhost.localdomai][m
attached mail follows:
Greetings, I am attempting to send an HTML based email using the Mail() function in PHP.
I am having great luck until I include an OBJECT or EMBED tag in the HTML string.
I am running PHP 4.2.1 on a WIN NT client.
If I uncomment the OBJECT or EMBED lines below in the $message variable, my script errors out on the MAIL() call at the bottom.
Please, any help would be appreciated. Thanks folks!
- NorthBayShane
-----------------------------------------
<?PHP
$myname = "Me Myself";
$myemail = "me
here.com";
$myreplyemail = "me
here.com";
$contactname = "Mister Contact";
$contactemail = "me
here.com";
----------------------------------- MY VERY LONG $MESSAGE STRING -----------------------------------
$message = "<html><head><title></title>"; $message.= "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head>"; $message.= "<body bgcolor='#54616E' text='#FFFFFF' link='#FF6600' vlink='#999999' alink='#FF9900'>"; $message.= "<center><table width='501' border='0' cellspacing='0' cellpadding='0'><tr><td width='500' background='http://www.delaplaine.net/flashmail/noflash.gif'>";
------------------------------ HERE IS WHERE THE TROUBLE STARTS IF I UNCOMMENT THE OBJECT OR EMBED TAG THE SERVER ERRORS OUT ON MY MAIL() CALL ------------------------------
//$message.= "<p><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='500' height='300'><param name=movie value='http://www.delaplaine.net/flashmail/delaplaine.swf'><param name=quality value=high><param name=menu value=false><param name='BGCOLOR' value='#54616E'>"; //$message.= "<embed src='http://www.delaplaine.net/flashmail/delaplaine.swf' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='500' height='300' bgcolor='#54616E'></embed>"; //$message.= "</object></p>";
------------------------------ HERE IS WHERE THE TROUBLE ENDS ------------------------------ $message.= "</td>"; $message.= "<td bgcolor='#54616E'><img src='http://www.delaplaine.net/flashmail/spacer.gif' width='1' height='300'></td></tr>"; $message.= "<tr><td align='center'><p><br></p><p><font face='Verdana, Arial, Helvetica, sans-serif' size='1'><a href='http://www.delaplaine.net/extranet/fm.php?sec=new&id=noflash'>Click here</a> if you cannot see the animation above.</font></p><p><font face='Verdana, Arial, Helvetica, sans-serif' size='1' color='#999999'>© Copyright 2002, Delaplaine Creative.<br> All rights reserved.</font></p></td><td align='center'> </td></tr>"; $message.= "</table><p> </p></center>"; $message.= "</body></html>";
$subject = "FlashMail Test"; $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: ".$myname."<".$myemail.">\r\n"; $headers.= "To: ".$contactname."<".$contactemail.">\r\n"; $headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n"; $headers.= "X-Priority: 1\r\n"; $headers.= "X-MSMail-Priority: High\r\n"; $headers.= "X-Mailer: Just My Server";
mail($contactemail, $subject, $message, $headers);
?>
attached mail follows:
I'll give it a shot, but there are # symbols all over the place in the other tags (like COLOR links...etc...
But thanks though? Anyone else???
Thanks folks!
-----Original Message-----
From: Paul Roberts [mailto:roberts_paul
bigfoot.com]
Sent: Thursday, July 11, 2002 11:31 AM
To: Shane
Subject: Re: [PHP] MAIL() Trouble. Need your eyes.
try escaping the # in there.
Paul Roberts
roberts_paul
bigfoot.com
++++++++++++++++++++++++
----- Original Message -----
From: "Shane" <shane
delaplaine.com>
To: <php-general
lists.php.net>
Sent: Thursday, July 11, 2002 7:21 PM
Subject: [PHP] MAIL() Trouble. Need your eyes.
Greetings, I am attempting to send an HTML based email using the Mail() function in PHP.
I am having great luck until I include an OBJECT or EMBED tag in the HTML string.
I am running PHP 4.2.1 on a WIN NT client.
If I uncomment the OBJECT or EMBED lines below in the $message variable, my script errors out on the MAIL() call at the bottom.
Please, any help would be appreciated. Thanks folks!
- NorthBayShane
-----------------------------------------
<?PHP
$myname = "Me Myself";
$myemail = "me
here.com";
$myreplyemail = "me
here.com";
$contactname = "Mister Contact";
$contactemail = "me
here.com";
----------------------------------- MY VERY LONG $MESSAGE STRING -----------------------------------
$message = "<html><head><title></title>"; $message.= "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head>"; $message.= "<body bgcolor='#54616E' text='#FFFFFF' link='#FF6600' vlink='#999999' alink='#FF9900'>"; $message.= "<center><table width='501' border='0' cellspacing='0' cellpadding='0'><tr><td width='500' background='http://www.delaplaine.net/flashmail/noflash.gif'>";
------------------------------ HERE IS WHERE THE TROUBLE STARTS IF I UNCOMMENT THE OBJECT OR EMBED TAG THE SERVER ERRORS OUT ON MY MAIL() CALL ------------------------------
//$message.= "<p><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='500' height='300'><param name=movie value='http://www.delaplaine.net/flashmail/delaplaine.swf'><param name=quality value=high><param name=menu value=false><param name='BGCOLOR' value='#54616E'>"; //$message.= "<embed src='http://www.delaplaine.net/flashmail/delaplaine.swf' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='500' height='300' bgcolor='#54616E'></embed>"; //$message.= "</object></p>";
------------------------------ HERE IS WHERE THE TROUBLE ENDS ------------------------------ $message.= "</td>"; $message.= "<td bgcolor='#54616E'><img src='http://www.delaplaine.net/flashmail/spacer.gif' width='1' height='300'></td></tr>"; $message.= "<tr><td align='center'><p><br></p><p><font face='Verdana, Arial, Helvetica, sans-serif' size='1'><a href='http://www.delaplaine.net/extranet/fm.php?sec=new&id=noflash'>Click here</a> if you cannot see the animation above.</font></p><p><font face='Verdana, Arial, Helvetica, sans-serif' size='1' color='#999999'>© Copyright 2002, Delaplaine Creative.<br> All rights reserved.</font></p></td><td align='center'> </td></tr>"; $message.= "</table><p> </p></center>"; $message.= "</body></html>";
$subject = "FlashMail Test"; $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: ".$myname."<".$myemail.">\r\n"; $headers.= "To: ".$contactname."<".$contactemail.">\r\n"; $headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n"; $headers.= "X-Priority: 1\r\n"; $headers.= "X-MSMail-Priority: High\r\n"; $headers.= "X-Mailer: Just My Server";
mail($contactemail, $subject, $message, $headers);
?>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Nope, no luck. Still errors out. Is there a limit to how man characters a MAIL() call can have?
-----Original Message-----
From: Paul Roberts [mailto:roberts_paul
bigfoot.com]
Sent: Thursday, July 11, 2002 11:31 AM
To: Shane
Subject: Re: [PHP] MAIL() Trouble. Need your eyes.
try escaping the # in there.
Paul Roberts
roberts_paul
bigfoot.com
++++++++++++++++++++++++
----- Original Message -----
From: "Shane" <shane
delaplaine.com>
To: <php-general
lists.php.net>
Sent: Thursday, July 11, 2002 7:21 PM
Subject: [PHP] MAIL() Trouble. Need your eyes.
Greetings, I am attempting to send an HTML based email using the Mail() function in PHP.
I am having great luck until I include an OBJECT or EMBED tag in the HTML string.
I am running PHP 4.2.1 on a WIN NT client.
If I uncomment the OBJECT or EMBED lines below in the $message variable, my script errors out on the MAIL() call at the bottom.
Please, any help would be appreciated. Thanks folks!
- NorthBayShane
-----------------------------------------
<?PHP
$myname = "Me Myself";
$myemail = "me
here.com";
$myreplyemail = "me
here.com";
$contactname = "Mister Contact";
$contactemail = "me
here.com";
----------------------------------- MY VERY LONG $MESSAGE STRING -----------------------------------
$message = "<html><head><title></title>"; $message.= "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head>"; $message.= "<body bgcolor='#54616E' text='#FFFFFF' link='#FF6600' vlink='#999999' alink='#FF9900'>"; $message.= "<center><table width='501' border='0' cellspacing='0' cellpadding='0'><tr><td width='500' background='http://www.delaplaine.net/flashmail/noflash.gif'>";
------------------------------ HERE IS WHERE THE TROUBLE STARTS IF I UNCOMMENT THE OBJECT OR EMBED TAG THE SERVER ERRORS OUT ON MY MAIL() CALL ------------------------------
//$message.= "<p><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='500' height='300'><param name=movie value='http://www.delaplaine.net/flashmail/delaplaine.swf'><param name=quality value=high><param name=menu value=false><param name='BGCOLOR' value='#54616E'>"; //$message.= "<embed src='http://www.delaplaine.net/flashmail/delaplaine.swf' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='500' height='300' bgcolor='#54616E'></embed>"; //$message.= "</object></p>";
------------------------------ HERE IS WHERE THE TROUBLE ENDS ------------------------------ $message.= "</td>"; $message.= "<td bgcolor='#54616E'><img src='http://www.delaplaine.net/flashmail/spacer.gif' width='1' height='300'></td></tr>"; $message.= "<tr><td align='center'><p><br></p><p><font face='Verdana, Arial, Helvetica, sans-serif' size='1'><a href='http://www.delaplaine.net/extranet/fm.php?sec=new&id=noflash'>Click here</a> if you cannot see the animation above.</font></p><p><font face='Verdana, Arial, Helvetica, sans-serif' size='1' color='#999999'>© Copyright 2002, Delaplaine Creative.<br> All rights reserved.</font></p></td><td align='center'> </td></tr>"; $message.= "</table><p> </p></center>"; $message.= "</body></html>";
$subject = "FlashMail Test"; $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: ".$myname."<".$myemail.">\r\n"; $headers.= "To: ".$contactname."<".$contactemail.">\r\n"; $headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n"; $headers.= "X-Priority: 1\r\n"; $headers.= "X-MSMail-Priority: High\r\n"; $headers.= "X-Mailer: Just My Server";
mail($contactemail, $subject, $message, $headers);
?>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I would think that there would only be a limit on the SMTP server that the mail function sends the mail through. I'm no expert on the subject though, just makes sense. :o)
Martin Clifford http://www.completesource.net (Now Open!)
>>> "Shane" <shane
delaplaine.com> 07/11/02 02:42PM >>>
Nope, no luck. Still errors out.
Is there a limit to how man characters a MAIL() call can have?
-----Original Message-----
From: Paul Roberts [mailto:roberts_paul
bigfoot.com]
Sent: Thursday, July 11, 2002 11:31 AM
To: Shane
Subject: Re: [PHP] MAIL() Trouble. Need your eyes.
try escaping the # in there.
Paul Roberts
roberts_paul
bigfoot.com
++++++++++++++++++++++++
----- Original Message -----
From: "Shane" <shane
delaplaine.com>
To: <php-general
lists.php.net>
Sent: Thursday, July 11, 2002 7:21 PM
Subject: [PHP] MAIL() Trouble. Need your eyes.
Greetings, I am attempting to send an HTML based email using the Mail() function in PHP.
I am having great luck until I include an OBJECT or EMBED tag in the HTML string.
I am running PHP 4.2.1 on a WIN NT client.
If I uncomment the OBJECT or EMBED lines below in the $message variable, my script errors out on the MAIL() call at the bottom.
Please, any help would be appreciated. Thanks folks!
- NorthBayShane
-----------------------------------------
<?PHP
$myname = "Me Myself";
$myemail = "me
here.com";
$myreplyemail = "me
here.com";
$contactname = "Mister Contact";
$contactemail = "me
here.com";
----------------------------------- MY VERY LONG $MESSAGE STRING -----------------------------------
$message = "<html><head><title></title>"; $message.= "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head>"; $message.= "<body bgcolor='#54616E' text='#FFFFFF' link='#FF6600' vlink='#999999' alink='#FF9900'>"; $message.= "<center><table width='501' border='0' cellspacing='0' cellpadding='0'><tr><td width='500' background='http://www.delaplaine.net/flashmail/noflash.gif'>";
------------------------------ HERE IS WHERE THE TROUBLE STARTS IF I UNCOMMENT THE OBJECT OR EMBED TAG THE SERVER ERRORS OUT ON MY MAIL() CALL ------------------------------
//$message.= "<p><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='500' height='300'><param name=movie value='http://www.delaplaine.net/flashmail/delaplaine.swf'><param name=quality value=high><param name=menu value=false><param name='BGCOLOR' value='#54616E'>"; //$message.= "<embed src='http://www.delaplaine.net/flashmail/delaplaine.swf' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='500' height='300' bgcolor='#54616E'></embed>"; //$message.= "</object></p>";
------------------------------ HERE IS WHERE THE TROUBLE ENDS ------------------------------ $message.= "</td>"; $message.= "<td bgcolor='#54616E'><img src='http://www.delaplaine.net/flashmail/spacer.gif' width='1' height='300'></td></tr>"; $message.= "<tr><td align='center'><p><br></p><p><font face='Verdana, Arial, Helvetica, sans-serif' size='1'><a href='http://www.delaplaine.net/extranet/fm.php?sec=new&id=noflash'>Click here</a> if you cannot see the animation above.</font></p><p><font face='Verdana, Arial, Helvetica, sans-serif' size='1' color='#999999'>© Copyright 2002, Delaplaine Creative.<br> All rights reserved.</font></p></td><td align='center'> </td></tr>"; $message.= "</table><p> </p></center>"; $message.= "</body></html>";
$subject = "FlashMail Test"; $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: ".$myname."<".$myemail.">\r\n"; $headers.= "To: ".$contactname."<".$contactemail.">\r\n"; $headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n"; $headers.= "X-Priority: 1\r\n"; $headers.= "X-MSMail-Priority: High\r\n"; $headers.= "X-Mailer: Just My Server";
mail($contactemail, $subject, $message, $headers);
?>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Might it be your/your provider's anti-virus blocking the clsid string? You could try to send another long mail with common text or HTML.
BTW mail() has been reworked for PHP 4.3.0, you can get a new (dev)version to try out on http://snaps.php.net/win32
Christoph
Martin Clifford wrote:
> I would think that there would only be a limit on the SMTP server
> that the mail function sends the mail through. I'm no expert on the
> subject though, just makes sense. :o)
>
> Martin Clifford
> http://www.completesource.net (Now Open!)
>
>>>> "Shane" <shane
delaplaine.com> 07/11/02 02:42PM >>>
> Nope, no luck. Still errors out.
> Is there a limit to how man characters a MAIL() call can have?
>
> -----Original Message-----
> From: Paul Roberts [mailto:roberts_paul
bigfoot.com]
> Sent: Thursday, July 11, 2002 11:31 AM
> To: Shane
> Subject: Re: [PHP] MAIL() Trouble. Need your eyes.
>
>
> try escaping the # in there.
>
>
> Paul Roberts
> roberts_paul
bigfoot.com
> ++++++++++++++++++++++++
>
>
> ----- Original Message -----
> From: "Shane" <shane
delaplaine.com>
> To: <php-general
lists.php.net>
> Sent: Thursday, July 11, 2002 7:21 PM
> Subject: [PHP] MAIL() Trouble. Need your eyes.
>
>
> Greetings, I am attempting to send an HTML based email using the
> Mail() function in PHP.
>
> I am having great luck until I include an OBJECT or EMBED tag in the
> HTML string.
>
> I am running PHP 4.2.1 on a WIN NT client.
>
> If I uncomment the OBJECT or EMBED lines below in the $message
> variable, my script errors out on the MAIL() call at the bottom.
>
> Please, any help would be appreciated.
> Thanks folks!
>
> - NorthBayShane
> -----------------------------------------
> <?PHP
> $myname = "Me Myself";
> $myemail = "me
here.com";
> $myreplyemail = "me
here.com";
> $contactname = "Mister Contact";
> $contactemail = "me
here.com";
>
> -----------------------------------
> MY VERY LONG $MESSAGE STRING
> -----------------------------------
>
> $message = "<html><head><title></title>";
> $message.= "<meta http-equiv='Content-Type' content='text/html;
> charset=iso-8859-1'></head>";
> $message.= "<body bgcolor='#54616E' text='#FFFFFF' link='#FF6600'
> vlink='#999999' alink='#FF9900'>";
> $message.= "<center><table width='501' border='0' cellspacing='0'
> cellpadding='0'><tr><td width='500'
> background='http://www.delaplaine.net/flashmail/noflash.gif'>";
>
> ------------------------------
> HERE IS WHERE THE TROUBLE STARTS
> IF I UNCOMMENT THE OBJECT OR EMBED TAG
> THE SERVER ERRORS OUT ON MY MAIL() CALL
> ------------------------------
>
> //$message.= "<p><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-
> 444553540000'
>
codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=5,0,0,0' width='500' height='300'><param name=movie
value='http://www.delaplaine.net/flashmail/delaplaine.swf'><param
name=quality value=high><param name=menu value=false><param name='BGCOLOR'
value='#54616E'>";
> //$message.= "<embed
> src='http://www.delaplaine.net/flashmail/delaplaine.swf' quality=high
>
pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash' type='application/x-shockwave-flash' width='500'
height='300' bgcolor='#54616E'></embed>";
> //$message.= "</object></p>";
>
> ------------------------------
> HERE IS WHERE THE TROUBLE ENDS
> ------------------------------
> $message.= "</td>";
> $message.= "<td bgcolor='#54616E'><img
> src='http://www.delaplaine.net/flashmail/spacer.gif' width='1'
> height='300'></td></tr>";
> $message.= "<tr><td align='center'><p><br></p><p><font face='Verdana,
> Arial, Helvetica, sans-serif' size='1'><a
> href='http://www.delaplaine.net/extranet/fm.php?sec=new&id=noflash'>Click
here</a> if you cannot see the animation above.</font></p><p><font
face='Verdana, Arial, Helvetica, sans-serif' size='1' color='#999999'>©
Copyright 2002, Delaplaine Creative.<br> All rights
reserved.</font></p></td><td align='center'> </td></tr>";
> $message.= "</table><p> </p></center>";
> $message.= "</body></html>";
>
> $subject = "FlashMail Test";
> $headers = "MIME-Version: 1.0\r\n";
> $headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
> $headers.= "From: ".$myname."<".$myemail.">\r\n";
> $headers.= "To: ".$contactname."<".$contactemail.">\r\n";
> $headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n";
> $headers.= "X-Priority: 1\r\n";
> $headers.= "X-MSMail-Priority: High\r\n";
> $headers.= "X-Mailer: Just My Server";
>
> mail($contactemail, $subject, $message, $headers);
>
> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
What's the error message?
"Shane" <shane
delaplaine.com> wrote in message
news:CD44D03584C7A249A3F86891B24EB8EA01EC7098
exch003intermedia.net...
Greetings, I am attempting to send an HTML based email using the Mail()
function in PHP.
I am having great luck until I include an OBJECT or EMBED tag in the HTML string.
I am running PHP 4.2.1 on a WIN NT client.
If I uncomment the OBJECT or EMBED lines below in the $message variable, my script errors out on the MAIL() call at the bottom.
Please, any help would be appreciated. Thanks folks!
- NorthBayShane
-----------------------------------------
<?PHP
$myname = "Me Myself";
$myemail = "me
here.com";
$myreplyemail = "me
here.com";
$contactname = "Mister Contact";
$contactemail = "me
here.com";
----------------------------------- MY VERY LONG $MESSAGE STRING -----------------------------------
$message = "<html><head><title></title>"; $message.= "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head>"; $message.= "<body bgcolor='#54616E' text='#FFFFFF' link='#FF6600' vlink='#999999' alink='#FF9900'>"; $message.= "<center><table width='501' border='0' cellspacing='0' cellpadding='0'><tr><td width='500' background='http://www.delaplaine.net/flashmail/noflash.gif'>";
------------------------------ HERE IS WHERE THE TROUBLE STARTS IF I UNCOMMENT THE OBJECT OR EMBED TAG THE SERVER ERRORS OUT ON MY MAIL() CALL ------------------------------
//$message.= "<p><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca b#version=5,0,0,0' width='500' height='300'><param name=movie value='http://www.delaplaine.net/flashmail/delaplaine.swf'><param name=quality value=high><param name=menu value=false><param name='BGCOLOR' value='#54616E'>"; //$message.= "<embed src='http://www.delaplaine.net/flashmail/delaplaine.swf' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_ Version=ShockwaveFlash' type='application/x-shockwave-flash' width='500' height='300' bgcolor='#54616E'></embed>"; //$message.= "</object></p>";
------------------------------ HERE IS WHERE THE TROUBLE ENDS ------------------------------ $message.= "</td>"; $message.= "<td bgcolor='#54616E'><img src='http://www.delaplaine.net/flashmail/spacer.gif' width='1' height='300'></td></tr>"; $message.= "<tr><td align='center'><p><br></p><p><font face='Verdana, Arial, Helvetica, sans-serif' size='1'><a href='http://www.delaplaine.net/extranet/fm.php?sec=new&id=noflash'>Click here</a> if you cannot see the animation above.</font></p><p><font face='Verdana, Arial, Helvetica, sans-serif' size='1' color='#999999'>© Copyright 2002, Delaplaine Creative.<br> All rights reserved.</font></p></td><td align='center'> </td></tr>"; $message.= "</table><p> </p></center>"; $message.= "</body></html>";
$subject = "FlashMail Test"; $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: ".$myname."<".$myemail.">\r\n"; $headers.= "To: ".$contactname."<".$contactemail.">\r\n"; $headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n"; $headers.= "X-Priority: 1\r\n"; $headers.= "X-MSMail-Priority: High\r\n"; $headers.= "X-Mailer: Just My Server";
mail($contactemail, $subject, $message, $headers);
?>
attached mail follows:
On Thu, Jul 11, 2002 at 07:00:57PM -0400, Chris Earle wrote:
> -----------------------------------------
> <?PHP
> $myname = "Me Myself";
> $myemail = "me
here.com";
> $myreplyemail = "me
here.com";
> $contactname = "Mister Contact";
> $contactemail = "me
here.com";
That's ok...
> ----------------------------------- > MY VERY LONG $MESSAGE STRING > ----------------------------------- > $message = "<html><head><title></title>";
That's not how MIME based email bodies start. > //$message.= "<p><object > classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' > codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca > b#version=5,0,0,0' width='500' height='300'><param name=movie > value='http://www.delaplaine.net/flashmail/delaplaine.swf'><param > name=quality value=high><param name=menu value=false><param name='BGCOLOR' > value='#54616E'>";
This will give an error, because the message is not defined as a propper MIME type.
I'm not 100% sure of the exact correct syntax of MIME based email now, but a look at the RFCs. A nice quick hack to get the propper syntax, send yourself a HTML based email from OE or a similar mail client, and view the source of the generated email message.
You need things like
--- message type="mime/type" type="application/x-shockwave --- --- next part="lbahb lah" ---
etc etc etc.
So yes, you're problem is that your email's not properly formated. Search arround a bit, read some fine manuals, and make some examples of MIME based email messages from clients that you know works properly (such as OE).
Then, go back, format your message body properly, and it should all work very nicely
-- me
attached mail follows:
This is a continue from this morning (thanks so much for the responses).. yielding a data type mismatch:
$CheckArr = array("Periodic", "Sale", "Return"); IF (SUBSTR($approvalcode,0,1) == "Y" && in_array($CheckArr, $type)) { PRINT "<BR>$approvalcode"; PRINT " "; PRINT "$type"; }
This line: IF (SUBSTR($approvalcode,0,1) == "Y" && in_array($CheckArr, $type))
Causes this error: Warning: Wrong datatype for second argument in call to in_array in /home/www/globalspacesolutions/php3/billingtrx.php on line 47
attached mail follows:
As far as I'm aware, the first argument to the in_array() function is the needle (what you're searching for) and the second is the array to be searched through (the haystack).
So if $type represents what you're searching for, then it would be written as:
in_array($type, $CheckArr);
If you supply the third argument as TRUE, then the search becomes case sensitive, I believe.
HTH!
>>> "Rw" <php
wiegmann.net> 07/11/02 02:25PM >>>
This is a continue from this morning (thanks so much for the responses)..
yielding a data type mismatch:
$CheckArr = array("Periodic", "Sale", "Return"); IF (SUBSTR($approvalcode,0,1) == "Y" && in_array($CheckArr, $type)) { PRINT "<BR>$approvalcode"; PRINT " "; PRINT "$type"; }
This line: IF (SUBSTR($approvalcode,0,1) == "Y" && in_array($CheckArr, $type))
Causes this error: Warning: Wrong datatype for second argument in call to in_array in /home/www/globalspacesolutions/php3/billingtrx.php on line 47
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
That did it!
Thanks!
----- Original Message -----
From: "Martin Clifford" <MLC1
nrc.gov>
To: <php-general
lists.php.net>; <php
wiegmann.net>
Sent: Thursday, July 11, 2002 1:32 PM
Subject: Re: [PHP] Newbie continued..wrong datatype
As far as I'm aware, the first argument to the in_array() function is the needle (what you're searching for) and the second is the array to be searched through (the haystack).
So if $type represents what you're searching for, then it would be written as:
in_array($type, $CheckArr);
If you supply the third argument as TRUE, then the search becomes case sensitive, I believe.
HTH!
>>> "Rw" <php
wiegmann.net> 07/11/02 02:25PM >>>
This is a continue from this morning (thanks so much for the responses)..
yielding a data type mismatch:
$CheckArr = array("Periodic", "Sale", "Return"); IF (SUBSTR($approvalcode,0,1) == "Y" && in_array($CheckArr, $type)) { PRINT "<BR>$approvalcode"; PRINT " "; PRINT "$type"; }
This line: IF (SUBSTR($approvalcode,0,1) == "Y" && in_array($CheckArr, $type))
Causes this error: Warning: Wrong datatype for second argument in call to in_array in /home/www/globalspacesolutions/php3/billingtrx.php on line 47
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
The manual says the second parameter needs to be an array. I assume it is not, but you have not shown us how $type is assigned so we cannot tell.
HTH Chris
Rw wrote:
>This is a continue from this morning (thanks so much for the responses).. >yielding a data type mismatch: > > $CheckArr = array("Periodic", "Sale", "Return"); > IF (SUBSTR($approvalcode,0,1) == "Y" && in_array($CheckArr, $type)) > { > PRINT "<BR>$approvalcode"; > PRINT " "; > PRINT "$type"; > } > >This line: IF (SUBSTR($approvalcode,0,1) == "Y" && in_array($CheckArr, >$type)) > >Causes this error: >Warning: Wrong datatype for second argument in call to in_array in >/home/www/globalspacesolutions/php3/billingtrx.php on line 47 > >
attached mail follows:
Hallo folks: (Sorry for a repost on the same topic just that my first one never got through)...
I have a bit of an issue with Paradox Table Searching... I have a fairly large table (4MB+), here is the problem:
When I run a search for an element in the Table on my localhost which is running Apache and php 4.1, I have no issues with speed... However when I run it on the Server at my work place, which is running IIS Server (I am not sure which version), and the same PHP version on my Workstation it takes ages to execute...
I have gotten suggestions and have revised my Script over and over using odbc_exec() with SQL commands SELECT myColumn FROM myTable, I have used a COUNT SQL command suggested on this forum, My general algorithm is as follows...
1) I create an Array using odbc_fetch_array this Array contains one column from the Table I am searching... 2) Keep trying to matchup each element in the array against the validation element being checked... returning found within a sequential loop... and eventually "Not Found"... 3) I suppose the sequential loop is whats killing me, but the table is not ordered hence I am forced to do a sequential search.. Does anyone else have an idea for a quicker and much more efficient algorithm...
Once again the issue of Speed is a non-factor on my local machine running Apache but it does become a factor when I run it on our Server, which is running an IIS Server...
Thanks in advance...
Kondwani
attached mail follows:
Would it be that it takes time to connect to a table if
it is in use?
"Kondwani Spike Mkandawire" <kondwani
cs.mun.ca> wrote in message
news:20020711183609.6656.qmail
pb1.pair.com...
> Hallo folks: (Sorry for a repost on the same topic just
> that my first one never got through)...
>
> I have a bit of an issue with Paradox Table Searching...
> I have a fairly large table (4MB+), here is the problem:
>
> When I run a search for an element in the Table on
> my localhost which is running Apache and php 4.1,
> I have no issues with speed... However when I run it
> on the Server at my work place, which is running IIS
> Server (I am not sure which version), and the same
> PHP version on my Workstation it takes ages to execute...
>
> I have gotten suggestions and have revised my Script
> over and over using odbc_exec() with SQL commands
> SELECT myColumn FROM myTable, I have used
> a COUNT SQL command suggested on this forum,
> My general algorithm is as follows...
>
> 1) I create an Array using odbc_fetch_array this Array
> contains one column from the Table I am searching...
> 2) Keep trying to matchup each element in the array
> against the validation element being checked...
> returning found within a sequential loop...
> and eventually "Not Found"...
> 3) I suppose the sequential loop is whats killing me,
> but the table is not ordered hence I am forced to
> do a sequential search.. Does anyone else have
> an idea for a quicker and much more efficient
> algorithm...
>
> Once again the issue of Speed is a non-factor on
> my local machine running Apache but it does become a
> factor when I run it on our Server, which is running an
> IIS Server...
>
> Thanks in advance...
>
> Kondwani
>
>
>
>
attached mail follows:
Kondwani Spike Mkandawire wrote:
>Would it be that it takes time to connect to a table if >it is in use? > I don't know Paradox. Does it use row or table level locking. If table locking then if anyone is doing an update then the whole table is locked until the update is complete. If row locking then only the row being updated is locked.
Thinking along those lines, how many database connections are configured in IIS? If everybody had to use a single database connection (and there were a lot of users) then each would have to wait their turn. Similarly, how may concurrent instances of IIS are configured in it. These could make a difference but I'd doubt if the defaults were poor in these respects.
Regards
Chris
attached mail follows:
Why are you building the array? Why not let SQL do the work?
Select col1, col2, col3, ... coln from target_table where field_holding_target_value = '$target_value_i_want'
If you have no records returned, then no match, otherwise you have one or more matches. In the second case you can proceed with your processing. I've also noted Chris Hewitt's suggestions re number of connections, etc.; that's worth checking as well.
See below as well ...
Cheers - Miles Thompson
At 04:00 PM 7/11/2002 -02-30, Kondwani Spike Mkandawire wrote: >Hallo folks: (Sorry for a repost on the same topic just >that my first one never got through)... > >I have a bit of an issue with Paradox Table Searching... >I have a fairly large table (4MB+), here is the problem: > >When I run a search for an element in the Table on >my localhost which is running Apache and php 4.1, >I have no issues with speed... However when I run it >on the Server at my work place, which is running IIS >Server (I am not sure which version), and the same >PHP version on my Workstation it takes ages to execute... > >I have gotten suggestions and have revised my Script >over and over using odbc_exec() with SQL commands >SELECT myColumn FROM myTable, I have used >a COUNT SQL command suggested on this forum, >My general algorithm is as follows... > >1) I create an Array using odbc_fetch_array this Array > contains one column from the Table I am searching...
How are you populating the array?
>2) Keep trying to matchup each element in the array > against the validation element being checked... > returning found within a sequential loop... > and eventually "Not Found"...
Are you hitting the database each time through the loop, or stepping through the result set? How many elements in the array?
>3) I suppose the sequential loop is whats killing me, > but the table is not ordered hence I am forced to > do a sequential search.. Does anyone else have > an idea for a quicker and much more efficient > algorithm...
What reasons are there for not ordering the table? Indexes speed things up dramatically, for both the users on the LAN and those accessing via the 'Net. Use indexes, they're your friend!
>Once again the issue of Speed is a non-factor on >my local machine running Apache but it does become a >factor when I run it on our Server, which is running an >IIS Server... > >Thanks in advance... > >Kondwani
attached mail follows:
Kondwani Spike Mkandawire wrote:
>Hallo folks: > >I have a bit of an issue with Paradox Table Searching... >I have a fairly large table (4MB+), here is the problem: > I've not been monitoring this thread so what I say may have been covered, so please bear with me.
> >When I run a search for an element in the Table on >my localhost which is running Apache and php 4.1, >I have no issues with speed... However when I run it >on the Server at my work place, which is running IIS >Server (I am not sure which version), and the same >PHP version on my Workstation it takes ages to execute... > Is the table layout, indices, amount of data and ODBC connection the same in both cases? How long is ages? If minutes then is it a DNS problem in connecting to the server computer? You could try this by getting an item of data from a new table containing only one row.
>I have gotten suggestions and have revised my Script >over and over using odbc_exec() with SQL commands >SELECT myColumn FROM myTable, I have used >a COUNT SQL command suggested on this forum, >My general algorithm is as follows... > >1) I create an Array using odbc_fetch_array this Array > contains one column from the Table I am searching... >2) Keep trying to matchup each element in the array > against the validation element being checked... > returning found within a sequential loop... > and eventually "Not Found"... > Do I understand correctly, you have an unordered array and you are comparing every element with every record (also unordered) from a database?
> >3) I suppose the sequential loop is whats killing me, > but the table is not ordered hence I am forced to > do a sequential search.. Does anyone else have > an idea for a quicker and much more efficient > algorithm... > If so then I agree. I'd order the php array (either ascending or descending) and ask for the database records similarly ordered (e.g. select myColumn from myTable order by myColumn). Then you only need make the comparisons until the value is lower (or higher) than the one it is being compared with. Make sure there is an index on myColumn in the database.
> >Once again the issue of Speed is a non-factor on >my local machine running Apache but it does become a >factor when I run it on our Server, which is running an >IIS Server... > I may not like IIS but I cannot see that it is to blame here.
HTH Chris
attached mail follows:
> Is the table layout, indices, amount of data and ODBC connection the > same in both cases? How long is ages? If minutes then is it a DNS > problem in connecting to the server computer? You could try this by > getting an item of data from a new table containing only one row. > Do I understand correctly, you have an unordered array and you are > comparing every element with every record (also unordered) from a database?
On my localhost (My Work Station) it takes 2 seconds to run the same search on the same Table... And on the work place Server it takes 30+ seconds... I think I have figured out the problem, it should be to do with the fact that I am connecting to a Table on the Network that is also being used by another Application (1st Place 95)... And at current 8 people are using this Application and constantly use it during working hours... I'll try the search at night and see if there is a difference...
Thanks for the response...
> If so then I agree. I'd order the php array (either ascending or > descending) and ask for the database records similarly ordered (e.g. > select myColumn from myTable order by myColumn). Then you only need make > the comparisons until the value is lower (or higher) than the one it is > being compared with. Make sure there is an index on myColumn in the > database. >
Sorting the Array will cost more time I think dependent on the Sort Approach... Creating the Array takes 1 or so secs... I should try and run it as a Script and set a timer...
Thanks again though...
Kondwani
attached mail follows:
How about
SELECT * FROM table WHERE $current_shot BETWEEN start_shot AND end_shot
Also, I hope you are validating $current_shot if register globals is on, to make sure it's really just an integer and not some extra SQL that'll allow someone to view your entire table/database...
---John Holmes...
----- Original Message -----
From: "Miles Thompson" <milesthompson
ns.sympatico.ca>
To: "Alexander Ross" <alexross
bleen.net>; <php-general
lists.php.net>
Sent: Thursday, July 11, 2002 12:24 PM
Subject: Re: [PHP] mysql question
> Yes, though I'd probably add parentheses to make it clearer. > > select * from table where ((start_shot <= $current_shot) and (end_shot >= > $current_shot)) > > Though that's probably not necessary. Make certain you have your less > than's and greater thans set the right way, I've often sat slack-mouthed > wondering why I had no data, simply because I was using "<" when it should > have been ">". > > Cheers - Miles Thompson > > At 12:06 PM 7/11/2002 -0400, Alexander Ross wrote: > >I realize this isn't a php question, but I figured that someone here knows > >of a good mysql newsgroup and in the mean time someone here probaby knows > >the answer to my question. > > > >Can I set up a query like this: > > > >select * from table where start_shot <= $current_shot and end_shot >= > >$current_shot > > > >note everything will be of type INT > > > >Thanks ya'll > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
ðÒÉ×ÅÔ!
1LT John W. Holmes wrote: > How about > > SELECT * FROM table WHERE $current_shot BETWEEN start_shot AND end_shot
*if* that was on Oracle *and* the table was big you'd notice that your performance goes down. Don't ask me why. And I never checked it on MySql. But watch out for betweens. Check them.
ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
ðÒÉ×ÅÔ!
Alexander Ross wrote: > I realize this isn't a php question, but I figured that someone here knows > of a good mysql newsgroup and in the mean time someone here probaby knows > the answer to my question. > > Can I set up a query like this: > > select * from table where start_shot <= $current_shot and end_shot >= > $current_shot > > note everything will be of type INT
Yes, you can, providing that those fields would exist and be of a comparable type. Just one question, wasn't it quicker to just give it a try? :)
ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
> ðÒÉ×ÅÔ!
Gesundheit
> 1LT John W. Holmes wrote: > > How about > > > > SELECT * FROM table WHERE $current_shot BETWEEN start_shot AND end_shot > > *if* that was on Oracle *and* the table was big you'd notice that your > performance goes down. Don't ask me why. And I never checked it on > MySql. But watch out for betweens. Check them.
Yes, good point. I don't know if it matters in MySQL either, but always test your queries and see which is faster. EXPLAIN may come in handy here. I don't see why it would be different, it seems like both would be interpreted the same...
---John Holmes...
attached mail follows:
I am trying to send an EMBED and OBJECT tag inside an HTML email using the mail() call. My HEADER Content type is...
$headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: ".$myname."<".$myemail.">\r\n"; $headers.= "To: ".$contactname."<".$contactemail.">\r\n"; $headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n"; $headers.= "X-Priority: 1\r\n"; $headers.= "X-MSMail-Priority: High\r\n"; $headers.= "X-Mailer: Just My Server";
mail($contactemail, $subject, $message, $headers);
Each Time I add the EMBED or OBJECT tag, the mail() call errors out. What type of content-type do I need to use to be able to send EMBED tags through an HTML email in PHP?
Please help, I have had no luck with the manual or my archives.
Thanks folks. - NorthBayShane
attached mail follows:
Have you perhaps tried rather sending the mail using MIMETools ?
There's a PHP class writen that's actually pretty good for sending MIME based email... I'm not sure what it's called now, but I'm sure someone else on the list will be able to elaborate on this.
On Thu, Jul 11, 2002 at 12:26:45PM -0700, Shane wrote: > I am trying to send an EMBED and OBJECT tag inside an HTML email using the mail() call. > My HEADER Content type is... > > $headers = "MIME-Version: 1.0\r\n"; > $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; > $headers.= "From: ".$myname."<".$myemail.">\r\n"; ^^^^^^^^^^^^ May not be of importance, but you're missing a space.
> $headers.= "To: ".$contactname."<".$contactemail.">\r\n"; > $headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n"; > $headers.= "X-Priority: 1\r\n"; > $headers.= "X-MSMail-Priority: High\r\n"; > $headers.= "X-Mailer: Just My Server"; > > mail($contactemail, $subject, $message, $headers); > > Each Time I add the EMBED or OBJECT tag, the mail() call errors out. > What type of content-type do I need to use to be able to send EMBED tags through an HTML email in PHP?
Can you show the message body? MIME isn't related to the headers that directly. Propper syntax of the body of the message is more important, and is more than likely where your fault lies. > Please help, I have had no luck with the manual or my archives.
Hope this helps
-- me
attached mail follows:
Chris Knipe wrote:
>Have you perhaps tried rather sending the mail using MIMETools ? > >There's a PHP class writen that's actually pretty good for sending MIME based >email... I'm not sure what it's called now, but I'm sure someone else on the >list will be able to elaborate on this. > I have not responded to this before as I have not used EMBED or OBJECT tagss but I have used Manuel Lemos's smtpclass-2002-05-13.tar.gz and mimemessage-2002-06-08.tar.gz which are intended for html email. They are on phpclasses.org and easy to find.
HTH Chris
attached mail follows:
On Thu, Jul 11, 2002 at 08:59:28PM +0100, Chris Hewitt wrote: > I have not responded to this before as I have not used EMBED or OBJECT > tagss but I have used Manuel Lemos's smtpclass-2002-05-13.tar.gz and > mimemessage-2002-06-08.tar.gz which are intended for html email. They > are on phpclasses.org and easy to find.
I just had a look through some of my source.... Here's what I use..
/***************************************
* Title.........: HTML Mime Mail class
* Version.......: 1.26
* Author........: Richard Heyes <richard.heyes
heyes-computing.net>
* Filename......: html_mime_mail.class
* Last changed..: 25/06/2000
*/
A simple search on google / phpclasses.org should reveal the tarbal.
-- me
attached mail follows:
Hi,
I have a form: <input type=file name=pdfFile>
And the code that processes the form: if ($_FILES['pdfFile']['name'] == "") { print "You must select a file to upload"; } else { // code to add data to db }
This works on my server at home (when I select a file to upload, it sees the filename in $_FILES['pdfFile']['name'], but on a server at work, it's blank so I see the error "You must select a file to upload".
Any ideas on why this might happen? Is there anything in php.ini that could be wrong (it works here at home when register_globals is set to on or off)?
Thanks everyone, Tyler
attached mail follows:
>Any ideas on why this might happen? Is there anything in php.ini that >could be wrong (it works here at home when register_globals is set to on >or off)?
PHP version and track_vars in php.ini
-- Like Music? http://l-i-e.com/artists.htm
attached mail follows:
Alexander Ross wrote:
>ok ... but the line of code that was the culprit was simply: > >print "var id = ".$id."<br>"; //for debugging > >how does that line constitute sending more header info? > It does not constitute sending more headers, but it does say that no more may be sent (as you have already sent the "print" line). Headers have to be the first thing sent, before anything else. Once anything else is sent then, by definition, headers are complete.
Think of the error message saying "Some output has been sent so its too late to send a header now."
Regards
Chris
attached mail follows:
Most notable changes are support for multiple plugin directories, grouping cache and compile files, removed overlib library from distribution, many optimizations, enhancements and bug fixes. Enjoy!
Homepage: http://smarty.php.net/
Release Notes: http://smarty.php.net/misc/RELEASE_NOTES
ChangeLog: http://smarty.php.net/misc/NEWS
Download: http://smarty.php.net/download.php
-Monte
attached mail follows:
How about working out the length of the column (by dividing the number of rows by the number of cols you want), dump your results into an array and using the col length as an offset to pick through the resulting table?
// $data is an array of results
$rows = count ($data) $row_len = round ($rows / 3); // three cols
print "<table>"; for ($i = 0; $i < $row_len; $i++) { print "<tr>"; print "<td>".$data[$i]."</td>"; print "<td>".($row_len + $i < $rows)?$data[$row_len + $i]:" "."</td>"; print "<td>".((2 * $row_len) + $i < $rows)?$data[(2 * $row_len) + $i]:" "."</td>"; print "</tr>" } print "</table>";
This is off the cuff code and I think the row length's might need some extra checking, but sth like this should work... (crosses fingers)
Mikey
attached mail follows:
I really wish I was at home right now so I could test this out... I'll certainly give this a shot tonight. Taking someone else's earlier suggestion and tweaking it a bit, I was wondering if the following might work:
$cells = 10; //set desired number of cells per column $numRows = mysql_num_rows($result); //determine number of rows $numCols = ceil($numRows/$cells); //determine number of columns needed
print "<center><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n"; //start main table
for($i=0; $i<$numCols; $i++) {
echo "<tr><td align=\"center\">\n"; //setup main row/cell
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0 \">\n"; //setup secondary table
while($dataArray = mysql_fetch_array($result)) { //print results of SQL in secondary table extract($dataArray); $n++; printf("<tr>\n<td align=\"center\" valign=\"center\"><a href=\"year.asp?year=%\">%s</td>\n</tr>", $grad_year, $grad_year);
if ($n==$cols) { echo "</table>"\n; //close secondary table at 10 cells }
echo "</td></tr>\n"; //close main row/cell
}
echo "</table>\n"; //close main table
Jason Soza
----- Original Message -----
From: "Michael Davey" <mikey
splatted.net>
Date: Thursday, July 11, 2002 12:01 pm
Subject: [PHP] Re: Table Making
> How about working out the length of the column (by dividing the > number of > rows by the number of cols you want), dump your results into an > array and > using the col length as an offset to pick through the resulting table? > > // $data is an array of results > > $rows = count ($data) > $row_len = round ($rows / 3); // three cols > > print "<table>"; > for ($i = 0; $i < $row_len; $i++) > { > print "<tr>"; > print "<td>".$data[$i]."</td>"; > print "<td>".($row_len + $i < $rows)?$data[$row_len + > $i]:" "."</td>"; > print "<td>".((2 * $row_len) + $i < $rows)?$data[(2 * > $row_len) + > $i]:" "."</td>"; > print "</tr>" > } > print "</table>"; > > This is off the cuff code and I think the row length's might need > some extra > checking, but sth like this should work... (crosses fingers) > > Mikey > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
attached mail follows:
Will this work for you?
$numFields = mysql_num_fields($Results); print "<table>"; while ($Row = mysql_fetch_array($Results)) { print "<tr>"; for ($i = 0; $ < $numFields; $i++) print "<td>".$Row[$i]."</td>"; print "</tr>"; } print "</table>";
-----Original Message----- I was wondering if the following might work:
$cells = 10; //set desired number of cells per column $numRows = mysql_num_rows($result); //determine number of rows $numCols = ceil($numRows/$cells); //determine number of columns needed
print "<center><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n"; //start main table
for($i=0; $i<$numCols; $i++) {
echo "<tr><td align=\"center\">\n"; //setup main row/cell
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0 \">\n"; //setup secondary table
while($dataArray = mysql_fetch_array($result)) { //print results of SQL in secondary table extract($dataArray); $n++; printf("<tr>\n<td align=\"center\" valign=\"center\"><a href=\"year.asp?year=%\">%s</td>\n</tr>", $grad_year, $grad_year);
if ($n==$cols) { echo "</table>"\n; //close secondary table at 10 cells }
echo "</td></tr>\n"; //close main row/cell
}
echo "</table>\n"; //close main table
**************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
Well, wouldn't that print a table with one row containing the results?
Again, what I'm looking for is a vertically laid-out table. So instead of: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
I want: 1 6 11 2 7 12 3 8 13 4 9 14 5 10 15
To give you an idea of why I want this, check out www.jdhsgrads.com - this is the site I'm currently working on. When you see the list of graduation years, your eye (well, at least mine) wants to follow the dates top to bottom, left to right. As it is now, you have to work to see the progression and find out where you want to go to locate a specific date.
I'm hoping the code I posted will create something like: <table> <tr> <td> <table> <tr><td>1941</td></tr> <tr><td>1942</td></tr> <tr><td>1943</td></tr> </table> </td> <td> <table> ...
Make sense?
Jason Soza
----- Original Message -----
From: "Lazor, Ed" <ELazor
providence.org>
Date: Thursday, July 11, 2002 2:08 pm
Subject: RE: [PHP] Re: Table Making
> Will this work for you? > > $numFields = mysql_num_fields($Results); > > print "<table>"; > while ($Row = mysql_fetch_array($Results)) > { > print "<tr>"; > for ($i = 0; $ < $numFields; $i++) > print "<td>".$Row[$i]."</td>"; > print "</tr>"; > } > print "</table>"; > > > > -----Original Message----- > I was wondering if the following might work: > > $cells = 10; //set desired number of cells per column > $numRows = mysql_num_rows($result); //determine number of rows > $numCols = ceil($numRows/$cells); //determine number of columns needed > > print "<center><table width=\"100%\" border=\"0\" > cellpadding=\"0\" > cellspacing=\"0\">\n"; //start main table > > for($i=0; $i<$numCols; $i++) { > > echo "<tr><td align=\"center\">\n"; //setup main row/cell > > echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0 > \">\n"; //setup secondary table > > while($dataArray = mysql_fetch_array($result)) { //print > results of SQL in secondary table > extract($dataArray); > $n++; > > printf("<tr>\n<td align=\"center\" > valign=\"center\">href=\"year.asp?year=%\">%s</td>\n</tr>", $grad_year, $grad_year); > > if ($n==$cols) { > echo "</table>"\n; //close secondary table at > 10 cells > } > > echo "</td></tr>\n"; //close main row/cell > > } > > echo "</table>\n"; //close main table
attached mail follows:
Well I guess I'd better get my 2 cents in. :) There is a natural progression to HTML tables so why fight it? I think the cleanest way to do this would be to reorder the array instead of trying to come up with a clever way to build the table. Set the number of table rows you want then use that as an offset to the dates array. Simply ask if(isset($dates[$i+$rowoffset])).. five lines of code in a for() loop and you got it licked. Then you can run through the new array and generate the HTML table linearly without any tricks and pad with the necessary number of cells. -Kevin
----- Original Message -----
From: "Jason Soza" <solja
gci.net>
To: "Michael Davey" <mikey
splatted.net>
Cc: <php-general
lists.php.net>
Sent: Thursday, July 11, 2002 3:43 PM
Subject: Re: [PHP] Re: Table Making
> I really wish I was at home right now so I could test this out... I'll
> certainly give this a shot tonight. Taking someone else's earlier
> suggestion and tweaking it a bit, I was wondering if the following
> might work:
>
> $cells = 10; //set desired number of cells per column
> $numRows = mysql_num_rows($result); //determine number of rows
> $numCols = ceil($numRows/$cells); //determine number of columns needed
>
> print "<center><table width=\"100%\" border=\"0\" cellpadding=\"0\"
> cellspacing=\"0\">\n"; //start main table
>
> for($i=0; $i<$numCols; $i++) {
>
> echo "<tr><td align=\"center\">\n"; //setup main row/cell
>
> echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0
> \">\n"; //setup secondary table
>
> while($dataArray = mysql_fetch_array($result)) { //print
> results of SQL in secondary table
> extract($dataArray);
> $n++;
>
> printf("<tr>\n<td align=\"center\" valign=\"center\"><a
> href=\"year.asp?year=%\">%s</td>\n</tr>", $grad_year, $grad_year);
>
> if ($n==$cols) {
> echo "</table>"\n; //close secondary table at
> 10 cells
> }
>
> echo "</td></tr>\n"; //close main row/cell
>
> }
>
> echo "</table>\n"; //close main table
>
>
> Jason Soza
>
> ----- Original Message -----
> From: "Michael Davey" <mikey
splatted.net>
> Date: Thursday, July 11, 2002 12:01 pm
> Subject: [PHP] Re: Table Making
>
> > How about working out the length of the column (by dividing the
> > number of
> > rows by the number of cols you want), dump your results into an
> > array and
> > using the col length as an offset to pick through the resulting table?
> >
> > // $data is an array of results
> >
> > $rows = count ($data)
> > $row_len = round ($rows / 3); // three cols
> >
> > print "<table>";
> > for ($i = 0; $i < $row_len; $i++)
> > {
> > print "<tr>";
> > print "<td>".$data[$i]."</td>";
> > print "<td>".($row_len + $i < $rows)?$data[$row_len +
> > $i]:" "."</td>";
> > print "<td>".((2 * $row_len) + $i < $rows)?$data[(2 *
> > $row_len) +
> > $i]:" "."</td>";
> > print "</tr>"
> > }
> > print "</table>";
> >
> > This is off the cuff code and I think the row length's might need
> > some extra
> > checking, but sth like this should work... (crosses fingers)
> >
> > Mikey
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Well.... then...
$TotalCol = 5; $NumRows = mysql_num_rows($Results); $RowsPerCol = ceil($NumRows / $TotalCol);
print "<table><tr>";
for ($i = 0; $i < $TotalCol; $i++) { print "<td>"; for ($j = 0; $j < $RowsPerCol; $j++) { $Row = mysql_fetch_array($Results); if (isset($Row)) print $Row[0] . "<br>"; } print "</td>"; }
print "</td></table>";
-----Original Message-----
From: Jason Soza [mailto:solja
gci.net]
Sent: Thursday, July 11, 2002 3:18 PM
To: Lazor, Ed
Cc: php-general
lists.php.net
Subject: Re: [PHP] Re: Table Making
Well, wouldn't that print a table with one row containing the results?
Again, what I'm looking for is a vertically laid-out table. So instead of: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
I want: 1 6 11 2 7 12 3 8 13 4 9 14 5 10 15
To give you an idea of why I want this, check out www.jdhsgrads.com - this is the site I'm currently working on. When you see the list of graduation years, your eye (well, at least mine) wants to follow the dates top to bottom, left to right. As it is now, you have to work to see the progression and find out where you want to go to locate a specific date.
I'm hoping the code I posted will create something like: <table> <tr> <td> <table> <tr><td>1941</td></tr> <tr><td>1942</td></tr> <tr><td>1943</td></tr> </table> </td> <td> <table> ...
Make sense?
Jason Soza
----- Original Message -----
From: "Lazor, Ed" <ELazor
providence.org>
Date: Thursday, July 11, 2002 2:08 pm
Subject: RE: [PHP] Re: Table Making
> Will this work for you? > > $numFields = mysql_num_fields($Results); > > print "<table>"; > while ($Row = mysql_fetch_array($Results)) > { > print "<tr>"; > for ($i = 0; $ < $numFields; $i++) > print "<td>".$Row[$i]."</td>"; > print "</tr>"; > } > print "</table>"; > > > > -----Original Message----- > I was wondering if the following might work: > > $cells = 10; //set desired number of cells per column > $numRows = mysql_num_rows($result); //determine number of rows > $numCols = ceil($numRows/$cells); //determine number of columns needed > > print "<center><table width=\"100%\" border=\"0\" > cellpadding=\"0\" > cellspacing=\"0\">\n"; //start main table > > for($i=0; $i<$numCols; $i++) { > > echo "<tr><td align=\"center\">\n"; //setup main row/cell > > echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0 > \">\n"; //setup secondary table > > while($dataArray = mysql_fetch_array($result)) { //print > results of SQL in secondary table > extract($dataArray); > $n++; > > printf("<tr>\n<td align=\"center\" > valign=\"center\">href=\"year.asp?year=%\">%s</td>\n</tr>", $grad_year, $grad_year); > > if ($n==$cols) { > echo "</table>"\n; //close secondary table at > 10 cells > } > > echo "</td></tr>\n"; //close main row/cell > > } > > echo "</table>\n"; //close main table **************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
I use mod_rewrite from Apache to do what you're describing. Everything without a period in the name gets processed by /index.php. The index.php script knows which data to load by parsing the URL.
-----Original Message-----
From: Monty [mailto:monty3
hotmail.com]
Sent: Thursday, July 11, 2002 11:13 AM
To: php-general
lists.php.net
Subject: [PHP] Loading dynamic pages based on URL
Articles for an online magazine will use one template and load content dynamically from a MySQL database. Assets and images for each article will be stored in their own folder: e.g., www.mysite.com/topic/article
Even though a physical HTML page will not exist at www.mysite.com/topic/article, is there a way to load the appropriate articles in the template without actually specifying a physical page name if soemone types that URL into their browser? I'd prefer to send people to www.mysite.com/topic/article instead of www.mysite.com/topic/article/template.php?id=39403848
I realize this may be more of an Apache issue than PHP, but, thought I'd see if anyone here has dealt with something similar.
Thanks!
Monty
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
>Articles for an online magazine will use one template and load content >dynamically from a MySQL database. Assets and images for each article will >be stored in their own folder: e.g., www.mysite.com/topic/article > >Even though a physical HTML page will not exist at >www.mysite.com/topic/article, is there a way to load the appropriate >articles in the template without actually specifying a physical page name if >soemone types that URL into their browser? I'd prefer to send people to >www.mysite.com/topic/article instead of >www.mysite.com/topic/article/template.php?id=39403848 > >I realize this may be more of an Apache issue than PHP, but, thought I'd see >if anyone here has dealt with something similar.
Well you still want the article ID number in the URL, right?...
mysite.com/topic/article/39403848
Then just use $PATH_INFO to snag your article ID and load up the content.
-- Like Music? http://l-i-e.com/artists.htm
attached mail follows:
A client wants a database-driven site that records information about real estate properties and includes geographic maps of property locations (throughout the US). The client has seen a presentation of a JavaScript-powered, Windows-only product that doesn't seem to fit well with my preference for PHP/MySQL. I've been Google-searching info on GIS and GPS and GMT, but thought it might be worthwhile to ask this discussion list for input.
Can anyone direct me to info on PHP presentation of geographic maps -- tied to a database with locating coordinates?
Thanks.
-- Lowell Allen
attached mail follows:
Are you really working with actual map coordinates that include longitude and latitude?
This seems to be a reverse approach to what I usually see. From what I've seen, you typically display a map of the united states. Click a state to zoom in. Have the state map divided into sections, click the section to zoom. And just continue having maps divided into sections that the user can click to zoom in closer and closer.
Using coordinates to accomplish this seems possible, but overly complex. You'll literally be creating a 3D world and that means you'll end up having to create coordinate systems for every single object in the world. For example, say you give coordinates and then have a 5 mile by 5 mile map display centering on these coordinates. Then each house falling within that geographic boundry gets displayed on the map. Obviously, it sounds very cool... but incredibly complex. It's just as easy to use the method I described above to zero in on the geographic area and list houses within that zone rather than draw pin-points on a map to show where the houses reside geographically. Especially when that geographic representation includes things like other houses, streams, schools, etc.
My $.10
-----Original Message-----
From: Lowell Allen [mailto:la
lowellallen.com]
Sent: Thursday, July 11, 2002 1:42 PM
To: PHP
Subject: [PHP] PHP and geographic maps
A client wants a database-driven site that records information about real estate properties and includes geographic maps of property locations (throughout the US). The client has seen a presentation of a JavaScript-powered, Windows-only product that doesn't seem to fit well with my preference for PHP/MySQL. I've been Google-searching info on GIS and GPS and GMT, but thought it might be worthwhile to ask this discussion list for input.
Can anyone direct me to info on PHP presentation of geographic maps -- tied to a database with locating coordinates?
Thanks.
-- Lowell Allen-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
> From: "Lazor, Ed" <ELazor
providence.org>
>
> Are you really working with actual map coordinates that include longitude
> and latitude?
>
That's what the client *WANTS*, yes. Currently, local sales agents visit
each property and take digital photos. They'd like to give them hand-held
GPS units so they can also record the location of each property. The sales
agents would then enter property information into an online database.
> This seems to be a reverse approach to what I usually see. From what I've > seen, you typically display a map of the united states. Click a state to > zoom in. Have the state map divided into sections, click the section to > zoom. And just continue having maps divided into sections that the user can > click to zoom in closer and closer. > > Using coordinates to accomplish this seems possible, but overly complex. > You'll literally be creating a 3D world and that means you'll end up having > to create coordinate systems for every single object in the world. For > example, say you give coordinates and then have a 5 mile by 5 mile map > display centering on these coordinates. Then each house falling within that > geographic boundry gets displayed on the map. Obviously, it sounds very > cool... but incredibly complex. It's just as easy to use the method I > described above to zero in on the geographic area and list houses within > that zone rather than draw pin-points on a map to show where the houses > reside geographically. Especially when that geographic representation > includes things like other houses, streams, schools, etc. > I agree it seems very complex, but it would just require referencing to the 2D world of map coordinates, wouldn't it? If the corners of each rectangular map view were referenced, couldn't any point be placed in relation to 3 of the corners?
> My $.10 > Thanks for the input. I certainly don't know if the client's desire is realistic, and I appreciate any guidance and suggestions.
>
> -----Original Message-----
> From: Lowell Allen [mailto:la
lowellallen.com]
> Sent: Thursday, July 11, 2002 1:42 PM
> To: PHP
> Subject: [PHP] PHP and geographic maps
>
>
> A client wants a database-driven site that records information about real
> estate properties and includes geographic maps of property locations
> (throughout the US). The client has seen a presentation of a
> JavaScript-powered, Windows-only product that doesn't seem to fit well with
> my preference for PHP/MySQL. I've been Google-searching info on GIS and GPS
> and GMT, but thought it might be worthwhile to ask this discussion list for
> input.
>
> Can anyone direct me to info on PHP presentation of geographic maps -- tied
> to a database with locating coordinates?
>
> Thanks.
>
> --
> Lowell Allen
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> ****************************************************************************
> This message is intended for the sole use of the individual and entity to
> whom it is addressed, and may contain information that is privileged,
> confidential and exempt from disclosure under applicable law. If you are
> not the intended addressee, nor authorized to receive for the intended
> addressee, you are hereby notified that you may not use, copy, disclose or
> distribute to anyone the message or any information contained in the
> message. If you have received this message in error, please immediately
> advise the sender by reply email and delete the message. Thank you very
> much.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
On 11 Jul 2002 at 16:42, Lowell Allen wrote:
> A client wants a database-driven site that records information about > real estate properties and includes geographic maps of property > locations (throughout the US). The client has seen a presentation of a > JavaScript-powered, Windows-only product that doesn't seem to fit well > with my preference for PHP/MySQL. I've been Google-searching info on > GIS and GPS and GMT, but thought it might be worthwhile to ask this > discussion list for input. > > Can anyone direct me to info on PHP presentation of geographic maps -- > tied to a database with locating coordinates?
Well heck, you've peaked my interest. I don't see how javascript makes any difference. The power of the app MUST be some server-side app otherwise it would work in any Browser (or please correct me in any way).
I'd like to hear more details about this. What kind of maps do they produce? I once worked with on a map site called pixxures.com and they had MANY servers that were SPECFICALLY designed to process requests and return images (ran on linux and solaris and might have worked on windows as the app itself was in java I believe). We only had to provide coordinates from the web form to these apps and they'd return a slice of an image.
Peter
attached mail follows:
Good question. Isn't GPS 3D? I'm guessing you're correct, but now I'm curious.
Assuming it's a 2D-based situation, it still seems easier to use the approach I described in the last e-mail and then somehow tie the GPS coordinates into that system rather than base everything on GPS. You'd end up with a translation of sorts. For example, X,Y coordinates translates to map T14. Display the map, assume the X,Y Coordinates are the boundries of the map, identify which properties are listed on that map and plot points for them...
You can either attempt a complex search for properties in the geographic zone every time the zone is displayed, or you can look up the map when you enter the initial information and store the value as part of the data set. That means your only searching for properties in the T14 zone.
This definitely seems possible from within PHP. It's just going to be A LOT of work. Pretty complicated too....
Sounds fun! hehe
-Ed
-----Original Message----- [It] would just require referencing to the 2D world of map coordinates, wouldn't it? **************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
Was written:
> > Using coordinates to accomplish this seems possible, but overly > > complex. You'll literally be creating a 3D world and that means
At pixxures.com the client just entered their ADDRESS. Then the backend (probably a bit too much for javascript) would return a sattelite view of that address. I believe they were using Russian data or something. But as I mentioned before, they had serverS that only took requests, cut out images, returned images. Oh heck, they are still in business, take a look:
But I can't wait for them to serve up any images as they are dreadfully slow.
Peter
attached mail follows:
Hey Lowell:
On Thu, Jul 11, 2002 at 04:42:04PM -0400, Lowell Allen wrote: > A client wants a database-driven site that records information about real > estate properties and includes geographic maps of property locations > (throughout the US).
[Also read your post saying they'll have GPS units]
So, have the brokers put the house information, including the Lat/Long into the database.
Now, find a map website that generates maps based on the lat/long (among other things) you type into the URI. For example, http://tiger.census.gov/cgi-bin/mapsurfer. Use the URI format as the basis for writing your PHP script's process that display's URI's.
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
attached mail follows:
Wow. That's pretty cool =) Do they allow map over-lays? For example, if you want to display a map displaying points for each house within the vicinity of the coordinates?
-----Original Message-----
From: Analysis & Solutions [mailto:danielc
analysisandsolutions.com]
Sent: Thursday, July 11, 2002 3:58 PM
To: PHP List
Subject: Re: [PHP] PHP and geographic maps
Hey Lowell:
On Thu, Jul 11, 2002 at 04:42:04PM -0400, Lowell Allen wrote: > A client wants a database-driven site that records information about real > estate properties and includes geographic maps of property locations > (throughout the US).
[Also read your post saying they'll have GPS units]
So, have the brokers put the house information, including the Lat/Long into the database.
Now, find a map website that generates maps based on the lat/long (among other things) you type into the URI. For example, http://tiger.census.gov/cgi-bin/mapsurfer. Use the URI format as the basis for writing your PHP script's process that display's URI's.
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
****************************************************************************
This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message. Thank you very
much.
attached mail follows:
On Thu, Jul 11, 2002 at 04:06:24PM -0700, Lazor, Ed wrote: > Wow. That's pretty cool =) Do they allow map over-lays? For example, if > you want to display a map displaying points for each house within the > vicinity of the coordinates?
I don't know. I have a feeling not, but hack away all you want and let us know.
--Dan
PS: Ed, you're a bright guy. Why not take the time to snip out the majority of my post that didn't directly have to do with your comment? As if top posting isn't bad enough. :)
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
attached mail follows:
I was just checking it out. That map is awesome! What's funny is that it even has an option to display the picture of a house at the coordinates you specify.
Thanks for the compliment *grin* I have no idea why I didn't. Probably just got lazy hehe My only excuse is that I think vacation mode has kicked in - even though it doesn't technically start until tomorrow evening.
Oh yea.... geesh, those silly top posters ;) hehe
-----Original Message----- I don't know. I have a feeling not, but hack away all you want and let us know.
--Dan
PS: Ed, you're a bright guy. Why not take the time to snip out the majority of my post that didn't directly have to do with your comment? As if top posting isn't bad enough. :) **************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
I'm currently working on a system that grabs an image from a map server and, using html layers, overlays where the products are.
Basically, this is how it's set up.
The map server is running on a WinNT system.
In the html code, I put am image tag that accesses the web server, passing the x,y coords (formatted as x meters from some origin) and zoom level (plus some other details). I then get the web server to access the map server (this is to shield the map server from the outside world) and basically do a fpassthru() on the data.
Meanwhile, the html doc has a layer placed over the map image. This layer contains another image with just the products on it. I get php to generate this second image on the fly by querying the database, filtering out all the products that lay outside the image's area, then I plot the points onto the image.
Because there's a lot of other things that are happening on the page (due to the client's requirements), when the user wants to zoom or pan the map, I use js to update the images.
Hope that helps anyone out there. Martin
-----Original Message-----
From: Lazor, Ed [mailto:ELazor
providence.org]
Sent: Friday, July 12, 2002 9:27 AM
To: 'Analysis & Solutions'; PHP List
Subject: RE: [PHP] PHP and geographic maps
I was just checking it out. That map is awesome! What's funny is that it even has an option to display the picture of a house at the coordinates you specify.
Thanks for the compliment *grin* I have no idea why I didn't. Probably just got lazy hehe My only excuse is that I think vacation mode has kicked in - even though it doesn't technically start until tomorrow evening.
Oh yea.... geesh, those silly top posters ;) hehe
-----Original Message----- I don't know. I have a feeling not, but hack away all you want and let us know.
--Dan
PS: Ed, you're a bright guy. Why not take the time to snip out the majority of my post that didn't directly have to do with your comment? As if top posting isn't bad enough. :) **************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
>A client wants a database-driven site that records information about real >estate properties and includes geographic maps of property locations >(throughout the US). The client has seen a presentation of a >JavaScript-powered, Windows-only product that doesn't seem to fit well with >my preference for PHP/MySQL. I've been Google-searching info on GIS and GPS >and GMT, but thought it might be worthwhile to ask this discussion list for >input. > >Can anyone direct me to info on PHP presentation of geographic maps -- tied >to a database with locating coordinates?
You mean something like this (incomplete) project:
http://chatmusic.com/maplocater.htm
The Red "dots" and the long/lat lines are not part of the static image: http://chatmusic.com/visual/maps/worldmap.jpg
They are coming from the database, and being added by GD.
Crude, but effective.
Yeah, if you give every Agent a GPS and record long/lat for each house, you can plop each of them into any map you have some minimal GPS info for. Specifically, you'll need to identify two (2) widely-separated landmarks on each map with known GPS co-ordinates. The Zip Codes are a good starting point, since the TIGRE data is freely available.
NOTE: End-user GPS units are "off" by like 30 meters (?) on purpose so Joe Blow can't tell the "enemy" how to find the White House and blow it up. Sigh. You're never gonna beat that error margin without a *LOT* of repeated readings over a long period of time and statistical analysis...
For this application, which is pretty much the same as yours only for music venues, I've found that a mix of GPS and hand-outlined borders of maps is the best solution.
I'm using the GPS to plop in the "dots", and have the left/right and horz/vert "scale" of each map in GPS co-ordinates terms.
But, when it comes time to "click" on the USA, that's just a raw set of points that I outlined using a web-interface, and an image map. I *CAN* convert any x/y in an image to any long/lat and vice-versa, of course.
But keeping all that junk in the database as 2-D mapping would only be needed if you're going to be providing driving directions and keeping all the highways and all that crap that MapQuest keeps (I assume). You almost for sure don't need all that.
Ya know what? I've pretty much written all the tricky parts of this thing...
You want to just license it or sub-contract me or something? I could save you a ton of time.
How many properties are we looking at? I've only got 1500 music venues in the database...
The one tricky part is getting public domain maps of the regions you want. We may need to commission a graphic artist or cartographer to synthesize the desired maps...
-- Like Music? http://l-i-e.com/artists.htm
attached mail follows:
In <Pine.LNX.4.21.0207120957190.1434-100000
localhost.localdomain>
Michael Hall wrote:
> Another PHP compilation question ... > > I've just compiled PHP 4.2.1 --with-mysql. I added no path to mysql, > --with-mysql=/somewhere/or/other/ > > 1. Is this always the case?
I though the documentation stated that all path variables need to be specified if it is outside your path. In any case I think even --with- mysql may be optional nowadays (Isn't mysql compiled in by default). It is most likely should be set to /usr (RPM'd binaries) or /usr/local ( MySQL compiled from tarball)
> 2. Where would the path be likely to be on RedHat 7.2 with MySQL rpms?
The easiest way to find this out is to check a RedHat phpinfo.php installation, you'd see that it is compiled as --with-mysql=shared,/usr. The "shared" part just meands that MySQL will be a dynamically loadable php extension instead of compiled in.
Hope this helps,
terry
attached mail follows:
Are you sure these newsgroup work? I tried subscribing to it and got a response saying newsgroup server could not be found. I didn't have that problem with PHP Newsgroup or mozilla.org Newsgroup.
--clip-- comp.os.linux.admin
comp.os.linux.misc
comp.os.linux.advocacy
comp.os.linux.network
comp.os.linux.alpha
comp.os.linux.networking
comp.os.linux.announce
comp.os.linux.portable
comp.os.linux.answers
comp.os.linux.powerpc
comp.os.linux.development.apps
comp.os.linux.development.system
comp.os.linux.questions
comp.os.linux.embedded
comp.os.linux.redhat
comp.os.linux.hardware
comp.os.linux.security
comp.os.linux.help
comp.os.linux.setup
comp.os.linux.m68k
comp.os.linux.x
--clip--
Groan! I hate MS-Outlook!!
Thanks,
FletchSOD
attached mail follows:
Which news service are you connecting to?
-----Original Message-----
From: Scott Fletcher [mailto:scott
abcoa.com]
Sent: Thursday, July 11, 2002 2:15 PM
To: php-general
lists.php.net
Subject: [PHP] Linux Newsgroup... ('continue');
Are you sure these newsgroup work? I tried subscribing to it and got a response saying newsgroup server could not be found. I didn't have that problem with PHP Newsgroup or mozilla.org Newsgroup.
--clip-- comp.os.linux.admin
comp.os.linux.misc
comp.os.linux.advocacy
comp.os.linux.network
comp.os.linux.alpha
comp.os.linux.networking
comp.os.linux.announce
comp.os.linux.portable
comp.os.linux.answers
comp.os.linux.powerpc
comp.os.linux.development.apps
comp.os.linux.development.system
comp.os.linux.questions
comp.os.linux.embedded
comp.os.linux.redhat
comp.os.linux.hardware
comp.os.linux.security
comp.os.linux.help
comp.os.linux.setup
comp.os.linux.m68k
comp.os.linux.x
--clip--
Groan! I hate MS-Outlook!!
Thanks,
FletchSOD
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
On Thu, 11 Jul 2002, Scott Fletcher wrote: > Are you sure these newsgroup work? I tried subscribing to it and got a > response saying newsgroup server could not be found. I didn't have that > problem with PHP Newsgroup or mozilla.org Newsgroup. > > --clip-- > comp.os.linux.admin > comp.os.linux.misc > comp.os.linux.advocacy > comp.os.linux.network > comp.os.linux.alpha > comp.os.linux.networking > comp.os.linux.announce > comp.os.linux.portable > comp.os.linux.answers > comp.os.linux.powerpc > comp.os.linux.development.apps > comp.os.linux.development.system > comp.os.linux.questions > comp.os.linux.embedded > comp.os.linux.redhat > comp.os.linux.hardware > comp.os.linux.security > comp.os.linux.help > comp.os.linux.setup > comp.os.linux.m68k > comp.os.linux.x
Yes, they all definitely work. Remember that different news servers carry different newsgroups. Your ISP should be running a news server that carries all of the above-listed groups, though, as they're in the main hierarchy. Just ask your ISP for the name of its news server.
Alternatively, you can read them all in groups.google.com, though they're about 12 hours behind.
miguel
attached mail follows:
List, Has anyone built Functions (or Stored Procedures) in PostgreSQL that can return a dataset? I would like to contain my login in PostgreSQL (like I did on M$-SQL) and call it from my PHP script (like I did with ASP).
Ex: $rs = pg_exec($db, "someprocname") while ($rec = pg_result_object($rs, $row)) { // Stuff }
Now "someprocname" should be on my PostgreSQL server and containts a SELECT statement whos results I want to send back to PHP for the $rs var. Has anyone got this working? I've tried all kinds of good stuff but can't get it to happen...
TIA /B
attached mail follows:
On Thu, Jul 11, 2002 at 11:40:09AM +0200, Benjamin Plaquevent wrote:
>
> preg_replace("/(http:\/\/.\S+(?<![\<\>]))/", "<a href=\"$1\"
> target='ext'>$1</a>", "http://test Is this what you're looking for?
preg_replace("/http:\/\/\S+(?=\<)/", '<a href="\\0"
target="ext">\\0</a>', "http://test --Dan
attached mail follows:
>Hi,
>
>I try to refer to the '<' character in a regex using preg_replace
>function:
>
>preg_replace("/(http:\/\/.\S+(?<![\<\>]))/", "<a href=\"$1\"
>target='ext'>$1</a>", "http://test PHP needs a \\ just to get a single \, and Regex needs a single \ in front
of the <.
Thus, you need \\< so that PHP hands \< to Regex and keeps Regex happy.
attached mail follows:
Hello,
I have followed all the directions on how to compile php and gd and all the
other stuff that needs to be complied for gd to work with php, but it will
not compile... it keeps failing to compile with the following errors :
gd.c: In function `zm_startup_gd':
gd.c:303: `gdArc' undeclared (first use in this function)
gd.c:303: (Each undeclared identifier is reported only once
gd.c:303: for each function it appears in.)
gd.c:304: `gdPie' undeclared (first use in this function)
gd.c:305: `gdChord' undeclared (first use in this function)
gd.c:306: `gdNoFill' undeclared (first use in this function)
gd.c:307: `gdEdged' undeclared (first use in this function)
gd.c: In function `zif_imagecreatetruecolor':
gd.c:588: warning: assignment makes pointer from integer without a cast
gd.c: In function `zif_imagecolorat':
gd.c:1626: structure has no member named `tpixels'
gmake[3]: *** [gd.lo] Error 1
can anyone give me a helping hand, with this?
the configure line that I have used is this:
./configure --with-vpopmail=/var/vpopmail/ --with-apxs=/usr/local/apache/bi
n/apxs --with-jpeg-dir=/usr/local --with-gd=/usr/local --with-png-dir=/usr/l
ocal --with-zlib-dir=shared --with-freetype-dir=/usr/local --enable-ftp
any help would be appreciated greatly,
Mike
attached mail follows:
oops, ok, I was being stupid... forgot to do a make install on gd 2 ;(
Mike
----- Original Message -----
From: "Mike" <funyon > Hello,
> I have followed all the directions on how to compile php and gd and all
the
> other stuff that needs to be complied for gd to work with php, but it will
> not compile... it keeps failing to compile with the following errors :
>
> gd.c: In function `zm_startup_gd':
> gd.c:303: `gdArc' undeclared (first use in this function)
> gd.c:303: (Each undeclared identifier is reported only once
> gd.c:303: for each function it appears in.)
> gd.c:304: `gdPie' undeclared (first use in this function)
> gd.c:305: `gdChord' undeclared (first use in this function)
> gd.c:306: `gdNoFill' undeclared (first use in this function)
> gd.c:307: `gdEdged' undeclared (first use in this function)
> gd.c: In function `zif_imagecreatetruecolor':
> gd.c:588: warning: assignment makes pointer from integer without a cast
> gd.c: In function `zif_imagecolorat':
> gd.c:1626: structure has no member named `tpixels'
> gmake[3]: *** [gd.lo] Error 1
>
> can anyone give me a helping hand, with this?
> the configure line that I have used is this:
>
./configure --with-vpopmail=/var/vpopmail/ --with-apxs=/usr/local/apache/bi
>
n/apxs --with-jpeg-dir=/usr/local --with-gd=/usr/local --with-png-dir=/usr/l
> ocal --with-zlib-dir=shared --with-freetype-dir=/usr/local --enable-ftp
>
> any help would be appreciated greatly,
> Mike
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
On Thu, 11 Jul 2002 17:19:07 +0100
"Danny Shepherd" <danny > You need to compile with GD2 if you want to use any of the 2.* functions in
> PHP - phpinfo will say 'GD 2.0 or higher'
I tried --with-gd2 but then I get no gd at all?
the included gd version is 2.0.1 but does not
seem to build from it.
Kevin
attached mail follows:
You need to use --with-gd=php to use the built-in gd library.
"Kevin Waterson" <kevin attached mail follows:
On Thu, 11 Jul 2002 15:32:30 -0700
"Ricky Dhatt" <ricky > You need to use --with-gd=php to use the built-in gd library.
yep, that got over that hurdle, I used the config line
./configure --with-apxs=/usr/sbin/apxs --with-mysql=/usr --with-ttf=/usr --enable-track-vars --enable-ftp --enable-imap --enable-ssl --enable-versioning --enable-trans-sid --enable-sysvsem --with-config-file-path=/etc --with-jpeg-dir=/usr --with-zlib-dir=/usr --with-gd=php
and I get an error...
In function `php_imagettftext_common':
/php/dev/php-4.3.0/ext/gd/gd.c:2734: undefined reference to `gdttf'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
what am I missing now?
Kevin
attached mail follows:
>trying to get the built in gd to work without luck
>I am using redhat and it has gd 1.8.4(or something)
>but the newer compiled version does not seem to install.
>
>I check with phpinfo and it just says 1.6.2 or higher
>but none of the 2.* functions work so I assume the
>new gd did not install. my config line looks like this..
>./configure --with-apxs=/usr/sbin/apxs --with-mysql=/usr --with-ttf=/usr
>--enable-track-vars --enable-ftp --enable-imap --enable-ssl
>--enable-versioning --enable-trans-sid --enable-sysvsem
>--with-config-file-path=/etc --with-gd
Or --with-gd=/full/path/to/gd/but/not/include/just/gd
if you want the one you've installed.
And, if you don't throw in --with-jpeg and --with-png and so on, then your
GD won't do much, unless those are on by default, and ./configure can find
them correctly.
attached mail follows:
Has anyone done LDAP auth with PHP on an Exchange 5 server? I need help
finding the values to authenticate with...
B i g D o g
attached mail follows:
Just a short announcement for those that have been requesting a port of
KISGB to PHPNuke. I have a beta up and running at
http://gaylenandmargie.com/nuke/html (A work in progress). Thanks!
attached mail follows:
Hi,
is it possible to benchmark a site/page which uses authentication via PHP
sessions?. If so, could you please tell me some hints to do it?.
Thank you.
Rodolfo.
attached mail follows:
> is it possible to benchmark a site/page which uses authentication via
PHP
> sessions?. If so, could you please tell me some hints to do it?.
Why does it matter if the page is authenticated? Get the time at the
beginning, the time at the end of the page, subtract smaller from
larger, and you've got how long it took the page to be created.... I
think PEAR has a module that provides a nice interface for doing this
and I'm sure there are others.
---John Holmes...
attached mail follows:
ðÒÉ×ÅÔ!
> Richard Lynch wrote:
>>
>> You can't upgrade somebody's stupid IE browser to Mozilla just by sending
>> them a new User-Agent header, no matter how attractive a solution it
>> might seem :-)
LOL sounds like having a supermodel pic sticked on the face of any girl
you don't like :) Or boy, for what it matters :) Just make sure your
glue holds properly :) Reality is not *that* virtual, yet...
ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is.......
attached mail follows:
Chris Knipe wrote:
> On Thu, Jul 11, 2002 at 02:29:11PM +0200, vins wrote:
> Allot of SMTP servers does quite a bit of sanity checking on the headers
> received from an email message.
Not in the west. They are too busy allowing in the commercial spam they
are sending themselves. Otherwise you'd never be reading mail from a
server called Lena.tut, as you are right now. And thank god they are
not, since our ISP as a *lousy* SMTP service and I have to resort to
this to make sure I can keep on working.
What I do not understand is why you would need to build anything to bomb
the guy. Just make sure you get an ISP that cannot track the phisical
call (here many are still on protostoric pulse stations, you can find
that somewhere at your place too, pretty sure).
Then invent yourself a server name and run straight from sendmail, over.
All you need is a temporary account from a dial-up. You are not
robbing a bank, so nobody will look for you (your abuse.somewhere.co.za
will say they never knew anybody, just like they said from norway and
they will keep on drinking their beers).
Personally I would not be cruel to anyone that has been already that
mistreated by Mother Nature. Let him live with himself, it's the worst
you can do to him. We got rid of Erik, but he never will :) *that* makes
me happy.
ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is.......
attached mail follows:
>Hi... I've just checked out a script from hotscripts.com that send email
>from and smtp server...
>
>I've managed to say the email has come from a server that doesn't exist
>but the email can still be traced...
>
>is there know way to build a php smtp server ?
If you want to build an SMTP server using PHP, go ahead.
However, at some point, your SMTP server has to send the email to another
SMTP server if you want it to go somewhere.
That SMTP server will record where the email came "From" in the email
headers.
Best you could do would be to forge a bunch of headers "before" those, and
then choose randomly from the open relays so that nobody can figure out
which is the common mail server doing the forgery.
Even then, it's only a matter of time before a determined sysadmin could
find you and hunt you down.
attached mail follows:
ðÒÉ×ÅÔ!
Martin Clifford wrote:
> I usually always have my content dynamically generated by functions,
>or displayed in include files. I'm not a fan of cluttering up my
apps with content.
me neither. You can mix up code and content only as long as you work
alone. But in most project (even very small ones) design resources and
coding resources are not the same person, as design is largely a matter
of customer taste, while proper coding is not.
Sometimes you have two people that are *far* from each other. Sometimes
they do not even have a common language. So the less they need to
interact, the better.
Besides, if the two things are well separeted you can port an
application from one design to another with little effort. Sort of
changing "skin" to a site. But you are attempting suicide when you do
that on a site that mixes the two components.
ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is.......
attached mail follows:
ðÒÉ×ÅÔ!
> The stuff about using time/directory is an IE bug.
> You can supply *BOTH* time and directory, but not just time.
> This is not the way the Cookie spec reads, but Microsoft never reads specs
> properly, much less implements them properly, mostly on purpose.
Not sure I am saying the truth but I'd say Mozilla 1.1 alpha does the
same. I stepped thru it while I was (am) in a hurry, so I just sent the
headers in instead and everything worked out. But setcookie()
appearantly did not.
Maybe someone else did investigate a bit more. Maybe it was my code
being broken. It's just a suspect.
ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is.......
attached mail follows:
On Wed, 10 Jul 2002, Phillip S. Baker wrote:
> Okay here is what I want to do.
>
> Select the field of a database that I want.
> Hit submit.
> Execute a query of a database based on the said form.
> Gather all the data and rows and plug them into an excel generated file.
> Display a dialogue box asking the user the save the file.
> The saved file being an excel file with data generated from a database.
>
> Make sense?
>
> Would the header calls be something like this?
> header("Content-type: application/xls");
> header("Content-Disposition: attachment; filename=downloaded.xls");
>
> Now if that is cool, how would I get the data into the downloaded.xls file
> to have this work?
echo "Cell A1\tCellB1\tCellC1\n";
echo "Cell A2\tCellB2\tCellC2\n";
miguel
attached mail follows:
The 'date' command-line utility reads the time zone from environment
variable 'TZ'. It then adjusts the system time before displaying it.
So your server is probably set to GMT, and your login environment
specifies EDT, which is 4 hours earlier. PHP is defaulting to GMT. Look
into putenv().
miguel
On Wed, 10 Jul 2002, Brian V Bonini wrote:
> Hmmm, wierd!! The server is physically in PDT I am in EDT but I have the
> servers time zone set to EDT and as I said "date" verifies the correct time
> but yet the script returns a time that is 4 hours ahead. Wierd.... :(
>
> > -----Original Message-----
> > From: Rasmus Lerdorf [mailto:rasmus attached mail follows:
Yes, that did the trick... Thanks!!!
> -----Original Message-----
> From: Miguel Cruz [mailto:mnc attached mail follows:
I am. I assumed the built-in mail function used "sendmail_path" as defined
in php.ini; is this an incorrect assumption?
"Chris Earle" <chris attached mail follows:
On Thu, 11 Jul 2002, Richard Lynch wrote:
> I honestly have no idea how to forge an email routing path, just know it can
> be done, and is not rocket-science. But you're going to have to dig into
> the guts of sendmail or equivalent at a minimum, or search out "send spam to
> 1,000,000 people!!!" software to do it...
>
> I don't *think* you can even do it with just PHP's fsockopen to the
> much-hated Open Relays of the world... Or, at least, they'd be tracked back
> to that Open Relay anyway... That might be sufficient for your purposes,
> whatever they are. I suggest, however, that you re-examine your purpose,
> and decide if it's really worthy of your time and talent.
For what it's worth, the only way to create a convincing fake routing
history in a message's headers is to find an open relay that doesn't
properly stamp mail it receives.
There are a very few SMTP servers which will receive and forward a piece
of mail without adding a "Received:" line that says where they got it
from. Thankfully these machines are almost all gone since they have been
brutally punished by spammers pumping messages through them.
They're also listed on blacklists, so many people (myself included)
wouldn't see messages that came through them.
miguel
attached mail follows:
I'm trying to preg_split() text between "<page>". I used the following but
can't get the regular expression to work:
$content = "blah blah <page> blah blah blah";
$paged = preg_split( "[[:cntrl:]*]<page>[[:cntrl:]*]", $content );
I also tried the following...
$content = "blah blah <page> blah blah blah";
$paged = preg_split( "[:cntrl:]<page>[:cntrl:]", $content );
...and...
$content = "blah blah <page> blah blah blah";
$paged = preg_split( "[[:cntrl:]]<page>[[:cntrl:]]", $content );
But none of these work. Can someone tell me what's wrong? I just want to
split the text on "<page>" and include any line feeds that may have been put
in before or after the "<page>" text.
Thanks.
attached mail follows:
On Thu, Jul 11, 2002 at 06:41:28PM -0400, Monty wrote:
> I'm trying to preg_split() text between "<page>". I used the following but
> can't get the regular expression to work:
>
> $content = "blah blah <page> blah blah blah";
> $paged = preg_split( "[[:cntrl:]*]<page>[[:cntrl:]*]", $content );
The * needs to be after the character class, ie [[:cntrl:]]*.
--Dan
attached mail follows:
> The * needs to be after the character class, ie [[:cntrl:]]*.
>
> --Dan
Thanks Dan. But, removing the asterisk or putting it after the character
class doesn't work either for some reason.
attached mail follows:
On Thu, Jul 11, 2002 at 07:33:59PM -0400, Monty wrote:
>
> Thanks Dan. But, removing the asterisk or putting it after the character
> class doesn't work either for some reason.
Have you tried [[:space:]]* instead? That'll pull in line breaks, tabs
and spaces.
--Dan
attached mail follows:
> Have you tried [[:space:]]* instead? That'll pull in line breaks, tabs
> and spaces.
>
> --Dan
I just tried it, but, still can't make this work. Also, I'm getting
different results between explode() and preg_split(), is that normal? Here's
what I'm trying:
$content = "blah blah page_break blah blah blah blah";
$contentpage = preg_split("[[:space:]]*page_break[[:space:]]*", $content);
But I just get a PHP error: Warning: Unknown modifier '*' in testme.php
If I try this:
$content = "blah blah page_break blah blah blah blah";
$contentpage = preg_split("[[:space:]]page_break[[:space:]]", $content);
I get this PHP error: Warning: Unknown modifier 'p' in testme.php
I'm not sure what I'm doing wrong with the reg exp, but, it won't even
parse. Both expressions above used with explode() only produce empty array
variables, as though it's stripping out everything.
What am I doing wrong?
Monty
attached mail follows:
On Thu, Jul 11, 2002 at 11:24:34PM -0400, Monty wrote:
> $contentpage = preg_split("[[:space:]]*page_break[[:space:]]*", $content);
DOH! It's preg!!! [[:space:]] is for ereg. Use \s. I don't know why I
didn't notice sooner. Do this:
'/\s*page_break\s*/'
--Dan
attached mail follows:
Yes! That was it! Thank you so much. I actually thought preg and ereg were
interchangeable, so, I'm glad you pointed out the difference for reg
expressions. Can you tell me what the open and closing slashes / are for
inside the quotes? Is it equivalent to [ and ] for ereg?
Monty
> DOH! It's preg!!! [[:space:]] is for ereg. Use \s. I don't know why I
> didn't notice sooner. Do this:
>
> '/\s*page_break\s*/'
>
> --Dan
attached mail follows:
On Fri, Jul 12, 2002 at 12:08:36AM -0400, Monty wrote:
> expressions. Can you tell me what the open and closing slashes / are for
> inside the quotes? Is it equivalent to [ and ] for ereg?
They are "delimiters." Other characters can be used, but / is the
standard.
--Dan
attached mail follows:
I have a small problem,
I can make the cgi version of php fine, it runs and installs perfectly, but
when I try to make the apache module (i.e. --with-apxs=/path/to/apxs) php
crashes apache. can anyone give me any insight on this?
Thanks,
Mike
attached mail follows:
Greetings, this may be simple, but it's late and my brain needs a hand.
I have a string such as "first,second,third,fourth"
I need a way to take each one of the items separated by the comma to be an item in an array.
I tried ereg() but to no avail. Is there a simpler way to do it?
Thanks gang!
Chaka Loves You!
attached mail follows:
take a look at explode() and split().
On Thu, 11 Jul 2002, Shane wrote:
> Greetings, this may be simple, but it's late and my brain needs a hand.
>
> I have a string such as "first,second,third,fourth"
>
> I need a way to take each one of the items separated by the comma to be an item in an array.
>
> I tried ereg() but to no avail. Is there a simpler way to do it?
> Thanks gang!
>
> Chaka Loves You!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
> Greetings, this may be simple, but it's late and my brain
> needs a hand.
>
> I have a string such as "first,second,third,fourth"
>
> I need a way to take each one of the items separated by the
> comma to be an item in an array.
Check out explode() and I think you'll find what you need.
CYA, Dave
attached mail follows:
howdy...
any one come accross this before...
down loaded apache 2.0.39 when I tried to install it as a service on win2k with php included in the httpd conf file as a module it was saying...
C:\PHPDEV\APACHE\APACHE2\BIN>apache -k install
APACHE: module "c:\php4build\snap\sapi\apache2filter\sapi_apache2.c" is not comp
atible with this version of Apache.
Please contact the vendor for the correct version.
but when tried to install php as CGI had no problems wot so ever...
now i'd prefer it as a module.. and have searched around thru php.ini httpd.conf and the like to find where it was referencing "c:\php4build\snap\sapi\apache2filter\sapi_apache2.c" but no luck... can't see it any where.. tried a search on google for module installation problems on this .. but no luck...
any idea's as to why?
Cheers
Peter
"the only dumb question is the one that wasn't asked"
attached mail follows:
PHP 4.2.1 does not support Apache 2.0.39. You'll need to download a more
recent snapshot, and you will actually also need Apache 2.0.40-dev to get
it to work.
As you can tell, this stuff is very much in flux and is nowhere near
production-quality.
-Rasmus
On Fri, 12 Jul 2002, Peter wrote:
> howdy...
>
> any one come accross this before...
>
> down loaded apache 2.0.39 when I tried to install it as a service on win2k with php included in the httpd conf file as a module it was saying...
>
> C:\PHPDEV\APACHE\APACHE2\BIN>apache -k install
> APACHE: module "c:\php4build\snap\sapi\apache2filter\sapi_apache2.c" is not comp
> atible with this version of Apache.
> Please contact the vendor for the correct version.
>
> but when tried to install php as CGI had no problems wot so ever...
>
> now i'd prefer it as a module.. and have searched around thru php.ini httpd.conf and the like to find where it was referencing "c:\php4build\snap\sapi\apache2filter\sapi_apache2.c" but no luck... can't see it any where.. tried a search on google for module installation problems on this .. but no luck...
>
> any idea's as to why?
>
>
> Cheers
>
> Peter
> "the only dumb question is the one that wasn't asked"
>
>
attached mail follows:
In article <20020711034110.14263.qmail Have you considered the possibility that, in this case, the book might
have a misprint? Your definitive source should always be the latest php
documentation.
> I remember when FORTRAN was being developed we were assurred that all previous
> commands from older versions would continue operative in the new. FORTRAN 77
> to FORTRAN 90. I think the developers of PHP ought to consider why the
> developers of FORTRAN thought that might be a good thing to do. It is still
> used to this day. Write a FORTRAN 77 prog and it will compile and run on a
> FORTRAN 90 compiler out of the box. Thanks again.
Quod subigo farinam
attached mail follows:
I have some clients who want to charge a flat rate for words entered, but over a certain number of
words there is an additional charge, to complicate matters there is an option/addon where you can
bold the lines, and there is a charge per line, so you have to calculate the total number of lines
based on character total.
Anyone know of way to accomplish this, I know that it will have to be done in seperate ways. but
does anyone have an idea or two .. hlp
thanks,
dan
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
attached mail follows:
if i remember correctly there was something on word counts posted in the last week or or .. maybe even last couple days... have a scroll thru and u will find it :)
> -----Original Message-----
> From: Dan McCullough [mailto:McWC attached mail follows:
You can use explode() to split the text up into words, and then count
them up. You can use strlen() or substr() or something to see how many
"lines" there are...whatever you define a line as. Look up other useful
functions at http://www.php.net/manual/en/ref.strings.php.
I really think you'd be best off with a human deciding these things,
though, maybe with a little PHP help. If you make it all automated,
what's stopping me from posting
1997_White_Chevy_S10_Loaded_Power_Everything_$2000_Call_555-1212_for_inf
o and only being charged 1 cent for it??
---John Holmes...
> -----Original Message-----
> From: Dan McCullough [mailto:McWC attached mail follows:
Dan, if you are entering the words in a form, when the variable holding the string hits your script do something like this.... (Hey I just figured this out myself too!!!!
Gotta love these lists!!!!!!!!
$tmpStr= whatever the form passes your script
// turn string into an array
// use EXPLODE() to seperate the words into an array
// since they are seperated by a " " (blank space)
$tmpAry = explode(' ',$tmpStr);
// if they were seperated by commas you would write
$tmpAry = explode(',',$tmpStr); // DIG????
// then just use count($tmpAry) to figure out the size of your array
// and you have the number of words!
There might be an easier way than that, but it workes for me.
-Peace dude!!!!!!!!
PS: Thank Andrew Braund for the solution, he sent a varriant of it to me!!!!!!!!!!!!
That's two people you helpes Andrew!
YOU RULE!!!!!!!!!!!!!!!
- NorthBayShane
-----Original Message-----
From: Peter [mailto:php if i remember correctly there was something on word counts posted in the last week or or .. maybe even last couple days... have a scroll thru and u will find it :)
> -----Original Message-----
> From: Dan McCullough [mailto:McWC attached mail follows:
DOes anyone know how to build a reminder application on:
a) identified users
b) Sorting users' reminders??
attached mail follows:
> DOes anyone know how to build a reminder application on:
>
> a) identified users
> b) Sorting users' reminders??
Yes.
---John Holmes...
http://homepages.tesco.net/~J.deBoynePollard/FGA/questions-with-yes-or-n
o-answers.html
attached mail follows:
On Thu, Jul 11, 2002 at 10:05:05PM -0400, John Holmes wrote:
> > DOes anyone know how to build a reminder application on:
> >
> > a) identified users
> > b) Sorting users' reminders??
>
> Yes.
You just couldn't resist, could you? ;)
I like it -g-
To be a bit more precise, the awnser's actually No. You can't build a
application on (in?) either (a) or (b) as indicated above. However, a
application could be written in various languages to accomplish both (a) and
(b) without much hassles. ;))
attached mail follows:
>> The "alternate syntax" with the colons is passe -- I think
>> you'd have to dig
>> pretty deep to find a script old enough that uses it for
>> anything other than
>> demonstration purposes. (Rasmus?)
>
>What utter tosh! *All* my scripts use the "alternative" syntax, as I think
>braces are an eyesore and an abomination, and cause more problems than they
>solve.
I apologize profusely to the fans of the "alternative syntax" who are still
using it.
I personally find the endxxx; to be more of an eyesore, but that's a
religious argument. :-)
>I've pretty much lost count of the number of times I've seen code written
>like this:
>
> if (x) {
> while (y) {
> ...
> } // end while
> ...
> } // end if
Never in my code.
If you can't tell from the logic structure of the code what } matches what
{, you're in trouble from the get-go. :-)
>Another advantage to the alternative syntax is that it can improve error
>reporting (slightly). Consider the following:
>PHP will tell you you have a syntax error on the very last line of your
>file, and you have no option but to go back and laboriously hand match all
>of your braces -- and with each ellipsis representing maybe tens (or even
>hundreds!)
Don't be ridiculous. Any decent editor will tell you where the missing { or
} is. No need to search for it by hand.
Not to mention that if you've indented properly, it's trivial to find it,
even in something as ill-suitable for Programming as NotePad.
>Now PHP will throw an error at the endwhile, because it knows there's an
>endfor missing -- and you've already cut out a large chunk of your code to
>check; better yet, as you're checking you can see at a glance what each
>"end" should be matching. And every "end" has to be there, too -- no
>cursing yourself for that lazy day when you left out a few comments on some
>"unimportant" closing braces!
None of my closing braces have comments. I never have a problem with
"missing" ones.
YMMV.
attached mail follows:
>> I don't know how to extract informations about upload progress status and
>how
>> to show informations to users. For example I want the users can see 30% of
>> upload completed, or the MByte just uploaded.
>
>It's impossible.
>
>PHP script starts when file is 100% uploaded on the server.
It's impossible in PHP...
You *COULD* do some JavaScript or even a Java application which uploaded the
file, maybe, and monitored the progress, maybe...
But it would hardly be worth the effort.
And it really doesn't belong on this list at that point.
attached mail follows:
Not possible with HTTP, as far as I know. The file is simply sent,
there's no communication back and forth.
---John Holmes...
> -----Original Message-----
> From: S. [mailto:php attached mail follows:
>Is there an easy way to get an array of characters from a string?
For virtually anything you need to do with it, a string *IS* an array of
characters...
$foo = 'test;
echo $foo[2];
for ($i = 0; $i < strlen($foo); $i++{
echo "$i $foo[$i]<BR>\n";
}
attached mail follows:
>> Warning: bzopen(): Unable to open file in
>> e:\apache\splatted.net\download_basket.php on line 53
Use full path for every filename.
Use ls -als to figure the permissions on each file.
If the "World" user (last of the three) can't do the thing to the file
(read/write/execute) that you want PHP to do, then PHP can't do it.
attached mail follows:
>I compiled with the --enable-magic-quotes option, then figured this was a
>bad move as I've been caught out before with scripts that assume it is
>on. So, I copied the php.ini-recommended file to php.ini, and now
>phpinfo() tells me that magic_quotes_gpc and magic_quotes_runtime are off.
>
>So, does compiling with --enable-magic-quotes have any effects if magic
>quotes are turned off in php.ini? Are they "really" off?
Yes, they are really off.
>Can all "--enable-whatever" options be turned on/off in php.ini,
>regardless of ./configure options?
I think the ones that hard-code compile in, say, MySQL aren't gonna get
turned "Off" in php.ini, although you *COULD* disable every known mysql_xxx
function...
>Does the "-with-config-file-path" option set the expected path to php.ini
>(I always thought it was to Apache)? How come PHP still works whether the
>file is there or not?
If you have no php.ini where PHP expects it, PHP uses the default values
that would have been there if you had copied the file there (unedited) in
the first place.
attached mail follows:
>Hi
>
>Can anyone in the group help, I'm trying to read and write from a serial
>port using php.
>
>So far using fsockopen I've managed to open and send data through a serial
>port but I'm having real problems reading a response. I've tried fgets
>really to no success can anyone spare me some ideas or thoughts?
>
>Setup:
>
>Linux box running serproxy ( A tcp to serial port proxy ) IP 192.168.123.192
>
>I connect to this from a webserver running on another machine with:
><?php
>$fp = fsockopen ("192.168.123.192", 5331, $errno, $errstr, 30);
>if (!$fp) {
> echo "$errstr ($errno)<br>\n";
>} else {
> if(fputs ($fp, "test data".chr(37))){
> echo 'data sent';
> } else {
> echo 'no data sent';
> }
> while (!feof($fp)) {
> echo fgets ($fp,128);
> }
> fclose ($fp);
>}
>?>
>
>The output is being read by a small ap that displays the serial port data
>and allows me to send a response, I've logged the response I send at the
>linux box on the serial port and serproxy is supposed to translate this back
>to tcp port 5331 however I cannot read it with fgets?
>
>Please help it's driving me mad and I'm sure I'm just being stupid : {
How sure are you the other app is sending something out?...
attached mail follows:
Thanks everyone that helped with this, I finally got it working - Ed's
version was the one I tweaked and got to work. It was pretty close to
working as-is, but needed an incrementing variable in the if(isset($Row))
statement to be used in the print $Row[] line. Here's the final working
code, if anyone else out there wants a vertically-displaying table:
$cols = 5;
$num_rows = mysql_num_rows($result);
$rows_col = ceil($num_rows / $cols);
print "<table><tr>";
for ($i = 0; $i < $cols; $i++) {
print "<td>";
for ($j = 0; $j < $rows_col; $j++) {
if (isset($array)) {
$a++;
print $array[$a] . "<br>";
}
}
}
print "</td></tr></table>";
-----Original Message-----
From: Lazor, Ed [mailto:ELazor Well.... then...
$TotalCol = 5;
$NumRows = mysql_num_rows($Results);
$RowsPerCol = ceil($NumRows / $TotalCol);
print "<table><tr>";
for ($i = 0; $i < $TotalCol; $i++)
{
print "<td>";
for ($j = 0; $j < $RowsPerCol; $j++)
{
$Row = mysql_fetch_array($Results);
if (isset($Row))
print $Row[0] . "<br>";
}
print "</td>";
}
print "</td></table>";
-----Original Message-----
From: Jason Soza [mailto:solja Well, wouldn't that print a table with one row containing the results?
Again, what I'm looking for is a vertically laid-out table. So instead
of:
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
I want:
1 6 11
2 7 12
3 8 13
4 9 14
5 10 15
To give you an idea of why I want this, check out www.jdhsgrads.com -
this is the site I'm currently working on. When you see the list of
graduation years, your eye (well, at least mine) wants to follow the
dates top to bottom, left to right. As it is now, you have to work to
see the progression and find out where you want to go to locate a
specific date.
I'm hoping the code I posted will create something like:
<table>
<tr>
<td>
<table>
<tr><td>1941</td></tr>
<tr><td>1942</td></tr>
<tr><td>1943</td></tr>
</table>
</td>
<td>
<table>
...
Make sense?
Jason Soza
----- Original Message -----
From: "Lazor, Ed" <ELazor > Will this work for you?
>
> $numFields = mysql_num_fields($Results);
>
> print "<table>";
> while ($Row = mysql_fetch_array($Results))
> {
> print "<tr>";
> for ($i = 0; $ < $numFields; $i++)
> print "<td>".$Row[$i]."</td>";
> print "</tr>";
> }
> print "</table>";
>
>
>
> -----Original Message-----
> I was wondering if the following might work:
>
> $cells = 10; //set desired number of cells per column
> $numRows = mysql_num_rows($result); //determine number of rows
> $numCols = ceil($numRows/$cells); //determine number of columns needed
>
> print "<center><table width=\"100%\" border=\"0\"
> cellpadding=\"0\"
> cellspacing=\"0\">\n"; //start main table
>
> for($i=0; $i<$numCols; $i++) {
>
> echo "<tr><td align=\"center\">\n"; //setup main row/cell
>
> echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0
> \">\n"; //setup secondary table
>
> while($dataArray = mysql_fetch_array($result)) { //print
> results of SQL in secondary table
> extract($dataArray);
> $n++;
>
> printf("<tr>\n<td align=\"center\"
> valign=\"center\">href=\"year.asp?year=%\">%s</td>\n</tr>",
$grad_year, $grad_year);
>
> if ($n==$cols) {
> echo "</table>"\n; //close secondary table at
> 10 cells
> }
>
> echo "</td></tr>\n"; //close main row/cell
>
> }
>
> echo "</table>\n"; //close main table
****************************************************************************
This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message. Thank you very
much.
attached mail follows:
Lo all,
Does anyone have some examples, ideas, or references on how to setup php's
safe_mode operation so that I can provide a reasonably secure environment for
hosting php3 and php4 (public web sites, with public users).
This is for a public type hosting environment, so I'll definately need to
protect the servers from malicious code (such as exec(rm... ), and everything
else that goes with it...
Any pointers or web sites that may be of help will be appreciated
tremendiously.
attached mail follows:
Hi y'all
Has anyone found any problems with the xml parsing functions when the xml
document gets quite large. eg, a doc with about 5000 lines (about 200KB)
The problem that's occurring is that some of the elements are being broken
in two parts
If you require more details, please ask, as it's one of my colleagues that
is having this problem and I'll need her to pass on an example if needed.
Martin
attached mail follows:
I'd say there's an easier way than switches...
<?
if(!empty($_GET['page_id'] && is_int($_GET['page_id']))
{
$page_id = $_GET['page_id'];
}
else
{
// default if no id was passed, or it wasn't an integer
$page_id = "1";
}
$file = "inc/page_" . $page_id . ".inc"; // eg page_18.inc
if(file_exists($file))
{
include($file);
}
else
{
include('inc/page_missing.inc');
}
?>
The difference being that there's no extra code (case statements) for 1000
different page_id's, or just 5 page_id's, and I've included pretty much all
the fallbacks for missing page_id, missing include files, etc etc.
You just need a /inc/ dir full of page_n.inc files.
Good luck!
Justin French
on 12/07/02 12:43 AM, Martin Clifford (MLC1 > The easiest way to accomplish that is by using switches. Here is an example:
>
> switch($pageid) {
> default:
> include("default_page.inc");
> break;
> case "18":
> include("page_18.inc");
> break;
> }
>
> With that in your index.php page, it will look for the variable $pageid, and
> depending on what it is set to, display the appropriate information. In this
> instance, it will display the default index page by default (if $pageid is
> empty), or page_18.inc if $pageid = 18.
>
> Hope that helps :o)
>
>>>> "Craig" <craig attached mail follows:
Hi all.
I know for sure that this question has been asked and answered before,
but I haven’t read anything about it in the 6918 mails I got from this
list yet (or missed it ;). I have been wondering for a couple of days
now on how to make a mailing list (like this list) with PHP. Before
writing this, I went to hotscripts and evilwalrus but didn’t find
anything. I think it should be easy for me if I could gain physical
access to my server, but that’s not the case. I don’t wanna use other
language because I am trying to get around PHP at it most so any idea
very much appreciated.
Thanks,
Cesar Aracena <mailto:webmaster attached mail follows:
The only way I've ever done it was on a Unix box:
- filter the email
- if it's a certain address, subject, or whatever, pipe it to a php script
(command line executable, rather than http)
- use this PHP script to manipulate the headers and body of the email, and
re-send it to the subscribers, or act on commands like subscribe,
unsubscribe, etc.
it's pretty complex stuff (or at the very least, a lot of work!!), and
obviously will require some non-typical allowances on the server, like the
ability to access scripts from the command line, email filtering, and
possibly even some special allowances on the server for bulk mail sending
(ie, some shared hosts restrict to batches of 100, etc).
if you're on a shared host, I doubt you'll be able to do this, but they may
be interested in installing a simular application onto the server for you
(and others to use)... there are heaps of them out there (ezmlm the obvious
one), and they might even have such a beast already installed.
Good luck!
Justin French
on 12/07/02 3:33 PM, César Aracena (icaam > Hi all.
>
> I know for sure that this question has been asked and answered before,
> but I haven’t read anything about it in the 6918 mails I got from this
> list yet (or missed it ;). I have been wondering for a couple of days
> now on how to make a mailing list (like this list) with PHP. Before
> writing this, I went to hotscripts and evilwalrus but didn’t find
> anything. I think it should be easy for me if I could gain physical
> access to my server, but that’s not the case. I don’t wanna use other
> language because I am trying to get around PHP at it most so any idea
> very much appreciated.
>
> Thanks,
>
> Cesar Aracena <mailto:webmaster attached mail follows:
I was hoping NOT to receive this kind of answers, but guess it's
logical. On the other hand, when reading your answer Justin, it came to
my mind (and that's luck) that HTML (Web) e-mail readers made in PHP
does manage the incoming e-mails with no server-side assistance... Is it
logical to think that a PHP script of this sort, joined by an 1 second
auto-reload would do the trick?
I mean, detect new e-mail, authenticate the sender in a DB, decide what
to do (suscribe, unsubscribe or send to list), and take action... Am I
talking crazy or what?
Obviously I'm thinking about a small-to-medium size mailing list.
Thanks, C.
> -----Original Message-----
> From: Justin French [mailto:justin attached mail follows:
We use qmail/ezmlm to run this list. High-traffic lists like this require
software written specifically to solve this problem. You would not write
such a mailing list system in PHP. It would make no sense. The parts you
might write in PHP would be web interfaces to allow your user to
subscribe, unsubscribe, browse archives, etc.
-Rasmus
On Fri, 12 Jul 2002, [iso-8859-1] César Aracena wrote:
> Hi all.
>
> I know for sure that this question has been asked and answered before,
> but I haven’t read anything about it in the 6918 mails I got from this
> list yet (or missed it ;). I have been wondering for a couple of days
> now on how to make a mailing list (like this list) with PHP. Before
> writing this, I went to hotscripts and evilwalrus but didn’t find
> anything. I think it should be easy for me if I could gain physical
> access to my server, but that’s not the case. I don’t wanna use other
> language because I am trying to get around PHP at it most so any idea
> very much appreciated.
>
> Thanks,
>
> Cesar Aracena <mailto:webmaster attached mail follows:
It’s me again… and not PHP related. Why is it that every piece of mail I
send to the list comes back as a *rich text” or sometime even “plain
text”, when my M$ Outlook is set to send HTML messages? I think it would
make sense if *EVERYBODY* e-mail where received like mine because of
server’s settings, but some people letters appear as they intend to be.
Any thoughts? Thanks,
Cesar Aracena <mailto:webmaster attached mail follows:
Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back
& Next). The buttons should be images. How can I make php see, which
button has been pressed?
Martin
attached mail follows:
give each a name and the value of the image clicked should then be in a var.
by that name
-----Original Message-----
From: Martin Thoma [mailto:martin Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back
& Next). The buttons should be images. How can I make php see, which
button has been pressed?
Martin
attached mail follows:
Hello,
There is a form tag which is like
<input type="image" name="xyz" src="abc.jpg" value="xyz">
This will have the same effect as clicking on a HTML submit button.
Hope this helps,
Sachin.
-----Original Message-----
From: Martin Towell [mailto:martin.towell give each a name and the value of the image clicked should then be in a var.
by that name
-----Original Message-----
From: Martin Thoma [mailto:martin Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back
& Next). The buttons should be images. How can I make php see, which
button has been pressed?
Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
give a name to the buttons ie: Next
<input name="Next" type="image" id="Next" src="whatever">
and check in php
<?
if(isset($Next.x) && isset($Next.y)){
// do somehting here
}
?>
do the same with Previous
"Martin Thoma" <martin
>");
>");
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
>");
--
Like Music? http://l-i-e.com/artists.htm
funyon.com>
To: "PHP List" <php-general
lists.php.net>
Sent: Thursday, July 11, 2002 5:52 PM
Subject: [PHP] Compile errors with php 4.2.1 and gd
kyboshed.com> wrote:
oceania.net> wrote in message
news:20020711224956.5047b186.kevin
oceania.net...
> trying to get the built in gd to work without luck
> I am using redhat and it has gd 1.8.4(or something)
> but the newer compiled version does not seem to install.
>
> I check with phpinfo and it just says 1.6.2 or higher
> but none of the 2.* functions work so I assume the
> new gd did not install. my config line looks like this..
>
./configure --with-apxs=/usr/sbin/apxs --with-mysql=/usr --with-ttf=/usr --e
nable-track-vars --enable-ftp --enable-imap --enable-ssl --enable-versioning
--enable-trans-sid --enable-sysvsem --with-config-file-path=/etc --with-gd
>
> kind regards
> Kev
electricarrow.com> wrote:
--
Like Music? http://l-i-e.com/artists.htm
--
Gaylen
PHP KISGB v4.0.5 Guest Book http://www.gaylenandmargie.com/phpwebsite/
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
--
Like Music? http://l-i-e.com/artists.htm
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
php.net]
> > Sent: Wednesday, July 10, 2002 6:24 PM
> > To: Brian V Bonini
> > Cc: php-general
lists.php.net
> > Subject: Re: [PHP] getdate
> >
> >
> > Works fine here. Are you actually in EDT?
> >
> > On Wed, 10 Jul 2002, Brian V Bonini wrote:
> >
> > > Any idea why this is off by 4 hours?
> > >
> > > Server time zone is set correctly,
> > > %date
> > > Wed Jul 10 14:26:18 EDT 2002
> > > but the script below returns the time as being 4 hours later then that.
> > >
> > >
> > > <?
> > > $date = getdate();
> > > $minutes = $date['minutes'];
> > > $hours = $date['hours'];
> > > $tz="EDT";
> > > $today = getdate();
> > > $month = $today['month'];
> > > $mday = $today['mday'];
> > > $year = $today['year'];
> > > $ampm="AM";
> > > if ($hours > 12) {
> > > $hours=$hours-12;
> > > $ampm="PM";
> > > } elseif ($hours == 12) {
> > > $ampm="PM";
> > > }
> > > if ( $minutes < 10) {
> > > $minutes="0$minutes";
> > > }
> > > print "$hours:$minutes $ampm $tz $month $mday, $year";
> > > ?>
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
>
>
>
stoic.net]
> Sent: Thursday, July 11, 2002 6:20 PM
> To: Brian V Bonini
> Cc: php-general
lists.php.net
> Subject: RE: [PHP] getdate
>
>
> The 'date' command-line utility reads the time zone from environment
> variable 'TZ'. It then adjusts the system time before displaying it.
>
> So your server is probably set to GMT, and your login environment
> specifies EDT, which is 4 hours earlier. PHP is defaulting to GMT. Look
> into putenv().
>
> miguel
>
> On Wed, 10 Jul 2002, Brian V Bonini wrote:
> > Hmmm, wierd!! The server is physically in PDT I am in EDT but I have the
> > servers time zone set to EDT and as I said "date" verifies the
> correct time
> > but yet the script returns a time that is 4 hours ahead. Wierd.... :(
> >
> > > -----Original Message-----
> > > From: Rasmus Lerdorf [mailto:rasmus
php.net]
> > > Sent: Wednesday, July 10, 2002 6:24 PM
> > > To: Brian V Bonini
> > > Cc: php-general
lists.php.net
> > > Subject: Re: [PHP] getdate
> > >
> > >
> > > Works fine here. Are you actually in EDT?
> > >
> > > On Wed, 10 Jul 2002, Brian V Bonini wrote:
> > >
> > > > Any idea why this is off by 4 hours?
> > > >
> > > > Server time zone is set correctly,
> > > > %date
> > > > Wed Jul 10 14:26:18 EDT 2002
> > > > but the script below returns the time as being 4 hours
> later then that.
> > > >
> > > >
> > > > <?
> > > > $date = getdate();
> > > > $minutes = $date['minutes'];
> > > > $hours = $date['hours'];
> > > > $tz="EDT";
> > > > $today = getdate();
> > > > $month = $today['month'];
> > > > $mday = $today['mday'];
> > > > $year = $today['year'];
> > > > $ampm="AM";
> > > > if ($hours > 12) {
> > > > $hours=$hours-12;
> > > > $ampm="PM";
> > > > } elseif ($hours == 12) {
> > > > $ampm="PM";
> > > > }
> > > > if ( $minutes < 10) {
> > > > $minutes="0$minutes";
> > > > }
> > > > print "$hours:$minutes $ampm $tz $month $mday, $year";
> > > > ?>
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> > >
> >
> >
> >
>
earleweb.com> wrote in message
news:20020711044704.77159.qmail
pb1.pair.com...
> Can you just use the built-in mail function?
>
> mail("chris
earleweb.com", "Errors", $ObjectGET->EMAIL, // doesn't have to
> be an object
> "From: errorresponse
earleweb.com\n"
> ."Reply-To: chris
earleweb.com\n"
> ."X-Mailer: PHP/" . phpversion());
>
> "Ricky Dhatt" <ricky
electricarrow.com> wrote in message
> news:20020711031950.93564.qmail
pb1.pair.com...
> > I've been trying to tweak my sendmail_path to work with some batch
emails
> I
> > have to sent out[1]. What'd like to do is set within a virtual site in
> > httpd.conf:
> >
> > php_admin_value sendmail_path =
> > "/usr/sbin/sendmail -t -oQ/var/spool/mqueue_batch -ODeliveryMode=q"
> >
> > Problem is when I do this, my emails go in to oblivion. I've tried
other
> > paths/options like "/usr/sbin/sendmail -oi -t -odq" and it works just
> fine.
> > I've tested my path in a perl script so I'm sure it's correct; I'm sure
my
> > permissions are correct...any ideas?
> >
> >
> > --Ricky
> >
> > [1] It's not spam. Honest!
> >
> >
>
>
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
pb1.pair.com>,
hesterloli
hotmail.com says...
> Thanks that worked just fine. But now I am irritated as hell. Obviously there
> is no backwards compatibility with new releases. Does this mean if I install a
> new version of PHP then all books published before that date are worthless?
> Seems so.
>
> For example in a book discussing PHP 3 it says:
>
> <?
> phpinfo();
> ?>
>
> This works just fine. In a book that discusses PHP 4 it says:
>
> <?
> php_info()
> ?>
>
> This gives "Fatal error: Call to undefined function: php_info() in
> c:\inetpub\wwwroot\php\phpinfo.php on line 2."
>
> So it's not just backwards compatibility it is careless planning. This is not
> good. I will have to search hi and lo to determine if a failure is due to
> incorrect syntax because of version and not just careless typing on my part.
--
David Robley
Temporary Kiwi!
rocketmail.com]
> Sent: Friday, 12 July 2002 11:08 AM
> To: PHP General List
> Subject: [PHP] HELP!!! Word count
>
>
> I have some clients who want to charge a flat rate for words
> entered, but over a certain number of
> words there is an additional charge, to complicate matters there
> is an option/addon where you can
> bold the lines, and there is a charge per line, so you have to
> calculate the total number of lines
> based on character total.
>
> Anyone know of way to accomplish this, I know that it will have
> to be done in seperate ways. but
> does anyone have an idea or two .. hlp
>
> thanks,
>
> dan
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
rocketmail.com]
> Sent: Thursday, July 11, 2002 9:08 PM
> To: PHP General List
> Subject: [PHP] HELP!!! Word count
>
> I have some clients who want to charge a flat rate for words entered,
but
> over a certain number of
> words there is an additional charge, to complicate matters there is an
> option/addon where you can
> bold the lines, and there is a charge per line, so you have to
calculate
> the total number of lines
> based on character total.
>
> Anyone know of way to accomplish this, I know that it will have to be
done
> in seperate ways. but
> does anyone have an idea or two .. hlp
>
> thanks,
>
> dan
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
vfsa.com.au]
Sent: Thursday, July 11, 2002 6:20 PM
To: Dan McCullough; PHP General List
Subject: RE: [PHP] HELP!!! Word count
rocketmail.com]
> Sent: Friday, 12 July 2002 11:08 AM
> To: PHP General List
> Subject: [PHP] HELP!!! Word count
>
>
> I have some clients who want to charge a flat rate for words
> entered, but over a certain number of
> words there is an additional charge, to complicate matters there
> is an option/addon where you can
> bold the lines, and there is a charge per line, so you have to
> calculate the total number of lines
> based on character total.
>
> Anyone know of way to accomplish this, I know that it will have
> to be done in seperate ways. but
> does anyone have an idea or two .. hlp
>
> thanks,
>
> dan
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Member - Liberal International On 11 Sept 2001 the WORLD was violated.
This is doctor
nl2k.ab.ca Ici doctor
nl2k.ab.ca
Society MUST be saved! Extremists must dissolve.
Beware of defining as intelligent only those who share your opinions
--
me
--
Like Music? http://l-i-e.com/artists.htm
--
Like Music? http://l-i-e.com/artists.htm
rivadossi.org]
> Sent: Thursday, July 11, 2002 2:45 AM
> To: php-general
lists.php.net
> Subject: [PHP] how to know upload progress status
>
> Hello,
> I'm beginning to use PHP, maybe my question is very simple...
> Anyway, I want permit users to upload files using a form, and I would
show
> them the upload progress status...
> I don't know how to extract informations about upload progress status
and
> how
> to show informations to users. For example I want the users can see
30% of
> upload completed, or the MByte just uploaded.
>
>
> I had some difficulties to write to the list, so I send the mail (with
> some
> modifies in the address) several times;
> I apologyze if many mails are sended to the list.
>
>
>
> Thanks for help...!
> S.
>
>
>
>
>
> In th file "fileupload.php" I call a function named "uploadfile" as
shown
> in
> the follow code:
>
>
>
>
>
>
> uploadfile($g_dir_corrente);
>
>
>
>
>
> if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name']))
> {
> $nomefile=$HTTP_POST_FILES['userfile']['name'];
>
>
>
>
>
>
if(($nomefile!=".htaccess")&&($nomefile!=".ftpaccess")&&($nomefile!=".qu
ot
> a"))
> {
>
copy($HTTP_POST_FILES['userfile']['tmp_name'],"$g_dir_corrente/$nomefile
")
> ;
> messaggio(12); // show a message to users
> echo "<br>";
> }
> else
> {
> messaggio(13); // show a message to users
> }
> }
>
>
>
>
>
> **************************************************************
>
>
>
>
>
> function uploadfile($g_dir_corrente)
> {
> $Upload_file=messaggioX(11); // show a message to users
> echo
> "
> <form enctype=\"multipart/form-data\" action=\"fileupload.php\"
> method=\"post\">
> <input type=\"hidden\" name=\"MAX_FILE_SIZE\"
value=\"1000000000\">
> $Upload_file <input name=\"userfile\" type=\"file\">
> <input type=\"submit\" value=\"Upload\">
> </form>
> ";
> }
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Like Music? http://l-i-e.com/artists.htm
--
Like Music? http://l-i-e.com/artists.htm
--
Like Music? http://l-i-e.com/artists.htm
--
Like Music? http://l-i-e.com/artists.htm
providence.org]
Sent: Thursday, July 11, 2002 3:05 PM
To: 'Jason Soza'; Lazor, Ed
Cc: php-general
lists.php.net
Subject: RE: [PHP] Re: Table Making
gci.net]
Sent: Thursday, July 11, 2002 3:18 PM
To: Lazor, Ed
Cc: php-general
lists.php.net
Subject: Re: [PHP] Re: Table Making
providence.org>
Date: Thursday, July 11, 2002 2:08 pm
Subject: RE: [PHP] Re: Table Making
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
me
nrc.gov) wrote:
sitedesign.net> 07/11/02 10:42AM >>>
> I want to acheive something like this
>
> http://www.claviga.com/index.php?pageid=18
>
>
icaam.com.ar>
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
icaam.com.ar) wrote:
icaam.com.ar>
> CE / MCSE+I
> Neuquen, Argentina
> +54.299.6356688
> +54.299.4466621
>
>
indent.com.au]
> Sent: Friday, July 12, 2002 2:42 AM
> To: César Aracena; PHP General List
> Subject: Re: [PHP] Mailing List
>
> The only way I've ever done it was on a Unix box:
>
> - filter the email
> - if it's a certain address, subject, or whatever, pipe it to a php
script
> (command line executable, rather than http)
> - use this PHP script to manipulate the headers and body of the email,
and
> re-send it to the subscribers, or act on commands like subscribe,
> unsubscribe, etc.
>
> it's pretty complex stuff (or at the very least, a lot of work!!), and
> obviously will require some non-typical allowances on the server, like
the
> ability to access scripts from the command line, email filtering, and
> possibly even some special allowances on the server for bulk mail
sending
> (ie, some shared hosts restrict to batches of 100, etc).
>
> if you're on a shared host, I doubt you'll be able to do this, but
they
> may
> be interested in installing a simular application onto the server for
you
> (and others to use)... there are heaps of them out there (ezmlm the
> obvious
> one), and they might even have such a beast already installed.
>
>
> Good luck!
>
> Justin French
>
>
>
>
> on 12/07/02 3:33 PM, César Aracena (icaam
icaam.com.ar) wrote:
>
> > Hi all.
> >
> > I know for sure that this question has been asked and answered
before,
> > but I haven’t read anything about it in the 6918 mails I got from
this
> > list yet (or missed it ;). I have been wondering for a couple of
days
> > now on how to make a mailing list (like this list) with PHP. Before
> > writing this, I went to hotscripts and evilwalrus but didn’t find
> > anything. I think it should be easy for me if I could gain physical
> > access to my server, but that’s not the case. I don’t wanna use
other
> > language because I am trying to get around PHP at it most so any
idea
> > very much appreciated.
> >
> > Thanks,
> >
> > Cesar Aracena <mailto:webmaster
icaam.com.ar>
> > CE / MCSE+I
> > Neuquen, Argentina
> > +54.299.6356688
> > +54.299.4466621
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
icaam.com.ar>
> CE / MCSE+I
> Neuquen, Argentina
> +54.299.6356688
> +54.299.4466621
>
>
icaam.com.ar>
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
radiok2r.de]
Sent: Friday, July 12, 2002 4:09 PM
To: php-general
lists.php.net
Subject: [PHP] 1 Form, 2 Submit-Buttons
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
world.net]
Sent: Friday, July 12, 2002 11:36 AM
To: 'Martin Thoma'; php-general
lists.php.net
Subject: RE: [PHP] 1 Form, 2 Submit-Buttons
radiok2r.de]
Sent: Friday, July 12, 2002 4:09 PM
To: php-general
lists.php.net
Subject: [PHP] 1 Form, 2 Submit-Buttons
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
radiok2r.de> wrote in message
news:3D2E7264.4C4B50A7
radiok2r.de...
> Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back
> & Next). The buttons should be images. How can I make php see, which
> button has been pressed?
>
> Martin
>
>