php-general Digest 20 Dec 2001 11:49:00 -0000 Issue 1063

Topics (messages 78267 through 78313):

Re: Remote image
        78267 by: David Piasecki

Quanta IDE - PHP Highlighing for 4.0.1
        78268 by: Mike Eheler
        78269 by: Mike Eheler

PHP 4.1.0 patch for Quanta IDE, The Sequel
        78270 by: Mike Eheler

temporary image
        78271 by: Michael Mehlmann
        78276 by: Bogdan Stancescu
        78277 by: Bogdan Stancescu

Re: Slash problem
        78272 by: Mike Eheler
        78273 by: Tom Rogers
        78274 by: Mike Eheler

Re: outputting db content
        78275 by: Greg Donald

PHP & XML
        78278 by: Martin Hughes
        78279 by: Martin Hughes
        78281 by: Bas van Rooijen
        78282 by: Martin Hughes

Re: Random
        78280 by: David

Re: Book.
        78283 by: David
        78300 by: Knut H. Hassel Nielsen

Re: PHP & XML (2)
        78284 by: Bas van Rooijen

Re: Question: Should exit() print out the integer exit-status?
        78285 by: Garth Dahlstrom

socket read byte by byte
        78286 by: brendan

How to open an existing Excel file(.xls)  from PHP program
        78287 by: Balaji Ankem
        78288 by: Bogdan Stancescu

PHP 4.1.0 and my system's expat 1.95.2 don't get along...
        78289 by: Russ Goodwin

Segmentation faults on headers()
        78290 by: Scott w

Hello, q about ./configure (php) on linux
        78291 by: Joelmon2001.aol.com
        78292 by: Rasmus Lerdorf

Re: GetImageSize Problem
        78293 by: Mirek Novak

PHP3 NOT being parsed for SSI!! HELP!!
        78294 by: Thomas Edison Jr.
        78313 by: Steve Edberg

How to backup records in mySQL DB?
        78295 by: Thomas Edison Jr.
        78296 by: Thomas Edison Jr.
        78301 by: Olivier Masudi
        78303 by: Mehmet Kamil ERISEN
        78304 by: Olivier Masudi
        78307 by: Jon Farmer

Passing Logined in Name form One Form to other Page
        78297 by: Jack
        78298 by: Andrey Hristov
        78302 by: Mehmet Kamil ERISEN

Re: [PHP-WIN] Passing Logined in Name form One Form to other Page
        78299 by: Svensson, B.A.T. (HKG)

Signing Files with PGP
        78305 by: J.Mueller, pro.vider.de GmbH

Size of array in bytes
        78306 by: Stefan Rusterholz

How to save the "result page" generated by a Form?
        78308 by: Joe
        78309 by: Stefan Rusterholz

fatal error: out of dynamic memory in yy_create_buffer() in unknown on line 0
        78310 by: Henri

CRLF Problem writing ASCII Flat File
        78311 by: Bob Holden

How to convert OEM to ANSI character set
        78312 by: Alex Vargas

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]


----------------------------------------------------------------------
--- Begin Message ---
Is anyone familiar with the overhead that this type of system might
create, as compared to a standard request/response to apache? That is,
to have PHP intercept the request for an image, check HTTP_REFERER - if
it is null or from the local server, open the file, redirect to browser,
close file, if not serve a default error image.

Also, would there be any danger (to the files in particular, but also
with runaway processes or files left open) in using this method if a
user cancels the request mid-stream?

David


-----Original Message-----
From: Chris Lee [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 18, 2001 9:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Remote image

how those remote servers destinguish where the images are coming from is
from the Referr header.

play around with getting the data manually using
fopen()/fwrite()/fread()
and your done. not so easy eh, well it works.

--

  Chris Lee
  [EMAIL PROTECTED]



"Martin Kampherbeek" <[EMAIL PROTECTED]> wrote in message
001201c18290$60da3820$328078d9@cc16349a">news:001201c18290$60da3820$328078d9@cc16349a...
Hi,

I have a problem with a remote image. I hope someone can help me.

People can post their link of their webpage at my site.
I check if the file excists, fopen().
After that I scan the page for links.
And the links for images.
Then I would like to see the sizes of all those images.

The problem is that there are servers that don't allow to brow straight
to
the images, it can only from the page self.
So I look for something in php that surfs the the page en from that page
to
the links.

I hope someone can help me.

Cheers,
Martin.






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



--- End Message ---
--- Begin Message ---
Attached is a text file that will update Quanta IDE 2.0.1 syntax 
highlighting for PHP.

Simply use your favourite text edit quanta/kwrite/highlight.cpp in your 
quanta-2.0.1 source tree, and paste the text from this attached file 
overtop of the phpKeywords and phpTypes variables.

If anyone knows how I can make a real patch (diff or whatever) lemme 
know cuz I've never done it before.

Also if you notice anything that shouldn't be a keyword, or is missing 
from either keywords or functions (currently there are 2499 functions 
defined in this file) let me know.

Mike
--- End Message ---
--- Begin Message ---
Shoot.. it didn't attach.

That's probably a good thing.

I'll put together a diff patch and put it somewhere for download.

Mike

Mike Eheler wrote:

> Attached is a text file that will update Quanta IDE 2.0.1 syntax 
> highlighting for PHP.
> 
> Simply use your favourite text edit quanta/kwrite/highlight.cpp in your 
> quanta-2.0.1 source tree, and paste the text from this attached file 
> overtop of the phpKeywords and phpTypes variables.
> 
> If anyone knows how I can make a real patch (diff or whatever) lemme 
> know cuz I've never done it before.
> 
> Also if you notice anything that shouldn't be a keyword, or is missing 
> from either keywords or functions (currently there are 2499 functions 
> defined in this file) let me know.
> 
> Mike

--- End Message ---
--- Begin Message ---
http://sourceforge.net/tracker/index.php?func=detail&aid=495239&group_id=4113&atid=304113

Download the attached file, and run

patch -p1 -i quanta-2.0.1-php-4.1.0.diff

That will patch your source tree.. then just configure, make, install.

I've actually tested this one, so go nuts people. :) Please let me know 
if you find any functions that should be keywords or keywords that 
shouldn't be keywords, or functions/keywords that just plain aren't in 
the list.

Mike

--- End Message ---
--- Begin Message ---
hallo,

my applications generates a html-page, with a link to an image.
this image is created by the application, and should exist only temporarily
- so it can be deleted after being accessed by the html-page - any ideas how
to implement this? is working with timetamps (microseconds) safe for creating
the image's unique name?

thanks
michi


-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--- End Message ---
--- Begin Message ---
Hi!

You may want to check out the tempnam() function -- it's under filesystem 
functions in the downloadable documentation.

Bogdan

> hallo,
>
> my applications generates a html-page, with a link to an image.
> this image is created by the application, and should exist only temporarily
> - so it can be deleted after being accessed by the html-page - any ideas
> how to implement this? is working with timetamps (microseconds) safe for
> creating the image's unique name?
>
> thanks
> michi
--- End Message ---
--- Begin Message ---
On the other hand if you want to keep track of the number of files generated 
you might want to try something like this:

      $i=1;
      $thePath=$temp_dir."/$fileprefix";
      while (file_exists($thePath.$i))
      {
        $i++;
      }
      $thePath.=$i;

($thePath stores a valid temp filename after that)

Bogdan

> hallo,
>
> my applications generates a html-page, with a link to an image.
> this image is created by the application, and should exist only temporarily
> - so it can be deleted after being accessed by the html-page - any ideas
> how to implement this? is working with timetamps (microseconds) safe for
> creating the image's unique name?
>
> thanks
> michi
--- End Message ---
--- Begin Message ---
This is done because magic_quotes_gpc is turned on. This makes it 
possible to just insert submitted data into a MySQL database, without 
preparing it first.

You can turn it off if you have access to the server config, or.. you 
can do this:

if (get_magic_quotes_gpc()) {
    foreach ($HTTP_POST_VARS as $key => $value) {
       // if you're into globals
       $$key = stripslashes($value);
       // otherwise -- not sure if this'll work or not
       // if $HTTP_POST_VARS is read-only then it won't.
       $HTTP_POST_VARS[$key] = stripslashes($value);
    }
}

At the beginning of your scripts. If you do that, don't forget to *not* 
use global values.

Mike

Evansville Scene wrote:

> I'm fairly new @ PHP, so forgive me if the answer is trivial ...
> 
> In many cases, if I take in data from a form and the user uses an apostrophe, the 
>data that is sent to me has a slash in it.  For example: Jones\' Auto Repair
> 
> Is there an easy fix?  I'm not sure why this is occurring ... 
> It\'s been quite a pain :)
> 
> Adam
> 
> 

--- End Message ---
--- Begin Message ---
Hi
set this in your php.ini file:
magic_quotes_gpc = Off
You'll have to use addslashes before you can store these variables with an 
' in a database after turning it off.
Tom

At 10:39 AM 20/12/01, Evansville Scene wrote:
>I'm fairly new @ PHP, so forgive me if the answer is trivial ...
>
>In many cases, if I take in data from a form and the user uses an 
>apostrophe, the data that is sent to me has a slash in it.  For example: 
>Jones\' Auto Repair
>
>Is there an easy fix?  I'm not sure why this is occurring ...
>It\'s been quite a pain :)
>
>Adam

--- End Message ---
--- Begin Message ---
I disagree.

That doesn't affect whether or not GPC variables are addslashes()'d.

Mike

Bas Van Rooijen wrote:

> 
> set_magic_quotes_runtime (false)
> 
> bvr.
> 
> On Thu, 20 Dec 2001 09:43:28 +1100, Martin Towell wrote:
> 
> 
>>either set "magic_quotes_gpc" to "off" in you .ini file - or use
>>stripslashes() on the variable
>>
> 
> 
> 
> 
> 
> 

--- End Message ---
--- Begin Message ---

> Does anyone have a quick example of how you would show X numbers of
database records at a time from a query?  (you know, list 25 of 400 records
with  next/previous navigation)...



Feel free to rip the navigation out of phpLinks and use it:
http://phplinks.org/

Have a look in functions.php, I think I named the function like 'nav' or
something.



Greg

--- End Message ---
--- Begin Message ---
Heya,

Is it possible to integrate XML with PHP - ie get data out of an XML file
and format it in html using php? Or alternatively, use php within an XSL
file...?

Cheers

Mart


--- End Message ---
--- Begin Message ---
Sorry - I should perhaps say that I'm only intending to code this site for
IE(5/6) - there are too many issues with NetS - I **KNOW** that that's bad
and lazy, but that's the way it's gonna be :o)

M


--- End Message ---
--- Begin Message ---

For XML use parser: http://www.php.net/manual/en/ref.xml.php

PHP in .xsl file is possible, edit your httpd.conf

find this line:
AddType application/x-httpd-php .phtml .php .php3

and add extensions that should be parsed by PHP, like so:

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

be carefull, anything between <? and ?> will be executed by
default. if this may conflict with the nature of the output (like .xml files)
you can edit your php.ini to force long open tags <?php

find this line:
short_open_tag = On

change On to Off


bvr.

On Thu, 20 Dec 2001 01:34:58 -0000, Martin Hughes wrote:

>Heya,
>
>Is it possible to integrate XML with PHP - ie get data out of an XML file
>and format it in html using php? Or alternatively, use php within an XSL
>file...?
>
>Cheers
>
>Mart



--- End Message ---
--- Begin Message ---
Thanks! Much appreciated.

M

"Bas Van Rooijen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> For XML use parser: http://www.php.net/manual/en/ref.xml.php
>
> PHP in .xsl file is possible, edit your httpd.conf
>
> find this line:
> AddType application/x-httpd-php .phtml .php .php3
>
> and add extensions that should be parsed by PHP, like so:
>
> AddType application/x-httpd-php .phtml .php .php3 .xsl
>
> be carefull, anything between <? and ?> will be executed by
> default. if this may conflict with the nature of the output (like .xml
files)
> you can edit your php.ini to force long open tags <?php
>
> find this line:
> short_open_tag = On
>
> change On to Off
>
>
> bvr.
>
> On Thu, 20 Dec 2001 01:34:58 -0000, Martin Hughes wrote:
>
> >Heya,
> >
> >Is it possible to integrate XML with PHP - ie get data out of an XML file
> >and format it in html using php? Or alternatively, use php within an XSL
> >file...?
> >
> >Cheers
> >
> >Mart
>
>
>


--- End Message ---
--- Begin Message ---
 yeah, my linux(Mandrake 8, Apache 1.3.22, PHP 4.1.0) box also gives me a 6 digit 
integer each time too.

but when i tried on my win32 (Win2k, Apache 1.3.22, PHP 4.1.0), it is limited to a max 
of 32767 as indicated with getrandmax(). the origional author of the problem probably 
using windows too :)

>> should be because rand() can\'t generate such a large number for u. 
>> 
>> use $max_random_number = getrandmax(); to check 
>> 
>> http://sg.php.net/manual/en/function.getrandmax.php 
>
>Hmmm... My webserver gives me no problems witht this at >all. 
>(Sun E250 with Solaris 8, Apache 1.3.20 and PHP4.6) 


>This : 

><?PHP 
>$floor = 100000; 
>$ceiling = 999999; 
>srand((double)microtime()*1000000); 
>$random = rand($floor, $ceiling); 
>print $random; 
>?> 

>Gives me a 6-digit integer every time 
--- End Message ---
--- Begin Message ---
 hmm, this how i use php for cron jobs:

#!/usr/local/bin/php // location of php binary
<?php
// Do your php stuff here
?>

then just ask cron to run this script at your wish of time interval

>I have a good understanding of PHP. I like to read more 
>documentation advanced PHP topics and also some more 
>information on how to run PHP from Unix, as a cron job, >how can PHP scripts be 
>called from Shell Scripts etc... 
>
>Any book or doc suggestions. 
>
>Thanks, 
>erisen. 
--- End Message ---
--- Begin Message ---

Remember #!/usr/local/bin/php -q
                             ^^^
This will quell any http-headers, and give you clean output.
(provided you wite your script right ;) )

On Thu, 20 Dec 2001, Bas van Rooijen wrote:

>
>
> No not CGI, binary (instead of apache module).
>
> - Just leave out the --with-apache part when you do configure.
>
> by default 'make install' will put the php binary in /usr/local/bin
>
> - On top of your PHP script add the following line:
> #!/usr/local/bin/php
>
> - Make sure you don't use MS-DOS (but UNIX) style text files,
> PHP doesn't care but for that first line it may be important.
>
> - PHP open/close tags <? ?> still apply
>
>
> bvr.
>
> On Wed, 19 Dec 2001 15:07:21 -0800 (PST), Mehmet Kamil ERISEN wrote:
>
> >Hi,
> >I think I'm misunderstood.  I do not want to run in cgi
> >mode.
> >Thanks,
> >Mehmet.
> >--- Mart¡n Marqu‚s <[EMAIL PROTECTED]> wrote:
> >> > information on how to run PHP from Unix, as a cron job,
> >> how
> >> > can PHP scripts be called from Shell Scripts etc...
> >>
> >> You need to compile PHP without web-server support, for
> >> cgi. In that case you
> >> will get a binary file, and you can use just like you use
> >> perl or bash for
> >> making scripts.
>
>
>
>
>

-- 
Knut
------
Knut H. Hassel Nielsen, [EMAIL PROTECTED]
Principal Engineer, Office : ITS 204
IDI NTNU, Sem Saelands vei 7-9
N-7491 Trondheim, Norway
Phone (+47) 73 59 18 46 Fax (+47) 73 59 60 35

"We all live in a yellow subroutine."

--- End Message ---
--- Begin Message ---
and restart ofcourse ;)

bvr.


--- End Message ---
--- Begin Message ---

My 2 cents...

I think "exit" should be fixed as you describe...

And I think "die" should behave as it does in perl
which is to print out whatever it is passed.

-Garth

--- Jani Taskinen 
-----  Question: Should exit() print out the integer exit-status?
-----  Wed, 19 Dec 2001 01:38:39 +0200 (EET)


background information:

http://bugs.php.net/bug.php?edit=1&id=11008
http://bugs.php.net/bug.php?edit=1&id=14574

exit() function is broken. Fixing the broken behaviour is the
only real solution, IMO.

One solution:

- When passed argument is string: print out this string
- When passed argument is integer: Don't print it, use it as exit-status

This is what is the expected behaviour is and I really can't think
of any good examples where this would fail. Nobody ever gave any.
And to get the REAL users (not only Zeev's opinion) I'm sending
this also to php-general.

>From manual:

"The exit() function terminates execution of the script. It prints
status just before exiting. If status is an integer, that value will be
used as exit-status."

This can be understood in many ways. If the status is integer,
it is used as exit-status..but it's not clear that it's ALSO printed out
which is simply buggy behaviour.

Now, if general concencus amongs the users of PHP is that it should
also print out the exit-status when it's an integer then 'shell_exit()'
function should be added.

--Jani


--- End Message ---
--- Begin Message ---
another question for the continuing saga ..
I am trying to undertake a handshake with the telnet (tn3270) server ..
using
$get=socket_read($socket, 128, PHP_BINARY_READ );
i now need to step through $get byte by byte
how do i do an equivilent fgetc? ie

  while (!feof($get)) {
echo fgetc($iget);
}

but with the socket???

entire code below. ...
cheers

brendan








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


<?php
################ SET BINARY CODES #############################

  function makeChr($loud="off"){
  for ($i = 0; $i < 256; ++$i) {
  static $genNum;
  $genNum++;
  $bin_array[$genNum]=(chr($genNum));
      if ($loud=="on") {
          echo "chr($genNum) will output '";
          echo (chr($genNum));
          echo "'<br> \n";
      }
  }
  return $bin_array;

}
$bin_array= makeChr();

     $chr_array[0]="NUL"; /*                                    NULL 
(NUL)              0      No Operation    */

     $chr_array[1]="ARE";               //        1


    $chr_array[7]="BELL";          /*               Produces an audible or
                                         visible signal (which does
                                         NOT move the print head).*/

         $chr_array[7]="BS";     /*    Moves the print head one
                                         character position towards
                                         the left margin.   */
         $chr_array[9]="HT";  /*    Moves the printer to the
                                         next horizontal tab stop.
                                         It remains unspecified how
                                         either party determines or
                                         establishes where such tab
                                         stops are located. */
         $chr_array[10]="LF"; /*      Line Feed ()              Moves 
the printer to the
                                         next print line, keeping the
                                         same horizontal position.   */

         $chr_array[11]="VT"; /*   Moves the printer to the
                                         next vertical tab stop.  It
                                         remains unspecified how
                                         either party determines or
                                         establishes where such tab
                                         stops are located.   */
          $chr_array[12]="FF"; /*    Moves the printer to the top
                                         of the next page, keeping
                                         the same horizontal position. */

         $chr_array[13]="CR"; /* Carriage Return (CR)   13      Moves 
the printer to the left
                                         margin of the current line.     */



          $chr_array[29]="3270-REGIME"; /*  Telnet 3270 Regime Option
                                          rfc 
http://www.ietf.org/rfc/rfc1041.txt
                                        */

   $chr_array[240]="SE";                  /*       End of subnegotiation 
parameters. */

       $chr_array[241]="NOP";                     /* No operation. */

       $chr_array[242]="Data Mark";                   /*  The data 
stream portion of a Synch.*/
                                 /* This should always be accompanied */
                                  /* by a TCP Urgent notification.*/
      $chr_array[243]="Break";                    /* NVT character BRK.*/
      $chr_array[244]="Interrupt Process";         /* The function IP.*/
      $chr_array[245]="Abort output";             /* The function AO.*/
      $chr_array[246]="Are You There";            /*  The function AYT.*/
      $chr_array[247]="Erase character"; /* The function EC. */
      $chr_array[248]="Erase Line";               /* The function EL.*/
      $chr_array[249]="Go ahead"; /* The GA signal. */
      $chr_array[250]="SB";       /* Indicates that what follows is
                                  subnegotiation of the indicated
                                  option. */
      $chr_array[251]="WILL";   /* Indicates the desire to begin
                                  performing, or confirmation that
                                  you are now performing, the
                                  indicated option.    */

      $chr_array[ 252]="WON'T";     /* Indicates the refusal to perform,
                                  or continue performing, the
                                  indicated option. */

      $chr_array[253]="DO";    /* Indicates the request that the
                                  other party perform, or
                                  confirmation that you are expecting
                                  the other party to perform, the
                                  indicated option. */

       $chr_array[254]="DON\'T";   /*Indicates the demand that the
                                  other party stop performing,
                                  or confirmation that you are no
                                  longer expecting the other party
                                  to perform, the indicated option. */
      $chr_array[255]="IAC";     //Data Byte 255.





################ SET BINARY CODES #############################

error_reporting (E_ALL);
$port = '23';
$address = '202.14.186.30';

/* Create a TCP/IP socket. */
$socket = socket_create (AF_INET, SOCK_STREAM, 0);
if ($socket < 0) {
     echo "socket_create() failed: reason: " . socket_strerror ($socket) 
. "\n";
} else {
     "socket_create() successful:\n";
}

echo "Attempting to connect to '$address' on port '$port'...";
$result = socket_connect ($socket, $address, $port);
if ($result < 0) {
     echo "socket_connect() failed.\nReason: ($result) " . 
socket_strerror($result) . "\n";
} else {
     echo "<BR>OK.\n";
}

$get=socket_read($socket, 128, PHP_BINARY_READ );

      $tmp = fgetc($get);
      $tmp=array_search ($tmp,$bin_array);

      if ($tmp) echo "<BR>".$chr_array[$tmp]."<BR>";


echo "Closing socket...";
socket_close ($socket);
echo "OK.\n\n";

?>
----------------

--- End Message ---
--- Begin Message ---
 
 
Hi,
        How to open an existing excel file(.xls) from PHP, and edit the contents of the particular cell.
 
Thanks in advance
Regards
Balaji
   
-----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.
------------------------------------------------------------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
There was a similar thread on the Midgard mailing list not long ago -- you 
may want to take a look for possible solutions:
http://marc.theaimsgroup.com/?l=midgard-user&m=100653565721944&w=2

> Hi,
>         How to open an existing excel file(.xls) from PHP, and edit the
> contents of the particular cell.
>
> Thanks in advance
> Regards
> Balaji
--- End Message ---
--- Begin Message ---
Please help...  (4.1 install problem)

I have two nearly-identical systems "production" and "backup".  When we
upgrade, we do backup first to work out any kinks, then production.  Last
night I upgraded backup in the following order: MySQL 3.23.46, OpenSSL
0.9.6b, Curl 7.9.2, Mod_SSL 2.8.5-1.3.22, Apache 1.3.22, PHP 4.1  -- with no
problems.  I proceeded to do production, and all went fine through the
Apache upgrade.  Apache ran fine without any changes in configuration at
this point.  I compiled and upgraded PHP (we had 4.0.6 before) and restarted
apache, but it wouldn't restart.  I did a diff on the PHP source files
between production and backup, and found that backup's Makefile
had -DUSE_EXPAT in all the right places, but that production didn't have it
at all.  Needless to say, all the configure, make, etc commands I did were
identical between the two boxes.

(./configure --with-mysql=/home/mysql --with-apxs=/usr/local/apache/bin/apxs
 --with-curl=/usr/local/lib/libcurl.so.1 --with-openssl)   It was late, so I
reverted to PHP 4.0.6 and all worked fine.

In the light of day today, I find out backup does not have expat installed,
so I assume the -DUSE_EXPAT tells make to use the bundled expat, while
production has expat 1.95.1 installed (from source, regular "./configure" --
no special options) for another tool, so I assume that the absence
of -DUSE_EXPAT means that PHP is going to use the system's expat library
instead of the bundled version.  I upgrade production to expat 1.95.2
(again, from source, plain "./configure"), recompile PHP 4.1, make
install -- no dice.  I'm pissed.  I move /usr/local/lib/libexpat* to /tmp
and try to recompile PHP 4.1, but apxs uses the libexpat.so so I fail in
./configure when it tries to test run apxs.

Next I figure that since I have an external expat, maybe I HAVE TO give
the --with-expat-dir=/usr/local option to configure, so I start with fresh
source, run the same ./configure with the expat-dir option tacked on and
make install.  Still no dice.  (I put the expat libs back in /usr/local/lib
first).

I know I could just grab the source dir with all targets made from backup,
stick it on production, and do a make install.... but I'd feel safer if
things compiled correctly on production (please no missives re compiling on
production boxes).  Is there something I'm overlooking that will get PHP to
use it's own expat?  All I see is the configure option --with-expat-dir=
that I tried.  Could this have to do with apxs's use of expat, and it only
manifests with PHP?  Or am I just not seeing the Real Problem(r)?

ANY hints, suggestions, or sympathy are welcome.

Thanks for reading this whole thing too!

-Russ





--- End Message ---
--- Begin Message ---
Hello,

I have a problem I can't quite figure out.  I recently upgraded PHP from 
4.0.6 to 4.1.0.  I can no longer use auth-headers...

When I try to load a page with for instance:

<?php
if(!isset($PHP_AUTH_USER)) {
      header('WWW-Authenticate:  Basic realm="Admin Area"');
      header('HTTP/1.0 401 Unauthorized');
      echo 'Authorization Required.';
      exit;
} else {
        echo "this is it";
}
?>

I receive a "Page can not be displayed" error on the browser.  When I look 
at the httpd/error file, I see the following error:

[Wed Dec 19 21:48:27 2001] [notice] child pid 4996 exit signal Segmentation 
fault(11)

I can't seem to figure out what this means...something has gone haywire, but 
I can't tell what it is.

Anyone know what this is?

Thanks,
Scott

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx

--- End Message ---
--- Begin Message ---
Hello, I have a question, I just want to confirm something

When I use the -- with 
in 
./configure such as:
--with-png-dir=/usr/local
for LIBPNG

My libpng is actually located (The top level directory) at:
/home/sites/home/users/admin/libpng-1.2.1
however, libpng.so is at 
/usr/local/lib

which path do I use in the --with 

It might sound like silly q, but I want to make sure I do this right, I am 
just confused if I point to the top level or the .so. Why would I ask this? 
All examples show pointing to usr/local/lib for my type of linux, but I found 
the top level elsewhere and that concerned me. now I am confused if 
libjpeg/png/gd all have /usr/local/lib or the path to the top level 
directory...

Thanks for your time

Joel
--- End Message ---
--- Begin Message ---
If you library is in /usr/local/lib, then chances are the corresponding   
header files are in /usr/local/include, the common directory is /usr/local
and thus you must use --with-png-dir=/usr/local

-Rasmus

On Thu, 20 Dec 2001 [EMAIL PROTECTED] wrote:

> Hello, I have a question, I just want to confirm something
> 
> When I use the -- with 
> in 
> ./configure such as:
> --with-png-dir=/usr/local
> for LIBPNG
> 
> My libpng is actually located (The top level directory) at:
> /home/sites/home/users/admin/libpng-1.2.1
> however, libpng.so is at 
> /usr/local/lib
> 
> which path do I use in the --with 
> 
> It might sound like silly q, but I want to make sure I do this right, I am 
> just confused if I point to the top level or the .so. Why would I ask this? 
> All examples show pointing to usr/local/lib for my type of linux, but I found 
> the top level elsewhere and that concerned me. now I am confused if 
> libjpeg/png/gd all have /usr/local/lib or the path to the top level 
> directory...
> 
> Thanks for your time
> 
> Joel
> 

--- End Message ---
--- Begin Message ---
You can get this information from header of this image file. Structure of BMP is here: http://www.dcs.ed.ac.uk/home/mxr/gfx/2d/BMP.txt (found with google.com)

M.N.
---

[EMAIL PROTECTED] wrote:

Hello, I'm PHPer from Korea.

I have a problem with GetImageSize function.
I wanted to know some information about BMP image.
So, I tried to use GetImageSize on PHP 4.0.5 , Linux.
But, it didn't work. GetImageSize function returned nothing.
Then, I tried it on PHP 4.0.6, Windows2000.
Ooops.. I worked.. -.-;

I looked the php.net manual, but there's no mention about my problem.

Does anyone know how to solve this problem.. ?
 
 


Do you know @MESSAGE? Powered by 3R Soft, Inc.


--  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]
--- End Message ---
--- Begin Message ---
Folks,

I have a serious problem and i don't know what to do.

We have a fixed  template  for  each intranet page.
Now the template consists of a header, a left
navigation and a footer. The body would contain 
my pages content.

What we are doing at present is that the header, the
left navigation and the footer is included in the page
using SSI.  The header is a static include file.
However the footer and the left navigation are
customizable, and hence are dynamic pages (cgi
scripts) which generate the appropriate code depending
on the command line parameters.

Now the problem is that php3 pages are not being
parsed for SSI. I looked up on the web , and
found that only one of two can be used at the same
time. 

Can anyone suggest a Possible Solution? We are running
a Solaris machine!

Thanks,
T. Edison Jr. 

=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--- End Message ---
--- Begin Message ---
If you're using PHP as an Apache module, you can use virtual() -

        http://www.php.net/manual/en/function.virtual.php

- to include the dynamic parts; vcstatic includes could be handled by 
virtual() or just a normal PHP include()/require().

        - steve



At 11:09 PM -0800 12/19/01, Thomas Edison Jr. wrote:
>Folks,
>
>I have a serious problem and i don't know what to do.
>
>We have a fixed  template  for  each intranet page.
>Now the template consists of a header, a left
>navigation and a footer. The body would contain
>my pages content.
>
>What we are doing at present is that the header, the
>left navigation and the footer is included in the page
>using SSI.  The header is a static include file.
>However the footer and the left navigation are
>customizable, and hence are dynamic pages (cgi
>scripts) which generate the appropriate code depending
>on the command line parameters.
>
>Now the problem is that php3 pages are not being
>parsed for SSI. I looked up on the web , and
>found that only one of two can be used at the same
>time.
>
>Can anyone suggest a Possible Solution? We are running
>a Solaris machine!
>
>Thanks,
>T. Edison Jr.
>
>=====
>Rahul S. Johari (Director)
>******************************************
>Abraxas Technologies Inc.
>Homepage : http://www.abraxastech.com
>Email : [EMAIL PROTECTED]
>Tel : 91-4546512/4522124
>*******************************************
>


-- 
+------------------------------------------------------------------------+
| Steve Edberg                                      [EMAIL PROTECTED] |
| University of California, Davis                          (530)754-9127 |
| Programming/Database/SysAdmin               http://pgfsun.ucdavis.edu/ |
+------------------------------------------------------------------------+
| "Restriction of free thought and free speech is the most dangerous of  |
| all subversions. It is the one un-American act that could most easily  |
| defeat us."                                                            |
|                 - Supreme Court Justice (1939-1975) William O. Douglas |
+------------------------------------------------------------------------+
--- End Message ---
--- Begin Message ---
Hi,

I'm having a touch situation on my hands. Last week
one of my site was shut down in what the Hosting
Company claimed to be a Policy Violation. However, it
was found out later that it wasn't so and they had to
re-host my site.

Unfortunately, they erased my mySQL database with my
account and we lost all our very important Data in the
tables there. It's horrible.

We're beggining again but i'm not scared about the
Data. The data is posted online by users. I need to
have a way to backup my mySQL data. If possible, on
some other site location or in Hard Copy (As in a
file) or something. I don't know how to do any of
this. I have no idea what to do about it. Can anyone
make any suggestions & help?

Regards,
T. Edison jr.


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--- End Message ---
--- Begin Message ---
Hi,

I'm having a touch situation on my hands. Last week
one of my site was shut down in what the Hosting
Company claimed to be a Policy Violation. However, it
was found out later that it wasn't so and they had to
re-host my site.

Unfortunately, they erased my mySQL database with my
account and we lost all our very important Data in the
tables there. It's horrible.

We're beggining again but i'm not scared about the
Data. The data is posted online by users. I need to
have a way to backup my mySQL data. If possible, on
some other site location or in Hard Copy (As in a
file) or something. I don't know how to do any of
this. I have no idea what to do about it. Can anyone
make any suggestions & help?

Regards,
T. Edison jr.


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--- End Message ---
--- Begin Message ---

Personnaly i use this method with phpMyAdmin.

I make a dump of each table Structure and data.copy and paste it into a txt
file.
You can also use de csv format.

Hope you don't hae a lot of table :=)

I know it's very simple but it work.

-----Message d'origine-----
De : Thomas Edison Jr. [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 20 décembre 2001 08:28
À : [EMAIL PROTECTED]
Objet : [PHP] How to backup records in mySQL DB?


Hi,

I'm having a touch situation on my hands. Last week
one of my site was shut down in what the Hosting
Company claimed to be a Policy Violation. However, it
was found out later that it wasn't so and they had to
re-host my site.

Unfortunately, they erased my mySQL database with my
account and we lost all our very important Data in the
tables there. It's horrible.

We're beggining again but i'm not scared about the
Data. The data is posted online by users. I need to
have a way to backup my mySQL data. If possible, on
some other site location or in Hard Copy (As in a
file) or something. I don't know how to do any of
this. I have no idea what to do about it. Can anyone
make any suggestions & help?

Regards,
T. Edison jr.


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

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

--- End Message ---
--- Begin Message ---

 Dear Friend,
If I were you, I would take my biz elsewhere.  BTW, which company is that?
Anyway, I will recommend you to use the phpMyAdmin.  It's a mysql database management 
tool written in PHP, free of charge of course, that lets you manage your database.  
One of the cool things it that it dumps your database into a flat file with table 
creation and INSERT commands, so that in case you need to restore you databases, you 
just run the sql.
I hope this helps.
Mehmet.
  "Thomas Edison Jr." <[EMAIL PROTECTED]> wrote: Hi,

I'm having a touch situation on my hands. Last week
one of my site was shut down in what the Hosting
Company claimed to be a Policy Violation. However, it
was found out later that it wasn't so and they had to
re-host my site.

Unfortunately, they erased my mySQL database with my
account and we lost all our very important Data in the
tables there. It's horrible.

We're beggining again but i'm not scared about the
Data. The data is posted online by users. I need to
have a way to backup my mySQL data. If possible, on
some other site location or in Hard Copy (As in a
file) or something. I don't know how to do any of
this. I have no idea what to do about it. Can anyone
make any suggestions & help?

Regards,
T. Edison jr.


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

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


Mehmet Erisen
http://www.erisen.com


---------------------------------
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts!
--- End Message ---
--- Begin Message ---


-----Message d'origine-----
De : Olivier Masudi [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 20 décembre 2001 09:24
À : Thomas Edison Jr.
Objet : RE: [PHP] How to backup records in mySQL DB?


I think thirs you have to install phpMYAdmin in your server you can find it
here :

http://phpwizard.net/projects/phpMyAdmin/

It's really easy to install.

It's a mysql database management tool written in PHP, free of charge of
course, that lets you manage your database it userfriendly like MSACCESS
(??? not so powerfull of course)



Give it a try


then everithing will be more easier :=)

-----Message d'origine-----
De : Thomas Edison Jr. [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 20 décembre 2001 09:08
À : Olivier Masudi
Objet : RE: [PHP] How to backup records in mySQL DB?


HI,

Your method does sound worthy of a try, but
technically, how do you achieve this? I mean is it a
manual proceure or it happens itself through scripts?

Thanks,
T. Edison Jr.

--- Olivier Masudi <[EMAIL PROTECTED]> wrote:
> Personnaly i use this method with phpMyAdmin.
>
> I make a dump of each table Structure and data.copy
> and paste it into a txt
> file.
> You can also use de csv format.
>
> Hope you don't hae a lot of table :=)
>
> I know it's very simple but it work.
>
> -----Message d'origine-----
> De : Thomas Edison Jr.
> [mailto:[EMAIL PROTECTED]]
> Envoyé : jeudi 20 décembre 2001 08:28
> À : [EMAIL PROTECTED]
> Objet : [PHP] How to backup records in mySQL DB?
>
>
> Hi,
>
> I'm having a touch situation on my hands. Last week
> one of my site was shut down in what the Hosting
> Company claimed to be a Policy Violation. However,
> it
> was found out later that it wasn't so and they had
> to
> re-host my site.
>
> Unfortunately, they erased my mySQL database with my
> account and we lost all our very important Data in
> the
> tables there. It's horrible.
>
> We're beggining again but i'm not scared about the
> Data. The data is posted online by users. I need to
> have a way to backup my mySQL data. If possible, on
> some other site location or in Hard Copy (As in a
> file) or something. I don't know how to do any of
> this. I have no idea what to do about it. Can anyone
> make any suggestions & help?
>
> Regards,
> T. Edison jr.
>
>
> =====
> Rahul S. Johari (Director)
> ******************************************
> Abraxas Technologies Inc.
> Homepage : http://www.abraxastech.com
> Email : [EMAIL PROTECTED]
> Tel : 91-4546512/4522124
> *******************************************
>
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for
> all of
> your unique holiday gifts! Buy at
> http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
>
> --
> 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]
>


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--- End Message ---
--- Begin Message ---
> We're beggining again but i'm not scared about the
> Data. The data is posted online by users. I need to
> have a way to backup my mySQL data. If possible, on
> some other site location or in Hard Copy (As in a
> file) or something. I don't know how to do any of
> this. I have no idea what to do about it. Can anyone
> make any suggestions & help?

This is a MySQL question and not a PHP question. That being said if you have
telnet/SSH access to your server create a script to use mysqldump then
tar/gzip the result and mail or ftp the resulting file to the backup
location. Then cron it to run as often as you want backups. To keep on topic
you can use PHP as the scripting language to do this.

Regards

Jon
--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key


--- End Message ---
--- Begin Message ---
Dear all
I had create the Login Page for the User to login before they can open the
WebPage. What i want to do is to:

When the User had type the Username into the Inputbox, and click the submit
button, this Username will be memorized, and pass to other PHP Page.Then
when he go to some page which need to select data from MYSQL, it will read
the Username which passed from the Login Form and select the only Record to
him!

I heard about the Session, but how i can pass the Username to other page
using Session??

Pls Help!

Thx a lot !
jack
[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
login.php
<?php
$user_name = $HTTP_GET_VARS['login];
session_start();
session_register("user_name");
?>

other.php
<?php
session_start();
if (!session_is_registered("user_name")) header("Location : login.php");
// use here $HTTP_SESSION_VARS['user_name'], if 4.1.0 then $_SESSION['user_name'] is 
also avaiable and preferable.

?>

Regards,
Andrey Hristov

----- Original Message ----- 
From: "Jack" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 20, 2001 9:30 AM
Subject: [PHP] Passing Logined in Name form One Form to other Page


> Dear all
> I had create the Login Page for the User to login before they can open the
> WebPage. What i want to do is to:
> 
> When the User had type the Username into the Inputbox, and click the submit
> button, this Username will be memorized, and pass to other PHP Page.Then
> when he go to some page which need to select data from MYSQL, it will read
> the Username which passed from the Login Form and select the only Record to
> him!
> 
> I heard about the Session, but how i can pass the Username to other page
> using Session??
> 
> Pls Help!
> 
> Thx a lot !
> jack
> [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]
> 
> 

--- End Message ---
--- Begin Message ---

 Hi,
May I suggest that you take a look at the code library at zend.com, and devshed.com .  
I remember seeing a login application using the SESSIONS.
Alternatively, you can use cookies to let your browser know who is browsing.
 
  Jack <[EMAIL PROTECTED]> wrote: Dear all
I had create the Login Page for the User to login before they can open the
WebPage. What i want to do is to:

When the User had type the Username into the Inputbox, and click the submit
button, this Username will be memorized, and pass to other PHP Page.Then
when he go to some page which need to select data from MYSQL, it will read
the Username which passed from the Login Form and select the only Record to
him!

I heard about the Session, but how i can pass the Username to other page
using Session??

Pls Help!

Thx a lot !
jack
[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]


Mehmet Erisen
http://www.erisen.com


---------------------------------
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts!
--- End Message ---
--- Begin Message ---
>From: Jack

>Dear all
>I had create the Login Page for the User to login before they 
>can open the WebPage. What i want to do is to:
>
>When the User had type the Username into the Inputbox, and click the submit
>button, this Username will be memorized, and pass to other PHP Page.Then
>when he go to some page which need to select data from MYSQL, it will read
>the Username which passed from the Login Form and select the only Record to
>him!
>
>I heard about the Session, but how i can pass the Username to 
>other page using Session??

To beging with, why not give the manual a try?
--- End Message ---
--- Begin Message ---
Hello List,

I try to setup a script which automatically 
signs a file with PGP.

With the system command this looks like that:

 % /usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt
 A private key is required to make a signature.
 Need a pass phrase to decrypt private key:
 1024 bits, Key ID F593ED45, Created 2001-12-14
 "Juergen Mueller <[EMAIL PROTECTED]>"
 Enter pass phrase: 
 Pass phrase is good.
 Creating output file test1.sig
 % 

Now the thing is how can I implement the pass phrase into
PHP so that the command is being done?

When I use something like

$command="/usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt";
exec("$command",$answer);

obviously nothing is happening cause the pass phrase was
not given.

Thanks.
Juergen



--- End Message ---
--- Begin Message ---
Hi

I have a rather large array in my script and I was interested how much
memory it uses. Is there a way to get the size of an array in bytes?
BTW: I did RTFM and didn't find an accomidating function, so if there is
one, please point me to it...

TIA
Stefan Rusterholz

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have a simple question.
My Scenario:
Page a.php - The Form
The user insert his data (ie name, address, city and so on...)Then he
submit the $ to b.php.

Page b.php now shows :
Hello Mr. $name , etc etc ...
I nedd now to save what I see on the sreen as .txt or .rft or .html ....
How can I do that?
I try many ways ...(using no session) ..but I can only save the empty
b.php page ...with no varialbles showed at all.

Thanx for your help and Marry XMas from Italy.

BR
Joe

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
Comment: ID: 0x0A17124F - DH/DSS 2048/1024 - Joe Athena Webmaster

iQA/AwUBPCGxOET82/4KFxJPEQK+yQCfdrsJMV6YXUxsqUxmgsTrVguHotUAn1pA
tF+VwCUw1Cdv4k70aWtvrynp
=GI2/
-----END PGP SIGNATURE-----



--- End Message ---
--- Begin Message ---
I don't know if it matches your needs but perhaps it helps:
http://www.php.net/manual/en/ref.outcontrol.php
http://www.php.net/manual/it/ref.outcontrol.php this page isn't translated,
but perhaps some subpages...

good luck
Stefan Rusterholz

----- Original Message -----
From: "Joe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 20, 2001 10:38 AM
Subject: [PHP] How to save the "result page" generated by a Form?


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I have a simple question.
> My Scenario:
> Page a.php - The Form
> The user insert his data (ie name, address, city and so on...)Then he
> submit the $ to b.php.
>
> Page b.php now shows :
> Hello Mr. $name , etc etc ...
> I nedd now to save what I see on the sreen as .txt or .rft or .html ....
> How can I do that?
> I try many ways ...(using no session) ..but I can only save the empty
> b.php page ...with no varialbles showed at all.
>
> Thanx for your help and Marry XMas from Italy.
>
> BR
> Joe
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
> Comment: ID: 0x0A17124F - DH/DSS 2048/1024 - Joe Athena Webmaster
>
> iQA/AwUBPCGxOET82/4KFxJPEQK+yQCfdrsJMV6YXUxsqUxmgsTrVguHotUAn1pA
> tF+VwCUw1Cdv4k70aWtvrynp
> =GI2/
> -----END PGP SIGNATURE-----
>
>
>
>
> --
> 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]
>
>
>

--- End Message ---
--- Begin Message ---
Hello,

When I try to access my .php4 pages I get this error :

fatal error: out of dynamic memory in yy_create_buffer() in unknown on line
0

These pages used to work before, but it seems that my Host has updated to
PHP 4.0.6. Is there some relation ?
Can you help me ?
You can try this page : www.acteam-langues.com/societeConnect.php4

Thanks

Henri



--- End Message ---
--- Begin Message ---
Using Linux 7.2/PHP 4/Apache.  I'm using the following code snippet to
process the POST of a form that sends $UserID and $Password:
  <?php
    $CryptPassword = md5($Password);       \\encrypt the password
    $TheFile = "/path/.htpasswd";                 \\Set the file name/path
    $Data = "$UserID:$CryptPassword\n\r";   \\ Setting the data stream for
the write
    $FilePointer = fopen($TheFile, "a");         \\open the file
      fwrite($FilePointer, $Data);                    \\write the data stream
      fclose ($FilePointer);                             \\close the file
  ?>

 to write to .htpasswd with the following format/layout:

userid:passwd
userid:passwd
userid:passwd
userid:passwd
userid:passwd

However, the data appears in the file without the carriage return or new
lines in the file as follows:

userid:passwd  userid:passwd  userid:passwd  userid:passwd  userid:passwd
userid:passwd  userid:passwd

How can I write the carriage returns to the file so that they show up via
vi or via windows notepad?

ALSO, will Apache and .htpasswd deal with md5() passwords, or do I need to
limit myself to the crypt() function?

TIA
--- End Message ---
--- Begin Message ---
I have a PHP script that receives a CSV text file and inserts it into a
MySQL database.
My problem is that this CSV file is made using the OEM character set and I
need it with the ANSI character set. The closest thing I've found is the
convert_cyr_string() function, but there isn't a code specific for OEM and
translation is not completely accurate.

Any help?


--- End Message ---

Reply via email to