php-general Digest 4 Jan 2003 18:21:57 -0000 Issue 1803

Topics (messages 130209 through 130241):

Re: true ip tracking
        130209 by: electroteque
        130212 by: Jason Wong

Re: Still executing afte die()?
        130210 by: Jason Wong
        130213 by: Leif K-Brooks

Re: exec() not exec-ing?
        130211 by: Jason Wong
        130215 by: gilrain
        130217 by: Jason Wong
        130220 by: gilrain
        130221 by: gilrain
        130240 by: gilrain

Avoiding Repeat Posts
        130214 by: OrangeHairedBoy
        130218 by: Justin French
        130219 by: OrangeHairedBoy
        130223 by: Tularis
        130225 by: Michael J. Pawlowsky
        130233 by: Charles likes PHP
        130237 by: Gyozo Papp

Re: Hello and help
        130216 by: OrangeHairedBoy

PHP and MySQL bug
        130222 by: Nuno Lopes
        130226 by: Michael J. Pawlowsky
        130239 by: OrangeHairedBoy
        130241 by: Michael J. Pawlowsky

Re: Javascript broken!
        130224 by: Sean Burlington

how to determine if the output has been flushed normally...
        130227 by: Gyozo Papp
        130229 by: Gyozo Papp

PHP vs. ASP
        130228 by: Anthony Rodriguez
        130234 by: Leon Mergen

REPOST: installation problems (php 4.2.3/mcrypt/curl)
        130230 by: Michael Geier
        130238 by: Michael J. Pawlowsky

help with preg_match
        130231 by: Anders Thoresson
        130235 by: Tracy Finifter Rotton

security in guest book and user forums
        130232 by: Anders Thoresson

upgrading WAMP environment
        130236 by: Anders Thoresson

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 ---
its a bit tedious to make anonymous visotors register on the site to vote a
poll , so there is no other workaround then ?
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Saturday 04 January 2003 12:38, electroteque wrote:
> > hi i was wondering if there was a way to get the clients ip's behind
> > proxies that hide the HTTP_X_FORWARDED_FOR header ?
>
> No.
>
> > this is most important
> > for checking ips for polls except some proxies dont send this important
> > header ??
>
> It's not that important. In many cases it could very well be a private IP
> address and hence of dubious value.
>
> If the accuracy of the poll is important then only let registered and
logged
> in users take part in the poll. Even then, depending on your registration
> procedures, you may have people registering multiple times to cast
multiple
> votes.
>
> In short there is no surefire way of preventing people from voting more
than
> once.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> "From there to here, from here to there, funny things are everywhere."
> -- Dr. Seuss
> */
>


--- End Message ---
--- Begin Message ---
On Saturday 04 January 2003 14:32, electroteque wrote:
> its a bit tedious to make anonymous visotors register on the site to vote a
> poll , so there is no other workaround then ?

No. You could make them people pay a substantial sum of money for each vote 
they place -- that'll make them think twice before putting in multiple votes 
:)

But seriously, look in the archives the hows and whys have been covered quite 
comprehensively in the past.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
VMS is like a nightmare about RXS-11M.
*/

--- End Message ---
--- Begin Message ---
On Saturday 04 January 2003 13:44, Leif K-Brooks wrote:

As I understand it, your situation is this:

a) all your pages are named in lowercase

b) if someone tries to access a non-existent page on your site (eg using a URI 
which is not fully lowercase) they'll hit your 404.php

> But I only want it to insert if the page was all lowercase when they
> went to it. 

But if the page was all lowercase they wouldn't be hitting your 404.php page 
in the first place? Or am I missing something?

> I understand it continuing after redirecting, but why after
> die()ing too?  Putting the insert code into an else statment solved the
> problem, but it's ugly, and the question still remains... why does it do
> this?

It cannot continue after a die(), unless there's a bug in PHP. If you still 
think that it does then post your full code and the circumstances under which 
it happens.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
My nose feels like a bad Ronald Reagan movie ...
*/

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


As I understand it, your situation is this:

a) all your pages are named in lowercase

b) if someone tries to access a non-existent page on your site (eg using a URI which is not fully lowercase) they'll hit your 404.php

Correct.

But if the page was all lowercase they wouldn't be hitting your 404.php page in the first place? Or am I missing something?

They can still go to nonexistantpage.php.
It cannot continue after a die(), unless there's a bug in PHP. If you still think that it does then post your full code and the circumstances under which it happens.

Hmm, odd. When I try to duplicate it, I can't. Either this bug doesn't always happen, or I made a really dumb mistake, or something...

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


--- End Message ---
--- Begin Message ---
On Saturday 04 January 2003 14:20, gilrain wrote:

>    // Close file, call script in background, return.
>    fclose($mailing);
>    exec("python ncMailer.py >/dev/null &");
>    return true;
> }
>
> The mailing file is written fine, and the Python script parses the file and
> e-mails fine, as long as I run it myself from the shell. However, the
> exec() call appears to do nothing at all, least of all run my script. I've
> tried a number of different things, but nothing seems to work.

Try specifying the full path to the python binary and possibly the full path 
to ncMailer.py as well.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
The profession of book writing makes horse racing seem like a solid,
stable business.
                -- John Steinbeck
        [Horse racing *is* a stable business ...]
*/

--- End Message ---
--- Begin Message ---
"Jason Wong" wrote...
>
> Try specifying the full path to the python binary and possibly the full
path
> to ncMailer.py as well.
>

Good suggestion! I switched everything over to absolute paths, as I should
have done in the first place. Unfortunately, this didn't solve the problem.

Still searching,

gilrain


--- End Message ---
--- Begin Message ---
On Saturday 04 January 2003 16:29, gilrain wrote:

> > Try specifying the full path to the python binary and possibly the full
>
> path
>
> > to ncMailer.py as well.
>
> Good suggestion! I switched everything over to absolute paths, as I should
> have done in the first place. Unfortunately, this didn't solve the problem.

Does the webserver have permission to:

  (a) execute the python binary
  (b) access and read ncMailer.py


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
A man's house is his hassle.
*/

--- End Message ---
--- Begin Message ---
"Jason Wong" wrote:
>
> Does the webserver have permission to:
>
>   (a) execute the python binary
>   (b) access and read ncMailer.py
>
>

Thanks for all the help! I really appreciate it. :)

Hm, I'm actually not sure if my host allows that. This could definitely be
the problem. Is there a simple way to find out, other than asking? For now,
my guess is I can only execute the file from my cgi-bin directory.

Okay, we're a step closer to victory. I can run the script, via a web
browser, through my cgi-bin. Unfortunately, this kind of defeats to purpose!
This is no better than my original PHP script, since it too will hang the
browser on long operations. I'm back to square one, if I can't run that
script without the browser waiting on it to finish...

Any ideas, given this new situation?

gilrain


--- End Message ---
--- Begin Message ---
> I'm back to square one, if I can't run that
> script without the browser waiting on it to finish...

For instance, is there a way for my PHP script to log into my shell account
and *then* send the command? Since I can execute the script, but PHP can't,
this would solve the problem -- if it's possible.

gilrain


--- End Message ---
--- Begin Message ---
Just in case any of you are still watching this thread, I thought I should
post the exciting conclusion!

Not too exciting, actually. In the end, I've simply added my Python script
to crontab. It runs every 20 minutes, and if the mailing file has changed,
it sends out the e-mails.

Pretty simple, and actually what I was first advised. Pity I thought I could
find a better way. ;)

Thanks to everyone who helped me out! I learned a lot, so it was worth my
screw-ups.

gilrain


--- End Message ---
--- Begin Message ---
Hi all,

It seems that there might be some basic solution on this that I never
received a memo on...

Basically, I'm looking for a way to avoid repeat posts. If someone, for
example, adds something to a bulletin board, clicks submit, and then presses
F5, they're just 1 click away from re-submitting the form and posting the
same information for a second time. Is there an easy way to avoid this?

I've thought about using a "unique visit id" or something which gets
triggered when a visitor posts, but that seems like a lot to do...

Also, do you think I should look into redirecting the user once they've
posted so they can't go back?

I just don't know where to begin...any input is greatly appreciated.

Thanks!

Lewis



--- End Message ---
--- Begin Message ---
on 04/01/03 7:26 PM, OrangeHairedBoy ([EMAIL PROTECTED]) wrote:

> Hi all,
> 
> It seems that there might be some basic solution on this that I never
> received a memo on...

it's been mentioned MANY times on the list in the last week :)
 
> Basically, I'm looking for a way to avoid repeat posts. If someone, for
> example, adds something to a bulletin board, clicks submit, and then presses
> F5, they're just 1 click away from re-submitting the form and posting the
> same information for a second time. Is there an easy way to avoid this?

when "generating" the form, include a hidden field which has a unique,
random value.

then the script that recieves/validated the post should check that the value
doesn't already exist in the database before inserting... the only way
someone can double-post is by actually refreshing the form (thus getting a
new hidden field.

 
> I've thought about using a "unique visit id" or something which gets
> triggered when a visitor posts, but that seems like a lot to do...
> 
> Also, do you think I should look into redirecting the user once they've
> posted so they can't go back?

they can still go "back" after a redirect... it's just pages in the browser
cache...


Justin French

--- End Message ---
--- Begin Message ---
I did searches on this one...I'm using NNTP so it's nice...unfortunatly, no
one had quite the same problem.

I had thought about the random value already (see paragraph about unique
visit id), but it just seems like so much to keep track of...

After asking on other board on the same topic, one theme seems to be the
same...just use redirects.

If anyone else is having the same issue, you can do a redirect using the PHP
header() function to send the user directly to the next page. If the user
goes back, they will get a new version of the form, and less browsers will
support resubmitting.

Also, on the same note, if anyone is using buttons as links, make sure you
are using an <input type=hidden onclick="window.location='http://whatever'">
command instead of submitting a form with no fields. This will solve the
problem here.

Lewis


"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> on 04/01/03 7:26 PM, OrangeHairedBoy ([EMAIL PROTECTED]) wrote:
>
> > Hi all,
> >
> > It seems that there might be some basic solution on this that I never
> > received a memo on...
>
> it's been mentioned MANY times on the list in the last week :)
>
> > Basically, I'm looking for a way to avoid repeat posts. If someone, for
> > example, adds something to a bulletin board, clicks submit, and then
presses
> > F5, they're just 1 click away from re-submitting the form and posting
the
> > same information for a second time. Is there an easy way to avoid this?
>
> when "generating" the form, include a hidden field which has a unique,
> random value.
>
> then the script that recieves/validated the post should check that the
value
> doesn't already exist in the database before inserting... the only way
> someone can double-post is by actually refreshing the form (thus getting a
> new hidden field.
>
>
> > I've thought about using a "unique visit id" or something which gets
> > triggered when a visitor posts, but that seems like a lot to do...
> >
> > Also, do you think I should look into redirecting the user once they've
> > posted so they can't go back?
>
> they can still go "back" after a redirect... it's just pages in the
browser
> cache...
>
>
> Justin French
>


--- End Message ---
--- Begin Message --- Actually, there is a different solution to this aswell. One that is used by phpBB and XMB, and maybe some others aswell.

Basicly, it's an anti-flood system. It works like this:

- You are a member and logged in

You post, and the post gets inserted into the database, and with it, also the time of posting is kept.

When you post the next thing, the script checks if there was a message posted, by that user in the last X seconds (can be set manually). If so, it will return a message saying not to repost stuff. Otherwise, it just continues...

Hope this helps,

- Tularis
XMB Lead Developer

Orangehairedboy wrote:
I did searches on this one...I'm using NNTP so it's nice...unfortunatly, no
one had quite the same problem.

I had thought about the random value already (see paragraph about unique
visit id), but it just seems like so much to keep track of...

After asking on other board on the same topic, one theme seems to be the
same...just use redirects.

If anyone else is having the same issue, you can do a redirect using the PHP
header() function to send the user directly to the next page. If the user
goes back, they will get a new version of the form, and less browsers will
support resubmitting.

Also, on the same note, if anyone is using buttons as links, make sure you
are using an <input type=hidden onclick="window.location='http://whatever'">
command instead of submitting a form with no fields. This will solve the
problem here.

Lewis


"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

on 04/01/03 7:26 PM, OrangeHairedBoy ([EMAIL PROTECTED]) wrote:


Hi all,

It seems that there might be some basic solution on this that I never
received a memo on...
it's been mentioned MANY times on the list in the last week :)


Basically, I'm looking for a way to avoid repeat posts. If someone, for
example, adds something to a bulletin board, clicks submit, and then
presses

F5, they're just 1 click away from re-submitting the form and posting
the

same information for a second time. Is there an easy way to avoid this?
when "generating" the form, include a hidden field which has a unique,
random value.

then the script that recieves/validated the post should check that the
value

doesn't already exist in the database before inserting... the only way
someone can double-post is by actually refreshing the form (thus getting a
new hidden field.



I've thought about using a "unique visit id" or something which gets
triggered when a visitor posts, but that seems like a lot to do...

Also, do you think I should look into redirecting the user once they've
posted so they can't go back?
they can still go "back" after a redirect... it's just pages in the
browser

cache...


Justin French




--- End Message ---
--- Begin Message ---
Why not create a unique constraint with the userid, day (without time) and post 
content.
Is it going in a DB?

Mike


*********** REPLY SEPARATOR  ***********

On 04/01/2003 at 3:26 AM OrangeHairedBoy wrote:

>Hi all,
>
>It seems that there might be some basic solution on this that I never
>received a memo on...
>
>Basically, I'm looking for a way to avoid repeat posts. If someone, for
>example, adds something to a bulletin board, clicks submit, and then
>presses
>F5, they're just 1 click away from re-submitting the form and posting the
>same information for a second time. Is there an easy way to avoid this?
>
>I've thought about using a "unique visit id" or something which gets
>triggered when a visitor posts, but that seems like a lot to do...
>
>Also, do you think I should look into redirecting the user once they've
>posted so they can't go back?
>
>I just don't know where to begin...any input is greatly appreciated.
>
>Thanks!
>
>Lewis
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
How about saving a timestamp when the user posts a message and when he posts
another message check whether the user already posted a message in the past,
let's say, minute. I saw this used in a lot of forums...


--- End Message ---
--- Begin Message ---
Michael J. Pawlowsky wrote:
Why not create a unique constraint with the userid, day (without time) and post content.
Is it going in a DB?

Index on text columns does not seem very efficient, IMHO.
If he wants to avoid multiple inserts, the random unique ID is enough.

--- End Message ---
--- Begin Message ---
Or to make it easy, here's the line you need:

$info = mysql_fetch_array( $result );

Put that line right after the query. So, here's sample:

$Link=mysql_pconnect($Host, $User, $Password);
$db=mysql_select_db($DBname, $Link);
$query=mysql_query("SELECT * from calendar", $Link);

$result = mysql_fetch_array( $query );
print $result[meeting];

You can also use Objects:

$result = mysql_fetch_object( $query );
print $result->meeting;

If you're getting more than one line, you need to fetch each row. For
example:

$query = mysql_query( "select * from capitals" );
while ( $a_row = mysql_fetch_array( $query ) )
    {
    print "$a_row[capital] is the capital of $a_row[country]<br>\n";
    }

Hope this helps!

Lewis

"Todd Barr" <[EMAIL PROTECTED]> wrote in message
00df01c2b388$b6e48930$6e20280a@ff">news:00df01c2b388$b6e48930$6e20280a@ff...
I am a PHP newbie, and I am having difficulty in getting my records to
display

here is my code

<?php
$Host="localhost";
$User="us34992a";
$Password="*****";
$DBname="db34992a";
$Tablename="calendar";
$Link=mysql_pconnect($Host, $User, $Password)
or die ("YOu suck1");
$db=mysql_select_db($DBname, $Link)
or die ("ISUCKEGGS");
$result=mysql_query("SELECT * from calendar", $Link)
or die ("YOu suck3");
print("<table width="53%" border="0" cellpadding="0" cellspacing="0">\n");
print ("<tr>\n");
print ("<td background="topbig.gif">\n");
print ("<div align="center"><font face="Arial, Helvetica,
sans-serif"><b><font color="#FFFFFF">Calender</font></b></font></div>
                  </td>
                </tr>\n");
print ("<tr bgcolor="#009ACE">\n");
print("<td>$result[meeting_name]</td>\n")or die ("you suck");
mysql_close ($Link);
?>

any help?



--- End Message ---
--- Begin Message ---
Dear Sirs,

I'm using PHP and MySQL to make my programs. But I think I discovered a bug
in PHP or in MySQL (I don't know!).

In one of my files I have the following:

MYSQL_CONNECT("localhost", "**user**", "**pass**");
mysql_select_db("be");
$r=MYSQL_QUERY("SELECT n,u,m,h FROM d WHERE id='$id'");

/* Some code including "mysql_num_rows" and "mysql_fetch_array($r,
MYSQL_NUM)"
And the another query:
*/

MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");

/* i don't know why but this doesn't work! But if I close the connection and
open another te query is done:*/

MYSQL_CLOSE();
MYSQL_CONNECT("localhost", "**user**", "**pass**");
mysql_select_db("be");
MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");

---------------
I don't know why is this? Because I'm used to do more than a query per
connection and this never happened!
I'm using Win 2k, Apache 2.0.43, MySQL 3.23.49-nt and PHP 4.3.


I hope you solve this,
Nuno Lopes


--- End Message ---
--- Begin Message ---
I cant give you a solution, and I''m running on Linux.
But I have pages were I do 6-7 queries on one page always using the same connection.
Never had a problem with that.

Mike


*********** REPLY SEPARATOR  ***********
>I'm using PHP and MySQL to make my programs. But I think I discovered a bug
>in PHP or in MySQL (I don't know!).
>
>---------------
>I don't know why is this? Because I'm used to do more than a query per
>connection and this never happened!
>I'm using Win 2k, Apache 2.0.43, MySQL 3.23.49-nt and PHP 4.3.
>


--- End Message ---
--- Begin Message ---
You really should be using a $link variable...it's good habit:

$link = mysql_connect(...);
mysql_select_db( "mydb" , $link);
$query = mysql_query( "select..." , $link );
$result = mysql_fetch_array($query);

Lewis

"Nuno Lopes" <[EMAIL PROTECTED]> wrote in message
003a01c2b3de$95004650$0100a8c0@pc07653">news:003a01c2b3de$95004650$0100a8c0@pc07653...
> Dear Sirs,
>
> I'm using PHP and MySQL to make my programs. But I think I discovered a
bug
> in PHP or in MySQL (I don't know!).
>
> In one of my files I have the following:
>
> MYSQL_CONNECT("localhost", "**user**", "**pass**");
> mysql_select_db("be");
> $r=MYSQL_QUERY("SELECT n,u,m,h FROM d WHERE id='$id'");
>
> /* Some code including "mysql_num_rows" and "mysql_fetch_array($r,
> MYSQL_NUM)"
> And the another query:
> */
>
> MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");
>
> /* i don't know why but this doesn't work! But if I close the connection
and
> open another te query is done:*/
>
> MYSQL_CLOSE();
> MYSQL_CONNECT("localhost", "**user**", "**pass**");
> mysql_select_db("be");
> MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");
>
> ---------------
> I don't know why is this? Because I'm used to do more than a query per
> connection and this never happened!
> I'm using Win 2k, Apache 2.0.43, MySQL 3.23.49-nt and PHP 4.3.
>
>
> I hope you solve this,
> Nuno Lopes
>
>


--- End Message ---
--- Begin Message ---
Personally I say get yourself a good simple dbconnect class and make life easy.
Also if you ever change users, database name etc, you onlu have one place to replace 
it in your code.

I wrote mine based on http://www.vtwebwizard.com/tutorials/mysql/

Take a look at it.  Nice and simple.


Mike



*********** REPLY SEPARATOR  ***********

On 04/01/2003 at 1:09 PM OrangeHairedBoy wrote:

>You really should be using a $link variable...it's good habit:
>
>$link = mysql_connect(...);
>mysql_select_db( "mydb" , $link);
>$query = mysql_query( "select..." , $link );
>$result = mysql_fetch_array($query);



--- End Message ---
--- Begin Message ---
Adam Wilson wrote:
I am beginning a tidy-up of a very messy site i am now managing. I have
started splitting repeated sections into single header and footer files, for
inclusion via php. Unfortunately the javascript no longer works, i.e.
rollovers etc.

Can someone please help me on this? Is this a known problem?

it's a fairly standard thing to do

most likely editing the files has introduced errors.


--

Sean

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

I'm dealing with the following issue:

how to determine whether the current page request has been responded normally, eg. output has been sent to the browser as regular, or just a redirection header sent to it header('Location: '); ?

Some words about the background:

This functinality would be implemented in my error handler class which does not depend on any application framework, or programming style, or whatsoever. And it must be used within a callback function by nature of error-handling.

So I'm seeking for a native PHP solution (mostly a function), but any suggestions are welcome.

--
gerzson

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

I'm dealing with the following issue:

how to determine whether the current page request has been responded
normally, eg. output has been sent to the browser as regular, or just a
redirection header sent to it header('Location: '); ?

Some words about the background:

This functinality would be implemented in my error handler class which
does not depend on any application framework, or programming style, or
whatsoever. And it must be used within a callback function by nature of
error-handling.

So I'm seeking for a native PHP solution (mostly a function), but any
suggestions are welcome.

--
gerzson



--- End Message ---
--- Begin Message ---
Hi!
How does PHP differs from ASP?

Are there any advantages in using PHP over ASP? Or the other way around?

Thanks!


--- End Message ---
--- Begin Message ---
"Anthony Rodriguez" <[EMAIL PROTECTED]> schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How does PHP differs from ASP?

search google on "php vs asp" ...


--- End Message ---
--- Begin Message ---
repost [no response]

I searched MARC first, but none of the "answers" there seemed to work.  I have 
noticed similar issues on there, but the only answers are "make sure you 
compiled with package X".

Installing:
  RH 8
  Apache 1.3.27 (--prefix --enable-module=so)
  PHP 4.2.3     (--with-apxs --enable-ftp --with-esoob --with-mcrypt
                 --with-curl --with-openssl)
  Openssl 0.9.7
  Mcrypt 2.5.3  (--disable-posix-threads)
  Curl 7.10.2   (--enable-ftp --enable-http --with-ssl)

No errors during installation.  Apache/PHP loads without error.

phpinfo shows mcrypt and curl support, yet both error out on basic functions 
(mcrypt_module_open, curl_init)(PHP Fatal Error: call to undefined function...)

mcrypt           support enabled 
version          >= 2.4.x 
Supported        ciphers twofish rijndael-128 rijndael-192 rijndael-256 
                 saferplus rc2 xtea serpent safer-sk64 safer-sk128 cast-256 
                 loki97 gost threeway cast-128 blowfish des blowfish-compat 
                 tripledes enigma arcfour panama wake  
Supported modes  ofb cfb nofb cbc ecb stream ncfb ctr  

mcrypt.algorithms_dir /usr/local/lib/libmcrypt 
mcrypt.modes_dir      /usr/local/lib/libmcrypt

CURL support     enabled 
CURL Information libcurl/7.10.2 OpenSSL/0.9.6b zlib/1.1.4 
 
Any help appreciated.

mike


-----------------------------------------------
 This email sent using CDM Sports Webmail v3.1
              [ http://webmail.cdmsports.com ]
--- End Message ---
--- Begin Message ---
Might or might not be helpful.. but I had the same thing happend when I added 
--with-jpeg-dir=/usr/lib
Everything looked fine... but I could not call imagejpeg. (PHP 4.3 - RH8 - apache2)
Once I did a make clean, ./configure -with-xxxx ... , make, make test (to see if it 
had jpg), make install
It worked. It really needed to have that make clean done first. Don't know if this 
will help you or not.

Mike


*********** REPLY SEPARATOR  ***********

On 04/01/2003 at 9:48 AM Michael Geier wrote:

>phpinfo shows mcrypt and curl support, yet both error out on basic
>functions
>(mcrypt_module_open, curl_init)(PHP Fatal Error: call to undefined
>function...)
>


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

I'm trying to write a function that validates the input in a textarea. I just want to allow alphanumrical characters, and if the user enters anything else, I display an error message by calling error().

But the following doesn't work. Even if I enter "hello" in the textarea, I get the error message. What am I missing?


// validate entered text in textarea

function validate_textarea($unchecked_text) {

if (!preg_match ("/^[a-zåäö0-9]$/is", $unchecked_text)) {
error("You have used unlegal characters, just alphanumeric is ok.");
}
}

Best regards,

Anders

--- End Message ---
--- Begin Message ---
You need to tell preg_match that there will be multiple characters.  Right
now, you're searching for one, and only one.

if (! preg_match ('/^[a-z0-9]+$/', $unchecked_text)) {


The "+" means one or more matches to the range in brackets.

-- tracy

On 1/4/03 9:03 AM, "Anders Thoresson" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I'm trying to write a function that validates the input in a textarea. I
> just want to allow alphanumrical characters, and if the user enters
> anything else, I display an error message by calling error().
> 
> But the following doesn't work. Even if I enter "hello" in the textarea,
> I get the error message. What am I missing?
> 
> 
> // validate entered text in textarea
> 
> function validate_textarea($unchecked_text) {
> 
> if (!preg_match ("/^[a-zåäö0-9]$/is", $unchecked_text)) {
> error("You have used unlegal characters, just alphanumeric is ok.");
> }
> }
> 
> Best regards,
> 
>  Anders
> 

-- 
Tracy F. Rotton
[EMAIL PROTECTED]
http://www.taupecat.com/

          "... I like the 49ers because they're pure of heart,
          Seattle because they've got something to prove,
          and the Raiders because they always cheat."
                                     -- Lisa Simpson, "Lisa the Greek"

--- End Message ---
--- Begin Message --- I've seen both guest books and user forums "hacked" by users who enter javascript or other code, and that way redirects vistors to other sites or do other unwelcome things. What expressions should I look for and not allow in my forms?

Best regards,

Anders

--- End Message ---
--- Begin Message --- I've been using Apache, MySQL and PHP under Win2k for a while to learn PHP. At the moment, I'm running PHP 4.2.2, MySQL 3.23.39 and Apache 2.0.40.

During the holidays, I've read about a security hole in MySQL and therefore plans to upgrade to 3.23.54a. At the same time, I want to install PHP 4.3.0 and Apache 2.0.43.

But when I started to look for upgrading instructions for each software package, I find nothing.

Therefore, I would like to know how to perform an upgrade of each package?

Should the MySQL and Apache deamons be stopped first?

Should I install into my current directories?

Will my config files be overwritten?

Does it matter which of the three I upgrade first?

What more should I keep in mind?

If questions like these are considered off topic, please let me know.

Best regards,

Anders

--- End Message ---

Reply via email to