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: Fri Aug 17 2001 - 22:09:33 CDT

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

    php-general Digest 18 Aug 2001 03:09:33 -0000 Issue 822

    Topics (messages 63180 through 63265):

    unlink(), safe mode, and other woes
            63180 by: Jan De Luyck

    Re: PHP and Perl script in same file?
            63181 by: billfarr.ages.com

    Re: merging arrays quickly
            63182 by: Reuben D Budiardja
            63184 by: Michael

    Re: Dnsquery
            63183 by: Tom Malone
            63186 by: Jon Haworth

    Re: Help.
            63185 by: Hugh Bothwell

    What is wrong ????
            63187 by: Dennis van Zanten
            63188 by: Tyler Longren
            63189 by: Dennis van Zanten
            63191 by: J Smith
            63196 by: Dennis van Zanten
            63197 by: Tyler Longren

    Invoking PHP scripts from a redirect location
            63190 by: Neil Freeman

    new IDE for PHP
            63192 by: Sandy Meier
            63193 by: Nick Davies
            63195 by: Sandy Meier

    need "Working..." pop up dialog
            63194 by: Ray Clouse

    XHTML compatible error messages
            63198 by: Jan
            63199 by: Tyler Longren
            63200 by: Jon Haworth
            63213 by: Jan

    stuck
            63201 by: Jeremy Morano
            63202 by: Jan De Luyck
            63207 by: Rob Hardowa

    $HTTP_REFERER
            63203 by: Erich Zigler
            63204 by: Nick Davies
            63205 by: Nick Davies
            63206 by: Nick Davies
            63208 by: Erich Zigler
            63211 by: Rob Hardowa
            63219 by: Jesse Arnett

    Apache alias to a specific .htm file
            63209 by: Neil Freeman
            63212 by: Jeffrey A Schoolcraft

    Attempt At Prev/Next Links
            63210 by: Gerard Samuel

    File Open and Writes..
            63214 by: Ashwin Kutty

    Using cURL on windows?
            63215 by: Brandon Orther

    sessions
            63216 by: Jeremy Morano
            63220 by: Rob Hardowa

    Re: tutor about PHP
            63217 by: Ivo Stoykov

    Connecting to a MSSQL2000 database with a Linux box and PHP
            63218 by: Brandon Orther
            63221 by: Michael Stearne

    Printf fails on large files
            63222 by: Inércia Sensorial Trabalhando
            63224 by: John Meyer
            63225 by: Inércia Sensorial Trabalhando

    problems with require
            63223 by: Martín Marqués

    xslt extension and encodings
            63226 by: Adam Rambousek

    cgi timeout
            63227 by: Raymond Siow
            63228 by: Raymond Siow
            63230 by: Erik H. Mathy
            63234 by: Raymond Siow
            63236 by: Raymond Siow

    Weird problems passing variables
            63229 by: JOHANSSON JÖRGEN

    Browser Detection & Redirection -- PHP or Apache ???
            63231 by: Christopher Raymond
            63232 by: Tyler Longren

    Segmentation fault (core dumped)
            63233 by: Evan Nemerson
            63241 by: Hugh Bothwell

    Can I turn this error off?
            63235 by: Rene Fournier
            63248 by: Rasmus Lerdorf

    Design Help: Tracking Users
            63237 by: Alnisa Allgood

    Adding records to a MySql database
            63238 by: Dave.O
            63240 by: Martín Marqués
            63242 by: ERISEN, Mehmet Kamil
            63244 by: Dave.O
            63249 by: Martín Marqués
            63255 by: ERISEN, Mehmet Kamil
            63256 by: Dave.O
            63257 by: Dave.O
            63258 by: Adam Rambousek
            63259 by: ERISEN, Mehmet Kamil
            63260 by: Martín Marqués
            63261 by: Martín Marqués
            63262 by: Dave.O
            63263 by: Dave.O

    Help with linux / apache / php
            63239 by: James, Yz

    SESSION question.
            63243 by: ERISEN, Mehmet Kamil

    looong date formatting for MySQL
            63245 by: CGI GUY
            63247 by: Adam Rambousek
            63250 by: mike
            63251 by: Jerry Lake
            63252 by: CGI GUY
            63253 by: Jerry Lake
            63254 by: Adam Rambousek

    History of the browser
            63246 by: Ing. Raul Glez Rdguez

    debugger_on() undefined?
            63264 by: Jeffery Cann

    Re: Errcode: 2 when running LOAD DATA LOCAL INFILE on server
            63265 by: Yeong CN

    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:


    Hello all,

    I've ran across a little problem.

    I've created a site for our gameing group, and added a section to upload
    screenshots.
    The webhost where I've put it is F2S, which have PHP support and also the
    php_safe restrictions active. This gave me a little problem in fixing the
    uploading, but that was done in no-time using the move_uploaded_file and the
    like.

    Now I'm having another problem: I would like to offer the ability to remove
    these files, using unlink(). Now, when issueing an unlink() on a file
    uploaded by another script, I get this error:

    Warning: SAFE MODE Restriction in effect. The script whose uid is 97613 is
    not allowed to access testscreen.jpg owned by uid 1001 in
    /path/to/script.php on line 3

    The offending line is

    unlink("shots/testscreen.jpg");

    After doing a bit of checking, I've found out that the webserver process
    seems to be running
    on user www/www - thus the uploaded files are also owned by that user.

    Anyone got a clue?

    Thanks,

    Jan De Luyck

    attached mail follows:


    Not any convenient or secure way I've yet found. But I do have PHP pages
    that slip out and exec() a Perl script to grab specific results that I need.

    Anyone else?

    B

    -----Original Message-----
    From: Tom Beidler [mailto:tomorbittechservices.com]
    Sent: Thursday, August 16, 2001 4:46 PM
    To: php list
    Subject: [PHP] PHP and Perl script in same file?

    Can php and perl code reside in the same file? When the document is served
    up it parses the PHP and then the Perl?

    -- 
    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:


    Take a look at the function array_merge http://www.php.net/array_merge

    Reuben D. B

    On Friday 17 August 2001 08:46 am, you wrote: > say I have > $array1 = array("name"=>NULL,"thread"=>NULL,"id"=>NULL); > $array2 = array("0"=>"fred","1"=>"3","2"=>"9999"); > > I want $array1 to have the values of array2 - or $array2 to hve the keys > of $array1 > A foreach loop works fine to do this - but I was wondering if there is a > quicker way to merge the values of one array to another array.

    attached mail follows:


    Reuben D Budiardja wrote: > > Take a look at the function array_merge > http://www.php.net/array_merge > > Reuben D. B >

    I have - it's no use unfortuntely - The array with the values has numeric keys so they just get appended - would have been okay if they had string keys though.

    > On Friday 17 August 2001 08:46 am, you wrote: > > say I have > > $array1 = array("name"=>NULL,"thread"=>NULL,"id"=>NULL); > > $array2 = array("0"=>"fred","1"=>"3","2"=>"9999"); > > > > I want $array1 to have the values of array2 - or $array2 to hve the keys > > of $array1 > > A foreach loop works fine to do this - but I was wondering if there is a > > quicker way to merge the values of one array to another array.

    attached mail follows:


    I don't know if this will be helpful or not - I found it in the manual:

    simonunixinside.com 25-Oct-2000 03:16

    system() function doesn't return a string value, if you want to assign the output of a system command, try using: $a = `/bin/ls -a`; note the ` is a backtick, not a single quote

    Tom Malone Web Designer http://www.tom-malone.com

    -----Original Message----- From: J.Mueller, pro.vider.de GmbH [mailto:j.muellerpro.vider.de] Sent: Friday, August 17, 2001 4:29 AM To: 'php-generallists.php.net' Subject: [PHP] Dnsquery

    Hello,

    I've tried to execute the system function dnsquery, which works fine from a shell:

    % dnsquery -h domain.net ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61611 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2 ;; domain.net, type = ANY, class = IN domain.net. 2D IN NS NS2.domain.net. domain.net. 2D IN NS NS1.domain.net. domain.net. 2D IN NS NS2.domain.net. domain.net. 2D IN NS NS1.domain.net. NS2.domain.net. 2D IN A 198.182.225.2 NS1.domain.net. 2D IN A 204.107.140.2

    but not with PHP-functions, e.g.

    system("dnsquery -h domain.net"); exec("dnsquery -h domain.net");

    There is no output at all. I'm using FreeBSD 4.2 Server, Apache 1.3.11, PHP 4.04

    Does anyone have an idea how I can get this work?

    Thanks very much.

    Juergen

    --
    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:


    >> I think you need to assign it to a variable and then echo that: >> $dnsquery = exec("dnsquery -h domain.net"); >> echo $dnsquery; >> > This is from the manual: > "exec() executes the given command, however it does not output > anything" > Use system instead.

    Well, don't trust everything you read :-)

    These lines:

    $httpd = exec("ps -e | grep -c httpd"); $mysqld = exec("ps -e | grep -c mysqld");

    fill $httpd and $mysqld with the current number of daemons running. Works fine on my Slackware box with PHP 4.0.6.

    Cheers Jon

    attached mail follows:


    From: rajarajeswari balasubramanian To: php-generallists.php.net Sent: Friday, August 17, 2001 12:09 PM Subject: [PHP] Help.

    > I have a program whihc will take that coordinate file > as the input and it will convert that file into a 3D > structure, i have the exe file of that program. > > so the data is retrived it has to automatically invoke > the ./xxx file and it will give the 3D rendering of > that data which is in the form of coordinate file.

    I see a couple of approaches to this...

    1. Run the .exe as a server-side CGI, returning an image or movie of the molecule. (Simple and widely compatible, but not interactive.)

    2. Associate the file extension with your specialized viewer program on the client side. You send the data and it fires up the viewer prog automatically. (Reasonably simple but not very cross-compatible unless you feel like writing viewers for each different platform. Also could introduce security holes.)

    3. Render to some generic format like VRML, which is already supported by the browser. (Reasonably simple and very compatible, if it does everything you want.)

    4. Write a Java applet to do the rendering. (A bit more complicated, slower, but very cross-compatible and flexible. The Java SDK includes a sample molecule-viewer applet.)

    ... other suggestions? Personally, I think standards are a wonderful thing, so I would write a PHP library to convert from your raw format to VRML. (Alternately, you could store the VRML model in your database and just dump it directly.)

    attached mail follows:


    I wanna do this Insert:

    INSERT INTO sysdba_product_link VALUES ('','Y4DHVA00000Q','CV/ Boiler','','010','CVs','','7-12-2000 12:52:25','ADMIN','7-12-2000 12:52:25','ADMIN','Solo + CV-Boiler','','','','','','','','Feenstra','','','','','','','','','S-HR 24');

    In the following database structure.... what is wrong because it gives a error....and I don't see a problem in the insert line...??? And already thanks for the help!!

    grtz, Dennis (dz-web.com)

    Field Type Attributes Null Default Extra PRODUCT_link int(11) No auto_increment PRODUCTID text No NAME text No DESCRIPTION longtext No ACTUALID text No FAMILY text No PRICE double No 0 CREATEDATE text No CREATEUSER text No MODIFYDATE text No MODIFYUSER text No PRODUCTGROUP text No STATUS text No UNIT text No STOCKVOLUME int(11) No 0 STOCKWEIGHT int(11) No 0 STOCKITEM text No PROGRAM text No SUPPLIER text No VENDOR text No SITEID text No WAREHOUSELOCATION text No COMMISSIONABLE text No TAXABLE text No ACCOUNTINGPERIOD text No GLACCOUNTNUMBER text No GLSUBACCOUNTNUMBER text No DATAOWNER text No TYPE text No

    attached mail follows:


    Well, what's the error?

    Tyler Longren Captain Jack Communications tylercaptainjack.com www.captainjack.com

    On Fri, 17 Aug 2001 15:57:13 +0200 "Dennis van Zanten" <dennisdz-web.nl> wrote:

    > I wanna do this Insert: > > INSERT INTO sysdba_product_link VALUES ('','Y4DHVA00000Q','CV/ > Boiler','','010','CVs','','7-12-2000 12:52:25','ADMIN','7-12-2000 > 12:52:25','ADMIN','Solo + > CV-Boiler','','','','','','','','Feenstra','','','','','','','','','S-HR > 24'); > > In the following database structure.... what is wrong because it gives a > error....and I don't see a problem in the insert line...??? > And already thanks for the help!! > > grtz, > Dennis > (dz-web.com) > > Field Type Attributes Null Default Extra > PRODUCT_link int(11) No auto_increment > PRODUCTID text No > NAME text No > DESCRIPTION longtext No > ACTUALID text No > FAMILY text No > PRICE double No 0 > CREATEDATE text No > CREATEUSER text No > MODIFYDATE text No > MODIFYUSER text No > PRODUCTGROUP text No > STATUS text No > UNIT text No > STOCKVOLUME int(11) No 0 > STOCKWEIGHT int(11) No 0 > STOCKITEM text No > PROGRAM text No > SUPPLIER text No > VENDOR text No > SITEID text No > WAREHOUSELOCATION text No > COMMISSIONABLE text No > TAXABLE text No > ACCOUNTINGPERIOD text No > GLACCOUNTNUMBER text No > GLSUBACCOUNTNUMBER text No > DATAOWNER text No > TYPE text No > > >

    attached mail follows:


    Ofcourse sorry:

    You have an error in your SQL syntax near '','','010','CVs','','7-12-2000 12:52:25','ADMIN','7-12-2000 12:52:25','ADMIN','S' at line 27

    The Insert below is line 27 and I see no errors in the line maybe you guys do!!

    thanxs, Dennis

    ----- Original Message ----- From: "Tyler Longren" <tylercaptainjack.com> To: "Dennis van Zanten" <dennisdz-web.nl> Cc: <php-generallists.php.net> Sent: Friday, August 17, 2001 4:06 PM Subject: Re: [PHP] What is wrong ????

    > Well, what's the error? > > Tyler Longren > Captain Jack Communications > tylercaptainjack.com > www.captainjack.com > > > > On Fri, 17 Aug 2001 15:57:13 +0200 > "Dennis van Zanten" <dennisdz-web.nl> wrote: > > > I wanna do this Insert: > > > > INSERT INTO sysdba_product_link VALUES ('','Y4DHVA00000Q','CV/ > > Boiler','','010','CVs','','7-12-2000 12:52:25','ADMIN','7-12-2000 > > 12:52:25','ADMIN','Solo + > > CV-Boiler','','','','','','','','Feenstra','','','','','','','','','S-HR > > 24'); > > > > In the following database structure.... what is wrong because it gives a > > error....and I don't see a problem in the insert line...??? > > And already thanks for the help!! > > > > grtz, > > Dennis > > (dz-web.com) > > > > Field Type Attributes Null Default Extra > > PRODUCT_link int(11) No auto_increment > > PRODUCTID text No > > NAME text No > > DESCRIPTION longtext No > > ACTUALID text No > > FAMILY text No > > PRICE double No 0 > > CREATEDATE text No > > CREATEUSER text No > > MODIFYDATE text No > > MODIFYUSER text No > > PRODUCTGROUP text No > > STATUS text No > > UNIT text No > > STOCKVOLUME int(11) No 0 > > STOCKWEIGHT int(11) No 0 > > STOCKITEM text No > > PROGRAM text No > > SUPPLIER text No > > VENDOR text No > > SITEID text No > > WAREHOUSELOCATION text No > > COMMISSIONABLE text No > > TAXABLE text No > > ACCOUNTINGPERIOD text No > > GLACCOUNTNUMBER text No > > GLSUBACCOUNTNUMBER text No > > DATAOWNER text No > > TYPE text No > > > > > > >

    attached mail follows:


    It might also help to know what database you're using, as the syntax between them all can vary slightly. PostgreSQL? MySQL? Oracle? Ingres?

    J

    Dennis Van Zanten wrote:

    > Ofcourse sorry: > > You have an error in your SQL syntax near '','','010','CVs','','7-12-2000 > 12:52:25','ADMIN','7-12-2000 12:52:25','ADMIN','S' at line 27 > > The Insert below is line 27 and I see no errors in the line maybe you guys > do!! > > thanxs, > Dennis > > > > ----- Original Message ----- > From: "Tyler Longren" <tylercaptainjack.com> > To: "Dennis van Zanten" <dennisdz-web.nl> > Cc: <php-generallists.php.net> > Sent: Friday, August 17, 2001 4:06 PM > Subject: Re: [PHP] What is wrong ???? > > >> Well, what's the error? >> >> Tyler Longren >> Captain Jack Communications >> tylercaptainjack.com >> www.captainjack.com >>

    attached mail follows:


    It's MYSQL I allready have located the problem but I still doesn't have a sollution? The problems are cost by slashes back slashes and ( ) signs in the fields because I put the insert query into a string it doens't work out....

    Is there a function that solves this problem? thanks,

    Dennis

    ----- Original Message ----- From: "J Smith" <dark_pandahushmail.com> To: <php-generallists.php.net> Sent: Friday, August 17, 2001 10:33 AM Subject: Re: [PHP] What is wrong ????

    > > It might also help to know what database you're using, as the syntax > between them all can vary slightly. PostgreSQL? MySQL? Oracle? Ingres? > > J > > > Dennis Van Zanten wrote: > > > Ofcourse sorry: > > > > You have an error in your SQL syntax near '','','010','CVs','','7-12-2000 > > 12:52:25','ADMIN','7-12-2000 12:52:25','ADMIN','S' at line 27 > > > > The Insert below is line 27 and I see no errors in the line maybe you guys > > do!! > > > > thanxs, > > Dennis > > > > > > > > ----- Original Message ----- > > From: "Tyler Longren" <tylercaptainjack.com> > > To: "Dennis van Zanten" <dennisdz-web.nl> > > Cc: <php-generallists.php.net> > > Sent: Friday, August 17, 2001 4:06 PM > > Subject: Re: [PHP] What is wrong ???? > > > > > >> Well, what's the error? > >> > >> Tyler Longren > >> Captain Jack Communications > >> tylercaptainjack.com > >> www.captainjack.com > >> > > > > -- > 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:


    addslashes() might help you.

    --
    Tyler Longren
    Captain Jack Communications
    tylercaptainjack.com
    www.captainjack.com
    

    On Fri, 17 Aug 2001 17:16:18 +0200 "Dennis van Zanten" <dennisdz-web.nl> wrote:

    > It's MYSQL I allready have located the problem but I still doesn't have > a > sollution? > The problems are cost by slashes back slashes and ( ) signs in the > fields > because I put the insert query into a string it doens't work out.... > > Is there a function that solves this problem? > thanks, > > Dennis > > > ----- Original Message ----- > From: "J Smith" <dark_pandahushmail.com> > To: <php-generallists.php.net> > Sent: Friday, August 17, 2001 10:33 AM > Subject: Re: [PHP] What is wrong ???? > > > > > > It might also help to know what database you're using, as the syntax > > between them all can vary slightly. PostgreSQL? MySQL? Oracle? Ingres? > > > > J > > > > > > Dennis Van Zanten wrote: > > > > > Ofcourse sorry: > > > > > > You have an error in your SQL syntax near > '','','010','CVs','','7-12-2000 > > > 12:52:25','ADMIN','7-12-2000 12:52:25','ADMIN','S' at line 27 > > > > > > The Insert below is line 27 and I see no errors in the line maybe > you > guys > > > do!! > > > > > > thanxs, > > > Dennis > > > > > > > > > > > > ----- Original Message ----- > > > From: "Tyler Longren" <tylercaptainjack.com> > > > To: "Dennis van Zanten" <dennisdz-web.nl> > > > Cc: <php-generallists.php.net> > > > Sent: Friday, August 17, 2001 4:06 PM > > > Subject: Re: [PHP] What is wrong ???? > > > > > > > > >> Well, what's the error? > > >> > > >> Tyler Longren > > >> Captain Jack Communications > > >> tylercaptainjack.com > > >> www.captainjack.com > > >> > > > > > > > > -- > > 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:


    Hi,

    I am having trouble getting a redirected file's php section activating. Some info to help you understand:

    1) Within Apache's httpd.conf file I have the following set: DocumentRoot "D:/Program Files/Apache Group/Apache/realdocs" <Directory "D:/Program Files/Apache Group/Apache/realdocs"> RedirectMatch permanent ^/$ "P:/Main Projects/Test/index.php" ScriptAlias /php/ "d:/php/" AddType application/x-httpd-php .php .phtml Action application/x-httpd-php "/php/php.exe

    2)Within IE I enter: http://localhost

    which calls my index.php file:

    ------------------------ <html> <head> <title>PHP Test</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    </head>

    <body bgcolor="#FFFFFF" text="#000000">

    <script> document.write("And the line is..."); </script>

    <?php print "please let me be seen"; ?>

    </body> </html> ------------------------

    This only prints out the javascript section though and doesn't appear to call the php section. If I copy this file to my DocumentRoot directory and then call it via:

    http://localhost/index.php

    all is well and both the javascript and php sections are displayed. Do I need to somehow configure Apache to run php scripts from other locations or am I doing something stupid?

    Hope you can help,

    Neil -------------------------------- Email: neil.freemanasa.co.uk neil_freemanyahoo.com --------------------------------

    attached mail follows:


    Hi!

    At the moment I am writing the PHP support for KDevelop3.0 (http://www.kdevelop.org). The IDE ist modular and it is very easy to write plugins, so it is possible to implement support for all languages, make tools, GUI builders and so on. Actually there are plugins for C/C++, Java, Python, Perl and PHP. The complete program ist opensource and was developed by some people in their sparetime.

    At the moment there are following features in the PHP mode.

    -modern editor with syntaxhighlighting (other editors are partly supported, for instance Nedit) -class and function parser including different views (treeview, graphical view) -intelligent Code Completion and argument help -executing php scripts with shell or webserver (no finished yet) -debugingtool for POSIX regular expressions -project generation (application wizard) and projectmanagment -documentation browser for the php documentation -nice grep frontend -classtools (generate new class..) and so on. Please look at a current screenshot to get a preview: ftp://fara.cs.uni-potsdam.de/stud/smeier/shot1.png

    Following features are planed -debugger and profiler support (http:((dd.cron.ru/dbg) -support for PHPDOC and similar tools -support for phpgtk (generation of framework...) -better support for HTML (table generation, tags ...) -code assistent (generate small codeparts from template) and so on.

    OK, now to the intentation of my email :-)

    At the moment I'm the only one who implement the PHP support, so maybe someone want to help? It is more fun and we will get faster a first release.:-) The IDE is written in C++, but the plugins can written in Java too, if someone want to do this. If you have some ideas or want to help please contact me. Thanks!

    Ciao! Sandy

    --
    ICQ: 27681958
    for sending encryted emails please use:
    ftp://fara.cs.uni-potsdam.de/stud/smeier/public_key
    

    attached mail follows:


    Is there a alpha/beta of this available now :)

    On Fri, 17 Aug 2001, Sandy Meier wrote:

    > Hi! > > At the moment I am writing the PHP support for KDevelop3.0 > (http://www.kdevelop.org). The IDE ist modular and it is very easy to write > plugins, so it is possible to implement support for all languages, make > tools, GUI builders and so on. Actually there are plugins for C/C++, Java, > Python, Perl and PHP. > The complete program ist opensource and was developed by some people in their > sparetime. > > At the moment there are following features in the PHP mode. > > -modern editor with syntaxhighlighting (other editors are partly supported, > for instance Nedit) > -class and function parser including different views (treeview, graphical > view) > -intelligent Code Completion and argument help > -executing php scripts with shell or webserver (no finished yet) > -debugingtool for POSIX regular expressions > -project generation (application wizard) and projectmanagment > -documentation browser for the php documentation > -nice grep frontend > -classtools (generate new class..) > and so on. > Please look at a current screenshot to get a preview: > ftp://fara.cs.uni-potsdam.de/stud/smeier/shot1.png > > Following features are planed > -debugger and profiler support (http:((dd.cron.ru/dbg) > -support for PHPDOC and similar tools > -support for phpgtk (generation of framework...) > -better support for HTML (table generation, tags ...) > -code assistent (generate small codeparts from template) > and so on. > > OK, now to the intentation of my email :-) > > At the moment I'm the only one who implement the PHP support, so maybe > someone want to help? It is more fun and we will get faster a first > release.:-) The IDE is written in C++, but the plugins can written in Java > too, if someone want to do this. > If you have some ideas or want to help please contact me. Thanks! > > Ciao! > Sandy > -- > ICQ: 27681958 > for sending encryted emails please use: > ftp://fara.cs.uni-potsdam.de/stud/smeier/public_key > >

    attached mail follows:


    Am Freitag, 17. August 2001 17:14 schrieben Sie: > Is there a alpha/beta of this available now :) No, there isn't a release yet, but you can get the CVS version from the KDE CVS server. see http://www.kde.org/anoncvs.html or by using cvsup http://www.kde.org/cvsup.html

    Ciao! Sandy

    -- 
    for sending encryted emails please use:
    ftp://fara.cs.uni-potsdam.de/stud/smeier/public_key
    

    attached mail follows:


    I'm trying to get a "working..." informational dialog or window going with my PHP page but I'm not getting anywhere. Here's the situation:

    When the user clicks on a link that has to gunzip a very large file, I want a popup to say "Working..." while the file is uncompressing. Then, when the file is uncompressed, I want the "Working..." popup to close itself and then the parent window to load a new URL (where it will use the uncompressed file).

    I've tried doing this with Javascript and window.open(), but I'm having no luck. Any ideas? TIA!

    -- 
    -------------------------------------------------------------------------
    Ray Clouse                         |             Don't fear the penguins.
    Engineer Scientist/Specialist      |              
    Boeing Expendable Launch Vehicles  |  Ray.Clouse AT boeing.com
    Huntington Beach, CA               |  clouse AT rayclouse.org
    

    attached mail follows:


    Hi out there!

    I have got a problem with PHP's standard way of reporting errors. The <br> in the error messages are making the XML invalid (should be <br/>). Is there an easy way to do this?

    Jan.

    attached mail follows:


    $string = "Hello everyone!<br>How are you today?"; $result = str_replace("<br>", <br/>", "$string");

    --
    Tyler Longren
    Captain Jack Communications
    tylercaptainjack.com
    www.captainjack.com
    

    On Fri, 17 Aug 2001 17:40:07 +0200 "Jan" <vincevgmx.de> wrote:

    > Hi out there! > > I have got a problem with PHP's standard way of reporting errors. > The <br> in the error messages are making the XML invalid (should be > <br/>). Is there an easy way to do this? > > Jan. >

    attached mail follows:


    I think Jan meant that when PHP spits out "Error in line x", it has a <br> in there which causes the page to be invalid.

    My question would be "why are you trying to validate pages with errors in anyway?"

    Cheers Jon

    -----Original Message----- From: Tyler Longren [mailto:tylercaptainjack.com] Sent: 17 August 2001 16:44 To: Jan Cc: php-generallists.php.net Subject: Re: [PHP] XHTML compatible error messages

    $string = "Hello everyone!<br>How are you today?"; $result = str_replace("<br>", <br/>", "$string");

    --
    Tyler Longren
    Captain Jack Communications
    tylercaptainjack.com
    www.captainjack.com
    

    On Fri, 17 Aug 2001 17:40:07 +0200 "Jan" <vincevgmx.de> wrote:

    > Hi out there! > > I have got a problem with PHP's standard way of reporting errors. > The <br> in the error messages are making the XML invalid (should be > <br/>). Is there an easy way to do this? > > Jan. >

    attached mail follows:


    Hi Jon,

    If the execution of a script is not stopped (when a parse error occures e.g.) then I could formate the error message within my generated XML with XSLT. My browser does not show the page if it is not valid XML so I have to use lynx in a putty telnet to look up my error messages which I would prefere to do not. So my question is: How can I alter the PHP built in error messaging format?

    Thanks in advance, Jan

    > I think Jan meant that when PHP spits out "Error in line x", it has a <br> > in there which causes the page to be invalid. > > My question would be "why are you trying to validate pages with errors in > anyway?" > > Cheers > Jon > > > -----Original Message----- > From: Tyler Longren [mailto:tylercaptainjack.com] > Sent: 17 August 2001 16:44 > To: Jan > Cc: php-generallists.php.net > Subject: Re: [PHP] XHTML compatible error messages > > > $string = "Hello everyone!<br>How are you today?"; > $result = str_replace("<br>", <br/>", "$string"); > > -- > Tyler Longren > Captain Jack Communications > tylercaptainjack.com > www.captainjack.com > > > > On Fri, 17 Aug 2001 17:40:07 +0200 > "Jan" <vincevgmx.de> wrote: > > > Hi out there! > > > > I have got a problem with PHP's standard way of reporting errors. > > The <br> in the error messages are making the XML invalid (should be > > <br/>). Is there an easy way to do this? > > > > Jan. > > > > -- > 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,

    Can someone please tell me what is wrong with this page. The problem is that my option block is always stuck on the last record in the table. No matter what option I choose, the information, address, city, state...etc, that is passed is always the one of the last record in the table...Help!

    <? session_start(); session_register("address"); session_register("city"); session_register("state"); session_register("zip_code"); session_register("country"); session_register("company"); session_register("occupation"); session_register("telephone"); session_register("fax");

    $db_name = "contact"; $table_name = "company";

    $connection = mysql_connect("l", "c", "c") or die("Couldn't connect.");

    $db = mysql_select_db($db_name, $connection) or die("Couldn't select database.");

    $sql = "SELECT * FROM $table_name ";

    $result = mysql_query($sql,$connection) or die("Couldn't execute query.");

    while ($row = mysql_fetch_array($result)) { $uid = $row['uid']; $address = $row['address']; $city = $row['city']; $state = $row['state']; $zip_code = $row['zip_code']; $country = $row['country']; $company = $row['company']; $occupation = $row['occupation']; $telephone = $row['telephone']; $fax = $row['fax'];

    $option_block .= "<option value=\"$uid\">$company</option>"; }

    $display_block = "

    <FORM METHOD=post ACTION=show_adduserbycompany.php>

    <P><strong>Company:</strong> <select name=\"uid\"> $option_block </select>

    <INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\"Select this Company\"></P> </form>

    ";

    ?>

    <HTML> <HEAD> <TITLE>User Information: Add a User</TITLE> </HEAD> <BODY> <h1> User Information</h1> <h2><em>Add a User</em></h2> <P>Select a company from the list below, to continue to the user addition.</p>

    <? echo "$display_block"; ?>

    <p><a href="contact_menu.php">Return to Main Menu</a></p>

    </BODY> </HTML>

    attached mail follows:


    You need to put the info in an array for all record to be available, like this:

    while ($row = mysql_fetch_array($result)) { $uid[] = $row['uid']; $address[] = $row['address']; $city[] = $row['city']; $state[] = $row['state']; $zip_code[] = $row['zip_code']; $country[] = $row['country']; $company[] = $row['company']; $occupation[] = $row['occupation']; $telephone[] = $row['telephone']; $fax[] = $row['fax'];

    and to get it out again, you need to use a for loop

    for ($i = 0; $i < count($uid); $i++) { echo $uid[$i]; ... }

    Hope this helps,

    Jan De Luyck

    > -----Original Message----- > From: Jeremy Morano [mailto:jeremyprepresshelp.com] > Sent: Friday, August 17, 2001 6:05 PM > To: php-generallists.php.net > Subject: [PHP] stuck > > > Hi, > > Can someone please tell me what is wrong with this page. The > problem is that > my option block is always stuck on the last record in the table. No matter > what option I choose, the information, address, city, state...etc, that is > passed is always the one of the last record in the table...Help! > > > > > > <? > session_start(); > session_register("address"); > session_register("city"); > session_register("state"); > session_register("zip_code"); > session_register("country"); > session_register("company"); > session_register("occupation"); > session_register("telephone"); > session_register("fax"); > > $db_name = "contact"; > $table_name = "company"; > > $connection = mysql_connect("l", "c", "c") or die("Couldn't connect."); > > $db = mysql_select_db($db_name, $connection) or die("Couldn't select > database."); > > $sql = "SELECT * > FROM $table_name > "; > > $result = mysql_query($sql,$connection) or die("Couldn't execute > query."); > > > while ($row = mysql_fetch_array($result)) { > $uid = $row['uid']; > $address = $row['address']; > $city = $row['city']; > $state = $row['state']; > $zip_code = $row['zip_code']; > $country = $row['country']; > $company = $row['company']; > $occupation = $row['occupation']; > $telephone = $row['telephone']; > $fax = $row['fax']; > > $option_block .= "<option value=\"$uid\">$company</option>"; > } > > > > $display_block = " > > <FORM METHOD=post ACTION=show_adduserbycompany.php> > > > <P><strong>Company:</strong> > <select name=\"uid\"> > $option_block > </select> > > <INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\"Select this Company\"></P> > </form> > > "; > > ?> > > > <HTML> > <HEAD> > <TITLE>User Information: Add a User</TITLE> > </HEAD> > <BODY> > <h1> User Information</h1> > <h2><em>Add a User</em></h2> > <P>Select a company from the list below, to continue to the user > addition.</p> > > <? echo "$display_block"; ?> > > <p><a href="contact_menu.php">Return to Main Menu</a></p> > > </BODY> > </HTML> > > > -- > 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:


    I'm not 100% sure what you want to accomplish here, or why it is stuck on the last row, but I've made some observations.

    On Friday 17 August 2001 09:05 am, you wrote: <? > session_start(); > session_register("address"); > session_register("city"); > session_register("state"); > session_register("zip_code"); > session_register("country"); > session_register("company"); > session_register("occupation"); > session_register("telephone"); > session_register("fax");

    ->Session register variables that were supposed to have been passed by a form. For a piece of test code you may want to execute this to see what variables and values were passed. I think only UID and company have been passed via the uid select.

    echo '<pre>From variables were:<BR>', print_r($HTTP_POST_VARS), '</pre>';

    > > while ($row = mysql_fetch_array($result)) { > $uid = $row['uid']; > $address = $row['address']; > $city = $row['city']; > $state = $row['state']; > $zip_code = $row['zip_code']; > $country = $row['country']; > $company = $row['company']; > $occupation = $row['occupation']; > $telephone = $row['telephone']; > $fax = $row['fax']; > > $option_block .= "<option value=\"$uid\">$company</option>"; > }

    ->Here you've requested a bunch of info back from your query, but you only use uid and company in the option form, so you never actually pass the other info back to be registered by the session in your first lines. You could simplify with:

    $option_block = NULL; while ($row = mysql_fetch_array($result)) { $option_block .= '<option value="'.$row['uid'].'">'.$row['company']. '</option>'; }

    you may also want to do an echo in this block, or examine your html source to make sure you are getting back the values you request, and make sure that uid is unique to each row.

    ...if you need the other info you may want to do a query for it after the UID and company have been passed via the form on the second iteration, and then sess register them.

    attached mail follows:


    I am working on the last half of an Online Signup page for an ISP.

    There is a local .php page on the webserver that actually finalizes the addition of the user, but ONLY if $HTTP_REFERER is from a certain host.

    I was wondering what you guys think of doing it this way?

    Any advice would be appreciated. Thank you.

    -- 
    Erich Zigler   
    

    attached mail follows:


    like

    if ($HTTP_REFERER == "certain host") { do finalise code }

    On Fri, 17 Aug 2001, Erich Zigler wrote:

    > I am working on the last half of an Online Signup page for an ISP. > > There is a local .php page on the webserver that actually finalizes the > addition of the user, but ONLY if $HTTP_REFERER is from a certain host. > > I was wondering what you guys think of doing it this way? > > Any advice would be appreciated. Thank you. > >

    attached mail follows:


    Sorry missed a bit you'll just need to ereg out the hostname from HTTP_REFERER - take everything after http:// and before /...

    Nick.

    On Fri, 17 Aug 2001, Erich Zigler wrote:

    > I am working on the last half of an Online Signup page for an ISP. > > There is a local .php page on the webserver that actually finalizes the > addition of the user, but ONLY if $HTTP_REFERER is from a certain host. > > I was wondering what you guys think of doing it this way? > > Any advice would be appreciated. Thank you. > >

    attached mail follows:


    Probably best to read stuff first ;)

    try preg_match

    preg_match("/^(http:\/\/)?([\/]+)/i", $HTTP_REFERER, $hostname);

    the hostname will be in $hostname[2]

    Hope it helps.

    On Fri, 17 Aug 2001, Nick Davies wrote:

    > > Sorry missed a bit you'll just need to ereg out the hostname from > HTTP_REFERER - take everything after http:// and before /... > > Nick. > > On Fri, 17 Aug 2001, Erich Zigler wrote: > > > I am working on the last half of an Online Signup page for an ISP. > > > > There is a local .php page on the webserver that actually finalizes the > > addition of the user, but ONLY if $HTTP_REFERER is from a certain host. > > > > I was wondering what you guys think of doing it this way? > > > > Any advice would be appreciated. Thank you. > > > > > > >

    attached mail follows:


    On Fri 17 Aug 2001, Nick Davies wrote:

    > Probably best to read stuff first ;) > try preg_match > preg_match("/^(http:\/\/)?([\/]+)/i", $HTTP_REFERER, $hostname); > the hostname will be in $hostname[2] > Hope it helps.

    Thanks. But is using $HTTP_REFERER the most secure way of doing it? Or can the $HTTP_REFERER be forged and thus gaining unauthorized access to the forms?

    -- 
    Erich Zigler    
    

    A sick mind is not necessarily the sign of a neat desk.

    attached mail follows:


    According to the spec: $HTTP_REFERER The address of the page (if any) which referred the browser to the current page. This is set by the user's browser; not all browsers will set this.

    So if it is set by the user's browser, it can be changed, or shut off. I believe there are programs out there that block that env var so people do not leave tracks within a site as well. Look at tucows.com for such programs.

    Typically, if a user went through 5 pages to sign up and is on the sixth page, I wouldn't worry about someone forging that too much. I'd be more worried about referrer not being set and then not allowing them to signup because of that. You can always set a variable like $PAGENUM in your code on the second last page and session register it, then check for it on the last page. If it exists, do your thing and destroy the session. If it does not exist, you can take the desired action. Combine this with the HTTP_REFERER and I would think you should be fairly safe....but remember, the HTTP_REFERER could be empty, whereas the session var should be trusted as it is coming from your own site.

    On Friday 17 August 2001 09:34 am, you wrote: > > Thanks. But is using $HTTP_REFERER the most secure way of doing it? Or can > the $HTTP_REFERER be forged and thus gaining unauthorized access to the > forms?

    attached mail follows:


    Hello,

    i'm not sure i would worry too much about the referrer.. if your 'add account' script has decent error checking, it shouldn't matter if the user creates their own form.

    -jesse

    --
    Jesse Arnett jarnettsiscom.net
    SISCOM Inc http://www.siscom.net/
    Southern Ohio's Superior Internet Service Provider
    Ph: 937.222.8150.413
    

    ----- Original Message ----- From: "Erich Zigler" <erichzsuperhero.org> To: <php-generallists.php.net> Sent: Friday, August 17, 2001 12:13 PM Subject: [PHP] $HTTP_REFERER

    > I am working on the last half of an Online Signup page for an ISP. > > There is a local .php page on the webserver that actually finalizes the > addition of the user, but ONLY if $HTTP_REFERER is from a certain host. > > I was wondering what you guys think of doing it this way? > > Any advice would be appreciated. Thank you. > > -- > Erich Zigler > > -- > 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 there,

    In an ideal world I would like to be able to type http://localhost into my browser and for Apache server to throw up a specific .htm file on my hard drive. At the moment I have an Apache Alias set up as follows:

    Alias /ife "P:/My Projects/Storyboard"

    and you need to enter:

    http://localhost/ife/index.htm

    to get to this .htm file. How can I setup Apache to automatically 'pick up' a set .htm file (ie, http://localhost equals "P:/My Projects/Storyboard/ife/index.htm").

    Any help would be greatly appreciated.

    Neil -------------------------------- Email: neil.freemanasa.co.uk neil_freemanyahoo.com --------------------------------

    attached mail follows:


    if you have DirectoryIndex support you can specify what file it will use as an index page.

    for most unix type os's this seems to be index.php[ 3] index.htm[ l] for IIS it's default.asp or something

    Jeff

    > In an ideal world I would like to be able to type http://localhost into > my browser and for Apache server to throw up a specific .htm file on my

    > to get to this .htm file. How can I setup Apache to automatically 'pick > up' a set .htm file (ie, http://localhost equals "P:/My > Projects/Storyboard/ife/index.htm").

    attached mail follows:


    Hey all. Im trying to setup a page where it has prev/next links. I have included a snip of the code. On the first page everything is cool, but on subsequent pages, the count get out of control. I was testing with displaying 5 entries at a time. The first page is good, the next displays 7 and so on. If you see anything in there, please let me know, its probably crude to what others are using but I wanted to give it a shot instead of coping someone elses work. Thanks

    $max_row = 5; if ($op == "next") { $low = $low + $max_row; $high = $low + $max_row; $result = mysql_query("SELECT * FROM TABLENAME where Post='yes' LIMIT $low, $high"); while($row = mysql_fetch_row($result)) { echo "<b>$row[1] writes</b>:<br>\n"; echo "&nbsp &nbsp <i>$row[2]</i><br>\n"; echo "<b>AskLee writes</b>:<br>\n"; echo "&nbsp &nbsp <i>$row[3]</i><br>\n"; echo "<hr>\n"; } } elseif ($op == "prev") { $low = $low - $max_row; $high = $high - $max_row; $result = mysql_query("SELECT * FROM TABLENAME where Post='yes' LIMIT $low, $high"); while($row = mysql_fetch_row($result)) { echo "<b>$row[1] writes</b>:<br>\n"; echo "&nbsp &nbsp <i>$row[2]</i><br>\n"; echo "<b>AskLee writes</b>:<br>\n"; echo "&nbsp &nbsp <i>$row[3]</i><br>\n"; echo "<hr>\n"; } } else { $low = 0; $high = $low + $max_row; $result = mysql_query("SELECT * FROM TABLENAME where Post='yes' LIMIT $low, $high"); while($row = mysql_fetch_row($result)) { echo "<b>$row[1] writes</b>:<br>\n"; echo "&nbsp &nbsp <i>$row[2]</i><br>\n"; echo "<b>AskLee writes</b>:<br>\n"; echo "&nbsp &nbsp <i>$row[3]</i><br>\n"; echo "<hr>\n"; } } $result = mysql_query("SELECT * FROM mpn_asklee where Post='yes'"); $num_rows = mysql_num_rows($result); if ($num_rows > $max_row) { echo "<table width=\"100%\" cellspacing=\"0\" border=\"0\" cellpadding=\"0\">\n"; echo "<tr><td align =\"left\">\n"; if ($low > $max_row) { echo "<a href=\"$PHP_SELF?op=prev&low=$low&high=$high\">Previous</a>"; } echo "</td><td align =\"right\">\n"; if ($num_rows > $high) { echo "<a href=\"$PHP_SELF?op=next&low=$low&high=$high\">Next</a>"; echo "</td></tr></table>\n" } } ?>

    attached mail follows:


    Hi,

    I have a little function in my script that used to work until a little while back and for some reason it has decided to act up.. It is a basic function that reads a number from a file and then processes it, but increments it by 1, writes it back to the file and closes it.. now it used to work ok, but somehow, suddenly..

    The function looks something along the lines of..

    $filename ='/path/to/my/file/filet'; $fd = fopen( $filename,"r"); $prev_ord_id = fread ($fd, filesize ($filename)); $order_id = $prev_ord_id+1; fclose( $fd ); $ord_id = "BW" . $order_id; $fp = fopen( $filename,"w+"); fwrite( $fp, $order_id, 26); fclose( $fp );

    The version of PHP on the server is:- 4.0.4pl1 and it sits on a RedHat Linux 7.1 server..

    I know there were some questions about file related functions in one of the versions of PHP but since this was working fine until now, I dont know..?

    --
    "Wise men talk because they have something to say; fools talk
    because they have to say something." - Plato
    

    Ashwin Kutty Systems Administrator Dalhousie University Libraries (902) 494-2694

    attached mail follows:


    Hello, How would I go about installing cURL for PHP on windows box?

    attached mail follows:


    Hi there, I was wondering if a function such as session_close() or session_stop() existed. You see, i've been using session_destroy and/or session_unregister but the problem is that they unregister and/or destroy ALL my sessions in my server folder. What I am trying to do is just stop the session that is going on in that particular page? How can I do this?

    attached mail follows:


    Hi Jeremy,

    session_destroy() should not destroy all your sessions. As per the manual:

    session_destroy() destroys all of the data associated with the current session.

    If you are having trouble with all your sessions being deleted in each run, it may be a problem with these php.ini file settings:

    session.gc_probability specifies the probability that the gc (garbage collection) routine is started on each request in percent. Defaults to 1.

    session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage' and cleaned up.

    You can find all the php session info at: http://php.net/manual/en/html/ref.session.html

    On Friday 17 August 2001 11:29 am, you wrote: > Hi there, I was wondering if a function such as session_close() or > session_stop() existed. You see, i've been using session_destroy and/or > session_unregister but the problem is that they unregister and/or destroy > ALL my sessions in my server folder. What I am trying to do is just stop > the session that is going on in that particular page? How can I do this?

    attached mail follows:


    Thanks.

    "_lallous" <elias_bachaalanyyahoo.com> wrote in message news:20010817123840.89586.qmailpb1.pair.com... > zend.com > php.net > > and lots more.. >

    attached mail follows:


    Hello, Does anyone know of a tutorial on how to get PHP to connect to a MSSQL database from a Linux box?

    attached mail follows:


    This should be in the manual or in the archives of the list. I believe you have to use the Sybase drivers for Linux in order to conntect to the database.

    Michael

    Brandon Orther wrote:

    >Hello, > >Does anyone know of a tutorial on how to get PHP to connect to a MSSQL >database from a Linux box? > >

    attached mail follows:


    Hi All,

    A friend of mine said his printf is failing when he parses a variable from a 4.5 mega file. On smaller files, it works fine.

    There's a limit on the printf or somewhere else?

    Thanks.

    --
    

    Julio Nobrega

    A hora está chegando: http://toca.sourceforge.net

    attached mail follows:


    At 05:14 PM 8/17/01 -0300, Inércia Sensorial Trabalhando wrote: > Hi All, > > A friend of mine said his printf is failing when he parses a variable from >a 4.5 mega file. On smaller files, it works fine. > > There's a limit on the printf or somewhere else? > > Thanks.

    Is he throwing the _entire_ 4.5 MB file into that variable and trying to print that?

    attached mail follows:


    He said no, here's the error:

    Warning: printf(): too few arguments in /htdocs/content.php on line 20

    And here's the code. Remember that only fails on large files:

    <html> <!-- GBJ --> <head> <title>SITUAÇÃO DA CAIXA POSTAL</title> </head> <body> Resultado da Consulta para: <b><? printf ($login_usuario) ?></b>. <pre> <?php opendir ("/var/mail"); chdir ("/var/mail"); // A variável $login_usuario é obtida em index.html // xxx.xxx.com.br/gbj/index.html if (file_exists("$login_usuario")) { printf ("<b>SITUAÇÃO DA CAIXA POSTAL</b>\n\n"); $situacao = `ls -ld $login_usuario`; printf ("<font color=blue>$situacao</font>\n"); printf ("<b>CONTEÚDO DA CAIXA POSTAL</b>\n\n"); $conteudo = `mailx -H -f /var/mail/$login_usuario`; printf ("<font color=blue>$conteudo</font>\n"); } else { printf ("O usuário $login_usuario <b>não foi encontrado</b>.\n"); } ?> </pre> </body> </html>

    --
    

    Julio Nobrega

    A hora está chegando: http://toca.sourceforge.net "John Meyer" <john_meyergeocities.com> wrote in message news:5.1.0.14.0.20010817142852.009f4c10pop.mail.yahoo.com... At 05:14 PM 8/17/01 -0300, Inércia Sensorial Trabalhando wrote: > Hi All, > > A friend of mine said his printf is failing when he parses a variable from >a 4.5 mega file. On smaller files, it works fine. > > There's a limit on the printf or somewhere else? > > Thanks.

    Is he throwing the _entire_ 4.5 MB file into that variable and trying to print that?

    attached mail follows:


    I'm having problems with the require_once command. I have an ini_set, changing my include_path variable, but the starge thing is that some files get included and others don't, and I have to right the full relative path.

    Any ideas on what that can be? It's on a PHP-4.0.4pl1.

    Saludos... :-)

    -- 
    Porqué usar una base de datos relacional cualquiera,
    si podés usar PostgreSQL?
    -----------------------------------------------------------------
    Martín Marqués                  |        mmarquesunl.edu.ar
    Programador, Administrador, DBA |       Centro de Telematica
                           Universidad Nacional
                                del Litoral
    -----------------------------------------------------------------
    

    attached mail follows:


    hi, I hope I'm asking on right place :)

    I'm using xslt functions to transform xml document to html it works perfectly, but I need to transform xml written in iso8859-2 to html output also in iso8859-2

    if I add <?xml encoding="iso-8859-2"?> at the beginning of xml, sablotron tells me "syntax error"

    I have sablotron 0.60; iconv is installed

    could anyone help me please?

    -- 
    Adam Rambousek
    email: rambousekvolny.cz     ICQ: 47596279     Jabber: rambouseknjs.netlab.cz
    * Linux is like teepee - no windows, no gates, Apache inside...
    

    attached mail follows:


    Hi:

    I am trying to run a script and it supposed to take a lot of time... so I set the max_execution_time in the config file to 0... (i think that's wat it's for no time limit).... but after exactly 5 mins it gives me a cgi error saying that "the cgi application exceeded the allowed time for processing".... so i changed the number to 1800.... it still gets killed in 5 mins.... I have my php installed on a win2k system with IIS 5 under the dir c:\php and the file php.ini has been edited and put into c:\winnt\ What am I supposed to do in order to allow my script to run more than 5 mins??

    yours, Ray

    attached mail follows:


    I have just tried the set_time_limit() function and it still doesn't work

    Ray

    Raymond Siow wrote:

    > Hi: > > I am trying to run a script and it supposed to take a lot of time... so > I set the max_execution_time in the config file to 0... (i think that's > wat it's for no time limit).... but after exactly 5 mins it gives me a > cgi error saying that "the cgi application exceeded the allowed time for > processing".... so i changed the number to 1800.... it still gets killed > in 5 mins.... I have my php installed on a win2k system with IIS 5 under > the dir c:\php and the file php.ini has been edited and put into > c:\winnt\ What am I supposed to do in order to allow my script to run > more than 5 mins?? > > yours, > Ray

    attached mail follows:


    I haven't had to use IIS5 yet, but you might want to check in the IIS setting for a max cgi execution time.

    - Erik

    > -----Original Message----- > From: Raymond Siow [mailto:rs234cornell.edu] > Sent: Friday, August 17, 2001 4:00 PM > To: php-generallists.php.net > Subject: [PHP] cgi timeout > > > Hi: > > I am trying to run a script and it supposed to take a lot of time... so > I set the max_execution_time in the config file to 0... (i think that's > wat it's for no time limit).... but after exactly 5 mins it gives me a > cgi error saying that "the cgi application exceeded the allowed time for > processing".... so i changed the number to 1800.... it still gets killed > in 5 mins.... I have my php installed on a win2k system with IIS 5 under > the dir c:\php and the file php.ini has been edited and put into > c:\winnt\ What am I supposed to do in order to allow my script to run > more than 5 mins?? > > yours, > Ray > > > -- > 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:


    ummm.... I tried look at the IIS setting... but couldn't find anything related to CGI execution time.... do you know how to change that if I were to do it?

    Ray

    "Erik H. Mathy" wrote:

    > I haven't had to use IIS5 yet, but you might want to check in the IIS > setting for a max cgi execution time. > > - Erik > > > -----Original Message----- > > From: Raymond Siow [mailto:rs234cornell.edu] > > Sent: Friday, August 17, 2001 4:00 PM > > To: php-generallists.php.net > > Subject: [PHP] cgi timeout > > > > > > Hi: > > > > I am trying to run a script and it supposed to take a lot of time... so > > I set the max_execution_time in the config file to 0... (i think that's > > wat it's for no time limit).... but after exactly 5 mins it gives me a > > cgi error saying that "the cgi application exceeded the allowed time for > > processing".... so i changed the number to 1800.... it still gets killed > > in 5 mins.... I have my php installed on a win2k system with IIS 5 under > > the dir c:\php and the file php.ini has been edited and put into > > c:\winnt\ What am I supposed to do in order to allow my script to run > > more than 5 mins?? > > > > yours, > > Ray > > > > > > -- > > 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:


    Seems like I've just found it.... if you look at how to config cgi setting in the IIS help file... it will tell you about it...

    yours, Ray

    Raymond Siow wrote:

    > ummm.... I tried look at the IIS setting... but couldn't find anything related > to CGI execution time.... do you know how to change that if I were to do it? > > Ray > > "Erik H. Mathy" wrote: > > > I haven't had to use IIS5 yet, but you might want to check in the IIS > > setting for a max cgi execution time. > > > > - Erik > > > > > -----Original Message----- > > > From: Raymond Siow [mailto:rs234cornell.edu] > > > Sent: Friday, August 17, 2001 4:00 PM > > > To: php-generallists.php.net > > > Subject: [PHP] cgi timeout > > > > > > > > > Hi: > > > > > > I am trying to run a script and it supposed to take a lot of time... so > > > I set the max_execution_time in the config file to 0... (i think that's > > > wat it's for no time limit).... but after exactly 5 mins it gives me a > > > cgi error saying that "the cgi application exceeded the allowed time for > > > processing".... so i changed the number to 1800.... it still gets killed > > > in 5 mins.... I have my php installed on a win2k system with IIS 5 under > > > the dir c:\php and the file php.ini has been edited and put into > > > c:\winnt\ What am I supposed to do in order to allow my script to run > > > more than 5 mins?? > > > > > > yours, > > > Ray > > > > > > > > > -- > > > 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 there!

    I've got some strange problems whilst passing variables from forms into my php-script. When I use IE5 it works like a charm. Using Opera or IE4* the referred "action" script crashes due to memory restrictions on the server, in a function I use to get all the dates between two given dates, presumably due to my while condition never turning false. This lead me to believe that my variables were being gargled in some way as to make the parsing fail, this is however not the case as far as I can tell.

    This is the function I use to retrieve all the dates inbetween $from and $to inclusive (yes, it's butt ugly, I know, but I'm in kinda of a hurry, my deadline is approaching ;) :

    /* Function geDates(from, to) takes strings containing dates in the form "YYYY-MM-DD" and returns an array containing the dates between "from" and "to" inclusive */

    function getDates($from, $to) { (int) $year=substr($from,0,4)+0; /* Adding the zero is a kluge to force away leading zeros */ (int) $month=substr($from,5,2)+0;

    (int) $day=substr($from,8,2)+0;

    $datearray[0]=$from; $current=$from; while($current!=$to) { $day=$day+1; if(checkdate($month, $day, $year)) { $current=zeroPadDate($year, $month, $day); $datearray[]=$current; } else { $month=$month+1; $day=1; if (checkdate($month, $day, $year)) { $current=zeroPadDate($year, $month, $day); $datearray[]=$current; } else { $year=$year+1; $month=1; $current=zeroPadDate($year, $month, $day); $datearray[]=$current; } }

    } return $datearray; }

    /* Accessory function to getDates above. */

    function zeroPadDate($year, $month, $day) { if ($month<10) $mstr="0$month"; if ($day<10) $dstr="0$day"; return "$year-$mstr-$dstr"; }

    What could it possibly be due to? Are there any differencies in the way the above mentioned browsers pass the form variables?

    If you do find it in your heart to help me out with this one, please also reply by e-mail to webmasterpalladiumbio.com

    Thanks in advance,

    Claes Andersson Webmaster, www.palladiumbio.com

    PS Exchanging "GET" and "POST" in the referring form made no difference in the world DS

    attached mail follows:


    PHP Folks:

    Does PHP provide some mechanism for browser detection & redirection or is this something that Apache Directives can handle?

    For example: I don't want users with browsers less than 4.0 to actually load a page on our site. Instead, I want them redirected to a page that let's them know their browser is in-compatible.

    I know this is something JavaScript can do, but again that relies on the browser.

    Thanks for any help,

    Christopher Raymond

    attached mail follows:


    the $HTTP_USER_AGENT variable will be of some use to you.

    --
    Tyler Longren
    Captain Jack Communications
    tylercaptainjack.com
    www.captainjack.com
    

    On Fri, 17 Aug 2001 16:14:40 -0500 Christopher Raymond <christopheroasisnetworks.com> wrote:

    > > PHP Folks: > > Does PHP provide some mechanism for browser detection & redirection or > is > this something that Apache Directives can handle? > > For example: I don't want users with browsers less than 4.0 to actually > load > a page on our site. Instead, I want them redirected to a page that let's > them know their browser is in-compatible. > > I know this is something JavaScript can do, but again that relies on the > browser. > > > Thanks for any help, > > Christopher Raymond > > > -- > 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:


    I am trying to run a repetitive script. Basically, one function over and over. Every time I run it from the command line I get "Segmentation fault (core dumped)". If I run it with the PHP module for apache, "Segmentation fault (core dumped)" appears in the error log.

    It seems to be a memory issue. If I run it via the command line I can get through the function 1426 times, while the apache module only allows 1371 (both are consistent).

    If I reduce the output to the screen, the number of times the function runs increases.

    I can't just minimize the output to the screen, I have to go through 62^12 repetitions.

    Does anyone have any ideas on how to fix this???

    Thanks in advance, Evan Nemerson

    attached mail follows:


    "Evan Nemerson" <evancoeus-group.com> wrote in message news:01081714192500.02467localhost.localdomain... > I can't just minimize the output to the screen, I have to go through 62^12 > repetitions.

    Uh, I hope you mean 6 * 2^12 (24576), not 62^12 (3226266762397899821056). ... assuming 10,000 reps per second, that would take a little over 10 billion years to complete.

    In either case, this really doesn't sound like something PHP is well-suited for.

    What is it you're trying to accomplish? Maybe we can suggest a better solution...

    attached mail follows:


    Just started learning PHP/MySQL a couple days ago, and would like to know if I can somehow suppress the following error:

    Warning: Undefined variable: submit in c:\Program Files\Apache Group\Apache\htdocs/smartslitters/invoices.php on line 22

    Is it just a server or PHP setting or something? Any suggestions are much appreciated. Thanks.

    (I hope no minds if I attach the source files...)

    ...Rene

    ---
    Rene Fournier,
    PLEASErenefournierNOyahooSPAM.com
    

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    Turn off E_NOTICE in your php.ini file.

    On Fri, 17 Aug 2001, Rene Fournier wrote:

    > Just started learning PHP/MySQL a couple days ago, and would like to know if > I can somehow suppress the following error: > > Warning: Undefined variable: submit in c:\Program Files\Apache > Group\Apache\htdocs/smartslitters/invoices.php on line 22 > > Is it just a server or PHP setting or something? Any suggestions are much > appreciated. Thanks. > > (I hope no minds if I attach the source files...) > > ...Rene > > --- > Rene Fournier, > PLEASErenefournierNOyahooSPAM.com > >

    -- 
    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 all:

    I'm in the design stage of creating a client-account management system. We provide an array of support services to nonprofits, and I wish to develop a system that is more than just a basic service request system. I've been reading up on sessions management, as well as cookies. I've also been combing through a number of similar systems (either service request systems, or accounts management systems).

    My question is this: is there a specific reason to use a tracking table in conjunction with session ids, other than knowing how often a user logs in?

    I ask, because a few of the systems I've examined have tracking tables. But they all seem very brief just basically a trackid, sessionid, userid, datetime, with one or two other fields.

    I don't need to keep track of what each user is doing per say, but I'm wondering if there have been other innovative uses of tracking user sessions, that maybe I should consider. What types of things would you use tracking for? and why?

    Any comments would be appreciated.

    Alnisa

    -- 
       .........................................
        Alnisa  Allgood
        Executive Director
        Nonprofit Tech
        (ph) 415.337.7412  (fx) 415.337.7927
        (url)  http://www.nonprofit-techworld.org
        (url)  http://www.nonprofit-tech.org
        (url)  http://www.tech-library.org
       .........................................
        Nonprofit Tech E-Update
        mailto:nonprofit-tech-subscribeegroups.com
       .........................................
        applying technology to transform
       .........................................
    

    attached mail follows:


    I am new to MySql but wanting to use PHP to update and maintain a database. I thought I might use MySql.

    I have installed MySql, and in PHP have created a database called 'mydir'. I am trying to find php functions to add new records/fields to the database, but all I can find are functions to query and get information from a database.

    Can anyone help or point me into the direction.

    Thanks

    Dave

    attached mail follows:


    On Vie 17 Ago 2001 19:17, you wrote: > I am new to MySql but wanting to use PHP to update and maintain a database. > I thought I might use MySql. > > I have installed MySql, and in PHP have created a database called 'mydir'. > I am trying to find php functions to add new records/fields to the > database, but all I can find are functions to query and get information > from a database.

    You should first learn howto use an SQL database, and after that think about using it. Read the MySQL tutorial. It's somewhrere in there web site.

    Saludos... :-)

    -- 
    Porqué usar una base de datos relacional cualquiera,
    si podés usar PostgreSQL?
    -----------------------------------------------------------------
    Martín Marqués                  |        mmarquesunl.edu.ar
    Programador, Administrador, DBA |       Centro de Telematica
                           Universidad Nacional
                                del Litoral
    -----------------------------------------------------------------
    

    attached mail follows:


    In adition to that, you may want to check out the online documentation on the www.php.net website. Find the section under mySQL. If you know how to manipulate data using SQL, php apis are very easy to use ...... www.mysql.com could be good resource for you as well. if you have a specific question in mind, fire it away!!!

    Erisen

    --- Martín Marqués <martinbugs.unl.edu.ar> wrote: > On Vie 17 Ago 2001 19:17, you wrote: > > I am new to MySql but wanting to use PHP to update and > maintain a database. > > I thought I might use MySql. > > > > I have installed MySql, and in PHP have created a > database called 'mydir'. > > I am trying to find php functions to add new > records/fields to the > > database, but all I can find are functions to query and > get information > > from a database. > > You should first learn howto use an SQL database, and > after that think about > using it. Read the MySQL tutorial. It's somewhrere in > there web site. > > Saludos... :-) > > -- > Porqué usar una base de datos relacional cualquiera, > si podés usar PostgreSQL? > ----------------------------------------------------------------- > Martín Marqués | > mmarquesunl.edu.ar > Programador, Administrador, DBA | Centro de > Telematica > Universidad Nacional > del Litoral > ----------------------------------------------------------------- > > -- > 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 >

    ===== Mehmet Erisen http://www.erisen.com

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    I have read the documentation already.

    I am trying to create a directory, which information can be added and maintained through a the web browser. I thought that using a MySql database would be a good idea rather than writing it all to a file. You saying that MySql is a waste of time for this ?

    I thought that PHP can be used to add records etc and query databases for this

    Dave

    ----- Original Message ----- From: "Martín Marqués" <martinbugs.unl.edu.ar> To: "Dave.O" <Dave.Otinyonline.co.uk> Cc: <php-generallists.php.net> Sent: Friday, August 17, 2001 11:28 PM Subject: Re: [PHP] Adding records to a MySql database

    > On Vie 17 Ago 2001 19:17, you wrote: > > I am new to MySql but wanting to use PHP to update and maintain a database. > > I thought I might use MySql. > > > > I have installed MySql, and in PHP have created a database called 'mydir'. > > I am trying to find php functions to add new records/fields to the > > database, but all I can find are functions to query and get information > > from a database. > > You should first learn howto use an SQL database, and after that think about > using it. Read the MySQL tutorial. It's somewhrere in there web site. > > Saludos... :-) > > -- > Porqué usar una base de datos relacional cualquiera, > si podés usar PostgreSQL? > ----------------------------------------------------------------- > Martín Marqués | mmarquesunl.edu.ar > Programador, Administrador, DBA | Centro de Telematica > Universidad Nacional > del Litoral > ----------------------------------------------------------------- > > -- > 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:


    On Vie 17 Ago 2001 20:14, Dave.O wrote: > I have read the documentation already. > > I am trying to create a directory, which information can be added and > maintained through a the web browser. I thought that using a MySql > database would be a good idea rather than writing it all to a file. You > saying that MySql is a waste of time for this ? > > I thought that PHP can be used to add records etc and query databases for > this

    You said that all you found were functions to query information. Thats all you need with an SQL database. The main SQL query commands are: SELECT, UPDATE, DELETE and INSERT. With those 4 comands you can read, insert and modify (also delete) the information on your database.

    Hope you understand know.

    Saludos... :-)

    -- 
    Porqué usar una base de datos relacional cualquiera,
    si podés usar PostgreSQL?
    -----------------------------------------------------------------
    Martín Marqués                  |        mmarquesunl.edu.ar
    Programador, Administrador, DBA |       Centro de Telematica
                           Universidad Nacional
                                del Litoral
    -----------------------------------------------------------------
    

    attached mail follows:


    Hello, I am using the PHPMyAdmin for that. There is a website www.phpwizard.net that you can download phpMyAdmin. Hope this helps. Mehmet. --- "Dave.O" <Dave.Otinyonline.co.uk> wrote: > I have read the documentation already. > > I am trying to create a directory, which information can > be added and > maintained through a the web browser. I thought that > using a MySql database > would be a good idea rather than writing it all to a > file. You saying that > MySql is a waste of time for this ? > > I thought that PHP can be used to add records etc and > query databases for > this > > > > Dave > > ----- Original Message ----- > From: "Martín Marqués" <martinbugs.unl.edu.ar> > To: "Dave.O" <Dave.Otinyonline.co.uk> > Cc: <php-generallists.php.net> > Sent: Friday, August 17, 2001 11:28 PM > Subject: Re: [PHP] Adding records to a MySql database > > > > On Vie 17 Ago 2001 19:17, you wrote: > > > I am new to MySql but wanting to use PHP to update > and maintain a > database. > > > I thought I might use MySql. > > > > > > I have installed MySql, and in PHP have created a > database called > 'mydir'. > > > I am trying to find php functions to add new > records/fields to the > > > database, but all I can find are functions to query > and get information > > > from a database. > > > > You should first learn howto use an SQL database, and > after that think > about > > using it. Read the MySQL tutorial. It's somewhrere in > there web site. > > > > Saludos... :-) > > > > -- > > Porqué usar una base de datos relacional cualquiera, > > si podés usar PostgreSQL? > > > ----------------------------------------------------------------- > > Martín Marqués | > mmarquesunl.edu.ar > > Programador, Administrador, DBA | Centro de > Telematica > > Universidad Nacional > > del Litoral > > > ----------------------------------------------------------------- > > > > -- > > 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 >

    ===== Mehmet Erisen http://www.erisen.com

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    No offence but you are telling me stuff I already know ! This mailing list is very good so dont take offence due to my frustration. I know how to connect to the server, create the database and more or less query it, but cant find the command to add/insert records or am I doing something very wrong. I presume this can be done in php

    ----- Original Message ----- From: "Martín Marqués" <martinbugs.unl.edu.ar> To: "Dave.O" <Dave.Otinyonline.co.uk> Cc: <php-generallists.php.net> Sent: Saturday, August 18, 2001 12:23 AM Subject: Re: [PHP] Adding records to a MySql database

    > On Vie 17 Ago 2001 20:14, Dave.O wrote: > > I have read the documentation already. > > > > I am trying to create a directory, which information can be added and > > maintained through a the web browser. I thought that using a MySql > > database would be a good idea rather than writing it all to a file. You > > saying that MySql is a waste of time for this ? > > > > I thought that PHP can be used to add records etc and query databases for > > this > > You said that all you found were functions to query information. Thats all > you need with an SQL database. > The main SQL query commands are: SELECT, UPDATE, DELETE and INSERT. With > those 4 comands you can read, insert and modify (also delete) the information > on your database. > > Hope you understand know. > > Saludos... :-) > > -- > Porqué usar una base de datos relacional cualquiera, > si podés usar PostgreSQL? > ----------------------------------------------------------------- > Martín Marqués | mmarquesunl.edu.ar > Programador, Administrador, DBA | Centro de Telematica > Universidad Nacional > del Litoral > ----------------------------------------------------------------- >

    attached mail follows:


    I was looking for the command something like mysql_insert or something, just found dba_insert() is this it ?!?

    ----- Original Message ----- From: "Martín Marqués" <martinbugs.unl.edu.ar> To: "Dave.O" <Dave.Otinyonline.co.uk> Cc: <php-generallists.php.net> Sent: Saturday, August 18, 2001 12:23 AM Subject: Re: [PHP] Adding records to a MySql database

    > On Vie 17 Ago 2001 20:14, Dave.O wrote: > > I have read the documentation already. > > > > I am trying to create a directory, which information can be added and > > maintained through a the web browser. I thought that using a MySql > > database would be a good idea rather than writing it all to a file. You > > saying that MySql is a waste of time for this ? > > > > I thought that PHP can be used to add records etc and query databases for > > this > > You said that all you found were functions to query information. Thats all > you need with an SQL database. > The main SQL query commands are: SELECT, UPDATE, DELETE and INSERT. With > those 4 comands you can read, insert and modify (also delete) the information > on your database. > > Hope you understand know. > > Saludos... :-) > > -- > Porqué usar una base de datos relacional cualquiera, > si podés usar PostgreSQL? > ----------------------------------------------------------------- > Martín Marqués | mmarquesunl.edu.ar > Programador, Administrador, DBA | Centro de Telematica > Universidad Nacional > del Litoral > ----------------------------------------------------------------- > > -- > 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:


    mysql_query() is universal for any SQL query so mysql_query("INSERT INTO table () values ()") is what you're looking for

    > I was looking for the command something like mysql_insert or something, just > found dba_insert() is this it ?!?

    -- 
    Adam Rambousek
    email: rambousekvolny.cz     ICQ: 47596279     Jabber: rambouseknjs.netlab.cz
    www: http://adamovy.cestiny.cz    http://hemzeni.poda.cz/matrix
    * United we stand, divided we fall.  - Elminster
    

    attached mail follows:


    Here is how this is done:

    $sql = "insert into employees values ('10','John','Smith','Engineer') "; $result = mysql_query($sql) or die ('Insert failed');

    with php, you can execute any SQL statement as long as you have access...

    to update a table

    $sql = "update employees set job = 'Chief Engineer' where employee_id = '10' "; $result = mysql_query($sql) or die ('Update failed');

    hope this helps, ultrAslan

    --- "Dave.O" <Dave.Otinyonline.co.uk> wrote: > I was looking for the command something like mysql_insert > or something, just > found dba_insert() is this it ?!? > > ----- Original Message ----- > From: "Martín Marqués" <martinbugs.unl.edu.ar> > To: "Dave.O" <Dave.Otinyonline.co.uk> > Cc: <php-generallists.php.net> > Sent: Saturday, August 18, 2001 12:23 AM > Subject: Re: [PHP] Adding records to a MySql database > > > > On Vie 17 Ago 2001 20:14, Dave.O wrote: > > > I have read the documentation already. > > > > > > I am trying to create a directory, which information > can be added and > > > maintained through a the web browser. I thought that > using a MySql > > > database would be a good idea rather than writing it > all to a file. You > > > saying that MySql is a waste of time for this ? > > > > > > I thought that PHP can be used to add records etc and > query databases > for > > > this > > > > You said that all you found were functions to query > information. Thats all > > you need with an SQL database. > > The main SQL query commands are: SELECT, UPDATE, DELETE > and INSERT. With > > those 4 comands you can read, insert and modify (also > delete) the > information > > on your database. > > > > Hope you understand know. > > > > Saludos... :-) > > > > -- > > Porqué usar una base de datos relacional cualquiera, > > si podés usar PostgreSQL? > > > ----------------------------------------------------------------- > > Martín Marqués | > mmarquesunl.edu.ar > > Programador, Administrador, DBA | Centro de > Telematica > > Universidad Nacional > > del Litoral > > > ----------------------------------------------------------------- > > > > -- > > 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 >

    ===== Mehmet Erisen http://www.erisen.com

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    On Vie 17 Ago 2001 20:39, Dave.O wrote: > No offence but you are telling me stuff I already know ! This mailing > list is very good so dont take offence due to my frustration. I know how > to connect to the server, create the database and more or less query it, > but cant find the command to add/insert records or am I doing something > very wrong. I presume this can be done in php

    I don't use MySQL, but I'll give you an example.

    Lets say you have a table in your database like this:

    col1 INT (autoincremental) col2 VARCHAR(50)

    and say the name of the table is tab1

    if you want to insert a new row with value 'Dave the great!' whihc is loaded in the $var1 variable, you just have to do this:

    $query="INSERT INTO tab1 (col2) VALUES (" . $var1 . ")";

    query_func($query);

    All this after you have connected to the database with the connection function of the MySQL extension.

    So, if the query went OK, you have a new record in the database with some value in the col1 (integer type) and 'Dave the great!' in col2.

    Undestand?

    -- 
    Porqué usar una base de datos relacional cualquiera,
    si podés usar PostgreSQL?
    -----------------------------------------------------------------
    Martín Marqués                  |        mmarquesunl.edu.ar
    Programador, Administrador, DBA |       Centro de Telematica
                           Universidad Nacional
                                del Litoral
    -----------------------------------------------------------------
    

    attached mail follows:


    On Vie 17 Ago 2001 20:41, Dave.O wrote: > I was looking for the command something like mysql_insert or something, > just found dba_insert() is this it ?!?

    dba is not MySQL!

    Saludos... :-)

    -- 
    Porqué usar una base de datos relacional cualquiera,
    si podés usar PostgreSQL?
    -----------------------------------------------------------------
    Martín Marqués                  |        mmarquesunl.edu.ar
    Programador, Administrador, DBA |       Centro de Telematica
                           Universidad Nacional
                                del Litoral
    -----------------------------------------------------------------
    

    attached mail follows:


    Thanks

    ----- Original Message ----- From: "ERISEN, Mehmet Kamil" <erisenyahoo.com> To: "Dave.O" <Dave.Otinyonline.co.uk>; "Martín_Marqués" <martinbugs.unl.edu.ar> Cc: <php-generallists.php.net> Sent: Saturday, August 18, 2001 12:42 AM Subject: Re: [PHP] Adding records to a MySql database

    > Here is how this is done: > > $sql = "insert into employees > values ('10','John','Smith','Engineer') "; > $result = mysql_query($sql) or die ('Insert failed'); > > with php, you can execute any SQL statement as long as you > have access... > > to update a table > > $sql = "update employees > set job = 'Chief Engineer' > where employee_id = '10' "; > $result = mysql_query($sql) or die ('Update failed'); > > hope this helps, > ultrAslan > > --- "Dave.O" <Dave.Otinyonline.co.uk> wrote: > > I was looking for the command something like mysql_insert > > or something, just > > found dba_insert() is this it ?!? > > > > ----- Original Message ----- > > From: "Martín Marqués" <martinbugs.unl.edu.ar> > > To: "Dave.O" <Dave.Otinyonline.co.uk> > > Cc: <php-generallists.php.net> > > Sent: Saturday, August 18, 2001 12:23 AM > > Subject: Re: [PHP] Adding records to a MySql database > > > > > > > On Vie 17 Ago 2001 20:14, Dave.O wrote: > > > > I have read the documentation already. > > > > > > > > I am trying to create a directory, which information > > can be added and > > > > maintained through a the web browser. I thought that > > using a MySql > > > > database would be a good idea rather than writing it > > all to a file. You > > > > saying that MySql is a waste of time for this ? > > > > > > > > I thought that PHP can be used to add records etc and > > query databases > > for > > > > this > > > > > > You said that all you found were functions to query > > information. Thats all > > > you need with an SQL database. > > > The main SQL query commands are: SELECT, UPDATE, DELETE > > and INSERT. With > > > those 4 comands you can read, insert and modify (also > > delete) the > > information > > > on your database. > > > > > > Hope you understand know. > > > > > > Saludos... :-) > > > > > > -- > > > Porqué usar una base de datos relacional cualquiera, > > > si podés usar PostgreSQL? > > > > > > ----------------------------------------------------------------- > > > Martín Marqués | > > mmarquesunl.edu.ar > > > Programador, Administrador, DBA | Centro de > > Telematica > > > Universidad Nacional > > > del Litoral > > > > > > ----------------------------------------------------------------- > > > > > > -- > > > 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 > > > > > ===== > Mehmet Erisen > http://www.erisen.com > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute with Yahoo! Messenger > http://phonecard.yahoo.com/ > > -- > 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:


    Thanks

    ----- Original Message ----- From: "Martín Marqués" <martinbugs.unl.edu.ar> To: "Dave.O" <Dave.Otinyonline.co.uk> Cc: <php-generallists.php.net> Sent: Saturday, August 18, 2001 12:43 AM Subject: Re: [PHP] Adding records to a MySql database

    > On Vie 17 Ago 2001 20:39, Dave.O wrote: > > No offence but you are telling me stuff I already know ! This mailing > > list is very good so dont take offence due to my frustration. I know how > > to connect to the server, create the database and more or less query it, > > but cant find the command to add/insert records or am I doing something > > very wrong. I presume this can be done in php > > I don't use MySQL, but I'll give you an example. > > Lets say you have a table in your database like this: > > col1 INT (autoincremental) > col2 VARCHAR(50) > > and say the name of the table is tab1 > > if you want to insert a new row with value 'Dave the great!' whihc is loaded > in the $var1 variable, you just have to do this: > > $query="INSERT INTO tab1 (col2) VALUES (" . $var1 . ")"; > > query_func($query); > > All this after you have connected to the database with the connection > function of the MySQL extension. > > So, if the query went OK, you have a new record in the database with some > value in the col1 (integer type) and 'Dave the great!' in col2. > > Undestand? > > -- > Porqué usar una base de datos relacional cualquiera, > si podés usar PostgreSQL? > ----------------------------------------------------------------- > Martín Marqués | mmarquesunl.edu.ar > Programador, Administrador, DBA | Centro de Telematica > Universidad Nacional > del Litoral > ----------------------------------------------------------------- >

    attached mail follows:


    Hi all,

    I'll apologise right away - this is more or less completely off topic, though it is remotely connected with PHP (so that's my excuse).

    At the moment, the company I work for is hosted on a co-located server. We have one main domain and many sub domains. Here's how they are (roughly set up):

    www.mainsite.com www.sub1.mainsite.com www.sub2.mainsite.com www.sub3.mainsite.com www.subn.mainsite.com

    The document trees are like this:

    /home/mainsite/www // main dir /home/mainsite/www/sub1 //sub 1 /home/mainsite/www/sub2 // sub2 (etc)

    We have just (in the last month or so) leased a cobalt raq all for our own use. Great. However, the sites using this box are setup and maintained using a web interface that comes as default with the box. when setting up sites (subs or otherwise), it adds sites (and you have to specify users for those sites) with directory trees like this:

    /home/sites/site1/web /home/sites/site2/web (etc)

    Obviously, this causes problems (like for the php scripts that are running on the current setup, where files are included / required as a part of the main directory, and out of the document root (/home/mainsite/includes might be an example)).

    So, I'd like to learn how to use linux (bearing in mind that I have very limited experience of unix based systems). I can perform the very basic commands, but would like to learn how to use / mainpulate the box through shell access rather than over a web interface (which ultimately, I'm assuming, will give me more flexibility - for example, I'd rather know how to install the latest version of php onto the server following the installation instructions than to attempt to do it through another medium).

    I've bought a couple of books and hope to delve into them in the course of the weekend and the next few weeks to come. I'm assuming that one of the first steps would be to install linux on my home machine and get a feel for it (currently I'm running windows.... ouch).

    So, here come the questions. Where can I find the latest version of linux? I have had a brief look at freshmeat.net and linux.com, but didn't find any download sections (I didn't look too hard, for reasons soon to be explained).

    If I install linux, can I still use windows as a secondary OS (perhaps running over the top of linux?)

    If I can run windows as well as linux, am I best formatting my main drive, installing linux, then windows?

    Is the httpdconf file one of the main files i need to confifure for sites, or are there many others (I've read a little about setting users up in vi and will read more on that, but are there mounds of files that you need to configure when setting up a new virtual site?)

    I'm sorry about asking what's probably obvious to most of you, but that's part of my reasoning behind asking on here - most of you will probably be familiar with this stuff. Another reason for asking here is that I don't know of any other relevant alt groups.

    I'm sure these questions have been asked many times before, but it really has been "one of those weeks", and I'm about fit to drop dead of exhaustion (not your problem, I know, but the sympathy vote might work ;)) - I've had a quick look through the archives and other sources, but the mounds of text that surround the basic questions I'm asking are (in my dazed state) making me even more dizzy.

    Lastly, thanks for reading. Any advice any of you can give, or any basic pointers you might have, are greatly appreciated. Please cc any replies.

    Thanks and goodnight, James

    attached mail follows:


    Hello, I have implemented a user login with PHP Session functions. THe problem I have is that if the user is logged in the site using http://mysite.com/login.php and starts a session, the session is not recognized when user is trying to utilize the site with http://www.mysite.com/dosomething.php

    any suggestions?

    thanks, erisen. ultrAslan.

    ===== Mehmet Erisen http://www.erisen.com

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    There's gotta be an easier way to get create a date properly formatted for MySQL's standard YYYY-MM-DD DATE field format. Any suggestions, smacks-upside-the-head, etc. on how to reduce this would be greatly appreciated.

    Here's my code:

    <?php

    $today = getdate(); $year = $today['year']; $month = $today['mon']; $mday = $today['mday'];

    if ($month < 10) { // $month = join("0",$today['mon']); $month = "0"; $month .= $today['mon']; }

    $printtoday = $year; $printtoday .= "-"; $printtoday .= $month; $printtoday .= "-"; $printtoday .= $mday;

    print($printtoday);

    ?>

    It works, but sheesh...

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    date("Y-m-d") should do the job

    > There's gotta be an easier way to get create a date > properly formatted for MySQL's standard YYYY-MM-DD > DATE field format. Any suggestions, > smacks-upside-the-head, etc. on how to reduce this > would be greatly appreciated.

    -- 
    Adam Rambousek
    email: rambousekvolny.cz     ICQ: 47596279     Jabber: rambouseknjs.netlab.cz
    www: http://adamovy.cestiny.cz    http://hemzeni.poda.cz/matrix
    * I'll save you from yourself, From those demons of the night
      They promise fame and fortune, All that you eagerly desire.  - Era
    

    attached mail follows:


    <?php $a = date( "Y\-m\-d" ); print( "$a" ); ?>

    should do the job...

    there is lot's of things that you can incorporate in the date function... look it up at www.php.net/date

    -----Original Message----- From: CGI GUY [mailto:cgi_guy1313yahoo.com] Sent: Friday, August 17, 2001 4:16 PM To: php-generallists.php.net Subject: [PHP] looong date formatting for MySQL

    There's gotta be an easier way to get create a date properly formatted for MySQL's standard YYYY-MM-DD DATE field format. Any suggestions, smacks-upside-the-head, etc. on how to reduce this would be greatly appreciated.

    Here's my code:

    <?php

    $today = getdate(); $year = $today['year']; $month = $today['mon']; $mday = $today['mday'];

    if ($month < 10) { // $month = join("0",$today['mon']); $month = "0"; $month .= $today['mon']; }

    $printtoday = $year; $printtoday .= "-"; $printtoday .= $month; $printtoday .= "-"; $printtoday .= $mday;

    print($printtoday);

    ?>

    It works, but sheesh...

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    -- 
    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:


    NOW()

    Jerry Lake Interface Engineering Technician

    -----Original Message----- From: Adam Rambousek [mailto:rambousekvolny.cz] Sent: Friday, August 17, 2001 4:20 PM To: CGI GUY; php-generallists.php.net Subject: Re: [PHP] looong date formatting for MySQL

    date("Y-m-d") should do the job

    > There's gotta be an easier way to get create a date > properly formatted for MySQL's standard YYYY-MM-DD > DATE field format. Any suggestions, > smacks-upside-the-head, etc. on how to reduce this > would be greatly appreciated.

    --
    Adam Rambousek
    email: rambousekvolny.cz     ICQ: 47596279     Jabber:
    rambouseknjs.netlab.cz
    www: http://adamovy.cestiny.cz    http://hemzeni.poda.cz/matrix
    * I'll save you from yourself, From those demons of the night
      They promise fame and fortune, All that you eagerly desire.  - Era
    

    -- 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:


    Thanks for the reply, however, that function call doesn't zero-substitute (i.e., "07" for "7", "03" for "3", etc.); that's why I've added this:

    if ($month < 10) { $month = "0"; $month .= $today['mon']; }

    By default, MySQL only accepts dates as YYYY-MM-DD; PHP's getdate(Y-m-d) prints out YYYY-M-DD or YYYY-MM-DD IF AND ONLY IF the month is two-digit.

    --- Adam Rambousek <rambousekvolny.cz> wrote: > date("Y-m-d") should do the job > > > There's gotta be an easier way to get create a > date > > properly formatted for MySQL's standard YYYY-MM-DD > > DATE field format. Any suggestions, > > smacks-upside-the-head, etc. on how to reduce this > > would be greatly appreciated. > > > > -- > Adam Rambousek > email: rambousekvolny.cz ICQ: 47596279 > Jabber: rambouseknjs.netlab.cz > www: http://adamovy.cestiny.cz > http://hemzeni.poda.cz/matrix > * I'll save you from yourself, From those demons of > the night > They promise fame and fortune, All that you > eagerly desire. - Era > > > -- > 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 >

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    (regarding my previous post)

    although, it probably doesn't apply to what your doing.

    Jerry Lake Interface Engineering Technician

    -----Original Message----- From: Jerry Lake [mailto:jerryleuropa.com] Sent: Friday, August 17, 2001 4:28 PM To: php-generallists.php.net Subject: RE: [PHP] looong date formatting for MySQL

    NOW()

    Jerry Lake Interface Engineering Technician

    -----Original Message----- From: Adam Rambousek [mailto:rambousekvolny.cz] Sent: Friday, August 17, 2001 4:20 PM To: CGI GUY; php-generallists.php.net Subject: Re: [PHP] looong date formatting for MySQL

    date("Y-m-d") should do the job

    > There's gotta be an easier way to get create a date > properly formatted for MySQL's standard YYYY-MM-DD > DATE field format. Any suggestions, > smacks-upside-the-head, etc. on how to reduce this > would be greatly appreciated.

    --
    Adam Rambousek
    email: rambousekvolny.cz     ICQ: 47596279     Jabber:
    rambouseknjs.netlab.cz
    www: http://adamovy.cestiny.cz    http://hemzeni.poda.cz/matrix
    * I'll save you from yourself, From those demons of the night
      They promise fame and fortune, All that you eagerly desire.  - Era
    

    -- 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:


    look into the docs, there's possibility to display zeros (but I don't remeber exact letter)

    > Thanks for the reply, however, that function call > doesn't zero-substitute (i.e., "07" for "7", "03" for > "3", etc.); that's why I've added this:

    -- 
    Adam Rambousek
    email: rambousekvolny.cz     ICQ: 47596279     Jabber: rambouseknjs.netlab.cz
    www: http://adamovy.cestiny.cz    http://hemzeni.poda.cz/matrix
    * Antivirus alert: file .signature infected by signature virus.
      Hi! I'm a signature virus! Copy me into your signature file to help me spread!
    

    attached mail follows:


    Hi Php Users.

    How can I get the items of a browser's history?

    Thank you.

    attached mail follows:


    Greetings.

    I am running php 4.0.6, which I built as an apache module on Linux 2.2.14. I am trying to get debug information, using the 'debugger_on()' function.

    My compilation line (from phpinfo()) is:

    './configure' '--prefix=/usr/local/php' '--with-config-file-path=/etc' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-track-vars' '--enable-magic-quotes' '--enable-debugger' '--with-mysql=/usr/local/mysql' '--with-interbase=/opt/interbase'

    However, when I execute a php script that includes the 'debugger_on()' function, I get:

    Fatal error: Call to undefined function: debugger_on()

    This would seem that although I said '--enable-debugger' in the configuration, my debugger is either: a) not working in php 4.0.6 or b) not compiled into my code.

    I appreciate any hints, suggestions, etc. The docs on php.net are rather weak on using the debugger_on() function.

    Thanks Jeff

    attached mail follows:


    thank for reply me. But i think the problem is not in the .csv file because today when I test it with netscape..it ok...

    it return the message like that :

    LOAD DATA LOCAL INFILE '/TEMP/phpB080AVGU' INTO TABLE purchase FIELDS TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date,courier_service,remark)

    Successful.

    but when I test with IE,it fail and return the message like that,

    Error : LOAD DATA LOCAL INFILE 'C:\prchase3.csv' INTO TABLE purchase FIELDS TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date,courier_service,remark)

    File 'c:purchase3.csv' not found (Errcode: 2)

    the difererent is between the file reading by IE 5.5 and Netscape 4.7 there...seem like IE reading file in C:\purchase3.csv and netscape reading file in /temp/phpB080AVGU ....

    but the true path of file is locate in c:\purchase3.csv...why this will happen?

    So I think the problem is occur on the variable $textfile that I defined...can some body help me..thanks...

    >Post a couple of lines from your data file. Does .csv insist on all >values single quoted?

    On Thu, Aug 16, 2001 at 09:03:36PM -0700, Yeong CN wrote: > Hi. > This is the script I write to upload a .csv file into my online mysql database : > > $sql_query="LOAD DATA LOCAL INFILE '$textfile' INTO TABLE purchase FIELDS > TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date, > courier_service,remark)"; > $sql_query=($sql_query); > $result=mysql_query($sql_query); > $error_message=mysql_error(); > if(!$result) > { > echo"Error : $sql_query<br><p>"; > echo"$error_message"; > } > else if($result) > { > echo"$sql_query<br><p>"; > echo"successful"; > } > > When I try to run the script in localhost, it is work.But when I try in the \ > server,it can't work and return the error message like that : > Error : LOAD DATA LOCAL INFILE 'C:\\purchase3.csv' INTO TABLE purchase FIELDS \ > TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date, > courier_service,remark) > File 'C:\purchase3.csv' not found (Errcode: 2) > > > I think it maybe the backsplashes that make the error occur.. > > so I change the script like that : > > $sql_query=stripslashes($sql_query); > > But it still return the error message like that : > > Error : LOAD DATA LOCAL INFILE 'C:\purchase3.csv' INTO TABLE purchase FIELDS > TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date, > courier_service,remark) > File 'C:purchase3.csv' not found (Errcode: 2) > > > What happen actually...hope that somebody can help me. Thanks.

    Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/