[PHP] Re: file not opening in internet explorer

2003-02-18 Thread John Taylor-Johnston
I had a similar problem Perling once. The server sometimes has default CHMOD settings. 
I suspect the default is "rw--". You may have to CHMOD your file in your script 
yourself to overcome this.

>the file permissions are "rw-r-r"

Are you sure :) Use your command line and check the CHMOD.

I cannot reach http://192.168.0.1/bdoi_change/sundar.html myself. My money is on: 
"rw--"

Diksha Neel wrote:

> hi all,
>
> $fp = fopen("\bdoi_change\sundar.html", "w");
>
> i am able to write to this file through my php page
> filecheck.php and even am able to read the written contents.
>
> but when i enter http://192.168.0.1/bdoi_change/sundar.html
> in my internet explorer address bar, it says the page cannot
> be displayed.
> the file permissions are "rw-r-r"
>
> thanks in advance,
>
> regards,
> diksha.

--
John Taylor-Johnston
-
"If it's not open-source, it's Murphy's Law."

  ' ' '   Collège de Sherbrooke:
 ô¿ô   http://www.collegesherbrooke.qc.ca/languesmodernes/
   - Université de Sherbrooke:
  http://compcanlit.ca/
  819-569-2064



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




Re: [PHP] Good grief

2003-02-18 Thread John Taylor-Johnston
Rasmus,

If I were going to remanufacture http://www.php.net/manual/en/function.explode.php I 
would add/edit:

$data = "foo:*:1023:1000::/home/foo:/bin/sh";
list($user,$pass,$uid,$gid,$gecos,$home,$shell) = explode(":",$data);

echo $user."".$pass."".$uid."".$gecos."".$home."".$shell;

Thanks again.

HTH?
John


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




Re: [PHP] Good grief

2003-02-18 Thread John Taylor-Johnston
Rasmus,

>You probably want just $db and $table

Yes I do. I need to learn a little more about declaring arrays & its syntax.

I figured I was declaring an array called "list". Then ... :) Copied & tinkered from:

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

Thanks!
John

--
John Taylor-Johnston
-
"If it's not open-source, it's Murphy's Law."

Université de Sherbrooke:
http://compcanlit.ca/


> What is $list supposed to be?  You probably want just $db and $table
> there.
>


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




[PHP] file not opening in internet explorer

2003-02-18 Thread DIKSHA NEEL
hi all,


$fp = fopen("\bdoi_change\sundar.html", "w");

i am able to write to this file through my php page
filecheck.php and even am able to read the written contents.

but when i enter http://192.168.0.1/bdoi_change/sundar.html
in my internet explorer address bar, it says the page cannot
be displayed.
the file permissions are "rw-r-r"

thanks in advance,

regards,
diksha.






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




Re: [PHP] php.ini for UNIX sendmail????

2003-02-18 Thread Robin Mordasiewicz
Is there any way to specify to use a remote smtp server in the php.ini

On Tue, 18 Feb 2003, Scott Fletcher wrote:

> Well, okay, even with the '\r\n' path, I still have problem.   Here's the new script 
>and I retested it.
>
> --clip--
> $message = "This is a test";
>
> mail("[EMAIL PROTECTED]", "the subject", $message,
> "From: webmaster@$SERVER_NAME\r\n"
> ."Return-Path: [EMAIL PROTECTED]\r\n"
> ."Reply-To: webmaster@$SERVER_NAME\r\n"
> ."X-Mailer: PHP/".phpversion()."\r\n");
> --clip--
>
> So far, I never got the email at yahoo and I never got the email at abcoa.com.
>   "Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>   Well your missing your \r\n at the end of your return path.
>
>   On Tue, 2003-02-18 at 10:57, Scott Fletcher wrote:
> Here's the command...
>
> --clip--
> mail("[EMAIL PROTECTED]", "the subject", $message,
> "From: webmaster@$SERVER_NAME\r\n"
> ."Return-Path: [EMAIL PROTECTED]"
> ."Reply-To: webmaster@$SERVER_NAME\r\n"
> ."X-Mailer: PHP/" . phpversion());
> --clip--
>
> The bad thing is that when I send the mail. I never get an email back when 
>something is not working right by using the return-path.
>
>
> "Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Oh, ok, well how about your PHP code then (the actual mail() line)?
>
> On Tue, 2003-02-18 at 10:34, Scott Fletcher wrote:
> Here's is the response to the command, 'where sendmail'.
> >>bash: where: command not found
>
> So, I don't have a where command but I did the phpinfo() and it showed .
>
> --clip--
> Directive || Local Value || master value
> 
>
> sendmail_from || no value || no value
> sendmail_path || /usr/sbin/sendmail -t -i || /usr/sbin/sendmail -t -i
> --clip--
>
> I don't have email problem when I send email to anywhere, the only problem is 
>the yahoo itself...
>
> Thanks...
> "Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Umm, are you asking for Sendmail's path?
> It's usually /usr/bin/sendmail -t -i but you can verify where it is
> on your system by typing "where sendmail".
>
> On Tue, 2003-02-18 at 10:25, Scott Fletcher wrote:
> Hi!
>
> What is the appropriate filepath with the flag command for the sendmail on
> the UNIX machine?? I send an email to yahoo and got the error message which
> I'm going to paste it here...
>
> --clip--
> - The following addresses had permanent fatal errors -
> [EMAIL PROTECTED]
>
> --- The transcript of the session follows ---
> ... while talking to mx2.mail.yahoo.com.:
> >>> MAIL From: SIZE=40
> <<< 501 Syntax error in parameters or arguments
> 501 [EMAIL PROTECTED] Data format error
> --clip--
>
> One thing I know for sure is that the sendmail is working and that hte
> PHP code is working. I don't think I did the bad php command. Could it be
> the sendmail command be set wrong???
>
> Thanks,
> FletchSOD
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> Adam Voigt ([EMAIL PROTECTED])
> The Cryptocomm Group
> My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
> --
> Adam Voigt ([EMAIL PROTECTED])
> The Cryptocomm Group
> My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
>

-- 
Robin Mordasiewicz
416-207-7012
UNIX System Developer
Primus Canada


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




Re: [PHP] Good grief

2003-02-18 Thread Rasmus Lerdorf
What is $list supposed to be?  You probably want just $db and $table
there.

-Rasmus

On Wed, 19 Feb 2003, John Taylor-Johnston wrote:

> Yawn of frustration.
>
> $dbtable = "ccl.ccl_main";
>
> list($db,$table) = explode(".",$dbtable);
> echo $dbtable.''.$list[$db].''.$list[$table].'';
> echo $dbtable."".$list[$db]."".$list[$table]."";
>
> I stumped :)
>
> $list[$db]shows nothing
> $list[$table]  shows nothing
>
> Ok, newbie time :( What's wrong?
>
>
> --
> 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




RE: [PHP] PHP fileperms

2003-02-18 Thread Kelly Protsko
Here is how the numbers work for file permissions.

644 = "rw-r--r--"

0 --- no access 
1 --x execute 
2 -w- write 
3 -wx write and execute 
4 r-- read 
5 r-x read and execute 
6 rw- read and write 
7 rwx read write execute

-Original Message-
From: DIKSHA NEEL [mailto:[EMAIL PROTECTED]] 
Sent: February 18, 2003 11:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP fileperms

HI ALL,

i am getting the result as 644 when i execute the following
command.
can anyone please tell me what file permission does 644
stand for and what should i do to make my file readable?

$filename = '\bdoi_change\sundar.html';

printf("%o",(fileperms("\bdoi_change\andar.html") & 0777));


regards,
diksha.


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




[PHP] Good grief

2003-02-18 Thread John Taylor-Johnston
Yawn of frustration.

$dbtable = "ccl.ccl_main";

list($db,$table) = explode(".",$dbtable);
echo $dbtable.''.$list[$db].''.$list[$table].'';
echo $dbtable."".$list[$db]."".$list[$table]."";

I stumped :)

$list[$db]shows nothing
$list[$table]  shows nothing

Ok, newbie time :( What's wrong?


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




[PHP] PHP fileperms

2003-02-18 Thread DIKSHA NEEL
HI ALL,

i am getting the result as 644 when i execute the following
command.
can anyone please tell me what file permission does 644
stand for and what should i do to make my file readable?

$filename = '\bdoi_change\sundar.html';

printf("%o",(fileperms("\bdoi_change\andar.html") & 0777));


regards,
diksha.


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




[PHP] Using the GD library

2003-02-18 Thread Øystein Håland
I can create images of words but I want the characters to be outlined, and I
want to have the first character in a different font. How can this be done?



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




Re: [PHP] internal site search

2003-02-18 Thread olinux
Option 2b. - there are several great open source site
indexers available. 

I really like htdig http://www.htdig.org. 
mnogosearch http://www.mnogosearch.org is another
often mentioned.

Search Tools for Web Sites and Intranets
http://www.searchtools.com

Open Source Search Engines
http://www.searchtools.com/tools/tools-opensource.html

olinux


--- David Otton <[EMAIL PROTECTED]>
wrote:
> On Tue, 18 Feb 2003 13:35:14 +, you wrote:
> 
> > i wanna make an internal site search, i wanna
> search my internal html 
> >pages and php pages..and i have no clue how to do
> thatany help!!!
> 
> Choices
> 
> 1. Embed a Google search that only searches within
> your site. Eg
> 
>
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=search+engines+site%3Ayahoo.com
> 
> 2. Buy an off-the-shelf product that will spider
> your site locally and
> create an index
> 
> 3. Do your own plain-text search against your
> database (eg
> http://www.mysql.com/doc/en/Fulltext_Search.html) If
> you have
> significant content outside the database, you'll
> have to search the
> HTML, too.
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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




Re: [PHP] Help with authentication 'design'

2003-02-18 Thread olinux
You may want to check out PEAR::LiveUser
http://pear.php.net/package-info.php?pacid=126
http://projects.21st-hq.de/liveuser/

A very complete / multilevel authentication package.
Get the latest source from CVS as the source on pear
site is a bit outdated.

olinux


--- "Clarkson, Nick" <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> I've searched the archives, bit it's not helping me
> much purely because it's
> not specific PHP code I'm after, but rather help
> with a login system design.
> So far I've got a PHP_AUTH based login which checks
> against a MySQL
> database, and if the user's details are correct it
> updates the database with
> their IP and login time, then creates sessions
> variables for their username
> and security level (for admins, mods etc). However,
> the more I read, the
> more I worry about security, so I want to try and
> get this as good as I can
> possibly get it with security my main concern. What
> I hope to achieve is
> some reusable code. All the tutorials and sample
> code I look at say don't
> use this in a production environment because it's
> not secure. When I'm happy
> with what I've got I'll make the code available,
> hopefully this will be a
> joint effort and any credit will be given.
> So far the steps I have are;
> 
> Set $auth to false
> Are PHP_AUTH_USER and PHP_AUTH_PW set ?
>   Yes -> Connect to database
>  check user/pw exists in database
>  if they do then set $auth to true
>   
> Is $auth false ?
>   Yes -> Display login box with header(); 
> 
>   No  -> update database with ip and time
>  create sessions variables
>  forward to next page
> 
> I'm after two things; ideas for a better (more
> comprehensive) design and
> potential security holes. Are sessions a bad idea ?
> Should I store them in
> my database ? Is the initial HTTP authentication a
> bad idea (because of
> either security or browser compatability) and can I
> make the HTTP
> authentication more secure ? Should I stick with a
> regular login form ? Is
> checking for a username session variable on each
> following page enough ?
> 
> Hopefully this is relevant here. 
> 
> Thanks,
> 
> Nick
> 
> 
> 
> 
> 
> 
> 
> This private and confidential e-mail has been sent
> to you by Egg.
> The Egg group of companies includes Egg Banking plc
> (registered no. 2999842), Egg Financial Products Ltd
> (registered
> no. 3319027) and Egg Investments Ltd (registered no.
> 3403963) which
> carries out investment business on behalf of Egg and
> is regulated
> by the Financial Services Authority.  
> Registered in England and Wales. Registered offices:
> 1 Waterhouse Square,
> 138-142 Holborn, London EC1N 2NA.
> If you are not the intended recipient of this e-mail
> and have
> received it in error, please notify the sender by
> replying with
> 'received in error' as the subject and then delete
> it from your
> mailbox.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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




Re: [PHP] Wrong version displayed after upgrading to php-4.2.3

2003-02-18 Thread Rasmus Lerdorf
Did you move things around after installing Apache?  The apxs program
needs to know where these various Apache files are.  Somehow your apxs is
out of synch with where your files actually are.  Either re-install using
whatever mechanism you use or edit your apxs script and teach it about
your paths.

-Rasmus

On Tue, 18 Feb 2003, PathFinder Software wrote:

> Now I get a Config file error.
>
> apxs:Error: Config file /etc/httpd/conf/httpd.conf not found
> make[1]: *** [install-sapi] Error 1
> make[1]: Leaving directory `/var/mnt/System/php-4.2.3'
> make: *** [install-recursive] Error 1
>
> On my distribution I have the httpd.conf in the
> /var/conf/apache/users
> I use the following ./configure i include the following:
>
> CFLAGS="-g -O3" \
> ./configure \
> --with-mysql=/usr/local/mysql \
> --with-apxs=/usr/netmax/sbin/apxs \
> --with-config-file-path=/var/conf/apache/users \
> --enable-versioning \
> --enable-ftp \
> --enable-bcmath \
> --disable-debug \
> --enable-memory-limit=yes \
> --enable-track-vars
>
> As you can see I give the full path on the line:
> --with-config-file-path=/var/conf/apache/users \
>
> Why am I getting this error?
>
> Anything I can test or force?
>
> Regards,
>
> Normand J. Charette
> PathFinder Software/Affiliate Software
> [EMAIL PROTECTED]
> www.AffiliateSoftware.net
>
> -Original Message-
> From: Jason k Larson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 18, 2003 5:30 PM
> To: PathFinder Software
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Wrong version displayed after upgrading to
> php-4.2.3
>
>
> use:
> --with-mysql=/usr/lib/mysql
>
> HTH,
> Jason k Larson
>
>
> PathFinder Software wrote:
> > Hi,
> >
> > During the configure I get this error message.
> >
> > configure: error: Cannot find header files under /var/lib/mysql
> >
> > a whereis mysql produce the following output:
> > mysql: /usr/bin/mysql /usr/lib/mysql /usr/include/mysql
> > /usr/share/mysql /usr/man/man1/mysql.1 /usr/man/man1/mysql.1.gz
> >
> > I have MySQL installed where the databases are in the
> > /var/lib/mysql directories.
> >
> > Where can I locate the header files the installer is
> complaining
> > about. Is it the same directory where "mysqld" is installed?
> >
> > what should I use for the
> ./configure --with-mysql=/usr/bin/mysql
> >
> > I tried the above and it does not work. Does it make a
> difference
> > if MySQL is running or not during the PHP upgrade?
> >
> > Regards,
> >
> > Normand J. Charette
> > PathFinder Software/Affiliate Software
> > [EMAIL PROTECTED]
> > www.AffiliateSoftware.net
> >
> >
> > I upgraded PHP from 4.0.3pl1 to php-4.2.3 on my Apache/1.3.14
> > using 'apxs' and I did not received any errors during the
> > configure and make. The installation seems to have gone just
> > fine.
> >
> > However, when I load a phpinfo.php document I get the 4.0.3pl1
> > version displayed???
> >
> > What can be wrong and what test or steps do I need to perform
> to
> > correct this?
> >
> > Regards,
> >
> > Normand J. Charette
> > PathFinder Software/Affiliate Software
> > [EMAIL PROTECTED]
> > www.AffiliateSoftware.net
> >
> >
> > --
> > 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
>
>
> --
> 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




Re: [PHP] Wrong version displayed after upgrading to php-4.2.3

2003-02-18 Thread Rasmus Lerdorf
On Tue, 18 Feb 2003, Jason k Larson wrote:

> use:
> --with-mysql=/usr/lib/mysql

No, in almost all cases it is wrong to have "lib" or "include" in a --with
path.  (including this time)

-Rasmus

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




Re: [PHP] limiting characters

2003-02-18 Thread Michael P. Carel
thnks its working here

- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "Michael P. Carel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 19, 2003 8:09 AM
Subject: Re: [PHP] limiting characters


> Season to taste:
>
>  function chopper($string,$length=20, $suffix="...") {
> $words = explode(' ',$string);
> if(count($words) >= $length) {
> $i = 0;
> $new = '';
> while($i < $length) {
> $new .= $words[$i].' ';
> $i++;
> }
> if($suffix) {
> $new .= $suffix;
> }
> return trim($new);
> } else {
> return $string;
> }
> }
>
> $foo = "This is my really long string";
>
> // EXAMPLES
>
> // no change, since $foo is less than 20 chars (default)
> echo chopper($foo);
>
> // echos 'This is my ...' -- uses default suffix
> echo chopper($foo,3);
>
> // echos 'This is my [too long]'
> echo chopper($foo,3,'[too long]');
> ?>
>
>
> Justin French
>
>
>
> on 19/02/03 10:18 AM, Michael P. Carel ([EMAIL PROTECTED]) wrote:
>
> > it would be better if it will be chopped by words and not by characters.
Any
> > idea how?
> >
> > - Original Message -
> > From: "Justin French" <[EMAIL PROTECTED]>
> > To: "Michael P. Carel" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> > Sent: Wednesday, February 19, 2003 7:26 AM
> > Subject: Re: [PHP] limiting characters
> >
> >
> >> Do you want it chopped at a certain number of words, or characters?
> >>
> >> Justin French
> >>
> >>
> >>
> >> on 19/02/03 10:00 AM, Michael P. Carel ([EMAIL PROTECTED]) wrote:
> >>
> >>> Hi to all,
> >>>
> >>> How could i limit the character output that is being displayed in the
> > html
> >>> page. Is there a function or a php classes that perfectly support it?
> >>>
> >>> Example:
> >>>
> >>> $myoutput = "This is my sample output.";
> >>>
> >>> Required Output:
> >>>
> >>> This is my 
> >>>
> >>> Any idea? Thanks in advance for the replies
> >>>
> >>>
> >>>
> >>> mike
> >>>
> >>>
> >
> > ---
> > [This E-mail scanned for viruses]
> >
> >


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




[PHP] Which is the difference

2003-02-18 Thread Breno Cardoso Perucchi
I am using the first example in my config file. I would like to know the
difference between both ?



php_admin_value open_basedir "/home/test"



php_admin_value safe_mode_include_dir "/home/test"



Respectfully
Breno Cardoso Perucchi
[EMAIL PROTECTED]




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




RE: [PHP] preg_replace

2003-02-18 Thread John W. Holmes
> This should work (as far as I can tell) But yields the following
error.
> Parse error: parse error, unexpected T_CHARACTER, expecting T_STRING
or
> T_VARIABLE or T_NUM_STRING
> Any help is appreciated!
> 
> function HTMLfromNickName ( $player ) {
> //example input "^2pla^3yer"
>   $color=array(
>   "1"=>"#FF",
>   "2"=>"#00FF00",
>   "3"=>"#F0FF0F",
>   "4"=>"#FF",
>   "5"=>"#00",
>   "6"=>"#FF00FF",
>   "7"=>"#FF",
>   "8"=>"ltbrown",
>   "9"=>"#0F00F0",
>   "0"=>"#E7E7E7"
>   );
>   $pattern = "/\^(\d)/";
>   $replacement = "$color[$1]";
>   $player = preg_replace($pattern, $replacement, $player);
>   return $player;
> }

You have a $1, which is not valid unless it's inside a "replacement"
string. It's not where you have it.

Anyway, you need an 'e' modifier to make this work. Use these two lines:

  $pattern = "/\^(\d)/e";
  $replacement = '$color[$1]';

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




Re: [PHP] Sessions Timing Out Too Often

2003-02-18 Thread Justin French
Did you look in the manual first?  Didn't think so.

php.net/session
first search result is http://www.php.net/manual/en/ref.session.php

There are two PHP.ini settings you should look at:

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

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


if you can't change the settings yourself in php.ini (or ask the host to),
then i'm 99% sure they can be over-ridden on a per-directory basis using a
.htaccess file (apache assumption here).

Something like (guess):


php_flag session.gc_maxlifetime 1440



Of course, all this was available by:

a) searching the manial
b) searching the archives, where this gets asked weekly


:)


Justin French



on 19/02/03 12:59 PM, Monty ([EMAIL PROTECTED]) wrote:

> I'm finding that my sessions seem to be timing out fairly quickly. For
> example, in a little forum I wrote with PHP, people are telling me that if
> they type a long message and click Submit, they are taken to the Login page
> because their session obviously timed out, and they loose their posts in the
> forum. I do have a "remember me" feature that uses a cookie, but, not all
> visitors are using it, and they are the ones experiencing this problem.
> 
> Is there a way to extend session time, and is that the best way to reduce
> this problem from happening to most members?
> 
> Thanks!
> 
> Monty
> 


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




Re: [PHP] running code on my machine wile serving other domain?

2003-02-18 Thread Jason Sheets
It is possible but not always a good idea.

First every time they go to the application it will have to load the
code off the Internet, that depends on your site being up and it will
introduce a lot of latency into your program.

Additionally a lot of people are not happy about applications phoning
home or automatically downloading code (some people flat out will not
run code that automatically downloads other code because they can not
guarantee the security of your web host which opens them up).

Rather than trying to hide the source code from them by putting it on
your server either encode it with Zend Encoder or another encoder or
preferably get an attorney and get a good license worked out that
legally binds them.

Jason
On Tue, 2003-02-18 at 13:21, merlin wrote:
> Hi there,
> 
> I am wondering if I could anyhow run php code on my machine and pull the
> html code to another domain?
> 
> Example:
> 
> I do have a webapp where I do not want to give away the code to customers
> They want to have the same webapp, with the same database, but with their
> front end design
> 
> 
> Is something like this possible? If yes, please give me a hint where to look
> for a solution.
> 
> Thanx in advance!
> 
> 
> 
> -- 
> 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




Re: [PHP] security issues on shared servers

2003-02-18 Thread Jason Sheets
If your hosting provider has enabled safe mode then others can not
include scripts that have a different uid than the owner of the current
script, that prevents them from including your code.

As far as the files go you could checksum them or if you are honestly
concerned about them being changed store them in your database where
only you have write access, the problem with that is that for your
application to connect to your database it must know the db password, if
the other users have shell access they can read your applications source
code and connect to your db as your application.

Bottom line, safe mode makes PHP a lot safer in multi user environments
but you are always going to be exposed when you go with a multi user
environment.

Any programming language/application encounters these problems when
introduced into a large multi user environment, switching programming
languages would not alleviate these security issues.


On Tue, 2003-02-18 at 15:49, David Feldman wrote:
> I run a PHP-based Web site hosted on a shared UNIX server provided by a  
> pretty standard Web hosting company -- as I imagine do many people.  
> There are a lot of users on this server, and I know nothing about them.  
> Apache (and thus PHP) generally runs as www or nobody, so although each  
> user on this shared server has a separate account, all PHP scripts run  
> as the same user. As such, I have a few security concerns:
> 
> 1. I restrict access to certain portions of my site, either with  
> ..htaccess/.htpasswd files or with a PHP equivalent. This works fine for  
> anyone using a Web browser, but it leaves a security hole: One can  
> write a PHP script that circumvents the Apache access restrictions,  
> either by calling a UNIX shell command (using passthru(), backticks,  
> etc., only some of which are blocked on my server), or, more  
> disturbingly, by using the include command. Using either of these  
> methods in a publicly available page can circumvent htaccess- or  
> PHP-based authorization and output the contents of a supposedly  
> restricted file, _including_ a file in another user's Web site.
> 
> 2. I am working on a PHP script that allows users to upload images,  
> view them, and ultimately send them over email. All the problems listed  
> in (1) apply, but in addition, these images' owner is www or nobody,  
> the user PHP runs as. As such, not only could other users on the same  
> shared server view these uploaded files, they could modify or delete  
> them through a PHP script, and it doesn't matter what I set the access  
> privileges to with chmod(), since they can call chmod() on the files  
> themselves. Now, I can run a checksum at upload time and verify it  
> later on to ensure that uploaded files haven't been changed. But that  
> might still leave a few seconds (between upload and checksum) during  
> which a file could be altered, and doesn't protect against deletions.
> 
> Both (1) and (2) are disturbing to me, since if I'm protecting a  
> portion of my site I don't want several hundred random people (whose  
> only qualification is that they purchased Web space at the same company  
> I did) to have access to it. Is there any way, short of a dedicated  
> server or a wholesale switch to another server-side language, to avoid  
> these problems?
> 
> Thanks.
> 
> --Dave
> 
>  
> --
> David Feldman
> User Interface Designer
> 
> 
> -- 
> 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




RE: [PHP] mysql select and date functions

2003-02-18 Thread John W. Holmes
> Change your query:
> selectdayofmonth(Posted) as DOM_Posted,
>   month(Posted) as M_Posted,
>   year(Posted)as Y_Posted,
>   hour(Posted) as HH_Posted,
>   minute(Posted) as MM_Posted,
>   Name,
>   Prayer
> from prayer
> 
> Then access the access the fields by the name (DOM_Posted).
> $recSet = mysql_query($query);
> $row = mysql_fetch_assoc($recSet);
> Access individual field:
>   $row['DOM_Posted'];
>   $row['M_Posted'];
>   etc
> 
> OR
> Use the php date (Don't know - haven't tried) functions to parse the
> required values out of the Posted field.

Or you can use the DATE_FORMAT() function in your query. 

SELECT DATE_FORMAT(Posted,'%m/%d/%Y') as F_Posted FROM Prayer

Then you can echo $row['F_Posted'] and it'll already be in the correct
format. Check the manual for the correct usage of DATE_FORMAT() (The
MySQL manual.)

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




Re: [PHP] Wrong version displayed after upgrading to php-4.2.3

2003-02-18 Thread PathFinder Software
Now I get a Config file error.

apxs:Error: Config file /etc/httpd/conf/httpd.conf not found
make[1]: *** [install-sapi] Error 1
make[1]: Leaving directory `/var/mnt/System/php-4.2.3'
make: *** [install-recursive] Error 1

On my distribution I have the httpd.conf in the
/var/conf/apache/users
I use the following ./configure i include the following:

CFLAGS="-g -O3" \
./configure \
--with-mysql=/usr/local/mysql \
--with-apxs=/usr/netmax/sbin/apxs \
--with-config-file-path=/var/conf/apache/users \
--enable-versioning \
--enable-ftp \
--enable-bcmath \
--disable-debug \
--enable-memory-limit=yes \
--enable-track-vars

As you can see I give the full path on the line:
--with-config-file-path=/var/conf/apache/users \

Why am I getting this error?

Anything I can test or force?

Regards,

Normand J. Charette
PathFinder Software/Affiliate Software
[EMAIL PROTECTED]
www.AffiliateSoftware.net

-Original Message-
From: Jason k Larson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 18, 2003 5:30 PM
To: PathFinder Software
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Wrong version displayed after upgrading to
php-4.2.3


use:
--with-mysql=/usr/lib/mysql

HTH,
Jason k Larson


PathFinder Software wrote:
> Hi,
>
> During the configure I get this error message.
>
> configure: error: Cannot find header files under /var/lib/mysql
>
> a whereis mysql produce the following output:
> mysql: /usr/bin/mysql /usr/lib/mysql /usr/include/mysql
> /usr/share/mysql /usr/man/man1/mysql.1 /usr/man/man1/mysql.1.gz
>
> I have MySQL installed where the databases are in the
> /var/lib/mysql directories.
>
> Where can I locate the header files the installer is
complaining
> about. Is it the same directory where "mysqld" is installed?
>
> what should I use for the
./configure --with-mysql=/usr/bin/mysql
>
> I tried the above and it does not work. Does it make a
difference
> if MySQL is running or not during the PHP upgrade?
>
> Regards,
>
> Normand J. Charette
> PathFinder Software/Affiliate Software
> [EMAIL PROTECTED]
> www.AffiliateSoftware.net
>
>
> I upgraded PHP from 4.0.3pl1 to php-4.2.3 on my Apache/1.3.14
> using 'apxs' and I did not received any errors during the
> configure and make. The installation seems to have gone just
> fine.
>
> However, when I load a phpinfo.php document I get the 4.0.3pl1
> version displayed???
>
> What can be wrong and what test or steps do I need to perform
to
> correct this?
>
> Regards,
>
> Normand J. Charette
> PathFinder Software/Affiliate Software
> [EMAIL PROTECTED]
> www.AffiliateSoftware.net
>
>
> --
> 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


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




RE: [PHP] Sessions Timing Out Too Often

2003-02-18 Thread John W. Holmes
> I'm finding that my sessions seem to be timing out fairly quickly. For
> example, in a little forum I wrote with PHP, people are telling me
that if
> they type a long message and click Submit, they are taken to the Login
> page
> because their session obviously timed out, and they loose their posts
in
> the
> forum. I do have a "remember me" feature that uses a cookie, but, not
all
> visitors are using it, and they are the ones experiencing this
problem.
> 
> Is there a way to extend session time, and is that the best way to
reduce
> this problem from happening to most members?

You can change the session.gc_maxlifetime in php.ini to a larger value.
That is the number of seconds after which inactive session files will be
seen as garbage. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




[PHP] Sessions Timing Out Too Often

2003-02-18 Thread Monty
I'm finding that my sessions seem to be timing out fairly quickly. For
example, in a little forum I wrote with PHP, people are telling me that if
they type a long message and click Submit, they are taken to the Login page
because their session obviously timed out, and they loose their posts in the
forum. I do have a "remember me" feature that uses a cookie, but, not all
visitors are using it, and they are the ones experiencing this problem.

Is there a way to extend session time, and is that the best way to reduce
this problem from happening to most members?

Thanks!

Monty


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




Re: [PHP] Block direct image loads but allow them in PHP

2003-02-18 Thread Michael Mulligan
So I implemented this the other day and got excited as it worked...sort of.
My code is very similar to the link that you suggested. This is the script
that I would call from within an :

if(isset($i))
{
//codeImageURL decodes $i into an image path that we can work with
$link=codeImageURL($i);
if($link!="" && (isAdmin() || !isThisFileBlocked($link)))
{
header("Cache-control: private");
header("Content-type: image/jpg");
header("Content-Disposition: attachment; filename=".$link);
$fp = fopen($link, 'r');
fpassthru($fp);
fclose($fp);
}
else
echo "Error: Couldn't decode image URL\n";
}

This code seems to work in *some* browsers, but not all. That is, in some
browsers, images will display just fine. In other browsers (i.e. Some
flavors of IE on the PC) I just get red x's. I cannot identify any
particular commonality among them and I was wondering if you have any
suggestions to make this work?

Thanks in advance!


On 02/15/03 8:44 PM, "Justin French" <[EMAIL PROTECTED]> wrote:

> Using Apache's main config file (or at a per-directory level using a
> .htaccess file), you need to black all .jpg, .jpeg, .gif, .png, .bmp, etc
> etc files from being *directly* served via http.
> 
> I'm not too good with Apache yet, but an example would be:
> 
> 
>   Order Allow,Deny
> ...
> 
> Then you need to create a script called image.php which:
> 
> a) accepts file=.xxx in the URL ($_GET)
> b) sets the appropriate image header
> c) passes the image file though
> 
> Instead of you calling
> 
> 
> You would call
> 


-m^2

__
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me
spread!
__ 



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




Re: [PHP] mysql select and date functions

2003-02-18 Thread Sunfire
tnx it worked just like i wanted it to...


- Original Message - 
From: "Barajas, Arturo" <[EMAIL PROTECTED]>
To: "'Sunfire'" <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 7:59 PM
Subject: RE: [PHP] mysql select and date functions


> Have you tried naming the fields?
> 
> > $query=mysql_query("select dayofmonth(Posted) AS day,
> > month(Posted) AS Mo, year(Posted) AS yr, hour(Posted)
> > as hr, minute(Posted) as min, Name, Prayer from prayer");
> 
> and the use
> 
> echo $view->day . "/" . $view->mo . "/" . $view->yr . "\n";
> 
> or something similar?
> --
> Un gran saludo/Big regards...
>Arturo Barajas, IT/Systems PPG MX (SJDR)
>(427) 271-9918, x448
> 
> > -Original Message-
> > From: Sunfire [mailto:[EMAIL PROTECTED]]
> > Sent: Martes, 18 de Febrero de 2003 06:51 p.m.
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] mysql select and date functions
> > 
> > 
> > i have a field in a table called Posted and it is a timestamp type
> > im using mysql and my page is supposed to take the timestamp 
> > field and show
> > it on the screen in the form of month#/dayofmonth/year
> > like 02/18/2003 the problem im having is trying to get it to 
> > be formatted..
> > i tried mysql functions like dayofmonth(Posted) month(Posted) and
> > year(Posted) in the query:
> > $query=mysql_query("select dayofmonth(Posted), month(Posted), 
> > year(Posted),
> > hour(Posted), minute(Posted), Name, Prayer from prayer");
> > 
> > this query works just fine but my question is now in php how 
> > to display the
> > results for dayofmonth(Posted) and so on further code follows:
> > while($view=mysql_fetch_array($query)) {
> > //display variables from query here...
> > 
> > //get to the date functions:
> > //$view[month(Posted)]/... doesnt work
> > //php complains about missing ] and this doesnt work
> > //either
> > while($view=mysql_fetch_object($query)){
> > //show variables here..
> > 
> > //show date fields in table...
> > //$view->dayofmonth(Posted) doesnt work either all i get
> > //in display is (Posted)
> > ...rest of code here...
> > 
> > ?>
> > and its strange because if i try: echo 
> > $view->dayofmonth(Posted); i get
> > parse error call to undefined function dayofmonth() in 
> > file.php on line
> > (line #)
> > 
> > any ideas on how to get this to work?
> > 
> > 
> > 
> > 
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003

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




RE: [PHP] mysql select and date functions

2003-02-18 Thread Bryan Lipscy
Change your query:
select  dayofmonth(Posted) as DOM_Posted, 
month(Posted) as M_Posted, 
year(Posted)as Y_Posted, 
hour(Posted) as HH_Posted, 
minute(Posted) as MM_Posted, 
Name, 
Prayer 
from prayer

Then access the access the fields by the name (DOM_Posted).
$recSet = mysql_query($query);
$row = mysql_fetch_assoc($recSet);
Access individual field:
$row['DOM_Posted'];
$row['M_Posted'];   
etc

OR
Use the php date (Don't know - haven't tried) functions to parse the
required values out of the Posted field.

HTH,
Bryan


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




[PHP] mysql select and date functions

2003-02-18 Thread Sunfire
i have a field in a table called Posted and it is a timestamp type
im using mysql and my page is supposed to take the timestamp field and show
it on the screen in the form of month#/dayofmonth/year
like 02/18/2003 the problem im having is trying to get it to be formatted..
i tried mysql functions like dayofmonth(Posted) month(Posted) and
year(Posted) in the query:
$query=mysql_query("select dayofmonth(Posted), month(Posted), year(Posted),
hour(Posted), minute(Posted), Name, Prayer from prayer");

this query works just fine but my question is now in php how to display the
results for dayofmonth(Posted) and so on further code follows:
while($view=mysql_fetch_array($query)) {
//display variables from query here...

//get to the date functions:
//$view[month(Posted)]/... doesnt work
//php complains about missing ] and this doesnt work
//either
while($view=mysql_fetch_object($query)){
//show variables here..

//show date fields in table...
//$view->dayofmonth(Posted) doesnt work either all i get
//in display is (Posted)
...rest of code here...

?>
and its strange because if i try: echo $view->dayofmonth(Posted); i get
parse error call to undefined function dayofmonth() in file.php on line
(line #)

any ideas on how to get this to work?




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


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




[PHP] preg_replace

2003-02-18 Thread aw2001
This should work (as far as I can tell) But yields the following error.
Parse error: parse error, unexpected T_CHARACTER, expecting T_STRING or
T_VARIABLE or T_NUM_STRING
Any help is appreciated!

function HTMLfromNickName ( $player ) {
//example input "^2pla^3yer"
  $color=array(
  "1"=>"#FF",
  "2"=>"#00FF00",
  "3"=>"#F0FF0F",
  "4"=>"#FF",
  "5"=>"#00",
  "6"=>"#FF00FF",
  "7"=>"#FF",
  "8"=>"ltbrown",
  "9"=>"#0F00F0",
  "0"=>"#E7E7E7"
  );
  $pattern = "/\^(\d)/";
  $replacement = "$color[$1]";
  $player = preg_replace($pattern, $replacement, $player);
  return $player;
}

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




Re: [PHP] Wrong version displayed after upgrading to php-4.2.3

2003-02-18 Thread Jason k Larson
use:
--with-mysql=/usr/lib/mysql

HTH,
Jason k Larson


PathFinder Software wrote:

Hi,

During the configure I get this error message.

configure: error: Cannot find header files under /var/lib/mysql

a whereis mysql produce the following output:
mysql: /usr/bin/mysql /usr/lib/mysql /usr/include/mysql
/usr/share/mysql /usr/man/man1/mysql.1 /usr/man/man1/mysql.1.gz

I have MySQL installed where the databases are in the
/var/lib/mysql directories.

Where can I locate the header files the installer is complaining
about. Is it the same directory where "mysqld" is installed?

what should I use for the ./configure --with-mysql=/usr/bin/mysql

I tried the above and it does not work. Does it make a difference
if MySQL is running or not during the PHP upgrade?

Regards,

Normand J. Charette
PathFinder Software/Affiliate Software
[EMAIL PROTECTED]
www.AffiliateSoftware.net


I upgraded PHP from 4.0.3pl1 to php-4.2.3 on my Apache/1.3.14
using 'apxs' and I did not received any errors during the
configure and make. The installation seems to have gone just
fine.

However, when I load a phpinfo.php document I get the 4.0.3pl1
version displayed???

What can be wrong and what test or steps do I need to perform to
correct this?

Regards,

Normand J. Charette
PathFinder Software/Affiliate Software
[EMAIL PROTECTED]
www.AffiliateSoftware.net


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




RE: [PHP] ASCII/UNICODE Character Translation Comparison in Strings

2003-02-18 Thread Dennis Cole

$txt = "björk";
$txt = strtr($txt, "ÁÉÍÓÚÑÀÈÌÒÙÄËÏÖÜÂÊÎÔÛáéíóúñàèìòùäëïöüâêîôûç",
"aeiounaeiouaeiouaeiouaeiounaeiouaeiouaeiouc");
echo $txt; // Returns "bjork"

-Original Message-
From: Chris McCluskey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 18, 2003 7:03 PM
To: [EMAIL PROTECTED]
Cc: Flint Doungchak; Ethan Nelson
Subject: [PHP] ASCII/UNICODE Character Translation Comparison in Strings


Hello, I was wondering if there are any native PHP functions that will
acomplish what I have set out to do here:

I have an issue where I would need to compare international characters, for
instance i would want "björk" to match "bjork", i would want ô,ö, and ò to
match o; ñ, Ñ to match n. etc...

I could just create a function that would do this, and I already have ideas
about how to go about this, but before i start coding, i want to make sure
there isn't something that PHP does already that could replace what i'm
trying to do here.

Thanks

(yes, i googled already) ;-)

-Chris


---
_  _  _  _
   |'|(_)|_)(_)|_(_)`-,
  * * *

Chris McCluskeyWeb Applications Engineer
Modulus, LLC
1720 Willow Creek Circle, Suite 520
Eugene, OR 97402
Email: [EMAIL PROTECTED]
Voice: +1 (541) 434-1024
Web..: http://www.modulusgroup.com 

The contents of this transmission may be
confidential in nature and should be
directed only to the person to whom it is
addressed. Do not read, copy, or disseminate
this material unless you are the intended
recipient.  If this transmission reached you
in error, please forward the e-mail to the
sender to advise, then destroy the
transmission you received.  Thank you.




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




[PHP] LDAP next prev howto

2003-02-18 Thread Roger Thomas
is it possible to retrieve a bunch of records from an ldap tree and do a
next-prev navigation on those records ? example script pls.

--


__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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




[PHP] Wrong version displayed after upgrading to php-4.2.3

2003-02-18 Thread PathFinder Software
Hi,

During the configure I get this error message.

configure: error: Cannot find header files under /var/lib/mysql

a whereis mysql produce the following output:
mysql: /usr/bin/mysql /usr/lib/mysql /usr/include/mysql
/usr/share/mysql /usr/man/man1/mysql.1 /usr/man/man1/mysql.1.gz

I have MySQL installed where the databases are in the
/var/lib/mysql directories.

Where can I locate the header files the installer is complaining
about. Is it the same directory where "mysqld" is installed?

what should I use for the ./configure --with-mysql=/usr/bin/mysql

I tried the above and it does not work. Does it make a difference
if MySQL is running or not during the PHP upgrade?

Regards,

Normand J. Charette
PathFinder Software/Affiliate Software
[EMAIL PROTECTED]
www.AffiliateSoftware.net


I upgraded PHP from 4.0.3pl1 to php-4.2.3 on my Apache/1.3.14
using 'apxs' and I did not received any errors during the
configure and make. The installation seems to have gone just
fine.

However, when I load a phpinfo.php document I get the 4.0.3pl1
version displayed???

What can be wrong and what test or steps do I need to perform to
correct this?

Regards,

Normand J. Charette
PathFinder Software/Affiliate Software
[EMAIL PROTECTED]
www.AffiliateSoftware.net


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




Re: [PHP] limiting characters

2003-02-18 Thread Justin French
Season to taste:

= $length) {
$i = 0;
$new = '';
while($i < $length) {
$new .= $words[$i].' ';
$i++;
}
if($suffix) {
$new .= $suffix;
}
return trim($new);
} else {
return $string;
}
}

$foo = "This is my really long string";

// EXAMPLES

// no change, since $foo is less than 20 chars (default)
echo chopper($foo);

// echos 'This is my ...' -- uses default suffix
echo chopper($foo,3);

// echos 'This is my [too long]'
echo chopper($foo,3,'[too long]');
?>


Justin French



on 19/02/03 10:18 AM, Michael P. Carel ([EMAIL PROTECTED]) wrote:

> it would be better if it will be chopped by words and not by characters. Any
> idea how?
> 
> - Original Message -
> From: "Justin French" <[EMAIL PROTECTED]>
> To: "Michael P. Carel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, February 19, 2003 7:26 AM
> Subject: Re: [PHP] limiting characters
> 
> 
>> Do you want it chopped at a certain number of words, or characters?
>> 
>> Justin French
>> 
>> 
>> 
>> on 19/02/03 10:00 AM, Michael P. Carel ([EMAIL PROTECTED]) wrote:
>> 
>>> Hi to all,
>>> 
>>> How could i limit the character output that is being displayed in the
> html
>>> page. Is there a function or a php classes that perfectly support it?
>>> 
>>> Example:
>>> 
>>> $myoutput = "This is my sample output.";
>>> 
>>> Required Output:
>>> 
>>> This is my 
>>> 
>>> Any idea? Thanks in advance for the replies
>>> 
>>> 
>>> 
>>> mike
>>> 
>>> 
> 
> ---
> [This E-mail scanned for viruses]
> 
> 


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




RE: [PHP] limiting characters

2003-02-18 Thread Dennis Cole
$words = "All I want for Christmas is my two front teeth ";

$newwords = trim($words);

$pieces = explode(" ", $words);

echo "$pieces[0] $pieces[1] $pieces[2] $pieces[3]...";

// Retures "All I want for... "

-Original Message-
From: Michael P. Carel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 18, 2003 6:19 PM
To: Justin French; [EMAIL PROTECTED]
Subject: Re: [PHP] limiting characters


it would be better if it will be chopped by words and not by characters. Any
idea how?

- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "Michael P. Carel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 19, 2003 7:26 AM
Subject: Re: [PHP] limiting characters


> Do you want it chopped at a certain number of words, or characters?
>
> Justin French
>
>
>
> on 19/02/03 10:00 AM, Michael P. Carel ([EMAIL PROTECTED]) wrote:
>
> > Hi to all,
> >
> > How could i limit the character output that is being displayed in the
html
> > page. Is there a function or a php classes that perfectly support it?
> >
> > Example:
> >
> > $myoutput = "This is my sample output.";
> >
> > Required Output:
> >
> > This is my 
> >
> > Any idea? Thanks in advance for the replies
> >
> >
> >
> > mike
> >
> >


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




Re: [PHP] limiting characters

2003-02-18 Thread Michael P. Carel
it would be better if it will be chopped by words and not by characters. Any
idea how?

- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "Michael P. Carel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 19, 2003 7:26 AM
Subject: Re: [PHP] limiting characters


> Do you want it chopped at a certain number of words, or characters?
>
> Justin French
>
>
>
> on 19/02/03 10:00 AM, Michael P. Carel ([EMAIL PROTECTED]) wrote:
>
> > Hi to all,
> >
> > How could i limit the character output that is being displayed in the
html
> > page. Is there a function or a php classes that perfectly support it?
> >
> > Example:
> >
> > $myoutput = "This is my sample output.";
> >
> > Required Output:
> >
> > This is my 
> >
> > Any idea? Thanks in advance for the replies
> >
> >
> >
> > mike
> >
> >


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




Re: [PHP] limiting characters

2003-02-18 Thread R B
You can use the substr function:

$myoutput = "This is my sample output.";

$myoutput = substr($myoutput,0,10)."...";




From: "Michael P. Carel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: [PHP] limiting characters
Date: Wed, 19 Feb 2003 07:00:52 +0800

Hi to all,

How could i limit the character output that is being displayed in the html
page. Is there a function or a php classes that perfectly support it?

Example:

$myoutput = "This is my sample output.";

Required Output:

This is my 

Any idea? Thanks in advance for the replies



mike



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




Re: [PHP] limiting characters

2003-02-18 Thread Justin French
Do you want it chopped at a certain number of words, or characters?

Justin French



on 19/02/03 10:00 AM, Michael P. Carel ([EMAIL PROTECTED]) wrote:

> Hi to all,
> 
> How could i limit the character output that is being displayed in the html
> page. Is there a function or a php classes that perfectly support it?
> 
> Example:
> 
> $myoutput = "This is my sample output.";
> 
> Required Output:
> 
> This is my 
> 
> Any idea? Thanks in advance for the replies
> 
> 
> 
> mike
> 
> 


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




[PHP] limiting characters

2003-02-18 Thread Michael P. Carel
Hi to all,

How could i limit the character output that is being displayed in the html
page. Is there a function or a php classes that perfectly support it?

Example:

$myoutput = "This is my sample output.";

Required Output:

This is my 

Any idea? Thanks in advance for the replies



mike



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




RE: [PHP] script to check if server is up

2003-02-18 Thread Luke Woollard
Another useful idea is running a cron job (as root) every so often on each
machine that opens a socket connection to a port (eg. for www: 80)

If the socket connection returns false, you have a problem. You could then
reboot the service (in this case apache or similar).

I did this to check mysql was running on our old server.. It always seemed
to crash at awkard times...

Luke Woollard





-Original Message-
From: Petre Agenbag [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 19 February 2003 12:17 AM
To:
Subject: [PHP] script to check if server is up


Hi
I have two servers on two different networks. I would like to implement
some sort of a watchdog application between the two to inform me should
either of the machines go down or has a connection problem.
I was thinking along the line of using a PHP script running from cron on
an hourly basis to "ping" the server as well as another server such as
google.com (they seem to be always up) and to only raise the alarm when
google can be reached, but NOT the other server.

My only problem is with the actual recognition of a "failed" ping, or
for that matter a successful one?

Can anyone give me some brain food as to the code for detecting a
up/down connection?

pseudo code:

make connection with server1
get result of connection_server1
make connection with google.com
get result of connection_google

if connection_google && !connection_server1
sms me
else
chill out


and a plus would be to do this ONLY if the result of the next cron-run
is the same, ie, don't sms me if the problem has been fixed within an
hour.
I just don';t know what to use to "make connection" and "get result of
connection"

Thanks.






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




Re: [PHP] Redirect without header or javascipt

2003-02-18 Thread Justin French
without header() and without javascript?

your only option would be a meta refresh, which i can't imagine is going to
help :)

Justin



on 19/02/03 9:59 AM, Daniel Guerrier ([EMAIL PROTECTED]) wrote:

> Is there any to redirect in php with using header()
> and without the use of javascript?
> 
> __
> Do you Yahoo!?
> Yahoo! Shopping - Send Flowers for Valentine's Day
> http://shopping.yahoo.com


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




Re: [PHP] Sending/recieiving email

2003-02-18 Thread Justin French
for sending, it can be REALLY basic (php.net/mail) or really complex... if
you want the complex end of things (HTML, attachments, etc) try manuel
lemos' class on phpclasses.com

for receiving, i've never done it, but php.net/imap looks like the go

justin


on 19/02/03 10:13 AM, Jono Bacon ([EMAIL PROTECTED]) wrote:

> Hello all,
> 
> I am looking to work with email and PHP, and I was wondering what would
> be the best way to deal with sending and recieving mail - is there a
> library pre-written or can I write it with functions that are part of
> PHP itself.
> 
> Cheers,
> 
> Jono
> 
> 
> 


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




RE: [PHP] Redirect without header or javascipt

2003-02-18 Thread Johnson, Kirk
> Is there any to redirect in php with using header()
> and without the use of javascript?

You can use an html meta tag with http-equiv="refresh".

Kirk

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




Re: [PHP] Redirect without header or javascipt

2003-02-18 Thread Tyler Longren
no

tyler

- Original Message - 
From: "Daniel Guerrier" <[EMAIL PROTECTED]>
To: "php user group" <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 4:59 PM
Subject: [PHP] Redirect without header or javascipt


> Is there any to redirect in php with using header()
> and without the use of javascript?
> 
> __
> Do you Yahoo!?
> Yahoo! Shopping - Send Flowers for Valentine's Day
> http://shopping.yahoo.com
> 
> -- 
> 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




[PHP] Redirect without header or javascipt

2003-02-18 Thread Daniel Guerrier
Is there any to redirect in php with using header()
and without the use of javascript?

__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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




[PHP] security issues on shared servers

2003-02-18 Thread David Feldman
I run a PHP-based Web site hosted on a shared UNIX server provided by a  
pretty standard Web hosting company -- as I imagine do many people.  
There are a lot of users on this server, and I know nothing about them.  
Apache (and thus PHP) generally runs as www or nobody, so although each  
user on this shared server has a separate account, all PHP scripts run  
as the same user. As such, I have a few security concerns:

1. I restrict access to certain portions of my site, either with  
.htaccess/.htpasswd files or with a PHP equivalent. This works fine for  
anyone using a Web browser, but it leaves a security hole: One can  
write a PHP script that circumvents the Apache access restrictions,  
either by calling a UNIX shell command (using passthru(), backticks,  
etc., only some of which are blocked on my server), or, more  
disturbingly, by using the include command. Using either of these  
methods in a publicly available page can circumvent htaccess- or  
PHP-based authorization and output the contents of a supposedly  
restricted file, _including_ a file in another user's Web site.

2. I am working on a PHP script that allows users to upload images,  
view them, and ultimately send them over email. All the problems listed  
in (1) apply, but in addition, these images' owner is www or nobody,  
the user PHP runs as. As such, not only could other users on the same  
shared server view these uploaded files, they could modify or delete  
them through a PHP script, and it doesn't matter what I set the access  
privileges to with chmod(), since they can call chmod() on the files  
themselves. Now, I can run a checksum at upload time and verify it  
later on to ensure that uploaded files haven't been changed. But that  
might still leave a few seconds (between upload and checksum) during  
which a file could be altered, and doesn't protect against deletions.

Both (1) and (2) are disturbing to me, since if I'm protecting a  
portion of my site I don't want several hundred random people (whose  
only qualification is that they purchased Web space at the same company  
I did) to have access to it. Is there any way, short of a dedicated  
server or a wholesale switch to another server-side language, to avoid  
these problems?

Thanks.

--Dave

 
--
David Feldman
User Interface Designer


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



[PHP] Web Based Video Conferencing Solution

2003-02-18 Thread Vernon
Anyone know of a video conferencing solution (hopefully GNU) for use within
a php web site? I'm looking to do something where a number of people can
video conference at the same time.

Thanks



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




[PHP] getting result from mysql decode() function

2003-02-18 Thread Tyler Longren
Hi,

I have this query:
$decode = mysql_query("SELECT decode(\"$data\", \"$password\")");

It decodes the $data using the $password.  How do I go about printing the
result?

Thanks,
Tyler


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




[PHP] Sending/recieiving email

2003-02-18 Thread Jono Bacon
Hello all,

I am looking to work with email and PHP, and I was wondering what would 
be the best way to deal with sending and recieving mail - is there a 
library pre-written or can I write it with functions that are part of 
PHP itself.

Cheers,

   Jono




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



Re: [PHP] browser identification problem

2003-02-18 Thread chip . wiegand
Ernest E Vogelsinger <[EMAIL PROTECTED]> wrote on 02/17/2003 11:20:41 
PM:

> At 06:05 18.02.2003, Jason Wong said:
> [snip]
> >On Tuesday 18 February 2003 01:18, [EMAIL PROTECTED] wrote:
> >
> >> > then set 'user_agent' in
> >> > php.ini to match that of one of the compatible browsers.
> >>
> >> I don't see any user_agent entry in my php.ini file. I did a search 
on the
> >> php.net site and didn't find any info on this. What would be the 
proper
> >> way
> >> to set this in php.ini, and in which section of php.ini?
> >
> >Anywhere in php.ini I suppose. Or it can be set at run-time using 
ini_set().
> [snip] 
> 
> http://www.php.net/manual/en/ref.filesystem.php#ini.user-agent

Thanks for the link. I added the following to my php.ini -
user_agent = Mozilla/5.0 (Windows; U; Windows 
NT 5.0; en-US; rv:1.3a) Gecko/20021212  

And it prevents any pages from being displayed. I copied that line
from the http_user_agent line in php_info. The php doc mentioned
above doesn't provide any info on the format of the user_agent line.
Obviously I'm doing it wrong. 
Suggestions?
Thanks
--
Chip 

> -- 
>>O Ernest E. Vogelsinger
>(\)ICQ #13394035
> ^ http://www.vogelsinger.at/
> 
> 
> 
> -- 
> 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




[PHP] Array declarations

2003-02-18 Thread Joachim Krebs
Is there any speed difference at all from the following two code
blocks (miniscule or not)? If so, which is faster?

$cfg["db"]["host"] = "";
$cfg["db"]["user"] = "";
$cfg["db"]["pass"] = "";

or

$cfg["db"] = array("host"=>"", "user"=>"", "pass"=>"");

Joachim



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




Re: [PHP] NULL character help

2003-02-18 Thread David Otton
On Tue, 18 Feb 2003 16:02:59 -0500, you wrote:

>http://www.psikon.com/vartest.php
>http://www.psikon.com/vartest.phps
>
>how can I get rid of that null character or am I forced to use sub_str in
>this case?

You changed the string to be "abcd\0f" on line 8. You didn't remove the
character, you set it to nothing.

If you want to remove the character instead... you have to slide
everything after it in the string back a place.

There are lots of ways to do this. For example,

$var = join("", split("e", $var));

will remove all instances of "e" from $var (I find this is the most
common manipulation of this type I want to do).

Joining together two string parts will also work.

$var = substr($var, 0, 4) . substr($var, 5, strlen($var));

ereg_replace() also springs to mind.


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




[PHP] NULL character help

2003-02-18 Thread v0idnull


http://www.psikon.com/vartest.php
http://www.psikon.com/vartest.phps

how can I get rid of that null character or am I forced to use sub_str in
this case?


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




[PHP] Re: [PHP-DEV] Re: [PHP] Threading

2003-02-18 Thread Rasmus Lerdorf
On Tue, 18 Feb 2003, Greg Donald wrote:
> On Tue, 18 Feb 2003, Bruce Miller wrote:
> 
> >Will PHP allow multiple-thread execution?
> 
> PHP4 does not have thread support.

Well, except for pear/PECL/threads, of course.

-Rasmus


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




[PHP] Re: function getting redeclared

2003-02-18 Thread Greg Beaver
Hi Erik,

You may want to re-investigate using nested functions for this purpose, it
seems a bit illogical.  The main reason is that it clutters up the source.
If you want a private function, use docblock tag @access private to let
other users know that it should not be accessed directly, or wait for php 5
when you can declare a method to be private/protected.

Having said that, if you are still into nested functions, try using

if (!method_exists($this,'isValidPhoneNumber'))
{
..
}

Greg

"Erik Price" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I have a problem where I am getting the following error, and I was
> wondering if anyone has seen this one before and can help me out.
>
> "Fatal error:  Cannot redeclare isvalidphonenumber() (previously
> declared in /home/bluekomo/public_html//classes/Registrant.class:360)
> in /home/bluekomo/public_html//classes/Registrant.class on line 360"
>
> I have a script, "registration.php", which calls require_once on the
> Registrant.class file mentioned in the above error message.  The
> Registrant::setPhone() method is called more than once.  Since it is
> called more than once, the function "isValidPhoneNumber()" defined
> within setPhone() is defined more than once, which I suspect is the
> source of the problem.  Does PHP not allow you to define a function
> within a function and then call the enclosing function more than once?
> Here is the relevant section of code:
>
> 354 /**
> 355  * sets the phone property
> 356  */
> 357 function setPhone($phone) {
> 358 // TODO: determine if these formats are acceptable
> 359 // TODO: account for extensions (separate form field?)
> 360 function isValidPhoneNumber($num) {
> 361 $valid = false;
> 362 if (preg_match('!\d{9,9}!', $num)) {
> 363 $valid = true;
> 364 }
> 365 if (preg_match('!\(?\d\d\d\)?-?\s*\d\d\d-?\s*\d\d\d\d!',
> 366 $num)) {
> 367
> 368 $valid = true;
> 369 }
> 370
> 371 return $valid;
> 372 }
> 373
> 374 if (isValidPhoneNumber($phone)) {
> 375 $this->phone = $phone;
> 376 }
> 377 }
>
>
> I am using PHP 4.3.0 on a RedHat machine with Apache 1.3.x.
>
> Thanks for your help, it's been a while since I've used PHP!
>
>
> Erik
>
>
>
>
>
>
>
> --
> Erik Price
>
> email: [EMAIL PROTECTED]
> jabber: [EMAIL PROTECTED]
>



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




[PHP] Using mail() function in php.ini (Unix/Linux)

2003-02-18 Thread Scott Fletcher
For those of you who don't know it or are struggling with the problem with
the slow sending of hte e-mail behind the firewall.  This problem doesn't
alway lie with the DNS itself.  The workaround to the problem is the
hostname resolution or the alias to the hostname.  Just open up the
/etc/hosts file using either vi or emac and add this ...   (Substitute the
term in the bracket for something else)

--clip--

--clip--

Do not use the dot between the hostname and the domain name.   Just like
this as you normally see in most host files




Enjoy.




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




Re: [PHP] Wrong version displayed after upgrading to php-4.2.3

2003-02-18 Thread Jason k Larson
if you did a 'make install' and didn't receive any errors, then I'd 
suggest making sure you restarted the Apache daemon, if that still 
resolves to the older version, then check the paths to the 
/path/to/apache/libexec/libphp.so

You can look at the date/time stamp of the file to determine if the 
PHPv4.2.3 install overwrote the older one successfully or not.  If you 
still have problems, then you might need to check the path you are 
giving to the --with-apxs for compiling PHP.

HTH,
Jason k Larson


PathFinder Software wrote:
Hi,

I upgraded PHP from 4.0.3pl1 to php-4.2.3 on my Apache/1.3.14
using 'apxs' and I did not received any errors during the
configure and make. The installation seems to have gone just
fine.

However, when I load a phpinfo.php document I get the 4.0.3pl1
version displayed???

What can be wrong and what test or steps do I need to perform to
correct this?

Regards,

Normand J. Charette
PathFinder Software/Affiliate Software
[EMAIL PROTECTED]
www.AffiliateSoftware.net






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




[PHP] running code on my machine wile serving other domain?

2003-02-18 Thread merlin
Hi there,

I am wondering if I could anyhow run php code on my machine and pull the
html code to another domain?

Example:

I do have a webapp where I do not want to give away the code to customers
They want to have the same webapp, with the same database, but with their
front end design


Is something like this possible? If yes, please give me a hint where to look
for a solution.

Thanx in advance!



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




Re: [PHP] Wrong version displayed after upgrading to php-4.2.3

2003-02-18 Thread Larry E. Ullman
I upgraded PHP from 4.0.3pl1 to php-4.2.3 on my Apache/1.3.14
using 'apxs' and I did not received any errors during the
configure and make. The installation seems to have gone just
fine.

However, when I load a phpinfo.php document I get the 4.0.3pl1
version displayed???

What can be wrong and what test or steps do I need to perform to
correct this?


I suspect the previous PHP installation is still cached. Do a make 
distclean or remove the config.cache file before you configure/make.

Larry


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



Re: [PHP] Problem with sessions

2003-02-18 Thread Larry E. Ullman
This work very well, but when i open twice mozilla browsers and login 
with diferent users, i always keep the same session id, and sessions 
vars for two browsers...
i don't know how to resolve this problem...

Use two different browsers, for example, both Mozilla and Netscape. The 
session cookie (with the session ID) is being shared by the two windows 
of your one Mozilla browser. Hence the confusion.

Larry


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



[PHP] Wrong version displayed after upgrading to php-4.2.3

2003-02-18 Thread PathFinder Software
Hi,

I upgraded PHP from 4.0.3pl1 to php-4.2.3 on my Apache/1.3.14
using 'apxs' and I did not received any errors during the
configure and make. The installation seems to have gone just
fine.

However, when I load a phpinfo.php document I get the 4.0.3pl1
version displayed???

What can be wrong and what test or steps do I need to perform to
correct this?

Regards,

Normand J. Charette
PathFinder Software/Affiliate Software
[EMAIL PROTECTED]
www.AffiliateSoftware.net


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




Re: [PHP] Threading

2003-02-18 Thread Greg Donald
On Tue, 18 Feb 2003, Bruce Miller wrote:

>Will PHP allow multiple-thread execution?

PHP4 does not have thread support.


-- 
Greg Donald
http://destiney.com


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




[PHP] Threading

2003-02-18 Thread Bruce Miller
Will PHP allow multiple-thread execution?



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




[PHP] Re: php.ini question.....

2003-02-18 Thread James Hatridge
HI All

On Tuesday 18 February 2003 18:32, David Otton wrote:
> On Tue, 18 Feb 2003 17:38:28 +0100, you wrote:
> >At last I got safe-mode turned off (Gott sei dank!). But I'm still having
> > a problem.  I can only read Mysql DBs. I can not open a DB to update.
>
> You have to connect to MySQL with a username and password.
>
> First check that the user you're connecting as has permission to do
> UPDATEs as well as SELECTs.

At the command line I have no problem with Mysql...

JIM


-- 
Jim Hatridge
Linux User #88484
--
 BayerWulf
   Linux System # 129656
 The Recycled Beowulf Project
  Looking for throw-away or obsolete computers and parts
   to recycle into a Linux super computer


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




[PHP] Replacing JSP with PHP?

2003-02-18 Thread Jiann-Ming Su

Is it possible to replace JSP and use PHP to encapsulate our page rendering 
code?  We're running a java servlet that needs to be integrated with a PHP
front end.  I've given up on trying to run php as a java servlet.  I know
this is a strange request, but thanks for any tips.

--
Jiann-Ming Su  [EMAIL PROTECTED]  404-712-2603
Development Team Systems Administrator
General Libraries Systems Division




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



Re: [PHP] I have a problem with MsSQL

2003-02-18 Thread role . php-general
Jimmy,

In response to your mail of Monday 17 February 2003 at 18:54:02:

JH> My problem is the characters in spanish:

JH> example:

JH> Construcción (Data of MsSQL Server)
  
JH> Result in web with PHP:
JH> Construcci¢n  


Are you aware of HTML codes like the following - some are the common
ones most people know, but there are some rarer characters too?

® ®© ©   ¡ ¡  ¢ ¢   £ £
¤ ¤ ¥ ¥¦ ¦ § §   ¨ ¨
ª ª   « «  ¬ ¬­ ­¯ ¯
° °± ± ² ²   ³ ³   ´ ´
µ µ  ¶ ¶   · · ¸ ¸  ¹ ¹
º º   » »  ¼ ¼ ½ ½ ¾ ¾
¿ ¿ × ×  Ø Ø Þ Þ  ÷ ÷
ø ø þ þ  € €   Ð Ðæ æ
è è é é ç ç ü ü   ö ö
& &‘ ‘  ’ ’  " "   ' '
< < > > – –  — —


Maybe you can str_replace or strtr (or some other similar function) to
get your international characters in the MySQL data converted to HTML?


-- 
Best regards,
James.


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




[PHP] application security

2003-02-18 Thread Brad Pauly
Hey Everyone,

There have been a couple of threads lately about application security. A
while ago I wrote a short article that digs into this a bit and explores
one way of increasing security. I cleaned it up this morning and put it
up on my site if anyone is interested. 

http://robinsontech.com/articles/web_app_security.php

If you have any comments on it I would like to hear them. And a quick
thanks to Chris Shiflett for his input.

Cheers,
Brad


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




Re[4]: [PHP] FTP not enabled in RedHat 7.x distro

2003-02-18 Thread role . php-general
Martin,

In response to your mail of Monday 17 February 2003 at 18:27:05:

MM> My RH 7.3 php (distributed by RH) has --enable-ftp, so it was
MM> compiled with the ftp support.
MM> Check yor sintax. Could have a typo somewhere.


Very weird - I thought RedHat would have enabled it too. I did
copy-and-paste the problem command to check I was searching for the
right one. Here's the error, just for clarity: -

Fatal error: Call to undefined function: ftp_connect() in
/home/www/script.php on line 2

...and the line in question is like...   

Anyway, maybe I should check the RH distro. Can you run the following
on your box for me so I can compare please?

  rpm -qa | grep -i php | sort ; uname -mrspv

Here's what my system shows for the above...

  php-4.1.2-7.1.6
  php-imap-4.1.2-7.1.6
  php-mysql-4.1.2-7.1.6
  Linux 2.4.18-19.7.x #1 Thu Dec 12 09:00:42 EST 2002 i686 unknown

Maybe even try an "rpm -qi php" for more details on that package.
  

Thanks in advance.


-- 
Best regards,
James.


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




Re[2]: [PHP] FTP not enabled in RedHat 7.x distro

2003-02-18 Thread role . php-general
Martin,

In response to your mail of Monday 17 February 2003 at 18:10:31:

MM> Use phpinfo() to know how your PHP was compiled. If it comes as a
MM> module, you should see a --enable-feature=shared. Don't know it
MM> ftp support can be compiled as shared, but

Indeed - I think the doc's maybe (!) indicate that FTP is shared
(loadable from a DLL) under MS-Windows, but only seems to be available
using --enable-ftp under Unix ... but no sign of that option in the
phpinfo() function. Hm. Doesn't seem to make absolute sense!

I'll keep looking into it some more I guess...


-- 
Best regards,
James.


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




[PHP] Problem with sessions

2003-02-18 Thread Sidar Lopez Cruz
I have RedHat 8, Apache 2, PHP 4.2.2 

My problem is with sessions, 

1. page
-index.html-










2. page
-login.php-
;
...
$_SESSION["UID"] = $id_usuario;
?>
from here i am to do a redirec to another page called, main.php where is the
menu options i do it so..

window.location="main.php"


3. page

...
...
some menu options...
...
...




This work very well, but when i open twice mozilla browsers and login with diferent 
users, i always keep the same session id, and sessions vars for two browsers...
i don't know how to resolve this problem... 

I NEED HELP


:-) Sidar Lopez Cruz
- Cero Riesgo, S.A.



Re: [PHP] escaping quotes for redisplay

2003-02-18 Thread David Otton
On Tue, 18 Feb 2003 13:10:33 -0500, you wrote:

>   




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




RE: [PHP] ankord php text editor

2003-02-18 Thread Edward Peloke
www.ankord.com


-Original Message-
From: Awlad Hussain [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 18, 2003 11:38 AM
To: Php-General@Lists. Php. Net
Subject: Re: [PHP] ankord php text editor


Tell us what the url of Ankord is.

 I use HtmlKit (http://www.htmlkit.com)  its the best FREE editor available
out there. :)

-awlad

- Original Message -
From: "Edward Peloke" <[EMAIL PROTECTED]>
To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 3:46 PM
Subject: [PHP] ankord php text editor


> anyone use the php expert editor from Ankord?  If so, what do you think?
>
> Thanks,
> Eddie
>
> --
> 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



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




[PHP] escaping quotes for redisplay

2003-02-18 Thread Erik Price
Hi,

I am running into a problem, that I'm certain I've had before but for 
some reason don't remember how to handle.  If anyone can advise me on 
what to do here, that would be great.

I have a PHP script that accepts some user input and validates it, and 
if the validation fails, it re-displays the form.  In the form, the 
text fields' "value" attributes are set to the user's input so that the 
user doesn't have to fill everything out again.  The whole system works 
great, and I'm sure you've all seen it a hundred times before.

The problem happens when a user enters a single quote, such as in the 
string "O'Reilly".  Re-displaying this value in the "value" attribute 
of the form, like this:

  

is clearly invalid HTML, and it shows when the page is rendered in the 
user's browser (only the "O" gets through).

If I turn on magic_quotes_gpc or use addslashes, the output is like so:

  

And of course, when rendered, simply allows the "O\" to get through.

I can solve this problem by using double-quotes instead of 
single-quotes for my attributes, and that is probably what I'm going to 
have to do.  However, this means I can't let users enter double quotes, 
or the same thing will happen.  In other fields, double-quotes might be 
necessary.  Is there any other solution?

Thanks,

Erik

PS: I am using htmlentities() on the output before displaying it in the 
browser, but it doesn't apply to singlequotes.  I suppose I could 
str_replace it, but I'm wondering how other people handle this 
situation






--
Erik Price

email: [EMAIL PROTECTED]
jabber: [EMAIL PROTECTED]


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



[PHP] highlight_string for VB, CPP or .NET source code?

2003-02-18 Thread stefen Lars
Hello all

PHP offers the fantastic function ‘highlight_string’ to highlight PHP source 
code.

I was wondering whether anyone had written a function to highlight Visual 
Basic, CPP or .NET source code.

Alternatively, would anyone have any suggestions on how to write such a 
function. Ideally, the output of this function / these functions would look 
very similar to that of ‘highlight_string’.

Thank you in advance for any light that you could shed on this subject.

All the best

Stefen Lars


_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


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



Re: [PHP] MySQL DB Schema

2003-02-18 Thread Erik Price

On Tuesday, February 18, 2003, at 12:39  PM, David Otton wrote:


You want the tables and the relationships between them? Not easy to get
the links because of the lack of foreign keys in MySQL.


You can add a comment to your table with the COMMENT modifier, which 
gives you 60 characters to describe your table's relationship to other 
tables.

(In a table named "registrants", you could have the comment

  registrants.user_id = users.user_id

)

http://www.mysql.com/doc/en/CREATE_TABLE.html



Erik




--
Erik Price

email: [EMAIL PROTECTED]
jabber: [EMAIL PROTECTED]


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



RE: [PHP] File upload problem

2003-02-18 Thread Chris McCluskey
Try 

if(isset($_REQUEST["Submit"]))

If that doesn't work, perhaps you could just diagnose this by
print_r'ing the variables you are getting from the form:

(at the very top of your code, put):
die(print_r($_REQUEST));

-Chris

-Original Message-
From: Manuel Ochoa [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 18, 2003 7:04 AM
To: John M; [EMAIL PROTECTED]
Subject: Re: [PHP] File upload problem



There may be several reasons why it doesn't work but the first thing I
noticed is that "action" is blank. You need to have this defined.
 John M <[EMAIL PROTECTED]> wrote:Hello,

I have the code below. It's a simple file upload. But it doesn't work.
Before the line if(isset( $Submit )) is an echo which can I read. But
after
choosing a file and press a submit nothing happens. Why is if(isset(
$Submit )) always false? Maybe my apache or php config is wrong?

I use WinXp Prof, Apache 2.0.43, PHP 4.2.3, safe_mode is on ,
upload_tmp_dir
is "c:\tmp\" and upload_max_filesize is 2M in PHP config file.

Thanks!










 [input] 
 [input] 

echo "Before submit 
\n";
if(isset( $Submit ))
{
echo "After submit 
\n";

if ($_FILES['imagefile']['type'] == "image/gif"){
copy ($_FILES['imagefile']['tmp_name'],
"files/".$_FILES['imagefile']['name'])
or die ("Could not copy");
echo "Name: ".$_FILES['imagefile']['name']."";
}
else {
echo "";
echo "Could Not Copy, Wrong Filetype
(".$_FILES['imagefile']['name'].")";
}
}
?>







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





~ Manuel Ochoa ~
Seven days is too long to wait for a gun!

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




Re: [PHP] MySQL DB Schema

2003-02-18 Thread Erik Price

On Tuesday, February 18, 2003, at 12:23  PM, Phillip S. Baker wrote:


Is there an easy way to pull out the schema of a MySQL for viewing??


If you have access to the command line (either directly or via the 
system() function), try this:

bash 2.05 $  mysqldump -t databasename --user=username --password



Erik





--
Erik Price

email: [EMAIL PROTECTED]
jabber: [EMAIL PROTECTED]


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



Re: [PHP] inserting

2003-02-18 Thread Chris Knipe
I believe you are looking for .

I may be mistaken though.

--
me


- Original Message -
From: "Michael P. Carel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 10:36 AM
Subject: [PHP] inserting 


> hi to all,
>
> I'm having problem posting messages that have paragraph. It's doesnt
appear
> to have one when being viewd in the page?
>
> Any idea on how to post this properly without manually inserting a 
tags
> in the text box  before it is being store in the database.
>
> Thanks in advance.
>
>
> mike
>
>
>
>
> --
> 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




Re: [PHP] MySQL DB Schema

2003-02-18 Thread David Otton
On Tue, 18 Feb 2003 09:23:52 -0800, you wrote:

>Greetings all,
>
>Is there an easy way to pull out the schema of a MySQL for viewing??

You want the tables and the relationships between them? Not easy to get
the links because of the lack of foreign keys in MySQL.

If you want a table, "DESC tablename".

If you want to capture the create statements for the tables, "mysqldump
-d databasename > filename.sql"


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




Re: [PHP] php.ini for UNIX sendmail????

2003-02-18 Thread Scott Fletcher
Found the solution to the problem, Take a look at this at 
http://forums.devshed.com/archive/5/2002/09/4/43013 ..  Very useful.

  "Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Well your missing your \r\n at the end of your return path. 

  On Tue, 2003-02-18 at 10:57, Scott Fletcher wrote: 
Here's the command... 

--clip-- 
mail("[EMAIL PROTECTED]", "the subject", $message, 
"From: webmaster@$SERVER_NAME\r\n" 
."Return-Path: [EMAIL PROTECTED]" 
."Reply-To: webmaster@$SERVER_NAME\r\n" 
."X-Mailer: PHP/" . phpversion()); 
--clip-- 

The bad thing is that when I send the mail. I never get an email back when 
something is not working right by using the return-path. 


"Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... 
Oh, ok, well how about your PHP code then (the actual mail() line)? 

On Tue, 2003-02-18 at 10:34, Scott Fletcher wrote: 
Here's is the response to the command, 'where sendmail'. 
>>bash: where: command not found 

So, I don't have a where command but I did the phpinfo() and it showed . 

--clip-- 
Directive || Local Value || master value 


 
sendmail_from || no value || no value 
sendmail_path || /usr/sbin/sendmail -t -i || /usr/sbin/sendmail -t -i 
--clip-- 

I don't have email problem when I send email to anywhere, the only problem is the 
yahoo itself... 

Thanks... 
"Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... 
Umm, are you asking for Sendmail's path? 
It's usually /usr/bin/sendmail -t -i but you can verify where it is 
on your system by typing "where sendmail". 

On Tue, 2003-02-18 at 10:25, Scott Fletcher wrote: 
Hi! 

What is the appropriate filepath with the flag command for the sendmail on 
the UNIX machine?? I send an email to yahoo and got the error message which 
I'm going to paste it here... 

--clip-- 
- The following addresses had permanent fatal errors - 
[EMAIL PROTECTED] 

--- The transcript of the session follows --- 
... while talking to mx2.mail.yahoo.com.: 
>>> MAIL From: SIZE=40 
<<< 501 Syntax error in parameters or arguments 
501 [EMAIL PROTECTED] Data format error 
--clip-- 

One thing I know for sure is that the sendmail is working and that hte 
PHP code is working. I don't think I did the bad php command. Could it be 
the sendmail command be set wrong??? 

Thanks, 
FletchSOD 



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

-- 
Adam Voigt ([EMAIL PROTECTED]) 
The Cryptocomm Group 
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 
-- 
Adam Voigt ([EMAIL PROTECTED]) 
The Cryptocomm Group 
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 



Re: [PHP] Re: recursion?????

2003-02-18 Thread David T-G
Kirk --

...and then Johnson, Kirk said...
% 
[quoting me]
% 
% > Not me!  Not me!  Not me!
% > 
% > It is by no means ubiquitous.  Anyone who even moderately considers
% > security will have it turned off.
% 
% The latest survey I've seen indicates that about 11% of browsers have JS
% disabled.

Hmmm...  Less than I thought; I was under the impresssion that it was up
nearer 20%.


% 
% About the same percent have cookies disabled.

Yeah.  Just as I do :-)


% 
% Kirk


HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg97395/pgp0.pgp
Description: PGP signature


Re: [PHP] php.ini question.....

2003-02-18 Thread David Otton
On Tue, 18 Feb 2003 17:38:28 +0100, you wrote:

>At last I got safe-mode turned off (Gott sei dank!). But I'm still having a 
>problem.  I can only read Mysql DBs. I can not open a DB to update. 

You have to connect to MySQL with a username and password.

First check that the user you're connecting as has permission to do
UPDATEs as well as SELECTs.


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




[PHP] MySQL DB Schema

2003-02-18 Thread Phillip S. Baker
Greetings all,

Is there an easy way to pull out the schema of a MySQL for viewing??

Thanks

Phillip


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




[PHP] php.ini question.....

2003-02-18 Thread James Hatridge
HI all...

At last I got safe-mode turned off (Gott sei dank!). But I'm still having a 
problem.  I can only read Mysql DBs. I can not open a DB to update. 

All I can see is that there must be something wrong with either the way I 
complied PHP or the php.ini file. When I complied PHP I used "--with-mysql". 
Is this enough or do I need a dir name? If a dir name what?

Is there any special thing I need in PHP.ini to update mysql?

Lastly, how can I make PHP read php.ini without rebooting? 

BTW I'm using SuSE 8.1 Pro, netscape, and KDE.

Thanks,

JIM

-- 
Jim Hatridge
Linux User #88484
--
 BayerWulf
   Linux System # 129656
 The Recycled Beowulf Project
  Looking for throw-away or obsolete computers and parts
   to recycle into a Linux super computer


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




Re: [PHP] Re: recursion?????

2003-02-18 Thread Erik Price

On Tuesday, February 18, 2003, at 10:58  AM, Johnson, Kirk wrote:


The latest survey I've seen indicates that about 11% of browsers have 
JS
disabled.

About the same percent have cookies disabled.

Too many for my tastes.  Probably 8% of browsers have JS and cookies 
disabled for a reason (knowingly) and therefore can be considered the 
most dangerous segment of users.  (Knowledge being power and all.)


Erik





--
Erik Price

email: [EMAIL PROTECTED]
jabber: [EMAIL PROTECTED]


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



Re: [PHP] ankord php text editor

2003-02-18 Thread Awlad Hussain
Tell us what the url of Ankord is.

 I use HtmlKit (http://www.htmlkit.com)  its the best FREE editor available
out there. :)

-awlad

- Original Message -
From: "Edward Peloke" <[EMAIL PROTECTED]>
To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 3:46 PM
Subject: [PHP] ankord php text editor


> anyone use the php expert editor from Ankord?  If so, what do you think?
>
> Thanks,
> Eddie
>
> --
> 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




Re: [PHP] function getting redeclared

2003-02-18 Thread Erik Price

On Tuesday, February 18, 2003, at 10:27  AM, Ford, Mike [LSS] wrote:


I have a script, "registration.php", which calls require_once on the
Registrant.class file mentioned in the above error message.  The
Registrant::setPhone() method is called more than once.  Since it is
called more than once, the function "isValidPhoneNumber()" defined
within setPhone() is defined more than once, which I suspect is the
source of the problem.  Does PHP not allow you to define a function
within a function and then call the enclosing function more
than once?


Well, it kinda does, but as it doesn't limit the scope in any way 
there's
not really any point.  Besides, it can lead to the kind of problems 
you're
experiencing.  Just declare the two functions sequentially in your 
include
file.

Okay, so PHP stores all functions that are not class methods in a 
global namespace?  Or does it even do this with methods?

Just curious so I don't depend on anything I'm used to from other 
languages thanks!


Erik





--
Erik Price

email: [EMAIL PROTECTED]
jabber: [EMAIL PROTECTED]


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



Re: [PHP] Set Current Array Pointer

2003-02-18 Thread Chris Boget
> is it possible to set the pointer of an array to a specific
> key or value of the array, so i can write an array navi-
> gation script?
> Maybe there is a way to use pos() to set it to a specific
> place in the array, but i dont know how.

Well, you can always access the array elements using a
numerical index.  And you can use whatever method is
most convenient to set that index.  Alternately, you can
look into current() and next().

Chris


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




RE: [PHP] register_globals On

2003-02-18 Thread Johnson, Kirk

> I'm thinking of running a shopping cart package (osCommerce) 
> that requires
> register_globals to be enabled. With all the warnings about 
> security with
> register_globals enabled I'm worried.
> 
> How dangerous is it?

The key defensive step is to initialize all of your session variables at the
time you create them, like so:

$isAdmin = '';
session_register('isAdmin');

PHP will do the rest ;)

Kirk

 

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




[PHP] Set Current Array Pointer

2003-02-18 Thread Sascha Braun
Hi Folks,

is it possible to set the pointer of an array to a specific
key or value of the array, so i can write an array navi-
gation script?

Maybe there is a way to use pos() to set it to a specific
place in the array, but i dont know how.

Please help me.

Sascha

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




Re: [PHP] php.ini for UNIX sendmail????

2003-02-18 Thread Scott Fletcher
Well, okay, even with the '\r\n' path, I still have problem.   Here's the new script 
and I retested it.

--clip--
$message = "This is a test";

mail("[EMAIL PROTECTED]", "the subject", $message,
"From: webmaster@$SERVER_NAME\r\n"
."Return-Path: [EMAIL PROTECTED]\r\n"
."Reply-To: webmaster@$SERVER_NAME\r\n"
."X-Mailer: PHP/".phpversion()."\r\n");
--clip--

So far, I never got the email at yahoo and I never got the email at abcoa.com.
  "Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Well your missing your \r\n at the end of your return path. 

  On Tue, 2003-02-18 at 10:57, Scott Fletcher wrote: 
Here's the command... 

--clip-- 
mail("[EMAIL PROTECTED]", "the subject", $message, 
"From: webmaster@$SERVER_NAME\r\n" 
."Return-Path: [EMAIL PROTECTED]" 
."Reply-To: webmaster@$SERVER_NAME\r\n" 
."X-Mailer: PHP/" . phpversion()); 
--clip-- 

The bad thing is that when I send the mail. I never get an email back when 
something is not working right by using the return-path. 


"Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... 
Oh, ok, well how about your PHP code then (the actual mail() line)? 

On Tue, 2003-02-18 at 10:34, Scott Fletcher wrote: 
Here's is the response to the command, 'where sendmail'. 
>>bash: where: command not found 

So, I don't have a where command but I did the phpinfo() and it showed . 

--clip-- 
Directive || Local Value || master value 


 
sendmail_from || no value || no value 
sendmail_path || /usr/sbin/sendmail -t -i || /usr/sbin/sendmail -t -i 
--clip-- 

I don't have email problem when I send email to anywhere, the only problem is the 
yahoo itself... 

Thanks... 
"Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... 
Umm, are you asking for Sendmail's path? 
It's usually /usr/bin/sendmail -t -i but you can verify where it is 
on your system by typing "where sendmail". 

On Tue, 2003-02-18 at 10:25, Scott Fletcher wrote: 
Hi! 

What is the appropriate filepath with the flag command for the sendmail on 
the UNIX machine?? I send an email to yahoo and got the error message which 
I'm going to paste it here... 

--clip-- 
- The following addresses had permanent fatal errors - 
[EMAIL PROTECTED] 

--- The transcript of the session follows --- 
... while talking to mx2.mail.yahoo.com.: 
>>> MAIL From: SIZE=40 
<<< 501 Syntax error in parameters or arguments 
501 [EMAIL PROTECTED] Data format error 
--clip-- 

One thing I know for sure is that the sendmail is working and that hte 
PHP code is working. I don't think I did the bad php command. Could it be 
the sendmail command be set wrong??? 

Thanks, 
FletchSOD 



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

-- 
Adam Voigt ([EMAIL PROTECTED]) 
The Cryptocomm Group 
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 
-- 
Adam Voigt ([EMAIL PROTECTED]) 
The Cryptocomm Group 
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 



RE: [PHP] Re: recursion?????

2003-02-18 Thread Johnson, Kirk


> % The benefit of checking in javascript(which I suspect is 
> enabled in most 
> 
> Not me!  Not me!  Not me!
> 
> It is by no means ubiquitous.  Anyone who even moderately considers
> security will have it turned off.


The latest survey I've seen indicates that about 11% of browsers have JS
disabled.

About the same percent have cookies disabled.

Kirk

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




Re: [PHP] php.ini for UNIX sendmail????

2003-02-18 Thread Adam Voigt




Well your missing your \r\n at the end of your return path.



On Tue, 2003-02-18 at 10:57, Scott Fletcher wrote:

Here's the command...



--clip--

mail("[EMAIL PROTECTED]", "the subject", $message,

"From: webmaster@$SERVER_NAME\r\n"

."Return-Path: [EMAIL PROTECTED]"

."Reply-To: webmaster@$SERVER_NAME\r\n"

."X-Mailer: PHP/" . phpversion());

--clip--



The bad thing is that when I send the mail.  I never get an email back when something is not working right by using the return-path.





  "Adam Voigt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

  Oh, ok, well how about your PHP code then (the actual mail() line)? 



  On Tue, 2003-02-18 at 10:34, Scott Fletcher wrote: 

Here's is the response to the command, 'where sendmail'. 

>>bash: where: command not found 



So, I don't have a where command but I did the phpinfo() and it showed . 



--clip-- 

Directive || Local Value || master value 

 

sendmail_from || no value || no value 

sendmail_path || /usr/sbin/sendmail -t -i || /usr/sbin/sendmail -t -i 

--clip-- 



I don't have email problem when I send email to anywhere, the only problem is the yahoo itself... 



Thanks... 

"Adam Voigt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] 

Umm, are you asking for Sendmail's path? 

It's usually /usr/bin/sendmail -t -i but you can verify where it is 

on your system by typing "where sendmail". 



On Tue, 2003-02-18 at 10:25, Scott Fletcher wrote: 

Hi! 



What is the appropriate filepath with the flag command for the sendmail on 

the UNIX machine?? I send an email to yahoo and got the error message which 

I'm going to paste it here... 



--clip-- 

- The following addresses had permanent fatal errors - 

[EMAIL PROTECTED] 



--- The transcript of the session follows --- 

... while talking to mx2.mail.yahoo.com.: 

>>> MAIL From: SIZE=40 

<<< 501 Syntax error in parameters or arguments 

501 [EMAIL PROTECTED] Data format error 

--clip-- 



One thing I know for sure is that the sendmail is working and that hte 

PHP code is working. I don't think I did the bad php command. Could it be 

the sendmail command be set wrong??? 



Thanks, 

FletchSOD 







-- 

PHP General Mailing List (http://www.php.net/) 

To unsubscribe, visit: http://www.php.net/unsub.php 



-- 

Adam Voigt ([EMAIL PROTECTED]) 

The Cryptocomm Group 

My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 

-- 

Adam Voigt ([EMAIL PROTECTED])

The Cryptocomm Group

My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 




-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


Re: [PHP] php.ini for UNIX sendmail????

2003-02-18 Thread Scott Fletcher
Here's the command...

--clip--
mail("[EMAIL PROTECTED]", "the subject", $message,
"From: webmaster@$SERVER_NAME\r\n"
."Return-Path: [EMAIL PROTECTED]"
."Reply-To: webmaster@$SERVER_NAME\r\n"
."X-Mailer: PHP/" . phpversion());
--clip--

The bad thing is that when I send the mail.  I never get an email back when something 
is not working right by using the return-path.


  "Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Oh, ok, well how about your PHP code then (the actual mail() line)? 

  On Tue, 2003-02-18 at 10:34, Scott Fletcher wrote: 
Here's is the response to the command, 'where sendmail'. 
>>bash: where: command not found 

So, I don't have a where command but I did the phpinfo() and it showed . 

--clip-- 
Directive || Local Value || master value 


 
sendmail_from || no value || no value 
sendmail_path || /usr/sbin/sendmail -t -i || /usr/sbin/sendmail -t -i 
--clip-- 

I don't have email problem when I send email to anywhere, the only problem is the 
yahoo itself... 

Thanks... 
"Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... 
Umm, are you asking for Sendmail's path? 
It's usually /usr/bin/sendmail -t -i but you can verify where it is 
on your system by typing "where sendmail". 

On Tue, 2003-02-18 at 10:25, Scott Fletcher wrote: 
Hi! 

What is the appropriate filepath with the flag command for the sendmail on 
the UNIX machine?? I send an email to yahoo and got the error message which 
I'm going to paste it here... 

--clip-- 
- The following addresses had permanent fatal errors - 
[EMAIL PROTECTED] 

--- The transcript of the session follows --- 
... while talking to mx2.mail.yahoo.com.: 
>>> MAIL From: SIZE=40 
<<< 501 Syntax error in parameters or arguments 
501 [EMAIL PROTECTED] Data format error 
--clip-- 

One thing I know for sure is that the sendmail is working and that hte 
PHP code is working. I don't think I did the bad php command. Could it be 
the sendmail command be set wrong??? 

Thanks, 
FletchSOD 



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

-- 
Adam Voigt ([EMAIL PROTECTED]) 
The Cryptocomm Group 
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 



[PHP] ankord php text editor

2003-02-18 Thread Edward Peloke
anyone use the php expert editor from Ankord?  If so, what do you think?

Thanks,
Eddie

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




Re: [PHP] php.ini for UNIX sendmail????

2003-02-18 Thread Adam Voigt




Oh, ok, well how about your PHP code then (the actual mail() line)?



On Tue, 2003-02-18 at 10:34, Scott Fletcher wrote:

Here's is the response to the command, 'where sendmail'.

>>bash: where: command not found



So, I don't have a where command but I did the phpinfo() and it showed .



--clip--

Directive  ||  Local Value ||  master value



sendmail_from || no value ||  no value 

sendmail_path  || /usr/sbin/sendmail -t -i  ||  /usr/sbin/sendmail -t -i 

--clip--



I don't have email problem when I send email to anywhere, the only problem is the yahoo itself...



Thanks...

  "Adam Voigt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

  Umm, are you asking for Sendmail's path? 

  It's usually /usr/bin/sendmail -t -i but you can verify where it is 

  on your system by typing "where sendmail". 



  On Tue, 2003-02-18 at 10:25, Scott Fletcher wrote: 

Hi! 



What is the appropriate filepath with the flag command for the sendmail on 

the UNIX machine?? I send an email to yahoo and got the error message which 

I'm going to paste it here... 



--clip-- 

- The following addresses had permanent fatal errors - 

[EMAIL PROTECTED] 



--- The transcript of the session follows --- 

... while talking to mx2.mail.yahoo.com.: 

>>> MAIL From: SIZE=40 

<<< 501 Syntax error in parameters or arguments 

501 [EMAIL PROTECTED] Data format error 

--clip-- 



One thing I know for sure is that the sendmail is working and that hte 

PHP code is working. I don't think I did the bad php command. Could it be 

the sendmail command be set wrong??? 



Thanks, 

FletchSOD 







-- 

PHP General Mailing List (http://www.php.net/) 

To unsubscribe, visit: http://www.php.net/unsub.php 



-- 

Adam Voigt ([EMAIL PROTECTED])

The Cryptocomm Group

My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 




-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


Re: [PHP] php.ini for UNIX sendmail????

2003-02-18 Thread Scott Fletcher
Here's is the response to the command, 'where sendmail'.
>>bash: where: command not found

So, I don't have a where command but I did the phpinfo() and it showed .

--clip--
Directive  ||  Local Value ||  master value

sendmail_from || no value ||  no value 
sendmail_path  || /usr/sbin/sendmail -t -i  ||  /usr/sbin/sendmail -t -i 
--clip--

I don't have email problem when I send email to anywhere, the only problem is the 
yahoo itself...

Thanks...
  "Adam Voigt" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Umm, are you asking for Sendmail's path? 
  It's usually /usr/bin/sendmail -t -i but you can verify where it is 
  on your system by typing "where sendmail". 

  On Tue, 2003-02-18 at 10:25, Scott Fletcher wrote: 
Hi! 

What is the appropriate filepath with the flag command for the sendmail on 
the UNIX machine?? I send an email to yahoo and got the error message which 
I'm going to paste it here... 

--clip-- 
- The following addresses had permanent fatal errors - 
[EMAIL PROTECTED] 

--- The transcript of the session follows --- 
... while talking to mx2.mail.yahoo.com.: 
>>> MAIL From: SIZE=40 
<<< 501 Syntax error in parameters or arguments 
501 [EMAIL PROTECTED] Data format error 
--clip-- 

One thing I know for sure is that the sendmail is working and that hte 
PHP code is working. I don't think I did the bad php command. Could it be 
the sendmail command be set wrong??? 

Thanks, 
FletchSOD 



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

-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 



RE: [PHP] function getting redeclared

2003-02-18 Thread Ford, Mike [LSS]
> -Original Message-
> From: Erik Price [mailto:[EMAIL PROTECTED]]
> Sent: 18 February 2003 15:14
> 
> I have a script, "registration.php", which calls require_once on the 
> Registrant.class file mentioned in the above error message.  The 
> Registrant::setPhone() method is called more than once.  Since it is 
> called more than once, the function "isValidPhoneNumber()" defined 
> within setPhone() is defined more than once, which I suspect is the 
> source of the problem.  Does PHP not allow you to define a function 
> within a function and then call the enclosing function more 
> than once?  

Well, it kinda does, but as it doesn't limit the scope in any way there's
not really any point.  Besides, it can lead to the kind of problems you're
experiencing.  Just declare the two functions sequentially in your include
file.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




Re: [PHP] php.ini for UNIX sendmail????

2003-02-18 Thread Adam Voigt




Umm, are you asking for Sendmail's path?

It's usually /usr/bin/sendmail -t -i but you can verify where it is

on your system by typing "where sendmail".



On Tue, 2003-02-18 at 10:25, Scott Fletcher wrote:

Hi!



  What is the appropriate filepath with the flag command for the sendmail on

the UNIX machine??  I send an email to yahoo and got the error message which

I'm going to paste it here...



--clip--

- The following addresses had permanent fatal errors -

[EMAIL PROTECTED]



  --- The transcript of the session follows ---

... while talking to mx2.mail.yahoo.com.:

>>> MAIL From: SIZE=40

<<< 501 Syntax error in parameters or arguments

501 [EMAIL PROTECTED] Data format error

--clip--



One thing I know for sure is that the sendmail is working and that hte

PHP code is working.  I don't think I did the bad php command.  Could it be

the sendmail command be set wrong???



Thanks,

 FletchSOD







-- 

PHP General Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP] php.ini for UNIX sendmail????

2003-02-18 Thread Scott Fletcher
Hi!

  What is the appropriate filepath with the flag command for the sendmail on
the UNIX machine??  I send an email to yahoo and got the error message which
I'm going to paste it here...

--clip--
- The following addresses had permanent fatal errors -
[EMAIL PROTECTED]

  --- The transcript of the session follows ---
... while talking to mx2.mail.yahoo.com.:
>>> MAIL From: SIZE=40
<<< 501 Syntax error in parameters or arguments
501 [EMAIL PROTECTED] Data format error
--clip--

One thing I know for sure is that the sendmail is working and that hte
PHP code is working.  I don't think I did the bad php command.  Could it be
the sendmail command be set wrong???

Thanks,
 FletchSOD



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




  1   2   >