OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Sat Mar 24 2001 - 11:39:19 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    php-general Digest 24 Mar 2001 17:39:19 -0000 Issue 586

    Topics (messages 45411 through 45433):

    i get this for some reason
            45411 by: adam
            45414 by: adam
            45415 by: Rasmus Lerdorf
            45418 by: adam
            45422 by: Jason Lotito

    Re: installation problem
            45412 by: Rasmus Lerdorf

    Sendmail
            45413 by: Atet Sugiharto

    Session problem
            45416 by: Rol
            45417 by: Felix Kronlage

    Re: Conversion between dates and weeknumbers
            45419 by: Michel Groenenstijn

    Re: mssql
            45420 by: almir
            45423 by: Andrew Hill

    $PHP_SELF - internal error?
            45421 by: Tommy

    php4 but dont work with php3
            45424 by: Mauricio Alarcon
            45426 by: KPortsmout.aol.com
            45428 by: Mauricio Alarcon
            45430 by: Felix Kronlage

    Delaying Printed Output
            45425 by: Greg Scott
            45427 by: KPortsmout.aol.com
            45429 by: Philip Olson

    random letters and numbers
            45431 by: Randy Johnson
            45433 by: Pierre-Yves Lemaire

    Very Easy Help Needed Quick!
            45432 by: Tony Daniels

    Administrivia:

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

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

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

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

    attached mail follows:


    everytime i post text to this file, i get the characters " and ' turning up
    as \" and \'

    is there anything i can add that would keep them from outputting into this?

    here is the code i use:

    <?

    if ($message)
     {
     /* uncomment the next two lines to strip out html from input */
     $name = strip_tags($name);
     /* $message = strip_tags($message); */
     $message = ereg_replace("\r\n\r\n", "\n<P>", $message);
     $date = date("l, F j Y, h:i a");

    if ($email == "") {
    $message = "<hr noshade color=white size=1 width=100%>\n
    <table width=100% cellpadding=10><tr><td>\n
     <font size=2 face=verdana><b>$name </b><font size=1> -- $date</font>\n
      <blockquote>\n
       $message\n
      </blockquote></font>\n
    </td></tr></table>\n\n";
     } else {
    $message = "<hr noshade color=white size=1 width=100%>\n
    <table width=100% cellpadding=10><tr><td>\n
     <font size=2 face=verdana><b><a href=mailto:$email>$name</a> </b><font
    size=1> -- $date</font>\n
      <blockquote>\n
       $message\n
      </blockquote></font>\n
    </td></tr></table>\n\n";
     }
     $fp = fopen ("comment.php.comment", "a");
     fwrite ($fp, $message);
     fclose ($fp);
     }
    readfile("comment.php.comment");
    ?>

    attached mail follows:


    p.s. the submitted text $ message is what is returning the wierd quote
    marks

    attached mail follows:


    Turn off magic_quotes_gpc in your php.ini file.

    -Rasmus

    On Fri, 23 Mar 2001, adam wrote:

    > everytime i post text to this file, i get the characters " and ' turning up
    > as \" and \'
    >
    > is there anything i can add that would keep them from outputting into this?
    >
    > here is the code i use:
    >
    > <?
    >
    > if ($message)
    > {
    > /* uncomment the next two lines to strip out html from input */
    > $name = strip_tags($name);
    > /* $message = strip_tags($message); */
    > $message = ereg_replace("\r\n\r\n", "\n<P>", $message);
    > $date = date("l, F j Y, h:i a");
    >
    > if ($email == "") {
    > $message = "<hr noshade color=white size=1 width=100%>\n
    > <table width=100% cellpadding=10><tr><td>\n
    > <font size=2 face=verdana><b>$name </b><font size=1> -- $date</font>\n
    > <blockquote>\n
    > $message\n
    > </blockquote></font>\n
    > </td></tr></table>\n\n";
    > } else {
    > $message = "<hr noshade color=white size=1 width=100%>\n
    > <table width=100% cellpadding=10><tr><td>\n
    > <font size=2 face=verdana><b><a href=mailto:$email>$name</a> </b><font
    > size=1> -- $date</font>\n
    > <blockquote>\n
    > $message\n
    > </blockquote></font>\n
    > </td></tr></table>\n\n";
    > }
    > $fp = fopen ("comment.php.comment", "a");
    > fwrite ($fp, $message);
    > fclose ($fp);
    > }
    > readfile("comment.php.comment");
    > ?>
    >
    >
    >
    >
    >

    attached mail follows:


    but i am not talking about running a server, i am just using php on server
    space that has php installed.

    what code would i incluse to get rid of this?

    attached mail follows:


    > -----Original Message-----
    > From: adam [mailto:vawanhome.com]
    > Sent: Saturday, March 24, 2001 1:43 AM
    > To: php-generallists.php.net
    > Subject: Re: [PHP] i get this for some reason
    >
    >
    > but i am not talking about running a server, i am just using php on server
    > space that has php installed.
    >
    > what code would i incluse to get rid of this?
    >

    RTM: http://www.php.net/manual/en/function.stripslashes.php

    Jason Lotito
    www.NewbieNetwork.net
    Where those who can, teach;
    and those who can, learn.

    attached mail follows:


    Because PHP needs to be able to find both the lib and the header files.
    Since the header files are nowhere to be found under /usr/lib, that isn't
    going to work. --with-gd=/usr is what you want here.

    -Rasmus

    On Sat, 24 Mar 2001, Paulo Vinícius Vitto Ruthes wrote:

    > can somebody explain me WHY I can't make my PHP
    > compile with GD? I put --with-gd=/usr/lib/ where usualy
    > the libgd.* are, and there THEY ARE, but the ./configure (blabla yada
    > yada yada) returns me that COULDN'T FIND the
    > libgd.* in /usr/lib/
    >
    > does anybody have some solution please?
    >
    >

    attached mail follows:


    Hi ,

    I'm at a loss....I've searched throught the knowledgebase, archives, docs,
    etc but I can't figure out what's going on. The problem is when using the
    mail() function nothing gets send and I don't get any error messages either.
    It's like the message gets eaten by a black hole.

    I already put "-t -i" in the path, but still doesn't work ..
    Anybody can help me ?

    Regards,

    Atet Sugiharto

    attached mail follows:


    Hello all

    each user gets a session id which can be reused later. I am writing all
    encoded details to for that session to mysql database.

    If the same user returns later (hours,day) he/she can use her Id (input box)
    and I get the details from the database.

    I did notice that the session id is also written to the /tmp folder. Linux
    mandrake.

    Things go wrong when I delete the session id in the /tmp folder. It should
    not be there in the first place I think, as all details of that session
    should be written to the db.

    Does somebody know how to fix this?

    attached mail follows:


    On Sat, Mar 24, 2001 at 08:50:16AM +0100, Rol wrote:

    > I did notice that the session id is also written to the /tmp folder. Linux
    > mandrake.

    If php doesn't set a cookie to save the session-registered variables it stores
    them in the locatin set in the php.ini (which is by default /tmp)

    > Things go wrong when I delete the session id in the /tmp folder. It should
    > not be there in the first place I think, as all details of that session
    > should be written to the db.

    mmh...do you write the variables registered with the sessions into the database?
    (since that is the only information stored in the file in /tmp this seems likely)

    -fkr

    -- 
    gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
      |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
      |all your base are belong to us  |  shame on me  | fkrIRCnet | 
    

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.3 (OpenBSD) Comment: For info see http://www.gnupg.org

    iD8DBQE6vGKpDTGb09msdNARAq9EAJ9I663NdCJZ52iaK/3E1+mdnoRtwwCfVKT1 Rh2sCPC/FXlx5qUfRe1UNRs= =L4NT -----END PGP SIGNATURE-----

    attached mail follows:


    Hello!

    I don't think that's the solution to my problem. I have a weeknumber, and I need the dates of the days in that week. With strftime gives the weeknumber for a certain date; its a bit clumsy to check all dates in a year to see if the happen to fall in the week I need :). Any other solutions?

    I don't know how to use the PEAR/Date/Calc.php solution; can't find that php file anywhere...

    Anybody?

    Thanks, Michel

    Jennifer Woodhead wrote:

    > I think you can do it using > strftime > > %V - The ISO 8601:1988 week number of the current year as a decimal number, > range 01 to 53, where week 1 is the first week that has at least 4 days in > the current year, and with Monday as the first day of the week. > > %W - week number of the current year as a decimal number, starting with the > first Monday as the first day of the first week > > -----Original Message----- > From: Yasuo Ohgaki [mailto:yohgakihotmial.com] > Sent: 20 March 2001 09:03 > To: php-generallists.php.net > Subject: Re: [PHP] Conversion between dates and weeknumbers > > How about use PEAR/Date/Calc.php? > > Regards, > -- > Yasuo Ohgaki > > "Michel Groenenstijn" <scylcatv9040.extern.kun.nl> wrote in message > news:3AB7143A.1F79A07catv9040.extern.kun.nl... > > Hello everybody, > > > > I need to convert between dates and weeknumbers, with PHP. Converting a > > given date to a weeknumber can be done with MySQL, but I don't know how > > to go the other way around. I need a function like > > get_dates_in_week($weeknumber). A function to convert between a date and > > a weeknumber without using mysql would help too... > > > > Can anyone help? > > > > Thanx! > > Michel > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    1) if you are running it on linux(web server ) it will cost you about 2000$ at least to connect it , and you will have to use odbc for linux, 2)if you are using ms web server then you have to enable support for that in php3.ini but usualy this way is not good, i usualy had problems with that and i always used odbc with odbc.dll "Mauricio Alarcon" <malarconwebdepot.com.co> schrieb im Newsbeitrag news:3ABBD93A.6050804webdepot.com.co... > Hello > I want to connect to a Microsoft SQL Server, I try with mssql_connect > but the script don't work, it always say > Call to unsupported or undefined function > What I do worng? > > Thanks > > -- > Mauricio Alarcon Rincon > Webmaster - Webdepot > Linux Registered User # 157093 > > > CF-18 Hornet > > \ / > \ _ / > ----/_\---- > x--------------( . )--------------x > x|x | |_|\_/|_| | x|x > x x x x > > http://www.merlinux.org > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Actually, OpenLink's ODBC drivers can get you connected from any UNIX to MS SQLServer, and start out at free of charge for 2 concurrent database sessions. This also includes free support. The commercial pricing for higher concurrent database connections starts at $675.

    The free download is available at http://www.openlinksw.com and a HOWTO on compiling iODBC in with PHP (this is the Driver Manager, which is needed to use any ODBC drivers with Apache/PHP) is available at www.iodbc.org

    Hope this helps.

    Best regards, Andrew --------------------------------------- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com

    On 3/24/01 7:35 AM, "almir" <a.kazazicmedienhaus.co.at> wrote:

    > 1) if you are running it on linux(web server ) it will cost you about 2000$ > at least to connect it , and you will have to use odbc for linux, > 2)if you are using ms web server then you have to enable support for that in > php3.ini but usualy this way is not good, i usualy had problems with that > and i always used odbc with odbc.dll > "Mauricio Alarcon" <malarconwebdepot.com.co> schrieb im Newsbeitrag > news:3ABBD93A.6050804webdepot.com.co... >> Hello >> I want to connect to a Microsoft SQL Server, I try with mssql_connect >> but the script don't work, it always say >> Call to unsupported or undefined function >> What I do worng? >> >> Thanks >> >> -- >> Mauricio Alarcon Rincon >> Webmaster - Webdepot >> Linux Registered User # 157093 >> >> >> CF-18 Hornet >> >> \ / >> \ _ / >> ----/_\---- >> x--------------( . )--------------x >> x|x | |_|\_/|_| | x|x >> x x x x >> >> http://www.merlinux.org >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >> For additional commands, e-mail: php-general-helplists.php.net >> To contact the list administrators, e-mail: php-list-adminlists.php.net >> > >

    attached mail follows:


    Hi, that's my paht:

    ./Webpages/Kalender/php.php

    The value of PHP_SELF in php.php is:

    /Kalender/php.php/Kalender

    How can I fix this Problem? I have PHP 4.04pl1 CGI, Windows ME.

    THX Tommy

    attached mail follows:


    Hello Thanks t all people that reply my last message about a msSQL server,

    But now I got a new problem, my server was running php3 and today i try to update to php4 with apache 1.3.19 and all file .php3 and php4 don't work, the php only make a echo with all code and the php3 ask for a application or save to disk.

    I put this line sin httpd.conf but dont'work AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3-source .phps AddType application/x-httpd-php .php Action application/php4script /cgi-bin/php

    What I'm doing wrong?

    Thanks

    -- 
    Mauricio Alarcon Rincon
    Webmaster - Webdepot
    Linux Registered User # 157093
    

    CF-18 Hornet

    \ / \ _ / ----/_\---- x--------------( . )--------------x x|x | |_|\_/|_| | x|x x x x x

    http://www.merlinux.org

    attached mail follows:


    Hi,

    I`m not sure if this is 100% the right method but you can try it and see. Change httpd.conf to the following.

    AddType application/x-httpd-php .php .php3

    Ade

    attached mail follows:


    Well it work partial, the .php now works but .php3 doesn't work Any other ideas?

    Thanks Mauricio Alarcon

    KPortsmoutaol.com wrote:

    > Hi, > > I`m not sure if this is 100% the right method but you can try it and see. > Change httpd.conf to the following. > > AddType application/x-httpd-php .php .php3 > > Ade >

    -- 
    Mauricio Alarcon Rincon
    Webmaster - Webdepot
    Linux Registered User # 157093
    

    CF-18 Hornet

    \ / \ _ / ----/_\---- x--------------( . )--------------x x|x | |_|\_/|_| | x|x x x x x

    http://www.merlinux.org

    attached mail follows:


    On Sat, Mar 24, 2001 at 10:49:57AM -0500, Mauricio Alarcon wrote:

    > Well it work partial, the .php now works but .php3 doesn't work Any > other ideas?

    make two lines out of it:

    AddType application/x-httpd-php .php AddType application/x-httpd-php .php3

    and so forth.

    -fkr

    -- 
    gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
      |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
      |all your base are belong to us  |  shame on me  | fkrIRCnet | 
    

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.3 (OpenBSD) Comment: For info see http://www.gnupg.org

    iD8DBQE6vMqIDTGb09msdNARAmBZAJ4uj9QoGmUB0Vv66bEX5fj+2B7bIwCcCGJc 7PhpQN8xA+/HzaEkXQxizME= =u6wm -----END PGP SIGNATURE-----

    attached mail follows:


    Is it possible using PHP to print a single line of text to a browser, have a second or two delay and then print the next line, etc. etc.?

    Greg

    attached mail follows:


    In a message dated 24/03/2001 14:47:03 GMT Standard Time, gscotttds.net writes:

    << Is it possible using PHP to print a single line of text to a browser, have a second or two delay and then print the next line, etc. etc.? Greg >>

    Hi,

    You can use the following commands:

    sleep(seconds); usleep(microseconds);

    HTH Ade

    attached mail follows:


    to go along with this, check out :

    Output Control Functions : http://www.php.net/manual/en/ref.outcontrol.php

    and some interesting ones in the Misc section :

    Miscellaneous Functions : http://www.php.net/manual/en/ref.misc.php

    links to a few tutorials are listed in ocf section. speaking of ocf, the Oregon Country Fair is coming up ... July 13-15 2001. the fresh squeezed orange juice is SO good! :-)

    regards,

    philip

    On Sat, 24 Mar 2001 KPortsmoutaol.com wrote:

    > In a message dated 24/03/2001 14:47:03 GMT Standard Time, gscotttds.net > writes: > > << Is it possible using PHP to print a single line of text to a browser, > have a second or two delay and then print the next line, etc. etc.? > > Greg >> > > Hi, > > You can use the following commands: > > sleep(seconds); > usleep(microseconds); > > HTH > Ade > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Is there an easy way to create random numbers and letters for a file example

    http://www.mydomain.com/1w2e3rff.txt

    and then after they download it have it be deleted off the server?

    thanks

    randy

    attached mail follows:


    Hello,

    I use a random password function to do just that,

    function randomPassword($length = 8) { // all the chars we want to use $all = explode( " ", "a b c d e f g h i j k l m n o p q r s t u v w x y z " . "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z " . "0 1 2 3 4 5 6 7 8 9 _");

    for($i=0;$i<$length;$i++) { srand((double)microtime()*1000000); $randy = rand(0, 61); $pass .= $all[$randy]; }

    return $pass; }

    $new_filename = randomPassword(10);

    For the delete of the file, unlink is your answer: http://www.php.net/manual/en/function.unlink.php

    hope it help! py

    At 12:05 PM 3/24/01 -0500, you wrote: >Is there an easy way to create random numbers and letters for a file example > > >http://www.mydomain.com/1w2e3rff.txt > >and then after they download it have it be deleted off the server? > > >thanks > >randy > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net

    + ====================== + Pierre-Yves Lemire + E-MedHosting.com + (514) 729-8100 + pylemsympatico.ca + ======================

    attached mail follows:


    Hello Everyone!

    We need something that is probably very simple.

    Here is what we are doing.

    We created a form that asks a series of questions about the product we are looking at, such as : Name, Condition, Weight, etc. We then put all of the information in a MySql database. Then sedn the variables to the ad creation page. This page contains all the constant information contained in each ad, along with all the new variables that we just inputted. What we need to do is save this new source code to a html file. We have been simply right clicking, viewing source, and then saving it to our hard drive.

    What we want is a button below the ad that says, "Do you want to save this ad?" or simply "Save?" When we click yes it will prompt us on the name and the location we want for the file, and then it will save the ad in html format. One important note is that we do not want this new button included in the file we are creating. Anyone have a simple code we can use to accomplish this. Remember, all we want is the ad saved, not the new button. We want to view the ad before we save it, so the ad must pop up like it does now.

    Please help soon. We appreciate your help.

    Tony