OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: php3 Digest 24 Apr 2000 04:57:44 -0000 Issue 1626
From: php3-digest-helplists.php.net
Date: Sun Apr 23 2000 - 23:57:44 CDT


php3 Digest 24 Apr 2000 04:57:44 -0000 Issue 1626

Topics (messages 87288 through 87324):

Simple question...
        87288 by: Sterling Hughes <sterlingdesignmultimedia.com>

eregi_replace?
        87289 by: Bill Zeller <billzelleryahoo.com>
        87292 by: Marcus D Hanwell <linuxcryos.net>

optimizing MySQL
        87290 by: Dieter Kneffel <datawap4.com>

Oracle/MSSQL & PHP
        87291 by: Markus Harma <Markus.Harmaabc.se>

PHP3+MSSQL woes
        87293 by: "Eric Pree" <ericquantumss.com>
        87301 by: Michael Kimsal <michaeltapinternet.com>

passing a file into a function
        87294 by: "Andrew Sheh" <asheadmetechnologies.com>
        87296 by: Zak Greant <zakfreeimages.com>

How to replace "First" instance of the matched pattern?
        87295 by: "Ted Knudson" <tedkmichianatoday.com>
        87298 by: Zak Greant <zakfreeimages.com>

Cookies + header redirection
        87297 by: "Martin Hearn" <hearnworldonline.co.uk>

cron jobs for php apache compiled
        87299 by: "Danny Heijl" <danny.heijlpandora.be>
        87300 by: Andrian Pervazov <andriantruefire.com>

PHP3+MSSQL woes - itchy send finger
        87302 by: Michael Kimsal <michaeltapinternet.com>

Newbie Problem
        87303 by: "Joe Rivera" <jrivaustin.rr.com>

php3 and mod_perl
        87304 by: Joao Pedras <jpedraswebvolution.net>

when compiling PHP4
        87305 by: "Michael S. Steuer" <michaelsteuer.com>

when compiling PHP4 - part II
        87306 by: "Michael S. Steuer" <michaelsteuer.com>

RegEx Question
        87307 by: "Shailendra Majmundar" <bantoobest.com>
        87308 by: "George Papadakis" <georgepforthnet.gr>
        87313 by: "Shailendra Majmundar" <bantoobest.com>

REMOTE_ADDR and includes
        87309 by: "gee" <geefxtra.co.nz>

problem with PWS
        87310 by: "Rossi Designs" <webmasterrossidesigns.net>

How to change user system password
        87311 by: "Mohd Ikhwan \(Mahen\)" <ikhwantas.com.my>

ld terminated with signal 11
        87312 by: "Sergio A. Murillo" <sammarrder.com>

Questions about updates to the FAQ
        87314 by: "Martin Edelius" <martin.edeliusspirex.se>

A more ELEGANT way to rename variables?
        87315 by: Derek Sivers <listhitmedia.com>
        87317 by: Sterling Hughes <sterlingdesignmultimedia.com>

Insert Date Into VFoxpro Table By Using ODBC.
        87316 by: chchar <chcharmcms.com>

Database Choice
        87318 by: Deirdre Saoirse <deirdredeirdre.net>

asp to php
        87319 by: "TV Karthick Kumar" <tvkarthickmailops.com>
        87322 by: Sterling Hughes <sterlingdesignmultimedia.com>
        87324 by: "TV Karthick Kumar" <tvkarthickmailops.com>

look for benchmarking test site(php and asp) for winNT
        87320 by: °­¿¬±¹ <enjoiram.co.kr>

fwrite error
        87321 by: Yamin Prabudy <minstarindo.net>

assemble a query dynamically, using a loop?
        87323 by: mark <mscoiname.com>

Administrivia:

To subscribe to the digest, e-mail:
        php3-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php3-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php3lists.php.net

----------------------------------------------------------------------

attached mail follows:


llbishopthemail.com wrote:
>
> check for it like this:
>
> if(! $textbox1){
> print "Textbox1 is required";
> }
>
Correction:

if (!isset ($textbox1)) {
        print "Textbox1 is required";
        exit;
}

Because:

1. The "exit" is there because you need to end your script's execution
on error.
2. Use isset because you're not checking the truth value of the
$textbox1, rather whether or not it was filled out.

Sterling

attached mail follows:


Hi,

I would suggest switching the order of the
eregi_replaces. This is the first code:

 $input = "text\nmoretext<br>\n<br>asdf";
 $input = eregi_replace("\n", "<br>\n", $input);
 //$input now equals
"text<br>\nmoretext<br><br>\n<br>asdf";
 $input = eregi_replace("<br>\n<br>\n", "<p>\n\n",
$input);
 //$input now equals
"text<br>\nmoretext<br><p>\n\nasdf";
 echo $input;

On the other hand, reversing the order of the
replacements will produce what is, I believe, the
desired result:

 $input = "text\nmoretext<br>\n<br>asdf";
 $input = eregi_replace("<br>\n<br>\n", "<p>\n\n",
$input);
 //$input now equals "text\nmoretext<p>\n\nasdf";
 $input = eregi_replace("\n", "<br>\n", $input);
//$input now equals
"text<br>\nmoretext<p><br>\n<br>\nasdf";
 echo $input;

(I haven't tested the code so there might be some
typos)

Best Regards,
Bill Zeller -> scriptmakers.com (in beta)

--- Vincent Driessen <vinniedew.nl> wrote:
> Hi Guys,
>
> I'm sure some of you can help me with this. I have a
> textarea-control on one
> of my sites. When the user types a message,
> including returns (line-feeds) I
> want that to show on another page in HTML. My
> problem is that the text will
> not show correctly in HTML since it does not contain
> the <br> or <p> tags.
>
> I wrote this:
>
> // $input contains the text
> $input = eregi_replace("\n", "<br>\n", $input);
> $input = eregi_replace("<br>\n<br>\n",
> "<p>\n\n", $input);
> echo $input;
>
> What am I doing wrong?
>
> Thanx a lot.
>
> Greetz,
>
> Vincent Driessen
> Venlo, The Netherlands
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to
> php3-unsubscribelists.php.net
> To subscribe to the digest, e-mail:
> php3-digest-subscribelists.php.net
> To search the mailing list archive, go to:
> http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail:
> php-list-adminlists.php.net
>
>

__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com

attached mail follows:


Vincent Driessen wrote:

> Hi Guys,
>
> I'm sure some of you can help me with this. I have a textarea-control on one
> of my sites. When the user types a message, including returns (line-feeds) I
> want that to show on another page in HTML. My problem is that the text will
> not show correctly in HTML since it does not contain the <br> or <p> tags.
>
> I wrote this:
>
> // $input contains the text
> $input = eregi_replace("\n", "<br>\n", $input);
> $input = eregi_replace("<br>\n<br>\n", "<p>\n\n", $input);
> echo $input;
>
> What am I doing wrong?
>
> Thanx a lot.
>
> Greetz,
>
> Vincent Driessen
> Venlo, The Netherlands
>

Just a suggestion, but you could also do:
<?php
print "<pre>\n".
    "$input\n".
    "</pre>\n";
?>
I think that's the tag I'm thinking of anyway, then the <br> and <p> tags aren't
even required. Although depending on your needs the ereg replace option may be
better. The above option would also be much quicker though.

HTH.

Marcus D Hanwell

attached mail follows:


Using COUNT(*) is just does pretty fine!
Thanks.

- Dieter

Mark Maggelet schrieb:

> ***********************************************
>
> On 4/23/00 at 4:17 AM Dieter Kneffel wrote:
>
> >Hi Mark and all others that replied so far,
> >
> >first of all, many thanks to you all for the information. This list is just great!
> >
> >Concerning my first issue:
> >I already did some testing and by using COUNT(*) instead I could
> >increase the processing speed noticeably.
> >
> >I need the LIMIT X,Y as I am steping through the results...
> >Is it faster to use the suggested 'mysql_data_seek' instead of LIMIT ???
>
> it's only faster if it saves you the extra query. If you're using the count(*)
> don't bother. By the way, if the count(*) takes more than a tenth of a second you're
> doing something wrong. If so, see #3 from my last post.
>
> >thank you!
> >
> >- Dieter
> >
> >
> >
> >
> >
> >Mark Maggelet schrieb:
> >
> >> Hi
> >>
> >> ***********************************************
> >>
> >> On 4/22/00 at 9:42 PM Dieter Kneffel wrote:
> >>
> >> >Question #1:
> >> > I need the total number of resulting rows. Currently using
> >> > mysql_num_rows() I wonder if there is a better way.
> >> >
> >> >Here an example code:
> >> >
> >> ><?
> >> > ...
> >> > $select = "select field_a,field_b,field_c from table where id =
> >> >'123'";
> >> >
> >> > $result = mysql_query( $select );
> >> >
> >> > $total = mysql_num_rows($result); // now I have the
> >> >needed value
> >> >
> >> > $select .= " limit 0, 10"; // limiting
> >> >the display to show only a part. (first 10 results)
> >> >
> >> > $result = mysql_query( $select );
> >> >
> >> > ...
> >> >?>
> >> >
> >> >What I do not like is the fact that I have to query twice. How can I
> >> >modify the
> >> >above so I need only one query???
> >>
> >> two different ways of optimizing might be:
> >>
> >> 1) use count(*) for the first query
> >> or
> >> 2) the second query just limits the first, so you don't really need it,
> >> just loop through til you get to ten. (use mysql_data_seek to start
> >> at row >0 )
> >> 3) it looks like id should be an int field, so don't quote it ( 'where id=123')
> >> mysql will go crazy trying to turn a string into an int when it doesn't have to.
> >> If you don't have an index on that field, make sure you put one there.
> >>
> >> which is better depends on how many rows you expect to get, amount of ram,
> >> etc. try them all.
> >>
> >> >Question #2: (SQL related)
> >> >
> >> >How do I use the 'GROUP BY' statement to get the last results within a
> >> >query?
> >>
> >> I don't think group by is really what you want, if you want the last inserted rows,
> >> maybe your table should include a date field.
> >>
> >> - Mark
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribelists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-adminlists.php.net

--
Dieter Kneffel, jr. | http://wap4.com    | tel: +49.170.2376.394
mail:datawap4.com  | http://mopilot.com | fax: +49.9187.904.124
Mobile Applications For A Portable Internet.

attached mail follows:


> Microsoft does not have a client for Linix so you might use ODBC > (or the sybase module if you are using SQL Server 6.5).

Is that only MS SQL Server 6.5 (not 7.0)?

> You can also use FreeTDS, but no module has been build so far (I'm > currently testing an alpha version of this module)

I tried using FreeTDS. When doing a SELECT query it all worked just fine, but any other query would crash the script and the webbrowser would report that the page contained no data. The database was updated though.

Is there any way to fix this? (I believe I used FreeTDS 0.5)

/m

attached mail follows:


Oh. I installed the client, and now it loaded up great! Thanks! :) -----Original Message----- From: Frank M. Kromann [mailto:fmkswwwing.com] Sent: Sunday, April 23, 2000 12:41 AM To: Eric Pree Cc: php3lists.php.net Subject: Re: [PHP3] PHP3+MSSQL woes

Hi Eric,

The module is loaded either with the dl("php3_mssql.dll") command in the begining of your script or by extention=php3_mssql.dll in your php3.ini file.

The module will only load if you have MSSQL Server Client tools installed on the maschine !

Does the system gives you an error message ?

- Frank

>This isn't even a code problem! I'm just trying to get the mssql extension >to load in PHP, and failing. I'm in WinNT, both the web server and PHP work >great, and I can load other modules like MySQL and crypt. I do have the dll >in the proper directory, but it's not showing up in php_info(), and I get >errors about mssql_connect() not being defined. This should be a simple >thing, and it's starting to piss me off. Oh, and I've tried both 3.0.9 and >3.0.16 of PHP, no dice either way. > >Thanks! > >Eric Pree >CTO >Whiscnet > > > >-- >PHP 3 Mailing List <http://www.php.net/> >To unsubscribe, send an empty message to php3-unsubscribelists.php.net >To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net >To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 >To contact the list administrators, e-mail: php-list-adminlists.php.net > > >

Swwwing A/S Frank M. Kromann VP Development Phone: +45 70 20 77 20 Fax: +45 70 20 77 21 http://www.swwwing.com

attached mail follows:


Hello Frank,

I'm having a similar problem, but I AM getting an error message.

Fatal error: Unable to load dynamic library 'c:\winnt\php_mssql70.dll' The specified procedure could not be found. in D:\Inetpub\wwwroot\tytest\php\a.php on line 2

line 2= dl("php_mssql70.dll");

(this dll was just downloaded from your swwwing site today).

The dll file is definitely in the c:\winnt directory - any clues? I'm using a binary build of PHP4RC1 from a few days ago - maybe Wednesday's build? NT4, SP6. Will I have to build it myself, rather than using the binaries?

Eric Pree wrote:

> Oh. I installed the client, and now it loaded up great! Thanks! :) > -----Original Message----- > > Hi Eric, > > The module is loaded either with the dl("php3_mssql.dll") command in the > begining of your script or by extention=php3_mssql.dll in your php3.ini > file. > > The module will only load if you have MSSQL Server Client tools installed on > the maschine ! > > Does the system gives you an error message ? > > - Frank > > >This isn't even a code problem! I'm just trying to get the mssql extension > >to load in PHP, and failing. I'm in WinNT, both the web server and PHP work > >great, and I can load other modules like MySQL and crypt. I do have the > dll > >in the proper directory, but it's not showing up in php_info(), and I get > >errors about mssql_connect() not being defined. This should be a simple > >thing, and it's starting to piss me off. Oh, and I've tried both 3.0.9 and > >3.0.16 of PHP, no dice either way. > >

--
==========================
Michael Kimsal
http://www.tapinternet.com
734-480-9961

attached mail follows:


I have this script that works well; however when I try to include it into a function, I seem to lose all my file properties and cannot work with them. The script is:

<? //Copy the file to somewhere function SaveNameImg ($folder, $name, $userfile) { // $folder = $country_folder/$company_folder // $userfile = uploaded file name // $name = name of picture in the company folder

echo $userfile_type . '<br>'; // test THIS LINE DOES NOT PRINT OUT // will not recognize any type of file if ($userfile_size<40000) { // if correct size if ($userfile_type == "image/gif") { // and if correct type if (copy($userfile, "$folder/$name")) { // then copy echo("<B>File successfully copied!</b>"); } else { echo ("<b>Error: failed to copy file ... </b>"); } } else { // else you sent a wrong file type echo 'We can only accept GIF files. The uploaded file cannot be accepted.<br>'; } } else { // else you sent a file too bog echo "<b>The uploaded file is too large.</b>"; } // destroy old file unlink($userfile);

}

$folder = '../aaaworking'; $name = 'logo.gif';

SaveNameImg ($folder, $name, $userfile);

?>

The exact error is : It seems to go into the first loop (correct size), but it will reject it because of the TYPE.

The exact code will work without calling a function. I don't know what is wrong, but watching the soccer game does not help. :-)

Happy Easter to all. Andrew

attached mail follows:


At 11:34 AM 4/23/00 -0700, you wrote: >I have this script that works well; however when I try to include it >into a function, I seem to lose all my file properties and cannot work >with them. The script is: > ><? >//Copy the file to somewhere >function SaveNameImg ($folder, $name, $userfile) { > // $folder = $country_folder/$company_folder > // $userfile = uploaded file name > // $name = name of picture in the company folder > >echo $userfile_type . '<br>'; // test THIS LINE DOES NOT PRINT OUT > // will not recognize any type of file > if ($userfile_size<40000) { // if correct size > if ($userfile_type == "image/gif") { // and if correct type > if (copy($userfile, "$folder/$name")) { // then copy > echo("<B>File successfully copied!</b>"); > } else { > echo ("<b>Error: failed to copy file ... </b>"); > } > } else { // else you sent a wrong file type > echo 'We can only accept GIF files. The uploaded file cannot be >accepted.<br>'; > } > } else { // else you sent a file too bog > echo "<b>The uploaded file is too large.</b>"; > } > // destroy old file > unlink($userfile); > >} > >$folder = '../aaaworking'; >$name = 'logo.gif'; > >SaveNameImg ($folder, $name, $userfile); > >?> > >The exact error is : It seems to go into the first loop (correct size), >but it will reject it because of the TYPE. > >The exact code will work without calling a function. I don't know what >is wrong, but watching the soccer game does not help. :-)

Hi Andrew,

Functions operate in a local namespace - this means that they do not have access to any variables that are defined outside.

The test for image size fails because your function cannot find $userfile_type.

Make sure that you are passing all of the variables that you use in your function to the function. i.e. SaveNameImg ($folder, $name, $userfile, $userfile_type, $userfile_size)

or you can also use the global keyword in your function to give you function access to global variables:

function SaveNameImg ($folder, $name, $userfile) { global $userfile_type, $userfile_size; ...

or you can use the $GLOBALS array:

if ($GLOBALS['userfile_type'] == "image/gif") {

Also check the PHP manual in the section on variables for more information.

HTH,

Zak

attached mail follows:


Yes

> >Is there a way to use ereg_replace to replace "First" instance of the > >matched pattern.

I guess I did not make myself clear. I want to change all phone numbers to a unified pattern. So If someone puts a 1 in front of a phone number I want to drop the first 1. I am using $phone = ereg_replace( "[^0-9.]", "", $phone); to get rid of all characters except the numbers. This seems to work fine. Then I check the length. If it is 11 then it is wrong or there is a 1 in front of the phone number. It is the 1 I want to delete. Then I want to put it all back together like this: 841-259-1189. This way all phone numbers will look the same and take up the same amount of space.

The manual does not do a good job of explaining what can be done with ereg_replace(). I have see all kinds of things done with it that could never be figured out from the manual. Is there some place that has more information on this function?

Ted Knudson http://www.automatedcabinets.com http://www.pulsarusa.com

> -----Original Message----- > From: Zak Greant [mailto:zakfreeimages.com] > Sent: Sunday, April 23, 2000 1:24 AM > To: Ted Knudson > Cc: php3lists.php.net > Subject: Re: [PHP3] How to replace "First" instance of the matched > pattern? > > > At 12:52 AM 4/23/00 -0500, you wrote: > >I need to change 18412591189 to 8412591189?

> >Is there a way to use ereg_replace to replace "First" instance of the > >matched pattern. > >I can not figure out how to do it with substr_replace() > >and I can not use substr_replace() because my host does not have > PHP version > >4. > > Hi Ted, > > What is the rule behind converting 18412591189 to 8412591189? > Are you just > looking to drop the leading 1? Please be more specific. :) > > Zak > > >

attached mail follows:


Hi Ted and List!

>I guess I did not make myself clear. I want to change all phone numbers to a >unified pattern. So If someone puts a 1 in front of a phone number I want to >drop the first 1. >I am using $phone = ereg_replace( "[^0-9.]", "", $phone); to get rid of all >characters except the numbers. This seems to work fine. Then I check the >length. If it is 11 then it is wrong or there is a 1 in front of the phone >number. It is the 1 I want to delete. >Then I want to put it all back together like this: 841-259-1189. This way >all phone numbers will look the same and take up the same amount of space.

To delete the leading one and reformat the number, you can use this regex:

ereg_replace ('^1(.{3})(.{3})(.{4})', '\\1-\\2-\\3', $cleaned_number);

Here is a breakdown of what the regex means:

^: The caret indicates the start of a line

(): If the regular expression within a set of brackets matches some text, then the matched text will be placed into a special register where you can access it later. The register works very much like an array. \\1 will give you access to the match in the first set of brackets. \\2 will give you access to the match for the second set of brackets. You can only access the register within replacement_string argument of your ereg_replace function call.

.: indicates match any character. We can do this because you have already cleaned out any non-numeric characters.

{}: Curly braces with a single number inside let you specify an exact number of matches for the preceding character in your regular expression. You can also use two numbers in the braces that are separated by a comma - this syntax lets you set a range of numbers. For example, [a-z|0]{1, 4} would match any string that contained any combination of a to z or 0 from 1 to 4 times.

>The manual does not do a good job of explaining what can be done with >ereg_replace(). I have see all kinds of things done with it that could never >be figured out from the manual. Is there some place that has more >information on this function?

Regular expressions are complex beasts. When I get back to work on Monday, I will check my resources to see if there are any online documents that I can recommend. There is a little summation on regular expressions in the back of the MySQL manual. Also try the 'Mastering Regular Expressions' book by O'Reilly.

HTH,

Zak

attached mail follows:


Hi everyone.

I have a cookie problem I cannot solve. I've consulted the mailing list + manual pages to no avail.

I have a script that sets a cookie and then calls the header function to redirect to another page. The problem is that the cookie does not set if I call the header. I have tried putting the cookie into the header itself but that doesn't do any good. I am calling the cookie first then the header (but i have tried it the otherway round as well). The cookie function and header function both work fine on their own. I am using PHP3 and Microsoft Personal Web Server and IE5.

Has anyone come across this problem and found a solution? (I don't want to use meta redirection).

Cheers and happy easter

Martin

attached mail follows:


You can make lif a lot easier by using the PHP3 CGI binary.

This way you can make executable PHP scripts just like you do with perl or the shell :

#!/usr/local/bin/php <?php // php script ?>

and you can execute these scripts from the crontab just like you would perl or shell scripts.

Danny

---

----- Original Message ----- From: ""Arnold Gamboa"" <arnoldc.gamboamileuweb.com> Newsgroups: php3.general Sent: Sunday, April 23, 2000 6:06 PM Subject: [PHP3] cron jobs for php apache compiled

> Hi there, > > I'm trying to run a php script every day. I think cron job can do this > stuff. The problem is I'm not familiar with it :).. How can i execute a php > file (say php.phtml) every 12:00am everyday. Kindly give me an example of > how I can do this while on telnet. Oh, btw, i'm running php on apache > module > > God bless. > > > Arnold Gamboa > Web Programmer > ------------------------------- > If Christ is our programmer, > How can our lives have bugs! > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net >

attached mail follows:


If PHP is compiled as an Apache module,. you can use lynx to run the script by adding the following cronjob:

0 0 * * * lynx -source /path/to/file/php.phtml

Andrian

Danny Heijl wrote: > > You can make lif a lot easier by using the PHP3 CGI binary. > > This way you can make executable PHP scripts just like you do with perl or > the shell : > > #!/usr/local/bin/php > <?php > // php script > ?> > > and you can execute these scripts from the crontab just like you would perl > or shell scripts. > > Danny > --- > > ----- Original Message ----- > From: ""Arnold Gamboa"" <arnoldc.gamboamileuweb.com> > Newsgroups: php3.general > Sent: Sunday, April 23, 2000 6:06 PM > Subject: [PHP3] cron jobs for php apache compiled > > > Hi there, > > > > I'm trying to run a php script every day. I think cron job can do this > > stuff. The problem is I'm not familiar with it :).. How can i execute a > php > > file (say php.phtml) every 12:00am everyday. Kindly give me an example of > > how I can do this while on telnet. Oh, btw, i'm running php on apache > > module > > > > God bless. > > > > > > Arnold Gamboa > > Web Programmer > > ------------------------------- > > If Christ is our programmer, > > How can our lives have bugs! > > > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


Sorry about that last post - I wasn't finished, and hit 'send' by mistake.

I just realized in Eric's post that it was PHP3 he was using - does the MSSQL70.DLL work in PHP4 yet? Maybe that's the whole problem here...

Sorry for the disturbance!

========================== Michael Kimsal http://www.tapinternet.com 734-480-9961

attached mail follows:


Help, I'm a newbie trying to setup PHP on my Windows 2000 Server machine and I'm getting this error: "CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:"

There is nothing after that so I take it it's not sending anything to the header. Could anyone please point me in the right direction (I don't know what to do). Thank you.

attached mail follows:


Greetings

As every1 used php3 with mod_perl ?

I compiled apache-1.3.12,mod_perl-1.23, php3-3.0.5 and php scripts go wild on me, especially those which generate forms.

What did I do wrong ?

l8r

Joao

^\ /^ O O ----------------------------------------o00-(_)-00o--------------------------

Be free and open and breezy! Enjoy! Things won't get any better so get used to it.

----------------------------------------------------------------------------- PGP key available upon request or may be cut at http://pedras.webvolution.net/pgpkey.html

attached mail follows:


Hi Folks,

When I'm configuring PHP4, I get stuck with the following:

[rootfreesms php-4.0RC1]# ./configure --enable-track-vars --with-apxs --with-mysql loading cache ./config.cache

Running system checks checking for a BSD compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... yes checking for working aclocal... found checking for working autoconf... found checking for working automake... found checking for working autoheader... found checking for working makeinfo... missing checking whether to enable maintainer-specific portions of Makefiles... no checking host system type... i686-pc-linux-gnu checking for bison... no checking for byacc... no configure: warning: You will need bison if you want to regenerate the PHP parsers. checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking how to run the C preprocessor... gcc -E checking for AIX... no checking for gcc option to accept ANSI C... none needed checking for ranlib... ranlib checking whether gcc and cc understand -c and -o together... yes checking whether ln -s works... yes checking for flex... no checking for lex... no ./configure: flex: command not found checking for flex... lex checking for yywrap in -ll... no checking lex output file root... ./configure: lex: command not found configure: error: cannot find output from lex; giving up

I don't understand the error message and I'm not sure what I'm doing wrong.

Please help, thanks in advance, regards,

Michael.

attached mail follows:


Hi Folks,

The configuration finally succeeded. So did the `make` and the `make install`. Now I have another problem...

in httpd.conf I got the following relevant directives:

# LoadModule foo_module libexec/mod_foo.so LoadModule php4_module libexec/libphp4.so

# And for PHP 4.x, use: # AddType application/x-httpd-php .php .php4 .php3 AddType application/x-httpd-php-source .phps

And I have restarted Apache (which is 1.3.12 btw). And there are no errors according to `apachectl configtest`.

Now when I open a php page, the servers try to serve it as a download.

What am I overseeing or doing wrong?

Thanks again!

Michael.

attached mail follows:


Folks,

Here goes my regex puzzle:

$t="specialist"; $str="I am a Word Processing Specialist from New York"; $profession=ereg_replace(".*([A-Z]*[a-z]*) *($t1) *([A-Z]*[a-z]*).*","\\1 \\2 \\3",$str) ;

I would expect the result to be $profession to be "Word Processing Specialist".

This does not parse properly in php3.

Any suggestion on how'd I parse this??

thanks!

Shailendra

attached mail follows:


use ereg not ereg_repace.

Gp.

attached mail follows:


Nope, ereg_replace is correct. The question is about the RegEx grammar as supported by php3 and not about the call.

Thanks

-----Original Message----- From: George Papadakis [mailto:georgepforthnet.gr] Sent: Sunday, April 23, 2000 4:05 PM To: Shailendra Majmundar; php3lists.php.net Subject: Re: [PHP3] RegEx Question

use ereg not ereg_repace.

Gp.

attached mail follows:


Greetings from a real newbie. I would be most grateful if someone could show me how to achieve the following :

If my pages get a hit from a predefined IP address then "footer1.inc" gets put in , but hits from all other IP's get "footer2.inc" put in.

eg; <?php if ( getenv ( "REMOTE_ADDR" ) != "201.55.182.170" ) include ("footer1.inc"); else include (footer2.inc"); } ?> <head> </head> <body> bla bla <? include("footer1.inc") if from the above IP address else include("footer2.inc"); ?> </body>

Thanking you all in advance Gee Fraser

geegeewizz.co.nz www.geewizz.co.nz what a site !

attached mail follows:


Is the 'execute' box checked for the directory that you are working in?

Rossi Designs PO Box 1084 Holly Hill, FL 32125-1084 Phone : (904) 226-8979 URL : http://rossidesigns.net ----- Original Message ----- From: Mickael Foucher <mikefnac.net> To: <php3lists.php.net> Sent: Saturday, January 22, 2000 7:15 AM Subject: [PHP3] problem with PWS

| I have problems when I want to use PHP3 whit PWS. | PWS returns this error : HTTP 500 | My PHP3 scripts works when I use a shell command but not whit PWS. | Can you help me ? | | Thanks | | | -- | PHP 3 Mailing List <http://www.php.net/> | To unsubscribe, send an empty message to php3-unsubscribelists.php.net | To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net | To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 | To contact the list administrators, e-mail: php-list-adminlists.php.net | |

attached mail follows:


i have a linux box with apache and php running on a server with the ip 1.1.1.1

now i would like to allow users via the web to change their password on a server (1.1.1.2) running linux and sendmail. here is the code that i came up with but it doesn't change the password.

<?php $sp = fsockopen("1.1.1.2",23); if(!$sp){ echo "Error: Can't establish connection"; exit; } fputs($sp, "$user"); fputs($sp, "$oldpwd"); fputs($sp, "passwd"); fputs($sp, "$oldpwd"); fputs($sp, "$newpwd1"); fputs($sp, "$newpwd2"); fclose($sp); echo "password changed"; ?>

attached mail follows:


Pat, thank for your input. I ran the memtest and "nada"! Everything looked ok! This error is realling driving me up the wall! I even tried 8 consecutives makes. Still nothing. Do you have anymore ideas? Ran out long time ago.

I've tried in three diferent machines, including a Compaq Proliant 3000R. All with the same results. I'm sure its because of something I'm missing.

I'm trying with Linux RedHat 6.2 on two computers and RH 6.1 on a processor machine. Also Apache 1.3.12, PHP 3.0.16, MySQL 3.22.32, Postgresql 6.5.2-1, Sysbase-CT (not sure what version) libraries, ( I tried pdflib 3.0 but aparently PHP does NOT like this version, but thats another story and I left that out) openldap-1.2.7-2, openssl-0.9.5a.

I need apache with mod_ssl (with RSA and mm-1.0.12 [shared memory library]) and php with the above options.

Does anyone have a similar build that you can send me? Would that work?

Thanks

Sergio

I can't beleive

On Sun, 23 Apr 2000, Pat Collins wrote:

> Got to freshmeat.net and look for a program called memtest. This will let you test your memory and is suppose to work well. My experience is that if your motherboard was bad your computer wouldn't work right for anything, if your cpu is bad then you would get processor oops and your whole system would crash, but if your memory is bad you will see signal 11's, when under load like compiling a program. Try memtest, and if it says anything then get new memory. You also might try disabling the motherboards cache memory and see if it is causing the problem. > > Pat > > > On Sun, Apr 23, 2000 at 02:48:33AM -0500, Sergio A. Murillo wrote: > > Pat, should I get more RAM, change it or change motherboard? What should I > > do? > > > > Sergio > > > > > > On Sun, 23 Apr 2000, Pat Collins wrote: > > > > > I bet you have bad (or nearly bad) memory, using different options places a different load on the machine. > > > I had one machine where it would take 20 times to recompile apache, new memory fixed the problem. > > > So, Keep trying the make until it compiles. > > > > > > Pat > > > > > > On Sun, Apr 23, 2000 at 12:23:03AM -0500, Sergio A. Murillo wrote: > > > > Hi all!, > > > > > > > > I've been triyn for some time now to compile php as an apache module but > > > > always get the same error. > > > > > > > > ./configure --with-apxs=/usr/sbin/apxs --with-mysql --with-pgsql=/usr > > > > --with-xml --with-sybase-ct=/root/sybase > > > > --with-openssl=/root/openssl-0.9.5a > > > > > > > > I always get an error when the Makefile invokes the apxs script! The error > > > > is: > > > > collect2: ld terminated with signal 11 [Segmentation Fault], core dumped > > > > > > > > So I got with the static module compilation > > > > ./configure --with-apache=/root/apache_1.3.12 etc.... > > > > make > > > > make install > > > > > > > > All goes well so far... > > > > > > > > When compling the apache server with these options > > > > > > > > SSL_BASE=../openssl-0.9.5a RSA_BSE=../rsaref-20/local EAPI_MM=../mm-1.0.12 > > > > ./configure --enable-module=ssl --with-layout=RedHat --enable-shared=ssl > > > > --activate-module=src/modules/auth_mysql/libauth_mysql.a > > > > --activate-module=src/modules/php3/libphp3.a > > > > > > > > When the makefile reaches the php library it stops with the same error > > > > collect2: ls terminated with signal 11 [Segmentation Fault] > > > > > > > > CAN ANYONE PLEASE HELP!!!! > > > > > > > > THANKS! > > > > > > > > Sergio Murillo > > > > > > > > > > > > > > > > -- > > > > PHP 3 Mailing List <http://www.php.net/> > > > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > > > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > > > > > > > >

attached mail follows:


Hi all.

I've started to tidy up and redo the PHP FAQ and I'd like some initial feedback from you guys/girls.

I'll go through the mailing list archives based on my experiences with what usually pops up here so no need to suggest topics yet, we'll hold off with that until I can post something for you to take a look at first.

What I would like to know though is how valid you feel the information regarding migration from PHP/FI 2.0 to PHP3 and new features in PHP3 is. Should this be included along with info on what's new in PHP4 as well as info on what needs to be done when going from 3 to 4? Or should PHP/FI 2.0 only be mentioned briefly and link to the old FAQ or a separate document? How many out there are still running on 2.0?

I'm not sure this is something that belongs on the list (unless you feel like discussing it of course 8) so feel free to drop me a line directly.

I'll try to get as much as possible done on the FAQ tomorrow and hopefully have something for you to look at by the end of next week. Don't expect any major changes though, I'm just updating it, not rewriting it from scratch.

Best regards, Martin Edelius

Spirex Digital Design -------------------------------- www: http://www.spirex.se Mail: martin.edeliusspirex.se Phone: +46-31-514651, 0708-113711 Fax: +46-31-514331 Aröds Industriväg 3c S-422 43 Hisings Backa -------------------------------- If I haven't got back to you or done what I'm supposed to, let me know again as I have too much to do for my own good...

attached mail follows:


A sign-up form...

Showing them their info before we insert it into the database...

Used $PHP_SELF to show it, now I need to send them to a different page, to insert it...

So I rename the variables in hidden fields. (See the code, below...)

There's GOT to be a more elegant way, isn't there?

printf('<input type="hidden" name="%s" value="%s">', "firstname", $firstname); printf('<input type="hidden" name="%s" value="%s">', "lastname", $lastname); printf('<input type="hidden" name="%s" value="%s">', "address", $address); printf('<input type="hidden" name="%s" value="%s">', "city", $city); printf('<input type="hidden" name="%s" value="%s">', "state_province", $state_province); printf('<input type="hidden" name="%s" value="%s">', "postalcode", $postalcode); printf('<input type="hidden" name="%s" value="%s">', "country", $country); printf('<input type="hidden" name="%s" value="%s">', "company_name", $company_name); printf('<input type="hidden" name="%s" value="%s">', "work_phone", $work_phone); printf('<input type="hidden" name="%s" value="%s">', "home_phone", $home_phone); printf('<input type="hidden" name="%s" value="%s">', "email", $email); printf('<input type="hidden" name="%s" value="%s">', "referred_by", $referred_by); printf('<input type="hidden" name="%s" value="%s">', "username", $username); printf('<input type="hidden" name="%s" value="%s">', "password", $password);

attached mail follows:


Derek Sivers wrote: > > A sign-up form... > > Showing them their info before we insert it into the database... > > Used $PHP_SELF to show it, now I need to send them to a different page, to > insert it... > > So I rename the variables in hidden fields. (See the code, below...) > > There's GOT to be a more elegant way, isn't there? > > printf('<input type="hidden" name="%s" value="%s">', "firstname", $firstname); > printf('<input type="hidden" name="%s" value="%s">', "lastname", $lastname); > printf('<input type="hidden" name="%s" value="%s">', "address", $address); > printf('<input type="hidden" name="%s" value="%s">', "city", $city); > printf('<input type="hidden" name="%s" value="%s">', "state_province", > $state_province); > printf('<input type="hidden" name="%s" value="%s">', "postalcode", > $postalcode); > printf('<input type="hidden" name="%s" value="%s">', "country", $country); > printf('<input type="hidden" name="%s" value="%s">', "company_name", > $company_name); > printf('<input type="hidden" name="%s" value="%s">', "work_phone", > $work_phone); > printf('<input type="hidden" name="%s" value="%s">', "home_phone", > $home_phone); > printf('<input type="hidden" name="%s" value="%s">', "email", $email); > printf('<input type="hidden" name="%s" value="%s">', "referred_by", > $referred_by); > printf('<input type="hidden" name="%s" value="%s">', "username", $username); > printf('<input type="hidden" name="%s" value="%s">', "password", $password);

$variables = (getenv("REQUEST_METHOD") == "POST") ? $HTTP_POST_VARS : $HTTP_GET_VARS; while (list ($key, $val) = each ($variables)) { echo "<input type=\"hidden\" name=\"$key\" value=\"$val\">"; }

Sterling

attached mail follows:


Thank for your feedback.

Yeap ! I already checked the date format, it displayed in dd/mm/yyyy. But I had tried to add in the format as the displayed format, still can't work.

Any idea ?

<? $connect_paysonel = odbc_connect( 'PAYSONEL' , '', '' ); if ( !$connect_paysonel) {echo "error\n";}

$my_date = '01/01/2000'; $my_name = 'ABC';

$sql_stmt = "INSERT INTO testing values(\"$my_name\",\"$my_date\")";

$query_paysonel = odbc_exec($connect_paysonel, $sql_stmt); ?>

Error Message Warning: SQL error: [Microsoft][ODBC Visual FoxPro Driver]Data type mismatch., SQL state 22005 in SQLExecDirect in C:\InetPub\www\IT\odbc_foxpro.php on line 10

Warning: SQL error: , SQL state 00000 in SQLExecDirect in C:\InetPub\www\IT\odbc_foxpro.php on line 11

TIA, Char

-----Original Message----- From: Frank M. Kromann [SMTP:fmkswwwing.com] Sent: Saturday, April 22, 2000 3:01 PM To: chchar Subject: Re: [PHP3] Need Help On ODBC Connect To Visual Foxpro.

Hi,

Try to select the date and display the result. This way you will see the format needed !

- Frank

>-

Swwwing A/S Frank M. Kromann VP Development Phone: +45 70 20 77 20 Fax: +45 70 20 77 21 http://www.swwwing.com <http://www.swwwing.com>

begin 600 winmail.dat M>)\^(A\"`0:0"``$```````!``$``0>0!`(````Y`0```````#H``$(`<` M&````$E032Y-:6-R;W-O9G036%I;"Y.;W1E`#$(`06``P`.````T`<$`!<` M%``?`"0```!)`0$`,`#```-`'!``7`!0`'0`=````0`$!"8`!`"$````R M13<P-#)$0S!%,3A$-#$Q.3V0C`P-C`Y-S-#.#9&,#^!$$`$`.```%)% M.B!;4$A0,UT($EN<V5R="!$871E($EN=&\5D9O>'!R;R!486)L92!">2!5 M<VEN9R!/1$)#+`T$$-`0``````(```!`Y`&`%`/```L`````P`[` M!``````P````````$8`````4H4``+<-```>`#R`""`&``````#````````` M1````!4A0```0````0````X+C```P`]`!``````P````````$8````` M`84````````+`#Z`""`&``````#`````````1`````#A0````````L`/X`( M(`8``````,````````!&``````Z%`````````P!``!``````P``````` M`$8`````$(4````````#`$&`""`&``````#`````````1`````1A0`````` M``,`0H`((`8``````,````````!&`````!B%````````'!#`!`````` MP````````$8`````-H4```$````!`````````!X`1(`((`8``````,`````` M``!&`````#>%```!`````0`````````>`$6`""`&``````#`````````1`` M```XA0```0````$``````````$)$`$```#F"0``XD``+T7``!,6D9UXC,6 MK0,`"!R8W!G,3(U<C(,8&,Q`S`!!PM;I$.$#`S,P\69F4/DD\!]P*D`V," M`&-H"L!SA&5T`M%P<G$R``"2*JA;F\24"`P`="%`=`V#Z`P-3`T%"'S`=`4 M$#1]!VT"P!0`]3[$?\3"V(3X110$[(8]!30$P<3%>0P-Q&.,C,XQ1=4(`=M M($-%&4;H<\:K11`&[\<Q7ER%>0/D+D1CC$V%C$?'P."1PG1?FLE18Q(3X. M4")?`W-4SPAP()4EH2$].#8EOQS$^D('0'0-X""5#\`671N(^P<3'1<Q'N$K M?1[7+/4=_\H\19L(AL]".Z&G$PSB6F_RST)R;H3#-*.<L]"IV`I%5".8[ M"6\P.5]E#C`U_SJ*.Z$[7SQI.G0\DCK_/L^?/HT^#SP_.H\08#(X1%K_17%% M+T8Y.G1&8D3/2)](7?='WT8/2=0Y#E!-)$Z!1J-#3H`"G-T>6P'D&=">!T M```34`/P9&-T"FP*L5Q0V&%D:G5S3_`%$&=H!4(6,P!8X<)P%#`S!S;F5X M%S`O![`%L`#``G-S`%!S8I8R%%!/X&$3\%QK">!^<`N04+]1(PA41`+&7] M4"!V5^`!0%(;##!2Y!N-U7`!*`+&=&<5-F8F']%Q!D`B!4(%/&4%!2$%H1 M_"`Q3[,.4%4?5B]7/P!1_UA\`*!2[EK_7`9/I`_`70]_7A]?+PY06&]ACV*? M7#,S^P*"$Q!C5.!J(5(07#`JH$E8$"!$`1!A=2J0(`I0"L!A"<!A<&CD8" M(52D0\!F:2T=D5\!0%>P;K-ECU$C8L<L\)4'#2%J!PTG<T0\$7`/YP`=!K M\E(_:1]J)FY0;1!;!1`","UML`-A.BE;Z%V,%-U8FH%D'1V,.!$871E.E2D M*/%NG_]OKW"_<<]RUU!`7",.(6HA;UDV#E!S[W3^4E!%P$_DA<$0205*0: M<7/>1]Z+[][.U>/?#\/D(?P"-!B"K#\=#AH>]49)!^/W]&B(#S%`+4'DO M;<![,`L1,7^<U2D&Z&!SX+?^][/W+?OXGOBO^,!'92=?1W*3F./W=1OP,P MB#,YDA^3+YD1/AO8W4'`(P!=!M&M6SY$D;#4,8`E08V8I4)HW\6O12'EP M!)"%\2/Q:V/%.7!V`E$>U6?,):AWQ72%M`6TCB!`54S9/&6P>^6L);PC]$! M&YVL`!"?#?;"";`(!5&!\TF4`\)N`EU``GN`.4'8(D'=K"X#^9![I-($ M\`=`$&$!0`X`[X^B7`*F-0(0;P5"%R$2\AUW0&T+47=`'1`Z7%SU=8!O;6%M M;;`#$`>0J.`F30W`V!S;P&`($_7`2`-X*07*J610#``Q#Z+FGP=*%%Q"6 M\%.AA?+N>&2QK%)LM&.$1,"`(#Y!9!L=F`A95`.<%1KC+_`9``(*["I2&; MP0'!KC$6X)\/<```95`,T`&0("Z?9/^N1Y0KN(JD)=`KU^P;[%_OP_`95`% M;,?M"^U/VP>X-UE4&RRW[>?N*4IL:Q#P,>V?[M?N)1B(""D;Q__ZYS*/"Z M+[[OO__!#ZZ&G#_PE*O+\._Q,^QK!NPE_'W__([\G_KJ"6,;?S&_-?\Z$ MGPKY`S"6KY>_F4U[5+A!Y&LHZ$>0AAUY`)X&)D:;!C:RX*A0J%68%<$'` M(2!)(`=`\SEPU8!Y(!;0!9!E(%.<G104"!DJ(*CHG<P+-X;$#;8`0`"U%Y MVP$+(,*A6P+VUM+WG>`?XN*F"%T-H!?.';(`B!VQ'^;]H;"#=`=LCV\3: M(`0_]LSW(8*A=O&3_`#$`,I<"["Y`7'6G<!.`!4!W!;#/V*#9)J%Y0!! M;MJ0W##;`0"X\#_8S`*0/.76Y0!:)`6;E/U'!?"K!Y(ZI`AA$/2`$<&)C M`E_GI2)U!!68!33TY%3"<W"#L)R?J8KS0.^2G!I#-\)O9X.>?*>2GY0%< M>P60[FC?<(W`V&!LXU0$D`-7]3`U!``$.YW1%!]Y#XD^&UY7]MSZ+#MP>Z5 M`I#X,#$O\M$!T(?P`I'C13OK"/%B;JE0\=+R-D%"AD/SGN<(<W%L7T_P#FT% M0/5"[G=)3E-%Y%)4^0%43]L!Y`JH,U<478'0`I0<RBHX.^)N_2V^LLL^L_; M<OS[*>^*?_:OXU`$D/&`Z"Y3\`60*)_L#]P]Z?J\.27/SX:$/_E[0KSU`^/ M.6B0D`EN49#O>=81>T7O$IOP^I!DT&>^907/!M_576XS>!7W7!G6(:$'9Q M44SN]'8P6R&I]UU;3T3U\"!6[1:`=3?Q;<!XJ0%LD&G8!Q77<AN/"D<B!M M%H#[V_$6T"[<(`]RT%&HD7X0+X?P=6#3X0]Q10)A1&F_.7`,L-_"&A'-X*C" M25/;'10=J"HX'<7,!:!5)>HX.C3IU!X*2!O+FV0OG`:$.C`T_"%\A8$,183 M__-B&1,:1!83#L\/TQ.ZA_&_A_`4SQ7?%N\7_QD*,0M_/PR/#9XBWR/O)/_= M1%1)]$$LY*=#,4$%7R:?)Z__)9\KLH7PH>(K_RT/.+%3<D.>H*X"8FMM:]!3 M($Y?G`"KP!*"?2TSHD__:"'=$#?Q"P4SHRL+TZ:!??XT9*$O?X]?A,^%WX;O MA___B0_7`C&F=?.H(*'`=>'78CI-WD!+='C$-/P6U,3510.F8R$!SRR`Q M6A$NZ2!M735/-E3_C3LWCSB?.:^1/]9L:($QM?Y3F\%`-!HA2I9W,-`\:#Z M>=P02%`J\`48=P\S+M:S`Z\M!M$$WF5TIHE3'_2UVY$Y/2N%VI4M=%`0 M`8!02%`S72!.V$'?,$P*J`T_`0XT/GM'9!_Q$I(4)##]/B+Q\P+TD/UO/S M4/QM4AI*;8I%$WU+_*`[4!ZQVS?C$-SPW'7;(_^?P!%0RX#>0-=`$4#C MP%_A_]?AX\#BPH"XY'&&IV%"]VP$AV,QUTM=AV,P^-3;-W3530E3E("]3 MW35`GIG=-590;)$[<6]PF[)=W350[B!U$'8P*T?P(&8WGJ!(83<W37%G1F&^ M>&K.(L=WD(U0.T!DK(^9NYW1!:0#&(,!94!7Y0$SY$$O>L'1T<.Z+R\ M,2Y"24N9K(]\:%A;B,]L=T013`S(```T,GJ>?FZS`1C((`J!+J2+`!U M`!=U!6`G1UP7``.`O=D$B=W:#+!S=H5I``AN`&=VX6,`;P#J;74!X'0- M,'6/=I]WJ_]Z<'4`GV!M\NY2##+#&"_YF2G95P?T*C?-.?P1%`V%!?G[*M MD-LPF6"?P61^D&W,-C29H$50-#>)Q3((?Z,Q,ODN+UAO67\Q6^96?0(`B,`` M``,`+``````"P`"``$````>`'```0```#,```!;4$A0,UT3F5E9"!(96QP M($]N($]$0D,0V]N;F5C="!4;R!6:7-U86P1F]X<')O+```%Q``$````; M`````;^L+>(23WG&OQ#$=2`1`"0)Y_%X0!9YH`$``.0`F:+XVE:V_`0,` M\3\)!```'`Q0`$````O````+T\]34E#4D].+T]5/4--4S`S+T-./4580TA! M3D=%(%5315)3+T-./4-(0TA!4```P`:0``````>`#!``0```"\````O3SU- M24-23TXO3U4]0TU3,#,O0TX]15A#2$%.1T455-%4E,O0TX]0TA#2$%2```# M`!E```````,`_3_D!````P`F```````#`#8```````,`!#_____`%'``$` M```S````8SU54SMA/2`[<#U-:6-R;VX[;#U?0TU3,#-%6$-(,2TP,#`T,C0P M,C,Q,S9:+3$T,CD```(!^3\!````2P````````#<IT#(P$(0&K2Y"``K+^&" M`0`````````O3SU-24-23TXO3U4]0TU3,#,O0TX]15A#2$%.1T455-%4E,O M0TX]0TA#2$%2```>`/_`0````<```!C:&-H87(``!X`.$`!````+P```"]/ M/4U)0U)/3B]/53U#35,P,R]#3CU%6$-(04Y'12!54T524R]#3CU#2$-(05(` M``(!^S\!````2P````````#<IT#(P$(0&K2Y"``K+^&"`0`````````O3SU- M24-23TXO3U4]0TU3,#,O0TX]15A#2$%.1T455-%4E,O0TX]0TA#2$%2```> M`/H_`0````<```!C:&-H87(``!X`.4`!````+P```"]//4U)0U)/3B]/53U# M35,P,R]#3CU%6$-(04Y'12!54T524R]#3CU#2$-(05(``$``!S#(FIKPDZV_ M`4``"#!`Q/CJE*V_`1X`/0`!````!0```%)%.B``````'`=#$````V```` M6U!(4#-=("!);G-E<G01&%T92!);G1O(%9&;WAP<F\5&%B;&40GD57-I M;F<3T1"0RX````+`"D```````L`(P```````P`&$"KZ/RD#``<0IP,```,` M$!```````P`1$`$````>``0`0```&4```!42$%.2T9/4EE/55)&145$0D%# M2UE%05!)04Q214%$64-(14-+14142$5$051%1D]234%4+$E41$E34$Q!645$ J24Y$1"]-32]965E90E5424A!1%12245$5$]!1$1)3E1(149/`````#<O ` end

attached mail follows:


On Sat, 22 Apr 2000, Wizaerd wrote:

> I had seen a message regarding a postgresql record is limited to 8k. Coming > from a SQL Server background, I found this completely unbelievable, so I > started extensive reading of the postgresql manual, and sure enough it's > true. Granted 8k isn't s tiny number, but it's sure not what I was hoping > for or expecting.

You can do what we used to do in Oracle when we were limited to 32K: break the data into chunks. If free is important, that's a solution to the problem.

You wind up with something like this:

other_key part_no data

Where other_key + part_no is unique.

Just remember, it's only a pain once. When you write functions to break apart and reassemble, you'll only have to do it once.

> As I read further and further into the documentation, I've started to > question my choice of using PostgreSQL... so now I'm looking for advice. > On a linux system, which database offers the most robust features and fast > performance?

Are these ALL your constraints? Because you haven't said why you didn't choose, say, Informix, Sybase, DB2 or Oracle. In my experience, Oracle is often faster than Informix (but Oracle's a resource hog), Sybase and DB2 are good. If network traffic between the database server and the back end is an issue, Oracle is a good choice.

But MySql and PostgreSQL have an advantage over the others mentioned: they're free (in MySql's case, free for most uses).

> I hear mySQL is fairly fast, but there are no stored > procedures, triggers, etc... which is very limiting.

It's a limited implementation when that is all one needs.

-- 
_Deirdre   *   http://www.linuxcabal.org   *   http://www.deirdre.net
"Dictators ride to and fro upon tigers which they dare not dismount.
 And the tigers are getting hungry." -- Winston Churchill

attached mail follows:


Hi List..

Here is a small code which is in ASP. I need to convert it into PHP as the programming flow would be the same.

Here see the line starting with ** (a qauery), which I am bit confused about. What exactly is happening and how it works ?. I just wanted to proceed with PHP - the same.

-----------------------------------

<%response.write(request.form("cat1"))%><br>

</font> in <% for each l in request.form("cities") %><font color="#fbb117" style="text-transform:capitalize"><% = l %>,</font> <% next %> has produced <% for each j in request.form("cities") for each i in request.form("cat1")

Set MyConn=Server.CreateObject("ADODB.Connection") MyConn.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.mappath("Directory.mdb") Set RsProfile = Server.CreateObject("ADODB.RecordSet") ** RsProfile.Open "Select * From Profile Where Status = 'Yes' and Id In(Select ProfileId From Category Where Item Like'%" & i &"%')" , MyConn,adOpenstatic

If NOT(RsProfile.BOF AND RsProfile.EOF) Then While NOT(RsProfile.EOF) If Trim(j = "") Then queryCity = " " Else queryCity = j End If If Trim(RsProfile("City") = "") Then rsCity = " " Else rsCity = RsProfile("City") End If

If queryCity = rsCity Then counter=counter+1 End If RsProfile.MoveNext Wend End If next next %> <font color=magenta> <% response.write(counter) %></font> listings.<BR> The results have been summarised (city-wise) below. </b><br>

-- All your ideas and help are welcome.

Thanks in advance.

-- K

attached mail follows:


TV Karthick Kumar wrote: > > Hi List.. > > Here is a small code which is in ASP. I need to convert it into PHP as > the programming flow would be the same. > > Here see the line starting with ** (a qauery), which I am bit confused > about. What exactly is happening and how it works ?. I just wanted to > proceed with PHP - the same. > > ----------------------------------- > > <%response.write(request.form("cat1"))%><br> > > </font> in <% for each l in request.form("cities") %><font color="#fbb117" > style="text-transform:capitalize"><% = l %>,</font> > <% next %> has produced <% for each j in request.form("cities") > for each i in request.form("cat1") > > Set MyConn=Server.CreateObject("ADODB.Connection") > MyConn.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=" & > Server.mappath("Directory.mdb") > Set RsProfile = Server.CreateObject("ADODB.RecordSet") > ** RsProfile.Open "Select * From Profile Where Status = 'Yes' and Id > In(Select ProfileId From Category Where Item Like'%" & i &"%')" , > MyConn,adOpenstatic > > If NOT(RsProfile.BOF AND RsProfile.EOF) Then > While NOT(RsProfile.EOF) > If Trim(j = "") Then > queryCity = " " > Else > queryCity = j > End If > If Trim(RsProfile("City") = "") Then > rsCity = " " > Else > rsCity = RsProfile("City") > End If > > If queryCity = rsCity Then > counter=counter+1 > End If > RsProfile.MoveNext > Wend > End If > next > next %> <font color=magenta> <% response.write(counter) %></font> > listings.<BR> The > results have been summarised (city-wise) below. </b><br> > > -- All your ideas and help are welcome. > > Thanks in advance. > > -- K >

This'll do it for you:

http://asp2php.naken.cc/

Sterling

attached mail follows:


Yeah.. I know that site exists. But it's of no use even I convert the needed code into php.

The confusion remains the same. So I am not able to analyse the query. I am trying to write / execute the same query here. In the meantime, if you can help me that'll be fine.

Thanks for your response.

-- K

> TV Karthick Kumar wrote: > > > > Hi List.. > > > > Here is a small code which is in ASP. I need to convert it into PHP as > > the programming flow would be the same. > > > > Here see the line starting with ** (a qauery), which I am bit confused > > about. What exactly is happening and how it works ?. I just wanted to > > proceed with PHP - the same. > > > > ----------------------------------- > > > > <%response.write(request.form("cat1"))%><br> > > > > </font> in <% for each l in request.form("cities") %><font color="#fbb117" > > style="text-transform:capitalize"><% = l %>,</font> > > <% next %> has produced <% for each j in request.form("cities") > > for each i in request.form("cat1") > > > > Set MyConn=Server.CreateObject("ADODB.Connection") > > MyConn.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=" & > > Server.mappath("Directory.mdb") > > Set RsProfile = Server.CreateObject("ADODB.RecordSet") > > ** RsProfile.Open "Select * From Profile Where Status = 'Yes' and Id > > In(Select ProfileId From Category Where Item Like'%" & i &"%')" , > > MyConn,adOpenstatic > > > > If NOT(RsProfile.BOF AND RsProfile.EOF) Then > > While NOT(RsProfile.EOF) > > If Trim(j = "") Then > > queryCity = " " > > Else > > queryCity = j > > End If > > If Trim(RsProfile("City") = "") Then > > rsCity = " " > > Else > > rsCity = RsProfile("City") > > End If > > > > If queryCity = rsCity Then > > counter=counter+1 > > End If > > RsProfile.MoveNext > > Wend > > End If > > next > > next %> <font color=magenta> <% response.write(counter) %></font> > > listings.<BR> The > > results have been summarised (city-wise) below. </b><br> > > > > -- All your ideas and help are welcome. > > > > Thanks in advance. > > > > -- K > > > > This'll do it for you: > > http://asp2php.naken.cc/ > > Sterling > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net >

attached mail follows:


i want to know about stability of php and asp in winNT and operating speed of php and asp in winNT

attached mail follows:


I write a script like this

$fd="directory/filename"; $check=file_exsits($fd);

if (!$check) { fwrite($fd,$string); } else { blah...balh } I got an out that said that the line 5 is not a valid File-Handler

well accidentally my script run OK (just for once) I get a my file write in $fd. When i try for the second time that error comes up. any suggestion what kind of mistake that i'd made

Thanks in advance

-Yamin-

attached mail follows:


Hi Phpers,

Anybody ever put together a query statement dynamically?

For example, if 3 of 10 checkboxes are checked from a previous page, I'd like to loop inside a resultant query, and actually make it work, with this as the result:

$doit=mysql_query("update T1 set col1='y', col7='y', col10='y' where id='$id'");

Instead of this .....update T1 set col1='$c1', col2='$c2', col3='$c3', col4='$c4', col5='$c5', col6='$c6', col7='$c7', col8='$c8', col9='$c9', col10='$c10'....

I've tried to loop inside a query, but could never get it to work.

Thanks,

Mark

art-nude.com