Re: [PHP] PHP Command Line Scripts 'Aborting' at end ...

2004-10-28 Thread Curt Zirzow
* Thus wrote Marc G. Fournier: Note that the following is based on php installed via the FreeBSD ports system ... I'm getting a core file, but if I try: gdb /usr/local/bin/php php.core ... its definitely not looking good: s# gdb /usr/local/bin/php php.core ... Core was

Re: [PHP] output htmkl file as text

2004-10-28 Thread Curt Zirzow
* Thus wrote Jerry Swanson: I want to output html file on the screen like text not like html file. I want a program to read html file and output source code to the screen. Any ideas how to fake browser, so browser will print html tags on the screen? By default php will send a header:

[PHP] required help on mail function

2004-10-28 Thread kunal Aggarwal
Dear friend, I am using PHP 4.3.4 version. Please tell how to unpload a mail function. Error comes on executing mail function is mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in C:\Program Files\Apache Group\Apache2\htdocs\testprodigious\MAIL\mail_enquiry.php on

Re: [PHP] Problem with Regular expression

2004-10-28 Thread Curt Zirzow
* Thus wrote kioto: Hi all. I have a problem: i want subs any characters from a string but i don't have fix the problem. The string that i want to manipulate is the value from a text field of a search engine. The characters that i want to try substitute is , , +, -, |, ||, or, and, not

Re: [PHP] required help on mail function

2004-10-28 Thread Curt Zirzow
* Thus wrote kunal Aggarwal: Dear friend, I am using PHP 4.3.4 version. Please tell how to unpload a mail function. Error comes on executing mail function is mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in C:\Program Files\Apache

[PHP] Php 4 and Php 5 on same box

2004-10-28 Thread Dave Carrera
Hi List, I have php 4 running all ok on a freebsd box installed from ports. What I would like to do is install php5 with all modules so's not to over right the php4 install and tell my users that they can test their scripts against the new php5 by including the path to php5 in their scripts

Re: [PHP] Php 4 and Php 5 on same box

2004-10-28 Thread Dirk Kredler
The solution depends on the Webserver you are using, i think for Apache2.x there should be no big problem at all to use php4 and php5 concurrently - just search the web. For Apache1.3.x you can look here:

[PHP] Validation and session variables

2004-10-28 Thread Stuart Felenstein
I guess my resolution was a fluke. Recap: Adding validation kills my session variables Now I tested a few things, SID is consistent across pages, so a new sid and cookie are not being generated. Perhaps it's a bug, Im on PHP 4.3.8 Here is the code again, perhaps something will jump out. ?php

[PHP] php mail help

2004-10-28 Thread Patrick E Phillips
I have php installed on my PC as well as an apache webserver and mysql. I am using cox.net as my cable internet provider. They block port 25 but I do not know if that affects what I am trying to do... which is: use the mail() function to send email for my user activation script. I am trying to

[PHP] Re: php mail help

2004-10-28 Thread M. Sokolewicz
*cough*quotes*cough* Patrick E Phillips wrote: I have php installed on my PC as well as an apache webserver and mysql. I am using cox.net as my cable internet provider. They block port 25 but I do not know if that affects what I am trying to do... which is: use the mail() function to send email

Re: Re: [PHP] urlencode and google search query

2004-10-28 Thread Joel CARNAT
On Thu, Oct 28 2004 - 00:31, Marek Kilimajer wrote: I meant get parameters to google: http://www.google.com/search?q=helpie=utf-8oe=utf-8 you need to change ie parameter ^^ to whatever encoding you are using. yepee ! finally got it. so the tweak was : * don't use urlencode() * add

RE: [PHP] Validation and session variables

2004-10-28 Thread Graham Cossey
See in-line comments... -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: 28 October 2004 08:54 To: [EMAIL PROTECTED] Subject: [PHP] Validation and session variables I guess my resolution was a fluke. Recap: Adding validation kills my session variables

Re: [PHP] bless function: a better aproach

2004-10-28 Thread raditha dissanayake
Curt Zirzow wrote: * Thus wrote Francisco M. Marzoa Alonso: Giving it a round, this seems to be a better aproach than the previous one. It has the advantage of provide direct access to the original array obtained from casting without boring about ___FAKE_KEYS_. ? ... $Obj = new TestClass ();

RE: [PHP] Validation and session variables

2004-10-28 Thread Stuart Felenstein
--- Graham Cossey [EMAIL PROTECTED] wrote: I think we need to know what happens when this function returns the user to the script upon finding an error. Are all the form field values passed back? Doesn't seem that they are. I tripped an error on page1 , had an echo set for the first

RE: [PHP] Validation and session variables

2004-10-28 Thread Stuart Felenstein
--- Graham Cossey [EMAIL PROTECTED] wrote: I think we need to know what happens when this function returns the user to the script upon finding an error. Are all the form field values passed back? Does it do anything at all with the session? Does it pass the SID? I want to append my

Re: [PHP] Validation and session variables

2004-10-28 Thread Jason Wong
On Thursday 28 October 2004 09:24, Stuart Felenstein wrote: --- Graham Cossey [EMAIL PROTECTED] wrote: I think we need to know what happens when this function returns the user to the script upon finding an error. Are all the form field values passed back? Does it do anything at all with

Re: [PHP] Q re: php-5.0.2 ./configure --with-soap --with-openssl --with-tidy (copy)

2004-10-28 Thread Bill McCuistion
Curt Zirzow wrote: * Thus wrote Bill McCuistion: Q re: php-5.0.2 ./configure --with-soap --with-openssl --with-tidy Hello all. Hoping for some direction with the above step. Have PHP-5.0.2 and can configure the soap and openssl options, but when I add the tidy option, the operation

[PHP] Regular expressions Q

2004-10-28 Thread Jack . van . Zanen
Hi All I'm trying to achieve the following: In a text string there may be a number of substrings that match my criteria. I need to retrieve all of them. This is what I have so far and works perfect for the first substring but ignores the possibility of others. I need to know if there are more

Re: [PHP] Regular expressions Q

2004-10-28 Thread Alex Hogan
ereg((([[:blank:]+]|^)[09][0-9][4789][0][0-9]{3}[abcABC]?),$zn[1],$zaakn ummers1); I thought that ereg would get all of them and store them in the array $zaaknummers1 however this is not the case I just asked a question similar to this the other day. Try using;

[PHP] Add spaces to a string

2004-10-28 Thread Phpu
How to add a specified number of spaces to a string I use this but won't work if $spaces is less than the length of the $string $string = bla bla bla; $spaces = 5; $string = str_pad($string, $spaces, ); Thanks in advance for your help

Re: [PHP] Add spaces to a string

2004-10-28 Thread Robert Cummings
On Thu, 2004-10-28 at 09:32, Phpu wrote: How to add a specified number of spaces to a string I use this but won't work if $spaces is less than the length of the $string $string = bla bla bla; $spaces = 5; $string = str_pad($string, $spaces, ); Assuming you don't want padding since

RE: [PHP] Regular expressions Q

2004-10-28 Thread Jack . van . Zanen
Thx, Just joined today, should have looked thru the archives first though. Jack -Original Message- From: Alex Hogan [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 3:31 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Regular expressions Q

[PHP] access database best pratice

2004-10-28 Thread Dan McCullough
I have a client who wants to update their access database that sits on their XP/IIS box. I plan on using PHP/ODBC connection to do this, however I am not up-to-speed on pitfalls or best pratices concerning access and odbc over the web or if I should suggest a better course of action, since I

Re: [PHP] Protecting Commercial PHP Scripts

2004-10-28 Thread Mark-Walter
Hi Dirk, I found this one very usefull: http://shiflett.org/php-security.pdf Nice docu *g* Does someone use this code out from the docu mentioned aboved ? It work's for me only under Explorer, Netscape switch to exit. # # Verify HTTP Header # if (isset($_SESSION['HTTP_USER_AGENT'] )) {

[PHP] PHP and send XML

2004-10-28 Thread Victor C.
Hi, I'm trying to pass XML file from Site A to Site B for Site B to parse. Site B is maintained by other company, so I only need to worry about sending over the XML file. I've been hinted that fsockopen() can do the job. I've done the following through PHP: $port=80; $host=134.134.134.134

[PHP] Protecting Javascript via PHP

2004-10-28 Thread Ryan A
Hey, I have been searching around the web for a way to mangle my javascript code the way some people do it to HTML/PHP etc so its not so easy to read. There is no sure way to do it and if a person is REALLY determined to get to your code...he can, but I would like that person to go through some

Re: [PHP] PHP and send XML

2004-10-28 Thread Matt M.
I'm trying to pass XML file from Site A to Site B for Site B to parse. Site B is maintained by other company, so I only need to worry about sending over the XML file. I've been hinted that fsockopen() can do the job. if you have to do this I would suggest giving pear a try, no need to

Re: [PHP] Protecting Javascript via PHP

2004-10-28 Thread Luke Barker
http://scriptasylum.com/tutorials/encdec/encode-decode.html is a good article on wasy to achieve this On Thu, 28 Oct 2004 16:24:24 +0200, Ryan A [EMAIL PROTECTED] wrote: Hey, I have been searching around the web for a way to mangle my javascript code the way some people do it to HTML/PHP etc

Re: [PHP] Protecting Commercial PHP Scripts

2004-10-28 Thread Curt Zirzow
* Thus wrote [EMAIL PROTECTED]: Hi Dirk, I found this one very usefull: http://shiflett.org/php-security.pdf Nice docu *g* Does someone use this code out from the docu mentioned aboved ? It work's for me only under Explorer, Netscape switch to exit. # # Verify HTTP Header #

[PHP] trying 2 pull data out table and populate a list box

2004-10-28 Thread Garth Hapgood - Strickland
I am trying to pull all data out of a table called province which has 2 fields ProvinceID and Description respectively. Now I want to populate a list with all the data in the descriptions field. Many thanx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: required help on mail function

2004-10-28 Thread Manuel Lemos
Hello, On 10/28/2004 03:34 AM, Kunal Aggarwal wrote: I am using PHP 4.3.4 version. Please tell how to unpload a mail function. Error comes on executing mail function is mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in C:\Program Files\Apache

[PHP] Re: PHP and send XML

2004-10-28 Thread Manuel Lemos
Hello, On 10/28/2004 11:01 AM, Victor C. wrote: I'm trying to pass XML file from Site A to Site B for Site B to parse. Site B is maintained by other company, so I only need to worry about sending over the XML file. I've been hinted that fsockopen() can do the job. You may want to try this HTTP

Re: [PHP] https://...

2004-10-28 Thread Rens Admiraal
You can find the exact $_SERVER var by checking the values printed by this loop: foreach ($_SERVER as $var = $value) { echo \$_SERVER[\{$var}\] = {$value}br; } Vail, Warren wrote: Depends on the server and the release, but my apache shows If($_SERVER[HTTPS] == on) // if true is secure Lots of

Re: [PHP] https://...

2004-10-28 Thread Rens Admiraal
But keep in mind that the var containing the value (I think $_SERVER[HTTPS] is the right one) is only set when https:// is used... Vail, Warren wrote: Depends on the server and the release, but my apache shows If($_SERVER[HTTPS] == on) // if true is secure Lots of other information like cypher

Re: [PHP] trying 2 pull data out table and populate a list box

2004-10-28 Thread Rens Admiraal
you mean: $query = SELECT ProvinceID, Description FROM province ORDER BY Description ASC ; $result = @mysql_query ($query, $connection) or die (mysql_error()); while ($row = @mysql_fetch_array($result)) { $options .= option value='{$row[ProviceID]}'{$row[Description]}/option\n; } $selectBox

Re: [PHP] https://...

2004-10-28 Thread Afan Pasalic
Hi Robby, Yes, I looked at SERVER_PORT/SERVER_PROTOCOL. What I got is 80 and HTTP/1.1 when I manually change http:// to https:// I'm getting 443 and HTTP/1.1 I am not so good in this: you want to say that SSL use 443 port -afan Robby Russell wrote: On Wed, 2004-10-27 at 16:35 -0500, Afan

Re: [PHP] https://...

2004-10-28 Thread Greg Donald
On Thu, 28 Oct 2004 11:01:53 -0500, Afan Pasalic [EMAIL PROTECTED] wrote: I am not so good in this: you want to say that SSL use 443 port Yup. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] https://...

2004-10-28 Thread Afan Pasalic
that's why I use it, sure. but can't find anything that helps me. Greg Donald wrote: On Wed, 27 Oct 2004 16:35:14 -0500, Afan Pasalic [EMAIL PROTECTED] wrote: hi, how can I check using php that I use SSL? tried with REQUEST_URI HTTP_HOST PATH_INFO but any of these does show http:// phpinfo()

[PHP] Fwd:

2004-10-28 Thread Greg Donald
-- Forwarded message -- From: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: 28 Oct 2004 16:10:47 - Subject: Re: Re: [PHP] https://... To: [EMAIL PROTECTED] Phil Ewington will be out of the office until 1st November. If your enquiry is urgent please email Ian Lowe ([EMAIL

Re: [PHP] https://...

2004-10-28 Thread Afan Pasalic
Yes, this one is correct one! :) Thanks Warren. -afan Rens Admiraal wrote: But keep in mind that the var containing the value (I think $_SERVER[HTTPS] is the right one) is only set when https:// is used... Vail, Warren wrote: Depends on the server and the release, but my apache shows

[Fwd: Re: [PHP] https://...]

2004-10-28 Thread Afan Pasalic
Ok, this works just great! Thanks Warren. Also, I found after I changed manualy http:// in https:// that SCRIPT_URI will show whole URL (https://www.) and if I don't use SSL will not show anything! Thanks to all guys you wanted to help me! -afan Vail, Warren wrote: Depends on the server and

[PHP] About File Paths

2004-10-28 Thread Nick Wilson
Hi all, If a script is to be called with cron *outside* of the http directory, how should file system paths be handled? Should I use fopen('a_path/relative_to/thescript.php'); or fopen('/usr/var/www/absolute_file_path/thescript.php'); Im not only using this for fopen. So does php work

Re: [PHP] https://...

2004-10-28 Thread Afan Pasalic
Well, didn't know that one. Thanks Greg, didn't know that one :) Today is successful day - learned something new :) -afan Greg Donald wrote: On Thu, 28 Oct 2004 11:01:53 -0500, Afan Pasalic [EMAIL PROTECTED] wrote: I am not so good in this: you want to say that SSL use 443 port Yup. -- PHP

Re: [PHP] About File Paths

2004-10-28 Thread Greg Donald
On Thu, 28 Oct 2004 18:27:34 +0200, Nick Wilson [EMAIL PROTECTED] wrote: If a script is to be called with cron *outside* of the http directory, how should file system paths be handled? I always assume cron is dumb and provide it with full paths. -- Greg Donald Zend Certified Engineer

Re: [PHP] Protecting Commercial PHP Scripts

2004-10-28 Thread Mark-Walter
Hi Curt, if ($_SESSION['HTTP_USER_AGENT'] != md5($SERVER['HTTP_USER_AGENT'])) ^^^ $_SERVER *g* If your using the same session for IE and netscape, the behaviour you are experiencing demonstrates how this can prevent session hijacking. Netscape, using

Re: [PHP] About File Paths

2004-10-28 Thread Nick Wilson
* and then Greg Donald declared On Thu, 28 Oct 2004 18:27:34 +0200, Nick Wilson [EMAIL PROTECTED] wrote: If a script is to be called with cron *outside* of the http directory, how should file system paths be handled? I always assume cron is dumb and provide it with full paths.

Re: [PHP] Protecting Javascript via PHP

2004-10-28 Thread Ryan A
Hey! Thanks dude, that DOES make it harder for ther person to get to your JS codeI have seen various solutions like this like code-secure from securecents.com (although I think the article you mentioned is better) I was thinking more of a php solution, passing some variables and looking at

[PHP] Socket trouble

2004-10-28 Thread René Fournier
I'm having some trouble with my socket client. I would like it to notice when the server is no longer there, and then reconnect. I have code for the reconnect, etc., but I can't figure out how to write the socket_read code so that it notices when the server is gone and then responds.

Re: [PHP] Socket trouble

2004-10-28 Thread bbonkosk
To prevent the blocking and your CPU going up to 100% usages look into: http://us2.php.net/manual/en/function.socket-select.php For length of a string: http://us2.php.net/manual/en/function.strlen.php - Original Message - From: René Fournier [EMAIL PROTECTED] Date: Thursday, October 28,

Re: [PHP] https://...

2004-10-28 Thread Robby Russell
On Thu, 2004-10-28 at 11:01 -0500, Afan Pasalic wrote: Hi Robby, Yes, I looked at SERVER_PORT/SERVER_PROTOCOL. What I got is 80 and HTTP/1.1 when I manually change http:// to https:// I'm getting 443 and HTTP/1.1 I am not so good in this: you want to say that SSL use 443 port -afan

[PHP] Converting a PERL Date

2004-10-28 Thread KWRIGHT
I have a perl date that is writing to a file. I need to display that date using PHP to a page.The date looks like this 1077051100 in the file. Can anyone help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Converting a PERL Date

2004-10-28 Thread Greg Donald
On Thu, 28 Oct 2004 13:06:57 -0400, KWRIGHT [EMAIL PROTECTED] wrote: I have a perl date that is writing to a file. I need to display that date using PHP to a page.The date looks like this 1077051100 in the file. Can anyone help? php.net/date -- Greg Donald Zend Certified Engineer

Re: [PHP] I must be an XML parser idiot

2004-10-28 Thread Robert Cummings
On Thu, 2004-10-28 at 14:26, Jay Blanchard wrote: Good afternoon gurus and gurettes! * example code * /* functions for XML parser */ function dataHandler($parser, $data){ echo $data . br\n; } function StartTag($parser, $name, $attribute){ if(servicebrandname ==

Re: [PHP] Date Calculation

2004-10-28 Thread Mike Tuller
That's not quite what I am talking about. I looked at that already. I can could also put the date and time that the script was ran into the MySql database by have a TIMESTAMP field in the database. I would like to compare the date and time of timestamp in the database to the current time and

RE: [PHP] Date Calculation

2004-10-28 Thread Jay Blanchard
[snip] That's not quite what I am talking about. I looked at that already. I can could also put the date and time that the script was ran into the MySql database by have a TIMESTAMP field in the database. [/snip] You can use that to convert your time in the DB, get the current time when seeking

RE: [PHP] I must be an XML parser idiot SOLVED

2004-10-28 Thread Jay Blanchard
[snip] Good afternoon gurus and gurettes! [/snip] I was misspelling the XML tag name. *slaps forehead* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Date Calculation

2004-10-28 Thread Mike Tuller
I have a shell script that inserts the unix date and time that the script ran into a MySql database. For example Thu Oct 28 13:41:33 CDT 2004. I would like to have my web page do the math so that it displays the time since the script ran. How can I do the math so that the web page will display

Re: [PHP] About File Paths [unresolved]

2004-10-28 Thread Nick Wilson
* and then Nick Wilson declared ***bumpety bump*** ;-) If a script is to be called with cron *outside* of the http directory, how should file system paths be handled? Should I use fopen('a_path/relative_to/thescript.php'); or

RE: [PHP] Date Calculation

2004-10-28 Thread Jay Blanchard
[snip] I have a shell script that inserts the unix date and time that the script ran into a MySql database. For example Thu Oct 28 13:41:33 CDT 2004. I would like to have my web page do the math so that it displays the time since the script ran. How can I do the math so that the web page will

[PHP] Require_once(_)...when does it reset?

2004-10-28 Thread Mike
I am playing with PEAR_Info on my server. It was working fine, then I upgraded some classes, now it is not. I think it is because PHP is holding on to the old code from some require_once functions. I may be totally wrong but that is all I can think of what would cause this. Other classes

[PHP] I must be an XML parser idiot

2004-10-28 Thread Jay Blanchard
Good afternoon gurus and gurettes! * example code * /* functions for XML parser */ function dataHandler($parser, $data){ echo $data . br\n; } function StartTag($parser, $name, $attribute){ if(servicebrandname == $name){ echo -br\n; } } function

Re: [PHP] Date Calculation

2004-10-28 Thread Mike Tuller
I guess. Are you telling me that I should take the timestamp, convert it to epoch time, the us the time function to get the current epoch time, then subtract the timestamp epoch time from the current epoch time? I think that is what you are saying. I know I can get the current epoch time in

[PHP] Question on HTML_QuickForm: Validation ignored if specify form action

2004-10-28 Thread Ying Guo, Ms
Hi, I just started to try HTML_QuickForm, and got a problem on setting form action in the HTML_QuickForm constructor. It looks like if I set the form action other than default, i.e., self, all the validation rule is ignored, the page goes directly to the process.php after click on

Re: [PHP] About File Paths [unresolved]

2004-10-28 Thread Matthew Sims
If a script is to be called with cron *outside* of the http directory, how should file system paths be handled? Should I use fopen('a_path/relative_to/thescript.php'); or fopen('/usr/var/www/absolute_file_path/thescript.php'); Im not only using this for fopen. So does php work relative

Re: [PHP] Date Calculation

2004-10-28 Thread Tom Rogers
Hi, Friday, October 29, 2004, 4:51:20 AM, you wrote: MT I have a shell script that inserts the unix date and time that the MT script ran into a MySql database. For example Thu Oct 28 13:41:33 CDT MT 2004. I would like to have my web page do the math so that it displays MT the time since the

Re: [PHP] Date Calculation

2004-10-28 Thread Mike Tuller
Ok, so here is what I have. Please check to see if there is a better way. There are a lot of database calls to me. ? $database_name = CETechnology; $host = server; $login = username; $password = password; $ethernet_address = 00:01:93:8e:69:50; $db_connect = mysql_connect( $host, $login,

[PHP] Re: Require_once(_)...when does it reset?

2004-10-28 Thread Greg Beaver
Mike wrote: I am playing with PEAR_Info on my server. It was working fine, then I upgraded some classes, now it is not. I think it is because PHP is holding on to the old code from some require_once functions. I may be totally wrong but that is all I can think of what would cause this. Other

Re: [PHP] Date Calculation

2004-10-28 Thread Jennifer Goodie
-- Original message from Mike Tuller [EMAIL PROTECTED]: -- Ok, so here is what I have. Please check to see if there is a better way. There are a lot of database calls to me. There are. Do it in one query. $query = SELECT * FROM hardware_assets WHERE

[PHP] Re: Require_once(_)...when does it reset?

2004-10-28 Thread M. Sokolewicz
Greg Beaver wrote: Mike wrote: I am playing with PEAR_Info on my server. It was working fine, then I upgraded some classes, now it is not. I think it is because PHP is holding on to the old code from some require_once functions. I may be totally wrong but that is all I can think of what would

[PHP] Learning PHP5

2004-10-28 Thread Matthew Sims
About a week ago someone was asking where are beginner can go to learn PHP5? This book was just advertised on Slashdot. Learning PHP 5 Only $20 on Amazon.com http://www.amazon.com/exec/obidos/tg/detail/-/0596005601/qid=1099000383/sr=8-1/ref=pd_csp_1/104-8763861-9120755?v=glances=booksn=507846

[PHP] Review: Function that measures the width of a text string in pixels.

2004-10-28 Thread Jacob Friis
I have created a function that will measure the width of a text string in pixels. It works ok. If you have optimizations, please let me know. Thanks, Jacob function txt_width ($txt) { $width = 0; $txt_len = strlen($txt); for ($n = 1; $n = $txt_len; $n++) {

[PHP] Re: Review: Function that measures the width of a text string in pixels.

2004-10-28 Thread M. Sokolewicz
Jacob Friis wrote: I have created a function that will measure the width of a text string in pixels. It works ok. If you have optimizations, please let me know. Thanks, Jacob function txt_width ($txt) { $width = 0; $txt_len = strlen($txt); for ($n = 1; $n = $txt_len; $n++) {

Re: [PHP] Review: Function that measures the width of a text string in pixels.

2004-10-28 Thread Robby Russell
On Fri, 2004-10-29 at 00:11 +0200, Jacob Friis wrote: I have created a function that will measure the width of a text string in pixels. It works ok. If you have optimizations, please let me know. Thanks, Jacob function txt_width ($txt) { $width = 0; $txt_len = strlen($txt);

Re: [PHP] Learning PHP5

2004-10-28 Thread Danny Brow
On Thu, 2004-10-28 at 15:03 -0700, Matthew Sims wrote: About a week ago someone was asking where are beginner can go to learn PHP5? This book was just advertised on Slashdot. Learning PHP 5 Only $20 on Amazon.com

Re: [PHP] Learning PHP5

2004-10-28 Thread Marek Kilimajer
Matthew Sims wrote: About a week ago someone was asking where are beginner can go to learn PHP5? This book was just advertised on Slashdot. Learning PHP 5 Only $20 on Amazon.com

Re: [PHP] Learning PHP5

2004-10-28 Thread Matthew Sims
On Thu, 2004-10-28 at 15:03 -0700, Matthew Sims wrote: About a week ago someone was asking where are beginner can go to learn PHP5? This book was just advertised on Slashdot. Learning PHP 5 Only $20 on Amazon.com

RE: [PHP] Review: Function that measures the width of a text stri ng in pixels.

2004-10-28 Thread Vail, Warren
There is a function in the GD library that measures text size; http://www.php.net/manual/en/function.imagettfbbox.php But it has an advantage you don't have, once it has places exactly the font it wants, the size it wants, directly into an image, it knows that the browser won't change the image.

Re: [PHP] Learning PHP5

2004-10-28 Thread Michael Lauzon
Eh...I tired. I guess http://php.net is as free as you can get. -- --Matthew Sims --http://killermookie.org Matt, Unfortunately the PHP.net are not really for beginners, you have to have some programming knowledge to get started using their tutorials...this is just my opinion.

Re[2]: [PHP] Date Calculation

2004-10-28 Thread Tom Rogers
Hi, Friday, October 29, 2004, 7:19:09 AM, you wrote: MT Ok, so here is what I have. Please check to see if there is a better MT way. There are a lot of database calls to me. MT ? MT $database_name = CETechnology; MT $host = server; MT $login = username; MT $password = password; MT

[PHP] Re: PHP4 PHP4ISAPI Extensions

2004-10-28 Thread George Hester
George Hester [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] In Windows 2000 Server SP3 I tried to set up the php4isapi.dll redirector. I can get it to work as long as there are no extensions loaded. But if there are from my php.ini then I get ./extensions\php_gd2.dll not found for

Re: [PHP] File uploads and handling

2004-10-28 Thread Philip Thompson
On Oct 26, 2004, at 7:06 AM, Jason Wong wrote: On Tuesday 26 October 2004 03:45, Philip Thompson wrote: I have a form to upload a file from a user's computer to the server. I want to then modify the file, and then let the user save it back. However, I am having troubles opening the file. It says

Re: [PHP] Re: Review: Function that measures the width of a text string in pixels.

2004-10-28 Thread Jacob Friis
M. Sokolewicz wrote: Jacob Friis wrote: I have created a function that will measure the width of a text string in pixels. It works ok. If you have optimizations, please let me know. Thanks, Jacob function txt_width ($txt) { $width = 0; $txt_len = strlen($txt); for ($n = 1; $n =

Re: [PHP] Protecting Javascript via PHP

2004-10-28 Thread M Saleh EG
Even if u make ur JS files dynamicaly made on the fly, browsers cach that dynamic JS. To be specific you'd get a file like script.php?parameter=pValue as a .php file that is cached after being rendered. So ur JS will be there stored in the cached static .php file ( a file with PHP extension

Re: [PHP] File uploads and handling

2004-10-28 Thread Greg Donald
On Thu, 28 Oct 2004 19:04:27 -0500, Philip Thompson [EMAIL PROTECTED] wrote: manual Handling file uploads to see how it all works. Yeah, that was not useful at all. That's how the rest of us learned. The examples on the page is pretty clear to me. That's what I originally looked

Re: [PHP] Learning PHP5

2004-10-28 Thread Greg Donald
On Thu, 28 Oct 2004 19:12:12 -0400, Michael Lauzon [EMAIL PROTECTED] wrote: Unfortunately the PHP.net are not really for beginners, you have to have some programming knowledge to get started using their tutorials...this is just my opinion. Well you're certainly entitled to your opinion.. I

[PHP] What is wrong with next code

2004-10-28 Thread Vladimir Shiray
Can one explain me why I has got a result: - Warning: mysql_query(): 4 is not a valid MySQL-Link resource in ... $result = mysql_query('SELECT 1+1', $db1); - from next example. The example does not

Re: [PHP] Learning PHP5

2004-10-28 Thread Danny Brow
On Thu, 2004-10-28 at 20:20 -0500, Greg Donald wrote: On Thu, 28 Oct 2004 19:12:12 -0400, Michael Lauzon [EMAIL PROTECTED] wrote: Unfortunately the PHP.net are not really for beginners, you have to have some programming knowledge to get started using their tutorials...this is just my

Re: [PHP] File uploads and handling

2004-10-28 Thread Robby Russell
On Thu, 2004-10-28 at 19:04 -0500, Philip Thompson wrote: On Oct 26, 2004, at 7:06 AM, Jason Wong wrote: On Tuesday 26 October 2004 03:45, Philip Thompson wrote: I have a form to upload a file from a user's computer to the server. I want to then modify the file, and then let the user

[PHP] insert xml data into database

2004-10-28 Thread mishin coleman
any ideas how to do this?   i can get the php to print out all the details of the xml but not sure how to input that data into a database. - maybe using some sort of array? its an annoying postgresql database that i need to insert it into but any ideas on how to insert into any database would be

Re: [PHP] What is wrong with next code

2004-10-28 Thread John Holmes
Vladimir Shiray wrote: - Warning: mysql_query(): 4 is not a valid MySQL-Link resource in ... $result = mysql_query('SELECT 1+1', $db1); - [snip] $db1 = mysql_connect ('localhost', 'test', '1'); $db2 =

[PHP] Bug-Tracking-System in PHP ?

2004-10-28 Thread Michelle Konzack
Hello, Curently I create my website and I need for my development project a BTS like this one from bugs.debian.org. I have only around 20 Debian Packages, so I do not need a big one of BTS. Curently I use E-Mails from my Provider like: package[EMAIL PROTECTED] with procmail and some BASH