php-general Digest 3 May 2001 05:13:37 -0000 Issue 663 Topics (messages 51169 through 51214): Re: Managing Multiple Conditions in a MySQL Query 51169 by: Sam Leibowitz Re: String Type Unknown 51170 by: Nathan Cook 51178 by: Nathan Cook Website production tool in PHP 51171 by: Michael O'Neal 51185 by: andreas \(.work\) Re: PHP 4.0.5 module causes Apache child processes to segfault... 51172 by: John Monfort 51212 by: Yasuo Ohgaki add to .htpasswd via php 51173 by: Joseph Koenig 51174 by: Jack Dempsey 51176 by: Tyrone Mills 51179 by: Joseph Koenig 51184 by: Matt Schroebel gd-2.0.1 51175 by: Dave Mariner connexion to mysql db through php 51177 by: Moise Bertrand Tachago Decimal to Ascii 51180 by: Wee Chua MySQL fulltext indices and phrase search 51181 by: Jens Kisters 51190 by: Steve Werby Re: SQL Select Unique() ? 51182 by: CC Zona Re: Forms with Field Arrays and JavaScript 51183 by: Tim McGuire Strange behaviour of mktime() in objects 51186 by: heinisch.creaction.de Closing a FTP connection 51187 by: Brandon Orther 51189 by: Brandon Orther 51194 by: Henrik Hansen Template programming 51188 by: Daniel Guerrier 51195 by: Henrik Hansen Any plans on fixing performance of file Upload? 51191 by: Jason Lam 51193 by: Joe Sheble (Wizaerd) cURL why don't work? 51192 by: Rв HI 51196 by: Jorge Amaya 51197 by: Jorge Amaya 51213 by: todd kennedy Templates/Graphics/Text 51198 by: Ashley M. Kirchner 51201 by: Chris Anderson 51210 by: Ashley M. Kirchner 51211 by: Philip Olson Re: [PHP-DB] MySQL fulltext indices and phrase search 51199 by: Dennis von Ferenczy Re: [PHP-WIN] trouble with cookies 51200 by: Dennis von Ferenczy Re: LDAP support for 4.0.5 51202 by: Mike Tuller Trouble Setup !!!!!!!!! 51203 by: Luis 51205 by: Andrew Hill 51206 by: Keith Elder apache toolbox 51204 by: Chris Schneck open foxpro database 51207 by: Benny Re: [PHP-DB] open foxpro database 51208 by: Scott Bernard substitute for assigning with array()? 51209 by: David Minor REG_BADPAT ERROR! 51214 by: Martin Bittner-Lamy Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
Well, first of all, you can start by getting friendly with "print mysql_error();", which will tell you if you have any syntax errors in your SQL statement. =D And I think you do. That should be: ...WHERE Public='yes' AND Verified='yes'... As opposed to: ...WHERE Public='yes',Verified='yes'... Additionally, you're passing your results directly to a while loop, which is a something of a no-no. Even if your SQL statement is perfectly formatted, you'll generate a warning if the number of rows returned is zero. Sam Leibowitz ([EMAIL PROTECTED]) Project Manager Business Technology Center (http://www.btcwcu.org) On Wed, 2 May 2001, Mike Gifford wrote: > Hello, > > I'd like to verify two conditions are true in the results that I pull out of my > MySQL database. In this case I wanted Verified and Public both to be listed as > 'yes' in the DB before they were displayed. The code I tried to use is as follows: > > <?php > echo "<p>Recent Signatures\n<br><em><UL>"; > $individuals_query = mysql_query("SELECT FirstName,LastName,CityState FROM > phPetition WHERE Public='yes',Verified='yes' ORDER BY ID DESC LIMIT 0,5"); > while ($individuals_array = mysql_fetch_array($individuals_query)) { > echo "<LI>" . stripslashes($individuals_array["FirstName"]) . " " . > stripslashes($individuals_array["LastName"]) . " from " . > stripslashes($individuals_array["CityState"]); > } > > However, it gave me the following error: > > Warning: Supplied argument is not a valid MySQL result resource in > /usr/local/rabble/petition/index.php3 on line 89 > > How do I get around this? > > Mike > -- > Mike Gifford, OpenConcept Consulting, http://openconcept.ca > Offering everything your organization needs for an effective web site. > Featured Client: http://rabble.ca - News For the Rest of Us! > Courage my friends, 'tis not too late to make a better world - T. Douglas > >
>From a field in an instantdb database (http://instantdb.enhydra.org) Nathan Cook [EMAIL PROTECTED] ----- Original Message ----- From: "Anuradha Ratnaweera" <[EMAIL PROTECTED]> To: "Nathan Cook" <[EMAIL PROTECTED]> Cc: "Php List" <[EMAIL PROTECTED]> Sent: Tuesday, May 01, 2001 11:03 PM Subject: Re: [PHP] String Type Unknown > > Since it contains only digits 0-9 and letters a-f, it looks like > hexadecimal. Why don't you try to read two characters at a time and either > convert them to binary or check their ascii values. There seem to be many > ascii values however. > > Where did you get this from? > > Anuradha > > On Mon, 30 Apr 2001, Nathan Cook wrote: > > > I have this string: > > > > 0ffffffac0ffffffed0005737200146a6176612e7574696c2e50726f7065727469657339120fffff > > fd07a70363e0ffffff980200014c000864656661756c74737400164c6a6176612f7574696c2f5072 > > 6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffffffbb0f252 > > 14a0ffffffe40ffffffb803000246000a6c6f6164466163746f724900097.... > > > > And I don't know what type it is. It is it a binary string? Can I convert it > > to text and if so, how? > > > > Thank You, > > Nathan Cook > > [EMAIL PROTECTED] > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
Thank you, for your help it works great! Nathan Cook [EMAIL PROTECTED] ----- Original Message ----- From: "Rudolf Visagie" <[EMAIL PROTECTED]> To: "Nathan Cook" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, May 02, 2001 4:47 AM Subject: RE: [PHP] String Type Unknown Nathan, Another way to do it (but much less fun): <?php function HexToChar($Txt) { // Read Hex and convert to characters // Rudolf Visagie - 1 May 2001 $Txt = strtoupper($Txt); $NewTxt = ""; for ($i = 0; $i < strlen($Txt); $i+=2) { $CharValue = base_convert(substr($Txt, $i, 2), 16, 10); $NewTxt .= chr($CharValue); } return $NewTxt; } $Txt = "0ffffffac0ffffffed0005737200146a6176612e7574696c2e50726f7065727469657339120 fffff"; $Txt .= "fd07a70363e0ffffff980200014c000864656661756c74737400164c6a6176612f7574696c2 f5072"; $Txt .= "6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffffffbb 0f252"; $Txt .= "14a0ffffffe40ffffffb803000246000a6c6f6164466163746f724900097468726573686f6c 64787"; $Txt .= "3f4000000000000877080000000300000002740005696d61676574004a3c494d47205352433 d226"; $Txt .= "87474703a2f2f6d6564696162616e6b2e656476656e74757265732e636f6d2f656476656e74 75726"; $Txt .= "5732f6c6162732f627269636b735f7765622e6a7067223e7400047465787474020249742069 73206"; $Txt .= "96d706f7274616e7420746f20656d70686173697a652074686174206120666163696c697461 746f7"; $Txt .= "220646f6573206e6f74206e65656420746f20626520616e2065787065727420696e20746865 20766"; $Txt .= "172696f7573207375626a6563742061726561732c206275742073686f756c64206265636f6d 65206"; $Txt .= "6616d696c6961722077697468207468652070726f6a6563747320616e64206d617465726961 6c732"; $Txt .= "0746861742073747564656e74732077696c6c20626520646f696e672c20616e642062652061 77617"; $Txt .= "265206f6620686f7720746f206765742068656c70206f72206c6f6f6b207570207465726d73 20616"; $Txt .= "e6420616e73776572732e2020496e20706172746963756c61722c2066616d696c6961726974 79207"; $Txt .= "769746820746865204c45474f3c7375703e267265673b3c2f7375703e20656c656d656e7473 20697"; $Txt .= "320686967686c79207265636f6d6d656e6465642e20205043532068617320646576656c6f70 65642"; $Txt .= "06120736570617261746520636f7572736520666f637573696e67206f6e2074686520757365 206f6"; $Txt .= "620746865204c45474f3c7375703e267265673b3c2f7375703e206d6174657269616c732e20 20416"; $Txt .= "c6c20666163696c697461746f72732073686f756c64207363686564756c652074696d652074 6f207"; $Txt .= "4616b652074686973206164646974696f6e616c20636f757273652e7870"; ?> <html> <head> <title>Read Hex dump</title> </head> <body> <?echo HexToChar($Txt)?> </body> </html> Rudolf Visagie QEDI -----Original Message----- From: Nathan Cook [mailto:[EMAIL PROTECTED]] Sent: 01 May 2001 11:16 To: Rudolf Visagie Subject: Re: [PHP] String Type Unknown How were you able to convert that? Thanks! Nathan Cook [EMAIL PROTECTED] ----- Original Message ----- From: "Rudolf Visagie" <[EMAIL PROTECTED]> To: "Nathan Cook" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, May 01, 2001 2:53 AM Subject: RE: [PHP] String Type Unknown Hi Nathan, It's a hex dump and it reads: sr java.util.Properties9c~ L defaultst Ljava/util/Properties;xr java.util.HashtableR EUR0 $` Df7F$ -F?&W6?G??@ w t imaget J<IMG SRC="http://mediabank.edventures.com/edventures/labs/bricks_web.jpg">t texttIt is important to emphasize that a facilitator does not need to be an expert in the various subject areas, but should become familiar with the projects and materials that students will be doing, and be aware of how to get help or look up terms and answers. In particular, familiarity with the LEGO<sup>®</sup> elements is highly recommended. PCS has developed a separate course focusing on the use of the LEGO<sup>®</sup> materials. All facilitators should schedule time to take this additional course.xp Rudolf Visagie QEDI -----Original Message----- From: Nathan Cook [mailto:[EMAIL PROTECTED]] Sent: 30 April 2001 10:31 To: Php List Subject: [PHP] String Type Unknown I have this string: 0ffffffac0ffffffed0005737200146a6176612e7574696c2e50726f7065727469657339120f ffff fd07a70363e0ffffff980200014c000864656661756c74737400164c6a6176612f7574696c2f 5072 6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffffffbb0 f252 14a0ffffffe40ffffffb803000246000a6c6f6164466163746f724900097468726573686f6c6 4787 03f4000000000000877080000000300000002740005696d61676574004a3c494d47205352433 d226 87474703a2f2f6d6564696162616e6b2e656476656e74757265732e636f6d2f656476656e747 5726 5732f6c6162732f627269636b735f7765622e6a7067223e74000474657874740202497420697 3206 96d706f7274616e7420746f20656d70686173697a652074686174206120666163696c6974617 46f7 220646f6573206e6f74206e65656420746f20626520616e2065787065727420696e207468652 0766 172696f7573207375626a6563742061726561732c206275742073686f756c64206265636f6d6 5206 6616d696c6961722077697468207468652070726f6a6563747320616e64206d6174657269616 c732 0746861742073747564656e74732077696c6c20626520646f696e672c20616e6420626520617 7617 265206f6620686f7720746f206765742068656c70206f72206c6f6f6b207570207465726d732 0616 e6420616e73776572732e2020496e20706172746963756c61722c2066616d696c69617269747 9207 769746820746865204c45474f3c7375703e267265673b3c2f7375703e20656c656d656e74732 0697 320686967686c79207265636f6d6d656e6465642e20205043532068617320646576656c6f706 5642 06120736570617261746520636f7572736520666f637573696e67206f6e20746865207573652 06f6 620746865204c45474f3c7375703e267265673b3c2f7375703e206d6174657269616c732e202 0416 c6c20666163696c697461746f72732073686f756c64207363686564756c652074696d6520746 f207 4616b652074686973206164646974696f6e616c20636f757273652e7870 And I don't know what type it is. It is it a binary string? Can I convert it to text and if so, how? Thank You, Nathan Cook [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi, I am wondering if a website planning/production tool exists already in PHP? This would be something that the agency and the client could use as a central "meeting" place about the project, with deadlines, comps, project brief, etc... Unix based, PHP/MySQL setup is preferred. I thought I'd mail the list before I built one from scratch. Please email me directly at [EMAIL PROTECTED], as I am on the digest. Thanks! mto Michael O'Neal Web Producer/ Autocrosser ST 28 '89 Civic Si --------------------- M A N G O B O U L D E R --------------------- http://www.thinkmango.com [EMAIL PROTECTED] p-303.442.1821 f-303.938.8507
Hi, search google or have a look at http://sourceforge.net/ http://www.phpgroupware.org/ maybe you find something and dont need to start from zero greetings andreas p.s: nice page ;-) ----- Original Message ----- From: "Michael O'Neal" <[EMAIL PROTECTED]> To: "php" <[EMAIL PROTECTED]> Sent: Wednesday, May 02, 2001 7:26 PM Subject: [PHP] Website production tool in PHP Hi, I am wondering if a website planning/production tool exists already in PHP? This would be something that the agency and the client could use as a central "meeting" place about the project, with deadlines, comps, project brief, etc... Unix based, PHP/MySQL setup is preferred. I thought I'd mail the list before I built one from scratch. Please email me directly at [EMAIL PROTECTED], as I am on the digest. Thanks! mto Michael O'Neal Web Producer/ Autocrosser ST 28 '89 Civic Si --------------------- M A N G O B O U L D E R --------------------- http://www.thinkmango.com [EMAIL PROTECTED] p-303.442.1821 f-303.938.8507 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
I too had to downgrade to PHP 4.0.4pl1. Version 4.0.5 would not let me load my extensions(dynamically). PHP+Apache Win 98 __________John Monfort_________________ _+-----------------------------------+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___________________________________+- On Wed, 2 May 2001, John Huggins wrote: > If I were you I would let the PHP guys figure this out. I am sure they read > messages here so stick with 4.04p11 and live on. I was just about to > download 4.0.5, but I want your issue to be addressed before I waste my time > with a recompile. > > John > > > -----Original Message----- > > From: Darron Froese [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, May 02, 2001 12:04 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] PHP 4.0.5 module causes Apache child processes to > > segfault... > > > > > > I compiled and installed PHP 4.0.5 onto our development server (Mandrake > > Linux 7.1 w/kernel 2.2.17) today and tried to access one of our php > > intensive sites on it - most of the pages wouldn't respond. > > > > This is how 4.0.5 was compiled: > > > > ./configure \ > > --with-apxs=/usr/local/apache_1.3.19/bin/apxs \ > > --with-mysql=/usr/local/mysql \ > > --enable-ftp \ > > --with-curl \ > > --with-zlib \ > > --with-pspell \ > > --with-ldap \ > > --with-pdflib \ > > --with-imap=/usr/local/src/imap-4.5 \ > > --with-zlib-dir=/usr/lib \ > > --with-gd \ > > --with-ttf \ > > --with-t1lib \ > > --with-xml \ > > --with-swf=/usr/local \ > > --with-java=/usr/local/jdk \ > > --with-gettext \ > > --with-mcrypt \ > > --with-mhash \ > > --enable-sockets \ > > --enable-calendar \ > > --enable-trans-sid \ > > --enable-track-vars=yes \ > > --enable-magic-quotes=yes > > > > Looking at the logs I saw a few of these - this wasn't happening with > > 4.0.4pl1: > > > > [Tue May 1 20:49:21 2001] [notice] child pid 19423 exit signal > > Segmentation > > fault (11) > > [Tue May 1 20:51:17 2001] [notice] caught SIGTERM, shutting down > > [Tue May 1 20:51:45 2001] [notice] Apache configured -- resuming normal > > operations > > [Tue May 1 20:57:41 2001] [warn] child process 19677 still did not exit, > > sending a SIGTERM > > [Tue May 1 20:57:45 2001] [error] child process 19677 still did not exit, > > sending a SIGKILL > > [Tue May 1 20:57:46 2001] [notice] caught SIGTERM, shutting down > > [Tue May 1 20:58:08 2001] [notice] Apache configured -- resuming normal > > operations > > [Tue May 1 20:59:11 2001] [notice] child pid 20039 exit signal > > Segmentation > > fault (11) > > [Tue May 1 21:00:54 2001] [notice] child pid 20290 exit signal > > Segmentation > > fault (11) > > > > I've downgraded to 4.0.4pl1 and all is well again. > > > > I've tried to generate a core dump file (Apache also has write access to a > > folder specified with the CoreDumpDirectory directive.) using the > > instructions here but have been unsuccessful: > > > > <http://www.php.net/bugs-generating-backtrace.php> > > > > I can't run httpd -X as suggested on that page because my version > > of Apache > > (1.3.19) doesn't support it. > > > > What can I do to get more debugging information so that this can > > get looked > > at? > > -- > > darron froese > > new media technologist > > sutton javelin corporate communications > > t 403.716.0351 > > f 403.265.7662 > > e [EMAIL PROTECTED] > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
Hello, If you have segfault, compile PHP with debug option and backtrace with gdb, then send the backtrace and short script that causes segfault. Instruction can be found at http://www.php.net/bugs-dos-and-donts.php Regards, -- Yasuo Ohgaki "Darron Froese" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On 5/2/01 10:16 AM, "John Huggins" <[EMAIL PROTECTED]> wrote: > > > If I were you I would let the PHP guys figure this out. I am sure they read > > messages here so stick with 4.04p11 and live on. I was just about to > > download 4.0.5, but I want your issue to be addressed before I waste my time > > with a recompile. > > I'm sure they do too - but if I can get some more information to help to > pinpoint the issue (if there is one with PHP and not with my box) - that > makes it easier on them. > -- > darron froese > new media technologist > sutton javelin corporate communications > t 403.716.0351 > f 403.265.7662 > e [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I'm attempting to streamline my work by writing a script that will add a user to the .htpasswd file. If echo the command I'm sending (via exec()) and run it on the command line, it works fine. From php though, it does nothing. All paths are full paths starting at server level. Is there anything that anyone is familiar with that would cause this to not work? Thanks, Joe
what user are you running the command on the the command line, and what user is php running it as? if you're root for the first one, but nobody on the second, that would be your problem... -jack -----Original Message----- From: Joseph Koenig [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 1:40 PM To: [EMAIL PROTECTED] Subject: [PHP] add to .htpasswd via php I'm attempting to streamline my work by writing a script that will add a user to the .htpasswd file. If echo the command I'm sending (via exec()) and run it on the command line, it works fine. From php though, it does nothing. All paths are full paths starting at server level. Is there anything that anyone is familiar with that would cause this to not work? Thanks, Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
I do this exact thing on my system, here is the code I use: $update = exec ("/usr/local/apache/bin/htpasswd -b ./.htpasswd $username $password"); My guess is you are dealing with a permissions issue. Like Jack says, try 'su nobody' (or whatever your webserver runs as) and then try the command... Once that works, so will your script. ----- Original Message ----- From: "Jack Dempsey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, May 02, 2001 10:44 AM Subject: RE: [PHP] add to .htpasswd via php > what user are you running the command on the the command line, and what user > is php running it as? if you're root for the first one, but nobody on the > second, that would be your problem... > > -jack > > -----Original Message----- > From: Joseph Koenig [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 02, 2001 1:40 PM > To: [EMAIL PROTECTED] > Subject: [PHP] add to .htpasswd via php > > > I'm attempting to streamline my work by writing a script that will add a > user to the .htpasswd file. If echo the command I'm sending (via exec()) > and run it on the command line, it works fine. From php though, it does > nothing. All paths are full paths starting at server level. Is there > anything that anyone is familiar with that would cause this to not work? > Thanks, > > Joe > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
My code looks very similiar to Tyrone's...here's what I'm using. When I'm on command line I'm the same user as the web server is running as. $username = "test2"; $password = "test"; $passfile = "/usr/home/myuser/etc/.htpasswd"; $addpass = "/usr/local/apache/1.3.12/bin/htpasswd -mb $passfile $username $password"; $add = exec($addpass); Anyone see anything stupid I'm missing? Thanks, Joe Tyrone Mills wrote: > > I do this exact thing on my system, here is the code I use: > > $update = exec ("/usr/local/apache/bin/htpasswd -b ./.htpasswd $username $password"); > > My guess is you are dealing with a permissions issue. Like Jack says, try 'su >nobody' (or whatever your webserver runs as) and then try the command... Once that >works, so will your script. > > ----- Original Message ----- > From: "Jack Dempsey" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Wednesday, May 02, 2001 10:44 AM > Subject: RE: [PHP] add to .htpasswd via php > > > what user are you running the command on the the command line, and what user > > is php running it as? if you're root for the first one, but nobody on the > > second, that would be your problem... > > > > -jack > > > > -----Original Message----- > > From: Joseph Koenig [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, May 02, 2001 1:40 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] add to .htpasswd via php > > > > > > I'm attempting to streamline my work by writing a script that will add a > > user to the .htpasswd file. If echo the command I'm sending (via exec()) > > and run it on the command line, it works fine. From php though, it does > > nothing. All paths are full paths starting at server level. Is there > > anything that anyone is familiar with that would cause this to not work? > > Thanks, > > > > Joe > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
You might want to forget the exec and write direct to the file as in this code gallery item: http://www.zend.com/codex.php?id=521&single=1 > From: Joseph Koenig [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 02, 2001 1:40 PM > I'm attempting to streamline my work by writing a script that > will add a > user to the .htpasswd file. If echo the command I'm sending > (via exec())
Hi, Not sure if this is the right place to post this (only joined list today) so accept apologies if hugely-OT. I need to add true-colour support to some code I'm writing, so want to build gd-2.0.1as an extension to PHP4 (currently have 4.0.4pl1). I have the gdlib building as a .so but don't know where to go from here. I'm running Mandrake Corporate Server 1.0.1, if that makes a difference. Thanks in advance, Dave Mariner.
Hi to all, I am working on i60086 environment with php-4.0.4pl1, mysql-3.23.36, Linux 7 and apache_1.3.19 (on the same computer). I can't connect to mysql with user and password i use in command line. This is what i do: <?php $serveur="sdnpc2.sdnp.cm"; $login="root"; $pass="sdnp"; $base="sdnpdb"; mysql_connect($serveur,$login,$pass) or die ("Connexion au serveur impossible"); mysql_select_db($base) or die("connexion a la base de donnees impossible"); . . . ?> this program is called when i submit my form (<form action="bd.php" method=post>) and i have the follow error message: Warning: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /www/htdocs/sdnpdev/Creation_Membre.php on line 11 Connexion au serveur impossible Please can somebody help me? Thanks in advance Bertrand
Hi all, Can i convert decimal 23 to ascii in PHP? Thanks. Calvin Chua Systems Analyst InterClean Equipment, Inc. 734-975-2967 www.InterClean.com
Hi there, is there a possibility to use MySQL's MATCH ... AGAINST to look for a string like "foo bar" ? if i MATCH keyname AGAINST ('foo bar') i get resuts that match foo or bar, but not both of them separated by a space. My guess is that the organization of the index doesn't allow this kind of search as it's based on single words , but maybe one of you has a better idea than to select the rows that contain both and hit those with LIKE '%foo bar%' -- Gre aus dem schnen Kleve Jens Kisters rosomm et partner Agentur fr neue Medien GmbH Dienstleistungszentrum am Weien Tor - Eingang B Gocher Landstrasse 2 47551 Kleve / Bedburg-Hau Telefon: 02821 - 97856-20 Telefax: 02821 - 97856-77 [EMAIL PROTECTED] http://www.rosomm-partner.de
"Jens Kisters" <[EMAIL PROTECTED]> wrote: > Hi there, is there a possibility to use MySQL's MATCH ... AGAINST to > look for a string like "foo bar" ? > > if i MATCH keyname AGAINST ('foo bar') i get resuts that match foo or > bar, but not both of them separated by a space. > > My guess is that the organization of the index doesn't allow this kind > of search as it's based on single words , but maybe one of you has a > better idea than > to select the rows that contain both and hit those with LIKE '%foo bar%' Perhaps you should ask on the mysql list. List-Subscribe: <mailto:[EMAIL PROTECTED]> -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/
In article <Pine.LNX.4.21.0105021106340.342-100000@presario>, [EMAIL PROTECTED] (Anuradha Ratnaweera) wrote: > > Is there a method of extracting rows from a MySQL table Uniquely (as in only > > once) ?..... For example, when a user performs a search, using two words, > > it may return the same row twice if the search is spread over two or more > > SQL "selections". An example: > > I am not sure whether you can do it on mysql. On postgresql you can do a > > select distinct ... The "distinct" keyword also works in mysql (the manual at mysql.com provides details). -- CC
For IE 5 and NN 4.7 at least, I made it work like this: for(var i = 0;i<numrows;i++){ //alert(i); //alert(theform["changed["+i+"]"].value); if (theform["changed["+i+"]"].value == 'true') { //record is changed //alert ("FOUND CHANGES"); var FREQ = theform["FREQ["+i+"]"]; var YEAR = theform["START_YEAR["+i+"]"]; var MONTH = theform["MONTH["+i+"]"]; var LBS = theform["NO_STOCKED["+i+"]"]; var NUM = theform["LBS_STOCKED["+i+"]"]; if (theform["RATE["+i+"]"]) { var RATE = theform["RATE["+i+"]"]; var str_RATE = theform["RATE["+i+"]"].value; } var str_qual = theform["QUAL["+i+"]"].value; if(isNaN(LBS.value)) { return warnInvalid (LBS, "LBS is not a number"); } if (isNaN(NUM.value)) { return warnInvalid (NUM, "NUM is not a number"); } return checkMonth(MONTH,false); return checkYear(YEAR,false); } //end if changed } when my form fields were named like this: <INPUT TYPE = TEXT NAME = 'RATE[<?PHP echo $row?>]'> etc. It works well >>> "Diego Fulgueira" <[EMAIL PROTECTED]> 05/02/01 09:14AM >>> After several tries, I am convinced there is no way to do it. I went around the problem by using dinamic field names (var1, var2, var3, etc) and then reading them using $HTTP_POST_VARS["var".$i], where $i would be your former index to the array. For example: The form coud have HTML code like this: <input type=text name=myvar0> <input type=text name=myvar1> <input type=text name=myvar2> Each field can be referenced by JavaScript code like this: document.myform.myvar1.value="hello"; Or dynamically like this: myfield=new array(); for(i=0;;i++) if(!eval("document.myform.myvar"+i)) break; myfield[i]=eval("document.myform.myvar"+i); } myfield[1].value="hello"; When the form is submitted, asuming, method=POST, then you get the field values like this: $myvars=array(); for($i=0;;$i++) { if(empty($HTTP_POST_VARS["myvar".$i]) break; $myvars[$i]=$HTTP_POST_VARS["myvar".$i]; } Hope it helps. Cheers, Diego. -----Original Message----- From: Utopia [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 01 May, 2001 10:32 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Forms with Field Arrays and JavaScript Hello, I see you sent this back in January. I'm having the very same problem. Could you PLLLLEEEAAASSEEE tell me how to assign a value to the 'myfields[]' text field using JavaScript. I can't make it happen. Thanks. Tiffany ---------------------------- THIS WAS YOUR MESSAGE ON THE BOARD Hi! I was wondering if someone knows, or can think of a way to go around this problem i have. The thing is i am working with a form with a field array. Each field is something like: <input name="myfields[]" type="text"> When i receive the posted data, I can access the "myfields" array. This is fine. The problem is within my form i have client JavaScript code to validate the form data. But I can't make reference to a form object called myfields[] or myfields[5] or just myfields. The property name of the javascript object is set to "myfields[]", but reference to myfields[][5] or document.myform.fields["myfields[]"] doesn't work either. Any suggestions will be greatly appreciated. Thanks in advance.
Hi folks, I have to make several conversions from / to timestamp (seconds in the UNIX-Epoche) here you see two snippets of my code File1 the testfile <? /* Testpage for Class timeStuff named test_sts_timestuff.html */ include"sts_timestuff.html"; $STST = new timeStuff; $wert="2001_04_20"; $STST -> setTimeStamp($wert); ?> File2 the Classfile <? /* Classfile named: sts_timestuff.html */ class timeStuff { var $TS; function setTimeStamp($wert) // $wert="2001_04_20"; { (int)$pieces=explode("_",$wert); //even if I use (int) or not no change in output //show the input in pieces for($i=0; $i < count($pieces) ; $i++) { echo "TIMESTAMP[$i] = $pieces[$i]<br>"; } $this -> TS = mktime(12,00,00,$pieces[1],$pieces[3],$pieces[0]); echo "TIMESTAMP in Object = ".date("H:i:s-Y-m-d",$this -> TS)."<br>"; }/* end function */ }/* end class */ ?> The output is : TIMESTAMP[0] = 2001 TIMESTAMP[1] = 04 TIMESTAMP[2] = 20 TIMESTAMP in Object = 13:00:00-2001-03-31 As you can see, the output of the pieces is correct, but the reassembling to a date gives a wrong date and time, (I would understand, if time is incorrect, but the date is absolutely out of tune) Any ideas what this could be?? Thanks in advance Oliver
Hello, I have recently been using the ftp functions in php to get a lot of stuff done. My question is when I exit; a php script does it close the ftp connection for me? I thought it would since the script is completely closing also. If anyone knows please let me know thanxZ Brandon
The reason I ask is not for a way to close an ftp connection but because I want to know if close closes it. thank you -----Original Message----- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 12:53 PM To: PHP User Group Subject: [PHP] Closing a FTP connection Hello, I have recently been using the ftp functions in php to get a lot of stuff done. My question is when I exit; a php script does it close the ftp connection for me? I thought it would since the script is completely closing also. If anyone knows please let me know thanxZ Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
"Brandon Orther" <[EMAIL PROTECTED]> wrote: > Hello, > > I have recently been using the ftp functions in php to get a lot of stuff > done. My question is when I exit; a php script does it close the ftp > connection for me? I thought it would since the script is completely > closing also. > I think it just drops the connection, little like doing a ctrl+c i guess, the best practise is to use ftp_close() as you sould always close a database connection too, so in short it's a matter of coding pratcise and style. (at least i think so :) -- Henrik Hansen
Where can I find detailed info on creating websites using php templates. Hardcopy or online Thanks in advance __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Daniel Guerrier <[EMAIL PROTECTED]> wrote: > Where can I find detailed info on creating websites > using php templates. > Hardcopy or online I would reccommend fasttemplates, more information here: http://www.thewebmasters.net/php/FastTemplate.phtml -- Henrik Hansen
I am wondering if there are any plans to fix the file upload performance problem. Try uploading a 200M file by post to a PHP script, you'll notice how slow it is. Even having enough RAM doesn't seems to help very much. Jason Lam
And how exactly is this the fault of PHP? It's the browser doing the actual upload, all PHP does is receive the file after the browser has uploaded it, sending the name to the script so it knows where it is.... At 04:25 PM 5/2/01 -0400, Jason Lam wrote: >I am wondering if there are any plans to fix the file upload performance >problem. > >Try uploading a 200M file by post to a PHP script, you'll notice how slow >it is. Even having enough RAM doesn't seems to help very much. > > > >Jason Lam
I have an privat apache win32 1.3.14 server , an Win ME at time...... I like to use the cURL funktions , to use PHP to make an HTTP post background , an small form where you chose an search engine , post the search word and the engine you chose to target new , my find.php ..... there he chose the right URL to post right text value name and so on ..... than to post the result need the cURL funktions , ..... (when someone have an better way :) like to know ) but when I activate the exstansion in my php.ini , on ever call of the php perser the PHP.exe don't find an and ,..... donno why ? ...... bug ? or i just forget something ? any tip ? thx Rв
Hello All I am new user of php, I have installed apache 1.3.x, php3 and mysql, but I have a problem, My navigator doesn't recognize the files of php3, that is to say it doesn't work me php in the navigator, I have configured such and like says the manual in php.ini and also in the directives of Apache that I will be making bad thank you for their help
Jorge Amaya wrote: > Hello All > > I am new user of php, I have installed apache 1.3.x, php3 and mysql, > but I have a problem, My navigator doesn't recognize the files of > php3, that is to say it doesn't work me php in the navigator, I have > configured such and like says the manual in php.ini and also in the > directives of Apache > that I will be making bad Forget to tell them that work on windows 98 OS. > > thank you for their help > > > > >
you need to tell apache that .php3 or .php or whatever extension you're using is a web file. this is done in the httpd.conf file. Jorge Amaya wrote: > Jorge Amaya wrote: > > > Hello All > > > > I am new user of php, I have installed apache 1.3.x, php3 and mysql, > > but I have a problem, My navigator doesn't recognize the files of > > php3, that is to say it doesn't work me php in the navigator, I have > > configured such and like says the manual in php.ini and also in the > > directives of Apache > > that I will be making bad > > Forget to tell them that work on windows 98 OS. > > > > > thank you for their help > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
I'm trying to figure out what's the best way to do something that may be simple, however I can't for the life of me envision it. I want to have three files as follows: [ NOTE: I may be thinking of this the wrong way (by thinking up three files.) If someone has a better suggestion, please speak up! I'm willing to entertain other solutions. ] -> img_template.php (which contains the full, graphical website page, except for the content) -> txt_template.php (which contains the full page, without any of the bells and whistles, graphics javascript and all) -> content_page.html (which is the actual content) This is where I get stuck. What to do? To me, the easiest seems to be one single (control) file for the whole site, which then loads up the content based on the URI. For example: http://our.web.site/index.php?page_to_load - this will grab the img_template.php file, then - fetch 'page_to_load.html' and insert it into the template and serve it. However, will this pose a problem for search engines? Or for anything else? I don't know. Anyone? Now, we would also like to have the whole site be in text format (really a slimmed down page without all the graphics, roll-overs, easy to print and such). I'm thinking, add another variable: http://our.web.site/index.php?page_to_load&format=text or: http://our.web.site/index.php?page_to_load&format=graphic But again, how will search engines handle this? And, I would also have to be able to dynamically update any anchor links that show up in the content so it knows what it needs to link to in terms of format. Somewhat stupid to have someone click on a 'text only' link, and when following another link from that it drops back to a graphic based page. Call for comments. Suggestions. A blow to the head. Something. I'd like to make this so that future site re-designs won't be as painful as this one is turning out to be (currently all 500+ pages of the site have everything hard coded, so changing something in say a menu causes a real problem). And yes, I've looked at FastTemplates and I'm, uh, somewhat lost, but that may be because I haven't really spent a whole lot of time reading up on it. Also, the stuff on there dates back to 1999 - has it not been updated recently? Or did it not need any? AMK4 -- W | | I haven't lost my mind; it's backed up on tape somewhere. |____________________________________________________________________ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. . eFax 248.671.0909 http://www.pcraft.com . 3550 Arapahoe Ave #6 .................. . . . . Boulder, CO 80303, USA
Personally I prefer to do the following: -Include things like navigation, banners, etc in a nav.inc file. Since this is loaded first I include meta tags for search engines in here -My content goes in individual files, that can be dynamically loaded -I have a third "footer" file which includes anything at the end, such as table closings and the graphics to close up the site As long as the meta tags are in the main page (ie the nav in my example), the search engine can parse it out and display it. They just won't get a url with a ?something=something. I may be wrong though. That's just how I do it Chris Anderson aka "Null" -------------------------------------------- PHP Developer / Nulltech PHP-GTK Grunt / gtk.php.net STA-DoD, TO and DDay Administrator / www.stronger.org DOD Co-Owner / www.dayofdefeat.com Zeroping Staff Member / www.zeroping.com Volition Programmer / www.Volition-net.com ----- Original Message ----- From: "Ashley M. Kirchner" <[EMAIL PROTECTED]> To: "PHP-General List" <[EMAIL PROTECTED]> Sent: Wednesday, May 02, 2001 5:27 PM Subject: [PHP] Templates/Graphics/Text | | I'm trying to figure out what's the best way to do something that | may be simple, however I can't for the life of me envision it. | | I want to have three files as follows: | | [ NOTE: I may be thinking of this the wrong way (by thinking up | three files.) If someone has a better suggestion, please speak | up! I'm willing to entertain other solutions. ] | | -> img_template.php (which contains the full, graphical | website page, except for the content) | -> txt_template.php (which contains the full page, without | any of the bells and whistles, graphics | javascript and all) | -> content_page.html (which is the actual content) | | This is where I get stuck. What to do? To me, the easiest seems | to be one single (control) file for the whole site, which then loads | up the content based on the URI. For example: | | http://our.web.site/index.php?page_to_load | - this will grab the img_template.php file, then | - fetch 'page_to_load.html' and insert it into the template | and serve it. | | However, will this pose a problem for search engines? Or for | anything else? I don't know. Anyone? | | Now, we would also like to have the whole site be in text format | (really a slimmed down page without all the graphics, roll-overs, easy | to print and such). | | I'm thinking, add another variable: | | http://our.web.site/index.php?page_to_load&format=text | | or: http://our.web.site/index.php?page_to_load&format=graphic | | But again, how will search engines handle this? | | And, I would also have to be able to dynamically update any anchor | links that show up in the content so it knows what it needs to link to | in terms of format. Somewhat stupid to have someone click on a | 'text only' link, and when following another link from that it drops | back to a graphic based page. | | | Call for comments. Suggestions. A blow to the head. Something. | I'd like to make this so that future site re-designs won't be as | painful as this one is turning out to be (currently all 500+ pages of | the site have everything hard coded, so changing something in say a | menu causes a real problem). | | And yes, I've looked at FastTemplates and I'm, uh, somewhat lost, | but that may be because I haven't really spent a whole lot of time | reading up on it. Also, the stuff on there dates back to 1999 - has | it not been updated recently? Or did it not need any? | | AMK4 | | -- | W | | | I haven't lost my mind; it's backed up on tape somewhere. | |____________________________________________________________________ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 | SysAdmin / Websmith . 800.441.3873 x130 | Photo Craft Laboratories, Inc. . eFax 248.671.0909 | http://www.pcraft.com . 3550 Arapahoe Ave #6 | .................. . . . . Boulder, CO 80303, USA | | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] | |
Chris Anderson wrote: > Personally I prefer to do the following: > -Include things like navigation, banners, etc in a nav.inc file. Since > this is loaded first > I include meta tags for search engines in here > -My content goes in individual files, that can be dynamically loaded > -I have a third "footer" file which includes anything at the end, such > as table closings and the > graphics to close up the site However, wouldn't this mean that if you change something, or add a new element, you'd have to edit all of your files again to include the new .inc file, or however you make it? This is what I want to avoid, having to edit a zillion files to make changes. I'd rather have one master template that dynamically pulls the content in. This way I can change that template to my heart's content and not worry about having to edit content files. Maybe I'm not seeing it all, but then, this is why I'm asking for suggestions. Does anyone else have more/other suggestions? AMK4 -- H | Hi, I'm currently out of my mind. Please leave a message. BEEEEP! +-------------------------------------------------------------------- Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 Director of Internet Operations / SysAdmin . 800.441.3873 x130 Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave, #6 http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.
sounds like you're wanting to do this : // get mode from url or preferences or somewhere $mode = strtolower($HTTP_GET_VARS['mode']); if ($mode == 'text') { include 'txt_template.php'; } else { include 'img_template.php'; } include 'content_page.html'; now : index.php?mode=text // loads text template index.php ... // anything else loads img template regarding friendly search-engine pages, have a look at these two tutorials : http://www.phpbuilder.com/columns/tim20000526.php3 http://www.zend.com/zend/spotlight/searchengine.php also, consider sending 'lynx' users to your text templatized pages ;-) and fyi, the above if/else can be written as follows (ternary conditional operator) : include ($mode == 'text') ? 'txt_template.php' : 'img_template.php'; regards, philip On Wed, 2 May 2001, Ashley M. Kirchner wrote: > > I'm trying to figure out what's the best way to do something that > may be simple, however I can't for the life of me envision it. > > I want to have three files as follows: > > [ NOTE: I may be thinking of this the wrong way (by thinking up > three files.) If someone has a better suggestion, please speak > up! I'm willing to entertain other solutions. ] > > -> img_template.php (which contains the full, graphical > website page, except for the content) > -> txt_template.php (which contains the full page, without > any of the bells and whistles, graphics > javascript and all) > -> content_page.html (which is the actual content) > > This is where I get stuck. What to do? To me, the easiest seems > to be one single (control) file for the whole site, which then loads > up the content based on the URI. For example: > > http://our.web.site/index.php?page_to_load > - this will grab the img_template.php file, then > - fetch 'page_to_load.html' and insert it into the template > and serve it. > > However, will this pose a problem for search engines? Or for > anything else? I don't know. Anyone? > > Now, we would also like to have the whole site be in text format > (really a slimmed down page without all the graphics, roll-overs, easy > to print and such). > > I'm thinking, add another variable: > > http://our.web.site/index.php?page_to_load&format=text > > or: http://our.web.site/index.php?page_to_load&format=graphic > > But again, how will search engines handle this? > > And, I would also have to be able to dynamically update any anchor > links that show up in the content so it knows what it needs to link to > in terms of format. Somewhat stupid to have someone click on a > 'text only' link, and when following another link from that it drops > back to a graphic based page. > > > Call for comments. Suggestions. A blow to the head. Something. > I'd like to make this so that future site re-designs won't be as > painful as this one is turning out to be (currently all 500+ pages of > the site have everything hard coded, so changing something in say a > menu causes a real problem). > > And yes, I've looked at FastTemplates and I'm, uh, somewhat lost, > but that may be because I haven't really spent a whole lot of time > reading up on it. Also, the stuff on there dates back to 1999 - has > it not been updated recently? Or did it not need any? > > AMK4 > > -- > W | > | I haven't lost my mind; it's backed up on tape somewhere. > |____________________________________________________________________ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 > SysAdmin / Websmith . 800.441.3873 x130 > Photo Craft Laboratories, Inc. . eFax 248.671.0909 > http://www.pcraft.com . 3550 Arapahoe Ave #6 > .................. . . . . Boulder, CO 80303, USA > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
try something like splitting the keywords using the php-command split(...) using a space as a separator and then search for a string matching all the words using "SELECT from table WHERE string LIKE "%foo%" AND string LIKE "%bar%"; > -----Original Message----- > From: Jens Kisters [mailto:[EMAIL PROTECTED]] > Sent: Mittwoch, 2. Mai 2001 20:13 > To: PHP-DB Mailingliste; [EMAIL PROTECTED] > Subject: [PHP-DB] MySQL fulltext indices and phrase search > > > Hi there, is there a possibility to use MySQL's MATCH ... AGAINST to > look for a string like "foo bar" ? > > if i MATCH keyname AGAINST ('foo bar') i get resuts that match foo or > bar, but not both of them separated by a space. > > My guess is that the organization of the index doesn't allow this kind > of search as it's based on single words , but maybe one of you has a > better idea than > to select the rows that contain both and hit those with LIKE '%foo bar%' > > -- > Gre aus dem schnen Kleve > Jens Kisters > > rosomm et partner > Agentur fr neue Medien GmbH > Dienstleistungszentrum am > Weien Tor - Eingang B > Gocher Landstrasse 2 > 47551 Kleve / Bedburg-Hau > > Telefon: 02821 - 97856-20 > Telefax: 02821 - 97856-77 > [EMAIL PROTECTED] > http://www.rosomm-partner.de > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I've always had problems with the php-sessions too. I think it's far easier and more effective and flexible, if you use a mySQL database to do your own session handling. This is actually very easy to do. > -----Original Message----- > From: r.gelstharp [mailto:[EMAIL PROTECTED]] > Sent: Donnerstag, 3. Mai 2001 00:05 > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] trouble with cookies > > > I'm having trouble getting cookies to work. I'm using PHP4, and yes I have > already read the manual and I've done like it says to place the > setcookies() > function BEFORE any other calls such as <HTML> and so forth. > > Have I missed a configuration I should have done in setting up > PHP/Apache/whatever? I don't believe I have but you never know... > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I didn't see that anyone had responded to your question. You need to install OpenLDAP. It is the only opensource one that I know. Mike > From: "Walgamotte, David" <[EMAIL PROTECTED]> > Date: Tue, 1 May 2001 15:03:25 -0500 > To: [EMAIL PROTECTED] > Subject: [PHP] LDAP support for 4.0.5 > > Can anyone direct me as to what source is needed to compile ldap support > into php ? I get the error ldap.h not found when performing a configure > *options on php4.0.5. The server does not have an LDAP directory installed > which makes perfect sense. I need to find an opensource solution that works > well with php. > > Thanks in advance for any assistance !! > > David > >
Hi all I was wondering if someone could help me out with a little problem I'm having .. I donwloaded the php tarball today. I will be installing it on my linux bo x. But the problem is that I already have apache running on my box. ( I installed the rpm apache-1.3.12-25 a while back. I just ran the ./configuration out of php folder. but i notice that i need to copy a php.ini file to my user/locar/lib folder. I guess it going to over right the old file. but theres no php.ini file in there. how do i setup php (tar) with apache-1.3.12-25 (rpm ) file that I installed .. Lusi
Hi Luis, I recommend you 'roll your own'. There are some straightforward steps for a install on Unix in the manual: http://www.php.net/manual/en/install.unix.php Best regards, Andrew -------------------------------------------- Andrew Hill - OpenLink Software Directory of Technology Evangelism Internet Data Integration Technology http://www.openlinksw.com On Wednesday, May 2, 2001, at 10:56 PM, Luis wrote: > Hi all I was wondering if someone could help me out with a little > problem > I'm having .. > > I donwloaded the php tarball today. I will be installing it on my linux > bo > x. > > But the problem is that I already have apache running on my box. ( > > I installed the rpm apache-1.3.12-25 a while back. I just ran the > ./configuration out of php folder.but i notice that i need to copy a > php.ini file to my user/locar/lib > folder. I guess it going to over right the old file. but theres no > php.ini > file in there. how do i setup php (tar) with apache-1.3.12-25 (rpm ) > file > that I installed .. > > > Lusi > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
Another good place that explains how to roll your own is: http://www.fluidthoughts.com/howto/config-webserver/ Keith * Andrew Hill ([EMAIL PROTECTED]) wrote: > Date: Wed, 2 May 2001 20:00:37 -0400 > From: Andrew Hill <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > X-Mailer: Apple Mail (2.388) > Subject: Re: [PHP] Trouble Setup !!!!!!!!! > > Hi Luis, > > I recommend you 'roll your own'. There are some straightforward steps > for a install on Unix in the manual: > http://www.php.net/manual/en/install.unix.php > > Best regards, > Andrew > -------------------------------------------- > Andrew Hill - OpenLink Software > Directory of Technology Evangelism > Internet Data Integration Technology > http://www.openlinksw.com > > On Wednesday, May 2, 2001, at 10:56 PM, Luis wrote: > > > Hi all I was wondering if someone could help me out with a little > > problem > > I'm having .. > > > > I donwloaded the php tarball today. I will be installing it on my linux > > bo > > x. > > > > But the problem is that I already have apache running on my box. ( > > > > I installed the rpm apache-1.3.12-25 a while back. I just ran the > > ./configuration out of php folder.but i notice that i need to copy a > > php.ini file to my user/locar/lib > > folder. I guess it going to over right the old file. but theres no > > php.ini > > file in there. how do i setup php (tar) with apache-1.3.12-25 (rpm ) > > file > > that I installed .. > > > > > > Lusi > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > ####################################################### Keith Elder Email: [EMAIL PROTECTED] Mobile/Pager: 1-734-507-1438 Text Messaging (145 characters): [EMAIL PROTECTED] Web: http://www.zorka.com (Howto's, News, and More!) "Confuscious Say: Confusion Can Often be Confusing" #######################################################
This might be a useful link for some people who are having problems with the combination of apache + ssl / php / mysql. I've used it and I had a couple problems, but after I actually read the README, everything was smooth :) www.apachetoolbox.com
I used function dbase_xxx to access foxpro database (.dbf) but it's not work. Here is my code : <? if (dbase_open("/home/benny/test/employee.dbf",0)) { for ($i=1; $i<=dbase_numrecords($open); $i++) { $rec = dbase_get_record($db, $i); $nf = dbase_numfields($db); for ($j=0; $j < $nf; $j++) { print $rec[$j]."<br>\n"; } } } ?> Everytime I call this page there's a message : Warning: unable to open database /home/benny/test/employee.dbf in /home/benny/htdocs/foxpro.php on line 2 I used php 4.0.4 and Visual Fox Pro 5.0. Before that I have mounted my foxpro dbf file to my linux in the /home/benny/test directory. Is there anything wrong? Anyone could help me? Regards; Benny.
Try it again, but make the employee.dbf free table, or just making it foxplus. -----Mensaje original----- De: Benny [mailto:[EMAIL PROTECTED]] Enviado el: Mircoles, 02 de Mayo de 2001 07:03 a.m. Para: [EMAIL PROTECTED]; [EMAIL PROTECTED] Asunto: [PHP-DB] open foxpro database I used function dbase_xxx to access foxpro database (.dbf) but it's not work. Here is my code : <? if (dbase_open("/home/benny/test/employee.dbf",0)) { for ($i=1; $i<=dbase_numrecords($open); $i++) { $rec = dbase_get_record($db, $i); $nf = dbase_numfields($db); for ($j=0; $j < $nf; $j++) { print $rec[$j]."<br>\n"; } } } ?> Everytime I call this page there's a message : Warning: unable to open database /home/benny/test/employee.dbf in /home/benny/htdocs/foxpro.php on line 2 I used php 4.0.4 and Visual Fox Pro 5.0. Before that I have mounted my foxpro dbf file to my linux in the /home/benny/test directory. Is there anything wrong? Anyone could help me? Regards; Benny. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
I had some code that was working nicely. In it, I was assigning values to a multidimensional array like: $array_name[0] = array( key1 => 'val', key2 => 'val', key3 => 'val'); I added a function that directly assigns vars to the same array like: $array_name[0][key4] = 'val'; If this function is called prior to the multiple assignment code, it erases the directly assigned key/value pair [key4] = 'val'. So I have to change my original code to do direct assignment. !! definitely is more difficult to read and doesn't look as neat. Is there an alternative I haven't thought about? Thanks
I got this error: Warning: REG_BADPAT in /usr/home/64.157.1.190/public_html/test/segrabs.php on line 236 and the line 236 is: $url=ereg_replace("&","&",$url); Sometime, the number of the line on which the error happen change, but it is always a ereg_replace function call.. what is that error?!