OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 12 May 2003 23:22:20 -0000 Issue 2053

php-general-digest-helplists.php.net
Date: Mon May 12 2003 - 18:22:20 CDT


php-general Digest 12 May 2003 23:22:20 -0000 Issue 2053

Topics (messages 147290 through 147367):

PHP problem
        147290 by: Daz
        147303 by: DvDmanDT

Re: counting check boxes
        147291 by: Maarten de Jong

How to read the bottom part of each post, and find out how to unsubscribe
        147292 by: Brendan Pratt

Re: UDP Packet Writing
        147293 by: Adam Voigt
        147295 by: Adam Voigt

Re: Virtual Host creation...
        147294 by: Jason Wong

Re: how to use strstr() (or similar) on an array?
        147296 by: Justin French
        147298 by: iliketheworld.gmx.ch

Re: GD transparency problem
        147297 by: Steve M
        147358 by: Steve M
        147366 by: John Coggeshall

Re: PHP 4.3.1 and MRTG or RRD
        147299 by: Shawn McKenzie

Re: [PHP-INST] How to read the bottom part of each post, and find out how to unsubscribe
        147300 by: Ben Lake

Re: I need a math genius!
        147301 by: Brent Baisley
        147306 by: Roedel, Mark

fopen perms help
        147302 by: Ross Bateman
        147329 by: Jason Wong

Fields printing twice
        147304 by: Brian V Bonini
        147305 by: Fatih Üstündağ

Getting data in and out of functions?
        147307 by: Derrick Fogle
        147311 by: Tom Rogers
        147341 by: Don Read

performance question with htmlspecialchars,strip_tags
        147308 by: Ryan A
        147309 by: Marek Kilimajer
        147310 by: Marek Kilimajer
        147319 by: Leif K-Brooks

An ASP application fro recording visitors
        147312 by: Denis L. Menezes
        147317 by: Leif K-Brooks
        147318 by: Denis L. Menezes
        147325 by: Dan Joseph
        147338 by: Dan Joseph

Re: ini_set (max_execution_time) ignored in SAFE MODE?
        147313 by: Pekka Saarinen

Re: Auto-Post form data
        147314 by: Gerhard Petrowitsch
        147330 by: Jason Wong

Need an ASP guestbook application
        147315 by: Denis L. Menezes
        147320 by: bbonkosk.tampabay.rr.com
        147321 by: bbonkosk.tampabay.rr.com
        147322 by: Denis L. Menezes

Re: [PHP-INST] Re: [PHP] bug using php, latest version and IIS version 5.1: php does not seem to accept variables... Please help.
        147316 by: Leif K-Brooks

What am i doing wrong :\
        147323 by: Clivus2k1.aol.com
        147331 by: Wendell Brown
        147332 by: Michael Geier
        147333 by: James
        147335 by: Wendell Brown

Re: IMAGES GALLERY
        147324 by: Pierrick LE GALL

SQL help
        147326 by: Brian V Bonini
        147337 by: James

word wrap
        147327 by: Jerry M. Howell II
        147336 by: James
        147339 by: Kevin Stone
        147362 by: Frappy John

Dump file to local computer
        147328 by: Alex Shi
        147334 by: Kevin Stone
        147340 by: Alex Shi

Session with SSL
        147342 by: Nicolas Ross

HELP!! need to find webhost
        147343 by: Don Buckley
        147344 by: Dan Joseph

mail() not working with PHP4.3.1 and RH8
        147345 by: John Zastrow

Cookie not getting set
        147346 by: Mike Morton
        147347 by: Jennifer Goodie
        147348 by: Mike Morton
        147353 by: James
        147355 by: Mike Morton

Output buffering help please
        147349 by: Gareth Hastings
        147354 by: Kevin Stone
        147356 by: Gareth Hastings

Storing a language array
        147350 by: Steve Vernon

Delphi port of ZendAPI?
        147351 by: Eddie Shipman

Session Cookies
        147352 by: Brian V Bonini
        147357 by: John Coggeshall

WHY will this not work
        147359 by: Brian V Bonini
        147361 by: Kevin Stone

Re: WHY will this not work - you must name a button to use it ;-)
        147360 by: Daevid Vincent

Re: Need a guestbook application
        147363 by: Frappy John

Session/header probs
        147364 by: Brian V Bonini
        147365 by: John Coggeshall

Getting result from URL
        147367 by: Stephen

Administrivia:

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

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

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

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

attached mail follows:


Hi
I don't know if you guys are the right people to handle these problems,
 but if you are, i have a script on my custom error page that is designed
 to get the url of the page that gave the error and save it into a text
document, it does this but the error page is always error.php. I don't know what is wrong with it so maybe you guys could check it. I have
attached my error.php page and my .htaccess.
Thanks in advance.
Daz.

attached mail follows:


Hello... Am I misstaken or did you forget to include it?

Also, did you run a Soldat site a while ago?

"Daz" <djdaz2002hotmail.com> skrev i meddelandet
news:Sea1-DAV279qG96gKms0000704ahotmail.com...
Hi
I don't know if you guys are the right people to handle these problems,
but if you are, i have a script on my custom error page that is designed
to get the url of the page that gave the error and save it into a text
document, it does this but the error page is always error.php. I don't know
what is wrong with it so maybe you guys could check it. I have
attached my error.php page and my .htaccess.
Thanks in advance.
Daz.

attached mail follows:


A querystring like this will allways fail:
    where id=154 and id=198 and id=505 and id=809 and

the ID can never be 154, 198, 505 and 809 at the same time.

You can either use:
1. where id=154 or id=198 or id=505 or id=809 or
2. where id IN (154,198,505,809)

The second method is most times the easiest. I'm not yet familiar with PHP
but only with ColdFusion.

I used to do the checking/selecting of multiple options in a listbox. The
selected ones were passed in a sort of list. I could put that list directly
in the query statement:
  where id IN ($selectedIDlist)

> Hi guys,
> Thanks for replying.
>
> Yes, I know its an ugly form and its pretty unusual...
> but I am just trying to copy the functionality of this site:
> http://hostfilter.com/plans_showresults.asp?price=30&diskspace=5&plat=All&Su
> bmit=Filter+It+%21&ps=20
> If you run the above query you will see a row of checkboxes and at the
> bottom a way to compare plans...thats exactly what i want to do...
> After going through their source i see their checkboxes are all named
> "planid" so i did the same for mine...
>
> What do you suggest to get the same functionality?
>
> Kindly reply,
> -Ryan
>
>
> ----- Original Message -----
> From: "Paul Chvostek" <paul+phpit.ca>
> To: "Ryan A" <ryanjumac.com>
> Cc: <php-generallists.php.net>
> Sent: Saturday, May 10, 2003 8:55 PM
> Subject: Re: counting check boxes
>
>
>> On Sat, May 10, 2003 at 08:35:25PM +0200, Ryan A wrote:
>>>
>>> I have run into a little problem, its hard to explain so am giving you
> the
>>> whole code below:
>>> I am getting a string to countchecks.php which is like:
>>> countchecks.php?id=154&id=198&id=505&id=809&id=1100
>>
>> Ugh.
>>
>> If you're stuck with this format, then you're going to have to parse
>> $_SERVER['QUERY_STRING'] manually, because repetitions of the same
>> variable will overwrite each other. So $_GET['id'] will be 1100, and
>> the other values will be lost.
>>
>>> taking that I have to format it into
>>>
>>> select * from asdf where id=154 and id=198 and id=505 and id=809 and
>>> id=1100;
>>>
>>> How can i do that?
>>
>> Why would you want to? How can 'id' have multiple values?
>>
>> Anyway, it would be something like:
>>
>> foreach (explode('&',$_SERVER['QUERY_STRING']) as $this) {
>> list($junk,$value)=explode('=',$this);
>> if ($junk=="id") $q.=" AND id=$value";
>> }
>> $q="SELECT * FROM asdf WHERE" . substr($q,5) . ";";
>>
>>> Below is the form that i am using...
>> ...
>>
>> It's an ugly form. You'd have an easier time if you put the checkbox
>> entities into an array, with:
>>
>> <form method="get">
>> ...
>> <input type="checkbox" name="id[]" value="154">154
>> <input type="checkbox" name="id[]" value="198">198
>> <input type="checkbox" name="id[]" value="202">202
>> <input type="checkbox" name="id[]" value="505">505
>> <input type="checkbox" name="id[]" value="809">809
>> <input type="checkbox" name="id[]" value="1100">1100
>> <input type="submit" name="Submit" value="Submit form">
>> </form>
>>
>> and processed it with:
>>
>> foreach ($id as $value) {
>> $q.=" AND id=" . $value;
>> }
>> $q="SELECT * FROM asdf WHERE" . substr($q,5) . ";";
>>
>> --
>> Paul Chvostek <paulit.ca>
>> Operations / Abuse / Whatever
>> it.canada, hosting and development http://www.it.ca/
>>
>

attached mail follows:


----- Original Message -----
From: "J!nXed" <jynksinternode.on.net>

> HOW DO I GET OFF THIS LIST!!!

> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

 How about reading the bottom of every post that comes from this list ?

attached mail follows:


Wow, thanks.

Only one question, what's the "CCLSC*" for?

On Thu, 2003-05-08 at 10:44, Hugh Bothwell wrote:
>
> <?php
>
> function SendUdpMsg($host, $port, $msg) {
> $udp = fsockopen("udp://$host", $port);
> fwrite($udp, $msg);
> fclose($udp);
> }
>
> function CommandStr($cmd, $ip, $port) {
> return pack(
> "CCLSC*",
> $cmd,
> 0,
> $ip,
> $port,
> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
> );
> }
>
> SendUDPMsg( "127.0.0.1", 8001,
> CommandStr(3, ip2long("127.0.0.1"), 8002)
> );
> ?>
--
Adam Voigt (adamcryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group

attached mail follows:


Answered my own question, never mind, thanks very much again.

On Mon, 2003-05-12 at 08:27, Adam Voigt wrote:
> Wow, thanks.
>
> Only one question, what's the "CCLSC*" for?
>
>
> On Thu, 2003-05-08 at 10:44, Hugh Bothwell wrote:
> >
> > <?php
> >
> > function SendUdpMsg($host, $port, $msg) {
> > $udp = fsockopen("udp://$host", $port);
> > fwrite($udp, $msg);
> > fclose($udp);
> > }
> >
> > function CommandStr($cmd, $ip, $port) {
> > return pack(
> > "CCLSC*",
> > $cmd,
> > 0,
> > $ip,
> > $port,
> > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
> > );
> > }
> >
> > SendUDPMsg( "127.0.0.1", 8001,
> > CommandStr(3, ip2long("127.0.0.1"), 8002)
> > );
> > ?>
> --
> Adam Voigt (adamcryptocomm.com)
> Linux/Unix Network Administrator
> The Cryptocomm Group
--
Adam Voigt (adamcryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group

attached mail follows:


On Monday 12 May 2003 18:23, David T-G wrote:

[lots of good points snipped]

> Mohit wasn't made an example of, flamed to a crisp, or hung out to dry;
> he[*] was simply told, with explanation, why he should ask that question
> on another list (and, note, it is both for his benefit as well as "ours"
> here on the list!).

Absolutely. Asking on the appropriate list is for the _benefit of the poster_.
I'm pretty sure the people hanging out on the apache list have a better
understanding of apache than the people on the php list.

> > Also remember that Apache and PHP compliment each other very well, so
> > Apache deserves a little respect too.

Apache's got so much respect that it has it's own list. Please respect it and
use it!

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
I put aside my copy of "BOWLING WORLD" and think about GUN CONTROL
legislation...
*/

attached mail follows:


I'm *positive* this is not optimised code, but it seems pretty fast on a
10k, 210-line file I made up:

<?

$src_trm = "one two";
$searchWords = explode(' ',$src_trm);

$handle = fopen("searchMe.txt", "r");
while(!feof($handle))
    {
    $buffer = fgets($handle, 4096);
    foreach($searchWords as $word)
        {
        $pos = strpos($buffer,$word);
        if($pos === false)
            {
            // not found
            }
        else
            {
            $wordFound = 1;
            }
        }
    if($wordFound)
        {
        echo $buffer."<br />";
        }
    $wordFound = 0;
    }
fclose($handle);

?>

Season to taste.

I'm not sure how to tackle the highlighting problem, other than to ask if
you *NEED* HTML tags in your search summary? Could this work? It's a lot
cleaner and faster than any regular expressions:

<?

$src_trm = "one two";
$searchWords = explode(' ',$src_trm);

$handle = fopen("searchee.txt", "r");
while(!feof($handle))
    {
    $buffer = strip_tags(fgets($handle, 4096));
    foreach($searchWords as $word)
        {
        $pos = strpos($buffer,$word);
        if($pos === false)
            {
            // not found
            }
        else
            {
            $wordFound = 1;
            $buffer = str_replace($word,"<b>{$word}</b>",$buffer);
            }
        }
    if($wordFound)
        {
        echo $buffer."<br />";
        }
    $wordFound = 0;
    }
fclose($handle);

?>

To justify, google for example doesn't include any HTML tags in it's search
results -- other than those which it places in there to highlight the key
words.

Justin

on 12/05/03 10:15 PM, iliketheworldgmx.ch (iliketheworldgmx.ch) wrote:

> i'm using the following script to scan each line of a text file for search
> term $src_trm. only lines that contain the requested expression are printed.
>
>
> $handle = fopen ($filename, "r");
> $i = 1;
>
> while ($i <= $total_lines_of_file) {
>
> $buffer = fgets($handle, 4096);
> $buffer_raw = strip_tags($buffer);
>
> if(strstr($buffer_raw, $src_trm)) {
> $buffer = preg_replace("/$src_trm/", "<b>$src_trm</b>", $buffer);
> echo $buffer;
> }
>
> $i++;
> }
> fclose ($handle);
>
>
> there are two problems:
>
> 1.
> a user enters more than one word to search for: 'one two' is only found as
> exact match and not if a line containes 'two' somewhere at the beginning and
> 'one' somewhere at the end.
>
> maybe i should explode($src_trm) but then i don't know how to scan the file
> for lines that contain all requested expressions.
>
>
> 2.
> $buffer = preg_replace("/$src_trm/", "<b>$src_trm</b>", $buffer);
>
> this marks found words bold. unfortunately sometimes a word is also found
> inside a html tag. is there a possibility to exclude tags from this
> operation?
>
>
> thanks a lot for your effort!
>
>
> philipp rieger
> http://www.ipdraw.org/
>
>
>
> ps: thanks to don read and jim lucas for their helpful answers to "[PHP]
> including() only given amount of lines"!
>

attached mail follows:


thank you for those suggestions!

1. i need the html tags because they link to corresponding entries.

2. the scripts below work (thanks!). but they also print lines that contain
only one of the given words. i think as i search for 'one two' only lines
that match both words should be listed.

3. my file contains 500+ lines with about 700 chars each.

best wishes

philipp
http://www.ipdraw.org/

am 12.05.2003 13:20 Uhr schrieb Justin French unter justinindent.com.au:

> I'm *positive* this is not optimised code, but it seems pretty fast on a
> 10k, 210-line file I made up:
>
> <?
>
> $src_trm = "one two";
> $searchWords = explode(' ',$src_trm);
>
> $handle = fopen("searchMe.txt", "r");
> while(!feof($handle))
> {
> $buffer = fgets($handle, 4096);
> foreach($searchWords as $word)
> {
> $pos = strpos($buffer,$word);
> if($pos === false)
> {
> // not found
> }
> else
> {
> $wordFound = 1;
> }
> }
> if($wordFound)
> {
> echo $buffer."<br />";
> }
> $wordFound = 0;
> }
> fclose($handle);
>
> ?>
>
>
> Season to taste.
>
> I'm not sure how to tackle the highlighting problem, other than to ask if
> you *NEED* HTML tags in your search summary? Could this work? It's a lot
> cleaner and faster than any regular expressions:
>
> <?
>
> $src_trm = "one two";
> $searchWords = explode(' ',$src_trm);
>
> $handle = fopen("searchee.txt", "r");
> while(!feof($handle))
> {
> $buffer = strip_tags(fgets($handle, 4096));
> foreach($searchWords as $word)
> {
> $pos = strpos($buffer,$word);
> if($pos === false)
> {
> // not found
> }
> else
> {
> $wordFound = 1;
> $buffer = str_replace($word,"<b>{$word}</b>",$buffer);
> }
> }
> if($wordFound)
> {
> echo $buffer."<br />";
> }
> $wordFound = 0;
> }
> fclose($handle);
>
> ?>
>
> To justify, google for example doesn't include any HTML tags in it's search
> results -- other than those which it places in there to highlight the key
> words.
>
>
> Justin

original message:

hello!

i'm using the following script to scan each line of a text file for search
term $src_trm. only lines that contain the requested expression are printed.

$handle = fopen ($filename, "r");
$i = 1;

while ($i <= $total_lines_of_file) {

  $buffer = fgets($handle, 4096);
  $buffer_raw = strip_tags($buffer);

   if(strstr($buffer_raw, $src_trm)) {
   $buffer = preg_replace("/$src_trm/", "<b>$src_trm</b>", $buffer);
   echo $buffer;
   }

  $i++;
}
fclose ($handle);

there are two problems:

1.
a user enters more than one word to search for: 'one two' is only found as
exact match and not if a line containes 'two' somewhere at the beginning and
'one' somewhere at the end.

maybe i should explode($src_trm) but then i don't know how to scan the file
for lines that contain all requested expressions.

2.
$buffer = preg_replace("/$src_trm/", "<b>$src_trm</b>", $buffer);

this marks found words bold. unfortunately sometimes a word is also found
inside a html tag. is there a possibility to exclude tags from this
operation?

thanks a lot for your effort!

philipp rieger
http://www.ipdraw.org/

ps: thanks to don read and jim lucas for their helpful answers to "[PHP]
including() only given amount of lines"!

attached mail follows:


Well, messing with the colour table in each image seems to have done the
trick. If you're interested, the results can be seen at:

http://www.webvivant.com/features/deptfndr.php

Thanks for everyone's help...

"James" <jamesglobalvision.com> wrote in message
news:20030512100737.43540.qmailpb1.pair.com...
> I've always found transparency to be crap with 24-32 bit pngs, try
> converting the pings down to 8bit and the transparency should stay.
>
> One other thing you should consider doing is putting the GD stuff as an
> image, this way you can load the page , text etc and call the complicated
> map process as an image which will "look" better atleast :)
>
> <img src="myDynamicImage.php?this=that" width=100 height=100>
>
> You can this kind of thing from the geo mapping system i built here:
>
http://www.londontown.com/londonmaps/index.php?ID=7643&IV_Type=TotalLondon&I
>
V_RunByMethod=VBGC&IV_GeoHorizontal=529451&IV_GeoVertical=180462&type=transp
> ort&PlotGeoH=529451&PlotGeoV=180462
>
> This was a nightmare to build, hundreds of tiles, dynamically trying to
find
> out which tiles should be obtained to create a single image and then
trying
> to join them and all the rest of it, yuk!
>
>
>
>
> "Steve M" <steve.mwanadoo.fr> wrote in message
> news:20030511200950.6492.qmailpb1.pair.com...
> > Just when I thought I was getting a grip on PHP I decide to take on the
GD
> > library. -sigh- I have two problems which I'll put in two postings, so
> > here's the first and here's what I'm trying to do:
> >
> > I want to display a map and overlay it with highlight sections according
> to
> > the results of a database search. I tried doing this with floating boxes
> and
> > GIFs, but had some issues with positioning the whole shebang on the
page,
> so
> > I thought I'd try some GD routines. And it's working to a degree. Having
> > converted the files to PNG format, I now use the following code:
> >
> > $backimg = imagecreatefrompng('deptmaps/bckgrnd.png');
> > for ($i = 1; $i <= $dbrows ; $i++) {
> > $overlay[$i] =
> imageCreateFromPNG("deptmaps/".$deptcode[$i].".png");
> > imageCopyMerge($backimg,$overlay[$i],0,0,0,0,350,394,10);
> > }
> > imagepng($backimg,"deptmaps/result.png");
> > echo "<IMG SRC='deptmaps/result.png'>";
> >
> > (the $deptcode array holds values from '01' to '95' and there are files
in
> > the deptmaps folder named 01.png etc...)
> >
> > The problem is that I don't get a clear image overlaid by other clear
> > images. The whole thing is rather murky (you can see what I mean at
> > http://www.webvivant.com/features/deptfndr.php . Type 'or' into the
> 'Search
> > by name' box and hit 'Find').
> >
> > I think the problem lies with the PNG files not retaining their
> > transparency. They look fine when I view them in Photoshop, but if I use
a
> > 'pct' value of 100 I see the last overlay as the desired image on a
grey,
> > rather than transparent, background. (BTW, I don't really understand
that
> > 'pct' value - I just tried experimenting with different values).
> >
> > So here's where I need help from wiser heads. I need a pointer to help
me
> > investigate this further. Is this a problem with the PNG files? Do I
need
> to
> > edit the colour map, maybe choosing a different transparency value?
> >
> > Or do I need to play with imagecolortransparent to try to set a new
> > transparency value for the image created with imagecreatefrompng?
> >
> > Any pointers would be appreciated.
> >
> >
>
>

attached mail follows:


Oops - spoke too soon. I haven't quite sorted the problem - or, at least,
I've created a new one. I'm merging a bunch of images based on a database
search using the following code:

$backimg = imagecreatefrompng('deptmaps/bckgrnd.png');
for ($i = 1; $i <= $dbrows ; $i++) {
    if ( file_exists("deptmaps/".$deptcode[$i].".png")) {
        $overlay[$i] = imageCreateFromPNG("deptmaps/".$deptcode[$i].".png");
        imageCopyMerge($backimg,$overlay[$i],0,0,0,0,350,394,100);
    }
}

So far so good. I then need to create a new image. All of this is working
and I was writing the new image out to a file called 'composite.jpg', and
that works too - except that the new graphic isn't always loaded by the
browser because it's already cached an older version of 'composite.jpg' and
so doesn't bother to get subsequent ones. I fixed this by changing the
filename each time using the following code:

$newfile = time();
imagejpeg($backimg,"deptmaps/".$newfile.".jpg");
echo "<IMG SRC='deptmaps/".$newfile.".jpg'>";

That sorted the caching problem, but now I'm creating lots of new images
which will slowly fill up the hard disk. Ugh! So either I need to delete the
older file each time (without being able to know its full name) or I need a
way of preventing the caching of the image.

I'd appreciate any thoughts on this... James earlier suggested making the
IMG SRC refer to a separate script that does the image creation, but that
means passing the array to that script, and I'm not sure how to do that.

attached mail follows:


> I'd appreciate any thoughts on this... James earlier suggested making the
> IMG SRC refer to a separate script that does the image creation, but that
> means passing the array to that script, and I'm not sure how to do that.

You can serialize the array and pass it:

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

Does the image need to be written to the file system?? If it doesn't,
why not just display it as a streamed image. If you still have caching
problems then you can always send some HTTP headers to inform the
browser to not cache the image.

John

--
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

attached mail follows:


Maybe I'm lost, but I thought MRTG was Perl?

-Shawn

"Ron Allen )" <allenrofirsthandcomm.com> wrote in message
news:20030511123321.47273.qmailpb1.pair.com...
> Here is my problem
>
> First I am new to the Linux community, so this is why I am having some
> problems (I just simply don't where or how to do some stuff)
>
> I have downloaded MRTG and I run the configure command, but everytime that
> it gets to the GD library it says that it isn't installed or that I don't
> have gd.h installed. PHP 4.3.1 has this natively supported or so I
thought!
>
> Help would be nice
>
>

attached mail follows:


He was just testing us :P

-----Original Message-----
From: Brendan Pratt [mailto:bprattoverflow.net.au]
Sent: Monday, May 12, 2003 6:39 AM
To: J!nXed
Cc: php-generallists.php.net; php-installlists.php.net;
php-windowslists.php.net
Subject: [PHP-INST] How to read the bottom part of each post, and find
out how to unsubscribe

----- Original Message -----
From: "J!nXed" <jynksinternode.on.net>

> HOW DO I GET OFF THIS LIST!!!

> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

 How about reading the bottom of every post that comes from this list ?

--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


You can do the old factoring way you learned in grade school where the
first number is actually
(0*1)+(3*10)+(6*100)+(2*1000)+(7*10000)+...

Although you don't have to do it in that detail. Perhaps breaking it
into one factor less than the max PHP can handle. When recombining into
a string, you just need to keep track of any carry over. It seems like
a lot of work though.

Have you looked at limits of other scripting languages like Perl,
Python, or Ruby? Perl might be your best bet since it been around the
longest.

On Friday, May 9, 2003, at 06:46 PM, Jason Caldwell wrote:

> Hi
>
> I need to divide, subtract and add *very* large unsigned integer
> numbers --
> no floating point numbers. In PHP I'm limited to an integer no larger
> than:
> 2,147,483,647 ...
>
> How is it possible to calculate much, much larger numbers?
>
> For example, say I want to add the following number:
>
> (7827363524473290039928827730299288277102938474655367299188272630 +
> 7829817981291982837938719793747646199192739190198791238479832)
>
> ---
>
> I'm ok at math, but not too skilled in it -- so, if the above can be
> calculated using Floating Numbers - great! -- however, if possible,
> I'd like
> to stick to unsigned integers.
>
> Thanks,
> Jason
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

attached mail follows:


Have a look at the BCMath functions...they support mathematical
operations with numbers of "any size". (In practical terms, it looks
like that probably means up to maxint digits, but I haven't looked into
the source code to verify that. (The numbers and results are actually
stored as strings rather than numeric types.

See http://www.php.net/bc for all the nitty-gritty.

---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for he shall never cease
LeTourneau University | to be entertained."
Longview, Texas, USA | -- John Powell

> -----Original Message-----
> From: Jason Caldwell [mailto:jasonthinkingman.org]
> Sent: Friday, May 09, 2003 5:47 PM
> To: php-generallists.php.net
> Subject: [PHP] I need a math genius!
>
>
> Hi
>
> I need to divide, subtract and add *very* large unsigned
> integer numbers --
> no floating point numbers. In PHP I'm limited to an integer
> no larger than:
> 2,147,483,647 ...
>
> How is it possible to calculate much, much larger numbers?
>
> For example, say I want to add the following number:
>
> (7827363524473290039928827730299288277102938474655367299188272630 +
> 7829817981291982837938719793747646199192739190198791238479832)
>
> ---
>
> I'm ok at math, but not too skilled in it -- so, if the above can be
> calculated using Floating Numbers - great! -- however, if
> possible, I'd like
> to stick to unsigned integers.
>
> Thanks,
> Jason
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


Hi

Please could somebody help me out with a permissions problem.

I have the following in a test script (line numbers appended):
43: $fp = fopen("/var/www/html/ittracker/ross.txt","w");
44: fwrite($fp,"This is a test");
45: fclose($fp);

When I run it I get the following error:
Warning: fopen("/var/www/html/ittracker/ross.txt", "w") - Permission denied
in /var/www/html/ittracker/reservations/save_file.php on line 43

I am not sure what the perms should be on the directory.
At the moment they are my user and group.
I did try to put mysql and apache in the same group but that did not help.

Any ideas or pointers,

Thanks,

Ross

attached mail follows:


On Monday 12 May 2003 22:18, Ross Bateman wrote:

> Please could somebody help me out with a permissions problem.
>
> I have the following in a test script (line numbers appended):
> 43: $fp = fopen("/var/www/html/ittracker/ross.txt","w");
> 44: fwrite($fp,"This is a test");
> 45: fclose($fp);
>
> When I run it I get the following error:
> Warning: fopen("/var/www/html/ittracker/ross.txt", "w") - Permission denied
> in /var/www/html/ittracker/reservations/save_file.php on line 43
>
> I am not sure what the perms should be on the directory.
> At the moment they are my user and group.
> I did try to put mysql and apache in the same group but that did not help.

Search the archives, this kind of question gets asked every other day or so.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Objects are lost only because people look where they are not rather than
where they are.
*/

attached mail follows:


Why does this print each DB field twice?

$line_break = "\r\n";
    while ($row = mysql_fetch_array($result)) {
          if ($csv) {
          $semi_separated = implode(";", $row);
          print $semi_separated . $line_break . "<br>";
    }

attached mail follows:


Since mysql_fetch_array returns array with associative indices and numeric
indices,
you will get each field twice by using implode.

you can use :

        $row = mysql_fetch_array($result,MYSQL_NUM) ( or MYSQL_ASSOC )

-----Original Message-----
From: Brian V Bonini [mailto:b-boninicox.net]
Sent: Monday, May 12, 2003 5:26 PM
To: PHP Lists
Subject: [PHP] Fields printing twice

Why does this print each DB field twice?

$line_break = "\r\n";
    while ($row = mysql_fetch_array($result)) {
          if ($csv) {
          $semi_separated = implode(";", $row);
          print $semi_separated . $line_break . "<br>";
    }

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


I'm really struggling with passing information both in to and out of
functions. I've turned to using include() as a replacement to functions
sometimes because I need to pass a lot of data in to a function, and
get lots of data back out of it, and I can't seem to figure out the
trick.

I'm OK with using
      function errorcheck($val1, $val2, $val3) {
      # blahblahblah
      }
      errorcheck($val1, $val2, $val);

to get values into a function, but I need to do error checking and
correction on those values, and return all that data plus controls
(were there any errors in the data? if so, which ones?). Returning all
that data back to the rest of the code is where I get lost.

If anyone could help de-mystify this for me, I'd sure appreciate it.

Thanks,

-Derrick

attached mail follows:


Hi,

Tuesday, May 13, 2003, 12:48:28 AM, you wrote:
DF> I'm really struggling with passing information both in to and out of
DF> functions. I've turned to using include() as a replacement to functions
DF> sometimes because I need to pass a lot of data in to a function, and
DF> get lots of data back out of it, and I can't seem to figure out the
DF> trick.

DF> I'm OK with using
DF> function errorcheck($val1, $val2, $val3) {
DF> # blahblahblah
DF> }
DF> errorcheck($val1, $val2, $val);

DF> to get values into a function, but I need to do error checking and
DF> correction on those values, and return all that data plus controls
DF> (were there any errors in the data? if so, which ones?). Returning all
DF> that data back to the rest of the code is where I get lost.

DF> If anyone could help de-mystify this for me, I'd sure appreciate it.

DF> Thanks,

DF> -Derrick

Put the results in an array and return that

--
regards,
Tom

attached mail follows:


On 12-May-2003 Derrick Fogle wrote:
> I'm really struggling with passing information both in to and out of
> functions. I've turned to using include() as a replacement to functions
> sometimes because I need to pass a lot of data in to a function, and
> get lots of data back out of it, and I can't seem to figure out the
> trick.
>
> I'm OK with using
> function errorcheck($val1, $val2, $val3) {
> # blahblahblah
> }
> errorcheck($val1, $val2, $val);
>
> to get values into a function, but I need to do error checking and
> correction on those values, and return all that data plus controls
> (were there any errors in the data? if so, which ones?). Returning all
> that data back to the rest of the code is where I get lost.
>
> If anyone could help de-mystify this for me, I'd sure appreciate it.
>

http://www.php.net/manual/en/functions.arguments.php#functions.arguments.by-
reference

Regards,
--
Don Read dreadtexas.net
-- It's always darkest before the dawn. So if you are going to
   steal the neighbor's newspaper, that's the time to do it.

attached mail follows:


Hi,
I am programming for a webhosting directory site (to be) and we have some
really huge forms...with as much as 45 fields in a single form and quite a
few text/hidden boxes, multiply that by around 5-10 forms....

As you can imagine I dont want some jackass spoiling my neat tables by
entering <h1> hahaha got you</h1> into it...so would you suggest I use
HTMLSPECIALCHARS or STRIP_TAGS to do it?

If I use either, will it slow down the rate of execution noticably?
I am kind of leaning towards HTMLSPECIALCHARS as if someones name is

Ryan 'O Conner

 it will happily take care of the " ' " there or if he accidentally puts

Ryan "O Conner

it will replace that with too...no need of the addslashes/strip slashes
thing.

Any experience with this and what do you suggest?

Kindly reply.

Cheers,
-Ryan

attached mail follows:


Use htmlspecialchars, not only for breaking your neat design, but for
security. Someone might insert javascript and steal your cookies or session.

Ryan A wrote:

>Hi,
>I am programming for a webhosting directory site (to be) and we have some
>really huge forms...with as much as 45 fields in a single form and quite a
>few text/hidden boxes, multiply that by around 5-10 forms....
>
>As you can imagine I dont want some jackass spoiling my neat tables by
>entering <h1> hahaha got you</h1> into it...so would you suggest I use
>HTMLSPECIALCHARS or STRIP_TAGS to do it?
>
>If I use either, will it slow down the rate of execution noticably?
>I am kind of leaning towards HTMLSPECIALCHARS as if someones name is
>
>Ryan 'O Conner
>
> it will happily take care of the " ' " there or if he accidentally puts
>
>Ryan "O Conner
>
>it will replace that with too...no need of the addslashes/strip slashes
>thing.
>
>Any experience with this and what do you suggest?
>
>Kindly reply.
>
>Cheers,
>-Ryan
>
>
>
>

attached mail follows:


Use htmlspecialchars only when you insert into db, this will not make a
significant difference.

Ryan A wrote:

>Hey there,
>Thanks for replying.
>
>So many htmlspecialchars($string)'s, wont it make my scripts slower?
>I just want to know if it will make my script very slow and put a lot of
>pressure on processing in the long run or it normal...
>
>Cheers,
>-Ryan
>
>
>
>
>>Use htmlspecialchars, not only for breaking your neat design, but for
>>security. Someone might insert javascript and steal your cookies or
>>
>>
>session.
>
>
>>Ryan A wrote:
>>
>>
>>
>>>Hi,
>>>I am programming for a webhosting directory site (to be) and we have some
>>>really huge forms...with as much as 45 fields in a single form and quite
>>>
>>>
>a
>
>
>>>few text/hidden boxes, multiply that by around 5-10 forms....
>>>
>>>As you can imagine I dont want some jackass spoiling my neat tables by
>>>entering <h1> hahaha got you</h1> into it...so would you suggest I use
>>>HTMLSPECIALCHARS or STRIP_TAGS to do it?
>>>
>>>If I use either, will it slow down the rate of execution noticably?
>>>I am kind of leaning towards HTMLSPECIALCHARS as if someones name is
>>>
>>>Ryan 'O Conner
>>>
>>>it will happily take care of the " ' " there or if he accidentally puts
>>>
>>>Ryan "O Conner
>>>
>>>it will replace that with too...no need of the addslashes/strip slashes
>>>thing.
>>>
>>>Any experience with this and what do you suggest?
>>>
>>>Kindly reply.
>>>
>>>Cheers,
>>>-Ryan
>>>
>>>
>>>
>>>
>>>
>>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
>
>
>

attached mail follows:


No, use it when you display data in an HTML page. That way, you don't
lose the freedom to display the DB data in other formats.

Marek Kilimajer wrote:

> Use htmlspecialchars only when you insert into db, this will not make
> a significant difference.
>
> Ryan A wrote:
>
>> Hey there,
>> Thanks for replying.
>>
>> So many htmlspecialchars($string)'s, wont it make my scripts slower?
>> I just want to know if it will make my script very slow and put a lot of
>> pressure on processing in the long run or it normal...
>>
>> Cheers,
>> -Ryan
>>
>>
>>
>>
>>> Use htmlspecialchars, not only for breaking your neat design, but for
>>> security. Someone might insert javascript and steal your cookies or
>>>
>>
>> session.
>>
>>
>>> Ryan A wrote:
>>>
>>>
>>>
>>>> Hi,
>>>> I am programming for a webhosting directory site (to be) and we
>>>> have some
>>>> really huge forms...with as much as 45 fields in a single form and
>>>> quite
>>>>
>>>
>> a
>>
>>
>>>> few text/hidden boxes, multiply that by around 5-10 forms....
>>>>
>>>> As you can imagine I dont want some jackass spoiling my neat tables by
>>>> entering <h1> hahaha got you</h1> into it...so would you suggest I use
>>>> HTMLSPECIALCHARS or STRIP_TAGS to do it?
>>>>
>>>> If I use either, will it slow down the rate of execution noticably?
>>>> I am kind of leaning towards HTMLSPECIALCHARS as if someones name is
>>>>
>>>> Ryan 'O Conner
>>>>
>>>> it will happily take care of the " ' " there or if he accidentally
>>>> puts
>>>>
>>>> Ryan "O Conner
>>>>
>>>> it will replace that with too...no need of the addslashes/strip
>>>> slashes
>>>> thing.
>>>>
>>>> Any experience with this and what do you suggest?
>>>>
>>>> Kindly reply.
>>>>
>>>> Cheers,
>>>> -Ryan
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>
>>
>>
>>
>>
>
>

--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

attached mail follows:


Hello friends.

I am trying to make an application for guestbooks but for all members who are schools.

I mean :
The schools in my town sign up as members at our website with theis school's complete profile.
Whenever they have visitors to their premises, they log into our website and enter the vistors details, when he arrived(date and time) and when he left(date and time).
The members can see only their own records and not anyone else's records.
The members should be able to query their database and find out who had visited their premises between which date/times.

I wonder if there is a ready made secure application like this available.
Can someone please help?

Thanks very much
Denis

attached mail follows:


If you're looking for ASP help, ask somewhere else...

Denis L. Menezes wrote:

>Hello friends.
>
>I am trying to make an application for guestbooks but for all members who are schools.
>
>I mean :
>The schools in my town sign up as members at our website with theis school's complete profile.
>Whenever they have visitors to their premises, they log into our website and enter the vistors details, when he arrived(date and time) and when he left(date and time).
>The members can see only their own records and not anyone else's records.
>The members should be able to query their database and find out who had visited their premises between which date/times.
>
>I wonder if there is a ready made secure application like this available.
>Can someone please help?
>
>Thanks very much
>Denis
>
>
>
>

--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

attached mail follows:


I meant Application Service Provider when I said ASP. Sorry.

Denis
----- Original Message -----
From: "Leif K-Brooks" <eurleifbuyer-brokerage.com>
To: "Denis L. Menezes" <menezesdsingnet.com.sg>
Cc: "PHP general list" <php-generallists.php.net>
Sent: Tuesday, May 13, 2003 12:43 AM
Subject: Re: [PHP] An ASP application fro recording visitors

> If you're looking for ASP help, ask somewhere else...
>
> Denis L. Menezes wrote:
>
> >Hello friends.
> >
> >I am trying to make an application for guestbooks but for all members who
are schools.
> >
> >I mean :
> >The schools in my town sign up as members at our website with theis
school's complete profile.
> >Whenever they have visitors to their premises, they log into our website
and enter the vistors details, when he arrived(date and time) and when he
left(date and time).
> >The members can see only their own records and not anyone else's records.
> >The members should be able to query their database and find out who had
visited their premises between which date/times.
> >
> >I wonder if there is a ready made secure application like this available.
> >Can someone please help?
> >
> >Thanks very much
> >Denis
> >
> >
> >
> >
>
> --
> The above message is encrypted with double rot13 encoding. Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.
>

attached mail follows:


Hi,

check www.sourceforge.com

they might have something. Its hard to really find pre-built packages for
things like this. Might want to consider writing something.

-Dan Joseph

> -----Original Message-----
> From: Denis L. Menezes [mailto:menezesdsingnet.com.sg]
> Sent: Monday, May 12, 2003 12:52 PM
> To: Leif K-Brooks
> Cc: PHP general list
> Subject: Re: [PHP] An ASP application fro recording visitors
>
>
> I meant Application Service Provider when I said ASP. Sorry.
>
> Denis
> ----- Original Message -----
> From: "Leif K-Brooks" <eurleifbuyer-brokerage.com>
> To: "Denis L. Menezes" <menezesdsingnet.com.sg>
> Cc: "PHP general list" <php-generallists.php.net>
> Sent: Tuesday, May 13, 2003 12:43 AM
> Subject: Re: [PHP] An ASP application fro recording visitors
>
>
> > If you're looking for ASP help, ask somewhere else...
> >
> > Denis L. Menezes wrote:
> >
> > >Hello friends.
> > >
> > >I am trying to make an application for guestbooks but for all
> members who
> are schools.
> > >
> > >I mean :
> > >The schools in my town sign up as members at our website with theis
> school's complete profile.
> > >Whenever they have visitors to their premises, they log into
> our website
> and enter the vistors details, when he arrived(date and time) and when he
> left(date and time).
> > >The members can see only their own records and not anyone
> else's records.
> > >The members should be able to query their database and find out who had
> visited their premises between which date/times.
> > >
> > >I wonder if there is a ready made secure application like this
> available.
> > >Can someone please help?
> > >
> > >Thanks very much
> > >Denis
> > >
> > >
> > >
> > >
> >
> > --
> > The above message is encrypted with double rot13 encoding. Any
> unauthorized attempt to decrypt it will be prosecuted to the full
> extent of
> the law.
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


-----Original Message-----
From: Kevin Millecam [mailto:kmillecambitworkz.com]
Sent: Monday, May 12, 2003 3:09 PM
To: Dan Joseph
Subject: Re: [PHP] An ASP application fro recording visitors

Denis,

You might be able to find something at either
http://www.scriptsearch.com/PHP/ or http://www.hotscripts.com

HTH,
Kevin

----- Original Message -----
From: "Dan Joseph" <djosephduhq.us>
To: "PHP general list" <php-generallists.php.net>
Sent: Monday, May 12, 2003 11:41 AM
Subject: RE: [PHP] An ASP application fro recording visitors

> Hi,
>
> check www.sourceforge.com
>
> they might have something. Its hard to really find pre-built packages for
> things like this. Might want to consider writing something.
>
> -Dan Joseph
>
> > -----Original Message-----
> > From: Denis L. Menezes [mailto:menezesdsingnet.com.sg]
> > Sent: Monday, May 12, 2003 12:52 PM
> > To: Leif K-Brooks
> > Cc: PHP general list
> > Subject: Re: [PHP] An ASP application fro recording visitors
> >
> >
> > I meant Application Service Provider when I said ASP. Sorry.
> >
> > Denis
> > ----- Original Message -----
> > From: "Leif K-Brooks" <eurleifbuyer-brokerage.com>
> > To: "Denis L. Menezes" <menezesdsingnet.com.sg>
> > Cc: "PHP general list" <php-generallists.php.net>
> > Sent: Tuesday, May 13, 2003 12:43 AM
> > Subject: Re: [PHP] An ASP application fro recording visitors
> >
> >
> > > If you're looking for ASP help, ask somewhere else...
> > >
> > > Denis L. Menezes wrote:
> > >
> > > >Hello friends.
> > > >
> > > >I am trying to make an application for guestbooks but for all
> > members who
> > are schools.
> > > >
> > > >I mean :
> > > >The schools in my town sign up as members at our website with theis
> > school's complete profile.
> > > >Whenever they have visitors to their premises, they log into
> > our website
> > and enter the vistors details, when he arrived(date and time) and when
he
> > left(date and time).
> > > >The members can see only their own records and not anyone
> > else's records.
> > > >The members should be able to query their database and find out who
had
> > visited their premises between which date/times.
> > > >
> > > >I wonder if there is a ready made secure application like this
> > available.
> > > >Can someone please help?
> > > >
> > > >Thanks very much
> > > >Denis
> > > >
> > > >
> > > >
> > > >
> > >
> > > --
> > > The above message is encrypted with double rot13 encoding. Any
> > unauthorized attempt to decrypt it will be prosecuted to the full
> > extent of
> > the law.
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

attached mail follows:


Hi,

It seems that in their eternal wisdom PHP developers have now disabled (in
4.3.2RC2) ini_set ("max_execution_time","1200") when safe mode is on. As
set_time_limit() is also disabled in safe mode there is NO way to make
scripts run more than default 30 seconds on most virtual servers (clients
usually can not edit php.ini, and admins won't).

What is the point? With updates like this writing real life applications
seems to get harder and harder. I have apps that support fully safe mode
and now they will support it no more because 30 secs get you nowhere with
megabytes of processee data and execution just halts. What can they do to
work around the problem? What can I do to work around the problem?

Pekka

attached mail follows:


Thanks Philips for your reply. I think that might help.
But I suspect, that it won't work with an https:// type
connection? Do I just have to adapt the port number
used in the fsockopen function to get it to run with https ?
If so, which port number must I use?

Thanks and regards,
Gerhard
P.S.: I can't try it out here, but my project depends on a
positive answer.

----- Original Message -----
From: "Philip Olson" <philipcornado.com>
To: "Gerhard Petrowitsch" <gerhardpetrowitsch.de>
Cc: <php-generallists.php.net>
Sent: Sunday, May 11, 2003 4:45 PM
Subject: Re: [PHP] Auto-Post form data

> [snip]
> > P.S.: If my description was unclear, here's a summary
> >
> > HTML form --> posted on user reqest to PHP script -->
> > checks data ---> posts automatically to external site
> >
> > Is the second automatic post possible? How?
>
> This faqt should help you:
>
> Using PHP, how do I send a http POST without using a form?
> ---------------------------------------------------------------
> http://www.faqts.com/knowledge_base/view.phtml/aid/12039/fid/51
>
> Regards,
> Philip
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


On Tuesday 13 May 2003 00:07, Gerhard Petrowitsch wrote:
> Thanks Philips for your reply. I think that might help.
> But I suspect, that it won't work with an https:// type
> connection? Do I just have to adapt the port number
> used in the fsockopen function to get it to run with https ?
> If so, which port number must I use?

Have a look at curl.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
One reason why George Washington
Is held in such veneration:
He never blamed his problems
On the former Administration.
                -- George O. Ludcke
*/

attached mail follows:


Hello friends.

I am trying to make an application for guestbooks but for all members who are schools.

I mean :
The schools in my town sign up as members at our website with theis school's complete profile.
Whenever they have visitors to their premises, they log into our website and enter the vistors details, when he arrived(date and time) and when he left(date and time).
The members can see only their own records and not anyone else's records.
The members should be able to query their database and find out who had visited their premises between which date/times.

I wonder if there is a ready made secure application like this available.
Can someone please help?

Thanks very much
Denis

attached mail follows:


You going to post this every 20 minutes?
Just wondering why you would ask a PHP list for an ASP application? Are there
no ASP lists where it could be more appropriate for you to ask?

In the mean time, stop posting dups to the list and do some web searching...
try google, sf.net, freshmeat.net, hotscripts....

-Brad

> Hello friends.
>
> I am trying to make an application for guestbooks but for all members
> who are schools.
>
> I mean :
> The schools in my town sign up as members at our website with theis
> school's complete profile.
> Whenever they have visitors to their premises, they log into our website
> and enter the vistors details, when he arrived(date and time) and when
> he left(date and time).
> The members can see only their own records and not anyone else's
> records.
> The members should be able to query their database and find out who had
> visited their premises between which date/times.
>
> I wonder if there is a ready made secure application like this
> available.
> Can someone please help?
>
> Thanks very much
> Denis
>

attached mail follows:


You going to post this every 20 minutes?
Just wondering why you would ask a PHP list for an ASP application? Are there
no ASP lists where it could be more appropriate for you to ask?

In the mean time, stop posting dups to the list and do some web searching...
try google, sf.net, freshmeat.net, hotscripts....

-Brad

> Hello friends.
>
> I am trying to make an application for guestbooks but for all members
> who are schools.
>
> I mean :
> The schools in my town sign up as members at our website with theis
> school's complete profile.
> Whenever they have visitors to their premises, they log into our website
> and enter the vistors details, when he arrived(date and time) and when
> he left(date and time).
> The members can see only their own records and not anyone else's
> records.
> The members should be able to query their database and find out who had
> visited their premises between which date/times.
>
> I wonder if there is a ready made secure application like this
> available.
> Can someone please help?
>
> Thanks very much
> Denis
>

attached mail follows:


Take it easy Brad. Mistakes happen.

Secondly, by ASP, I meant Application Solution Provider and not Active
Server Pages.

Maybe I can help you when you need my help. Surely, I will not scold or be
rude. Just take it easy sir.

Denis
----- Original Message -----
From: <bbonkosktampabay.rr.com>
To: "Denis L. Menezes" <menezesdsingnet.com.sg>; "PHP general list"
<php-generallists.php.net>
Sent: Monday, May 12, 2003 9:06 PM
Subject: Re: [PHP] Need an ASP guestbook application

> You going to post this every 20 minutes?
> Just wondering why you would ask a PHP list for an ASP application? Are
there
> no ASP lists where it could be more appropriate for you to ask?
>
> In the mean time, stop posting dups to the list and do some web
searching...
> try google, sf.net, freshmeat.net, hotscripts....
>
> -Brad
>
> > Hello friends.
> >
> > I am trying to make an application for guestbooks but for all members
> > who are schools.
> >
> > I mean :
> > The schools in my town sign up as members at our website with theis
> > school's complete profile.
> > Whenever they have visitors to their premises, they log into our website
> > and enter the vistors details, when he arrived(date and time) and when
> > he left(date and time).
> > The members can see only their own records and not anyone else's
> > records.
> > The members should be able to query their database and find out who had
> > visited their premises between which date/times.
> >
> > I wonder if there is a ready made secure application like this
> > available.
> > Can someone please help?
> >
> > Thanks very much
> > Denis
> >
>
>
>
>

attached mail follows:


See the text at the bottom of every message on the list?! "To
unsubscribe, visit: http://www.php.net/unsub.php"

J!nXed wrote:

>HOW DO I GET OFF THIS LIST!!!
>----- Original Message -----
>From: "Leif K-Brooks" <eurleifbuyer-brokerage.com>
>To: "Slick" <the_krashhotmail.com>
>Cc: <php-generallists.php.net>; <php-installlists.php.net>;
><php-windowslists.php.net>
>Sent: Monday, May 12, 2003 1:55 PM
>Subject: [PHP-INST] Re: [PHP] bug using php, latest version and IIS version
>5.1: php does not seem to accept variables... Please help.
>
>
>
>
>>Have you ever thought of RTFMing?! Searching the archives?! This
>>question is asked at least once a day. Have a look at
>>http://www.php.net/manual/en/security.registerglobals.php.
>>
>>Slick wrote:
>>
>>
>>
>>>I have a fresh php 4.3.1 and iis 5.1 install, and I have this strange
>>>
>>>
>bug:
>
>
>>>when i load up a page, php doesnt recognise variables. This isn't the
>>>
>>>
>first
>
>
>>>time it happened and I have a friend this has hapened to also. I am sorry
>>>
>>>
>if
>
>
>>>I posted this on the wrong group, but if you can help, please do..
>>>
>>>thanks,
>>>slick
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>--
>>The above message is encrypted with double rot13 encoding. Any
>>
>>
>unauthorized attempt to decrypt it will be prosecuted to the full extent of
>the law.
>
>
>>
>>--
>>PHP Install Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>
>
>
>
>
>

--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

attached mail follows:


Basicly its a simple to check to see if chars a-z,A-Z,0-9 and _ are added,
why does this tell me both strings display illegal chars? :\

<?
function validc($text) {
        if (preg_match("[a-zA-Z0-9_]",$text)) { return 1; }
        else { return 0; }
}

$str = "moo-";
if (!validc($str)) { echo("ERROR - $str contains illegal chars<br>"); }

$str2 = "moo";
if (!validc($str2)) { echo("ERROR - $str2 contains illegal chars"); }
?>

Thanks for the help in advanced :-)

attached mail follows:


On Mon, 12 May 2003 13:25:23 EDT, Clivus2k1aol.com wrote:

><?
>function validc($text) {
> if (preg_match("[a-zA-Z0-9_]",$text)) { return 1; }
> else { return 0; }
>}

Try this (no, I haven't checked to see if it works)....

        if (preg_match("/[a-zA-Z0-9_]/",$text)) { return 1; }

attached mail follows:


http://www.php.net/preg_match

preg_match("/[regex]/",$str)

On Mon, 2003-05-12 at 12:25, Clivus2k1aol.com wrote:
> Basicly its a simple to check to see if chars a-z,A-Z,0-9 and _ are added,
> why does this tell me both strings display illegal chars? :\
>
> <?
> function validc($text) {
> if (preg_match("[a-zA-Z0-9_]",$text)) { return 1; }
> else { return 0; }
> }
>
> $str = "moo-";
> if (!validc($str)) { echo("ERROR - $str contains illegal chars<br>"); }
>
> $str2 = "moo";
> if (!validc($str2)) { echo("ERROR - $str2 contains illegal chars"); }
> ?>
>
> Thanks for the help in advanced :-)
--
Michael Geier <mgeiercdmsports.com>

attached mail follows:


The answer is to read the manual on preg, since it is basically perl regex
you need to use "/[a-zA-Z0-9_]/".
Note the forward slashes.

<Clivus2k1aol.com> wrote in message news:c6.1cc636e8.2bf13303aol.com...
> Basicly its a simple to check to see if chars a-z,A-Z,0-9 and _ are added,
> why does this tell me both strings display illegal chars? :\
>
> <?
> function validc($text) {
> if (preg_match("[a-zA-Z0-9_]",$text)) { return 1; }
> else { return 0; }
> }
>
> $str = "moo-";
> if (!validc($str)) { echo("ERROR - $str contains illegal chars<br>"); }
>
> $str2 = "moo";
> if (!validc($str2)) { echo("ERROR - $str2 contains illegal chars"); }
> ?>
>
> Thanks for the help in advanced :-)
>

attached mail follows:


On Mon, 12 May 2003 13:25:23 EDT, Clivus2k1aol.com wrote:

> if (preg_match("[a-zA-Z0-9_]",$text)) { return 1; }

I was close.....

        if (preg_match("/^[a-zA-Z0-9_]+$/",$text)) { return 1; }

the / starts and ends Perl Regular Expressions,
the ^ says start looking at the beginning of the string,
the $ says look to the end of the string,
the + says one of more of the []'s

attached mail follows:


Hi,

Miles Thompson <milesthompsonns.sympatico.ca> writes:

> At 09:03 PM 5/11/2003 +0200, Zanzamarr wrote:
>
>> Hello everyone!
>>
>> I have a little problem I want to create a web gallery dinamically...but
>> I don't know how to do!
>>
>> I'd like to have a folder where I put the files and I read them by a
>> script.php and then I have the thumbnailed resized ...
>> what should I do?

> There are a couple of pretty good galleris out there now - you may want to
> check HotScripts first.

For example, you can try PhpWebGallery http://www.phpwebgallery.net See
the demo on http://demo.phpwebgallery.net

bye

--
Pierrick LE GALL | http://www.z0rglub.com
<pierrickz0rglub.com> | http://www.phpwebgallery.net

attached mail follows:


Have this table

+------------+---------------------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default |
Extra |
+------------+---------------------+------+-----+------------+----------------+
| id | tinyint(3) unsigned | | PRI | NULL |
auto_increment |
| month | date | | | 0000-00-00
| |
| company | varchar(30) | | | 0
| |
| title | varchar(75) | YES | | 0
| |
| actor_name | varchar(20) | YES | | NULL
| |
| actor_role | varchar(75) | YES | | NULL
| |
+------------+---------------------+------+-----+------------+----------------+

using this query:

LOAD DATA LOCAL INFILE "data.txt" INTO TABLE table
(month,company,title,actor_name,actor_role);

data.txt looks like:

2002-02-01;Coastal;Prospecting;Zoe Whitaker;Corporate Representative
2002-02-01;Commercial;Barton Ford;Dave Hobbs;Car Salesman
2002-02-01;Commercial;Barton Ford;Jackie Jackson;Customer's Wife
2002-02-01;Metro Video;"Right Spirit Campaign (Binge Drinking PSA), -
Richmond, VA";Amie Hill;Spokesperson
2002-02-01;Metro Video;"Right Spirit Campaign (Binge Drinking PSA), -
Richmond, VA";Tom Downs;Jim (Sailor)/Principal
2002-02-01;Metro Video;Colonial Williamsburg;Molly Larkin;Mother/Wife

etc...

I end up with a bunch of rows like this and teh data does not get
imported:

0000-00-00;;;;

Tried via MySQL front, phpmyadmin and directly via mysql al with same
results.

attached mail follows:


LOAD DATA LOCAL INFILE 'F:/Program Files/MySQL-Front/import.csv' INTO TABLE
celebleague.leagues FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n' (id,name,comment)

Your file syntax is not normal, you need to adjust it use the field
seperators etc.

"Brian V Bonini" <b-boninicox.net> wrote in message
news:1052758522.24967.19.camelgfxdesign...
> Have this table
>
>
+------------+---------------------+------+-----+------------+--------------
--+
> | Field | Type | Null | Key | Default |
> Extra |
>
+------------+---------------------+------+-----+------------+--------------
--+
> | id | tinyint(3) unsigned | | PRI | NULL |
> auto_increment |
> | month | date | | | 0000-00-00
> | |
> | company | varchar(30) | | | 0
> | |
> | title | varchar(75) | YES | | 0
> | |
> | actor_name | varchar(20) | YES | | NULL
> | |
> | actor_role | varchar(75) | YES | | NULL
> | |
>
+------------+---------------------+------+-----+------------+--------------
--+
>
> using this query:
>
> LOAD DATA LOCAL INFILE "data.txt" INTO TABLE table
> (month,company,title,actor_name,actor_role);
>
>
> data.txt looks like:
>
> 2002-02-01;Coastal;Prospecting;Zoe Whitaker;Corporate Representative
> 2002-02-01;Commercial;Barton Ford;Dave Hobbs;Car Salesman
> 2002-02-01;Commercial;Barton Ford;Jackie Jackson;Customer's Wife
> 2002-02-01;Metro Video;"Right Spirit Campaign (Binge Drinking PSA), -
> Richmond, VA";Amie Hill;Spokesperson
> 2002-02-01;Metro Video;"Right Spirit Campaign (Binge Drinking PSA), -
> Richmond, VA";Tom Downs;Jim (Sailor)/Principal
> 2002-02-01;Metro Video;Colonial Williamsburg;Molly Larkin;Mother/Wife
>
> etc...
>
> I end up with a bunch of rows like this and teh data does not get
> imported:
>