[PHP] HELP read & write???

2001-12-18 Thread NZeeman

HI
I See that the read and write functions have been discontinued in 4.1.0
can anyone tell me if they have been replaced with onther functions that
replace their functionality or how I could implement something like this :
read( stdin , $buff, $length );
write( stdout, $str_return, strlen( $str_returb ) );

Thanks for any help at all !

--
NZ
BTECH

"I love deadlines
I like the sound they make when they rush past"




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] telneting sockets help..

2001-12-18 Thread Kernel Panic

Hanging is normal accroding to your code, because the telnet server is
waiting for your handshake signal in order to telnet successfully, you
need to follow the protocal in rfc strictly.

I've wrote a telnet class, although it;s a very rough one, but it work. If
anybody have any change on it, please let me know. thx.

"Lawrence Sheed" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
...
> Have you tried setting socket blocking?
> Here's what I do...
>
> var $connection=0;
> $host = "pericles.ipaustralia.gov.au";
> $port=23;
>
> switch( $connection=fsockopen($host,$port) )   {
>case -3:
> return("-3 socket could not be created");
>case -4:
> return("-4 dns lookup on host '$host' failed");
>case -5:
> return("-5 connection refused or timed out");
>case -6:
> return("-6 fdopen() call failed");
>case -7:
> return("-7 setvbuf() call failed");
>default:
> //let getline do its job bit by bit rather than timeout by timeout
> ;)
>   set_socket_blocking ($connection,false);
>   }
>
> Function GetLine() {
> global $debug,$connection;
> $line = fread($connection,128);
> while(empty($line)){
> $line = fread($connection,128);
> usleep(25);
> }
>
> //If debugging on, force output
> if ($debug) {
> print ($line) ."";
> System("echo ''");
> flush;
> }
>
> return ($line);
> }
>
>
> print GetLine();
>
> -Original Message-
> From: brendan [mailto:[EMAIL PROTECTED]]
> Sent: December 19, 2001 1:04 PM
> To: [EMAIL PROTECTED]; James Cox
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] telneting sockets help..
>
>
> hi james,
> thanks for your reply  ..
> i was able to connect ( i should have written that in the email) its
> getting the info to flush to the screen that i cant do .. it just hangs..
>
> so if you add
> something like
>
> while (!feof($fp)) {
>  echo fgets ($fp,128);
>  }
>  fclose ($fp);
>
> to the end
> you get nothing..
>
> ...
> herein lies my second sleepless day..
> i have been tyring to use the sockets() functions which have been
> added.. but they are badly documented and extremely unfriendly..
>
> how did you manage to interact with your telnet server?
> cheers
> brendan
>
>
> James Cox wrote:
>
> > Hi,
> >
> > I had recent problems like this, and I traced it to firewall issues;
> however
> > i just checked the destination, and  found it is possible to telnet to
> that
> > port, so it's not a firewall issue on their side.
> >
> > Try using the following code -- and let it run, see what response you
get.
> >
> >  >
> > $host = "pericles.ipaustralia.gov.au";
> >
> > $fp = fsockopen($host, 23, &$errno, &$errstr, 5);
> >if (!($fp)) {
> > echo "SOCKET ERROR: $errno - $errstr\n";
> > }
> >
> > ?>
> >
> > Hope that helps,
> >
> > James Cox
> >
> > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> > James Cox :: Senior Support Engineer
> > Wherewithal, Inc. e: [EMAIL PROTECTED]
> > Wherewithal. Capture Creative Connections.
> > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> >
> >>-Original Message-
> >>From: brendan [mailto:[EMAIL PROTECTED]]
> >>Sent: 19 December 2001 04:12 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: [PHP] telneting sockets help..
> >>
> >>
> >>hi
> >>
> >>i have been trying to write a telnet client to a tn3270 IBM mainframe
> >>database ( pericles.ipaustralia.gov.au:23 ) using fsockopen ...
> >>i thought it wouldnt be that bad given i have done something similar
> >>with usenet ..
> >>however i cannot get it to work no matter what I do .. i just get a
> >>permanent hang ...
> >>has anyone ever attempted this or have any solutions?
> >>
> >>i know this is rather open ended but i cant offer any code which even
> >>kind of works..
> >>
> >>it would be much appreciated..
> >>
> >>
> >>--
> >>PHP General Mailing List (http://www.php.net/)
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


begin 666 telnet.php
M/#]P:' @+RH-"D9I;&4@;F%M93H@+VEN8VQU9&4O=&5L;F5T+G!H< T*#0I$
M97-C6]U(&-H86YG92!A;GD@PT*"61E9FEN92@B4T(B+"!C:'(H
M,C4P*2D[#0I]#0II9B H(61E9FEN960H(E=)3$PB*2D@>PT*"61E9FEN92@B
M5TE,3"(L(&-HPT*"61E9FEN92@B7T1/(BP@8VAR*#(U,RDI.PT*?0T*:68@
M*"%D969I;F5D*")$3TY4(BDI('L-"@ED969I;F4H(D1/3E0B+"!C:'(H,C4T
M*2D[#0I]#0II9B H(61E9FEN960H(DE!0R(I*2![#0H)9&5F:6YE*"))04,B
M+"!C:'(H,C4U*2D[#0I]#0H-"F-L87-S(%1%3$Y%5"![#0H)=F%R("1H;W-T
M.PT*"79APT*+R\)9&5F:6YE('-U<'!OPT*+R\):68@:6YP=70@2@D
M2@DPT*
M"0D))'1H:7,M/G-U7W!R;VUP=" ]("1S=5]PPT*"0D))'1H:7,M/F1E8G5G*")FPT*"0D)"65C:&\@(DYO(&QI;FMI9#H@)&5R2@D=&AIPT*+R\)PT*"0D))&,@/2! 9F=E=&,H)'1H:7,M
M/FQI;FMI9"D[#0H)"0EI9B H)&,@/3T@24%#*2![#0HO+PEG;R!T;R!C;VUM
M86YD(&UO9&4-"@D)"0DD=

Re: [PHP] fgets and eval

2001-12-18 Thread Greg Donald


> Okay here is the situation. I am reading a file using fgets up until I hit
a certain delimiter within the text. No problem there. This text file may or
may not
> contain php in the format . So I now have two variables $header
and $footer which may or may not contain some php within them. I need to
echo
> the variables at the top and bottom of other files but need any php that
may be in there to execute.
>
>  I tried echo(eval($header))
>
> and I also tried
>
> $header = addslashes($header);
> eval("\$header = \"$header\";");
> $header= stripslashes($header);
> echo($header);
>
> The first produces and error, the second produces no error however only
variables evaluate while actual commands, such as echo just get written into
the
> code.
>
> Any idea  what I may be doing wrong here?

Try this, it's from a template parsing function I wrote:

$header = str_replace("\\'","'",addslashes($header));
eval("\$header = \"$header\";");

Greg



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: kancha [PHP] telneting sockets help..

2001-12-18 Thread brendan

have you tried the client script at http://php.ca/manual/en/ref.sockets.php
??
this seems to (kind of) work ..
however i get a ton of warning messsages from php such as

"Attempting to connect to '202.14.186.30' on port '23'...
Warning: socket_connect() expects parameter 1 to be resource, boolean
Warning: socket_read() expects parameter 1 to be resource, boolean given
Warning: socket_write() expects parameter 1 to be resource, boolean
Warning: socket_close() expects parameter 1 to be resource, boolean
"
not sure why

might be different for you?
cheers


Kancha . wrote:

> I'm in a smilar situation. I'm trying to telnet to a
> RAS server using php and the process justs hangs. I
> tried to telnet to other linux servers as well and the
> result was same. fsockopen to other ports such as 21
> or even 25 workds. It's just the port 23 that's giving
> this strange problem.
> 
> So far I haven't got a clue.
> 
> 
> --- brendan <[EMAIL PROTECTED]> wrote:
> 
>>hi
>>
>>i have been trying to write a telnet client to a
>>tn3270 IBM mainframe 
>>database ( pericles.ipaustralia.gov.au:23 ) using
>>fsockopen ...
>>i thought it wouldnt be that bad given i have done
>>something similar 
>>with usenet ..
>>however i cannot get it to work no matter what I do
>>.. i just get a 
>>permanent hang ...
>>has anyone ever attempted this or have any
>>solutions?
>>
>>i know this is rather open ended but i cant offer
>>any code which even 
>>kind of works..
>>
>>it would be much appreciated..
>>
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail:
>>[EMAIL PROTECTED]
>>For additional commands, e-mail:
>>[EMAIL PROTECTED]
>>To contact the list administrators, e-mail:
>>[EMAIL PROTECTED]
>>
>>
> 
> 
> __
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] telneting sockets help..

2001-12-18 Thread brendan

ta lawrence ..

did you get that to work on your server side??
if so maybe its a m$IIS problem (which i am forced to run off)  .. 
because that code hangs here too
cheers

brendan


Lawrence Sheed wrote:

> Have you tried setting socket blocking?
> Here's what I do...
> 
> var $connection=0; 
> $host = "pericles.ipaustralia.gov.au";
> $port=23;
> 
> switch( $connection=fsockopen($host,$port) )   { 
>case -3: 
> return("-3 socket could not be created"); 
>case -4: 
> return("-4 dns lookup on host '$host' failed"); 
>case -5: 
> return("-5 connection refused or timed out"); 
>case -6: 
> return("-6 fdopen() call failed"); 
>case -7: 
> return("-7 setvbuf() call failed"); 
>default: 
>   //let getline do its job bit by bit rather than timeout by timeout
> ;)
>   set_socket_blocking ($connection,false);
>   } 
> 
> Function GetLine() {
>   global $debug,$connection;
>   $line = fread($connection,128);
>   while(empty($line)){
>   $line = fread($connection,128);
>   usleep(25); 
>   }
> 
>   //If debugging on, force output
>   if ($debug) {
>   print ($line) ."";
>   System("echo ''"); 
>   flush;
>   }
> 
>   return ($line);
> }
> 
> 
> print GetLine();
> 
> -Original Message-
> From: brendan [mailto:[EMAIL PROTECTED]]
> Sent: December 19, 2001 1:04 PM
> To: [EMAIL PROTECTED]; James Cox
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] telneting sockets help..
> 
> 
> hi james,
> thanks for your reply  ..
> i was able to connect ( i should have written that in the email) its 
> getting the info to flush to the screen that i cant do .. it just hangs..
> 
> so if you add
> something like
> 
> while (!feof($fp)) {
>  echo fgets ($fp,128);
>  }
>  fclose ($fp);
> 
> to the end
> you get nothing..
> 
> ...
> herein lies my second sleepless day..
> i have been tyring to use the sockets() functions which have been 
> added.. but they are badly documented and extremely unfriendly..
> 
> how did you manage to interact with your telnet server?
> cheers
> brendan
> 
> 
> James Cox wrote:
> 
> 
>>Hi,
>>
>>I had recent problems like this, and I traced it to firewall issues;
>>
> however
> 
>>i just checked the destination, and  found it is possible to telnet to
>>
> that
> 
>>port, so it's not a firewall issue on their side.
>>
>>Try using the following code -- and let it run, see what response you get.
>>
>>>
>>$host = "pericles.ipaustralia.gov.au";
>>
>>$fp = fsockopen($host, 23, &$errno, &$errstr, 5);
>>   if (!($fp)) {
>>  echo "SOCKET ERROR: $errno - $errstr\n";
>>}
>>
>>?>
>>
>>Hope that helps,
>>
>>James Cox
>>
>>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
>>James Cox :: Senior Support Engineer
>>Wherewithal, Inc. e: [EMAIL PROTECTED]
>>Wherewithal. Capture Creative Connections.
>>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
>>
>>
>>>-Original Message-
>>>From: brendan [mailto:[EMAIL PROTECTED]]
>>>Sent: 19 December 2001 04:12 AM
>>>To: [EMAIL PROTECTED]
>>>Subject: [PHP] telneting sockets help..
>>>
>>>
>>>hi
>>>
>>>i have been trying to write a telnet client to a tn3270 IBM mainframe
>>>database ( pericles.ipaustralia.gov.au:23 ) using fsockopen ...
>>>i thought it wouldnt be that bad given i have done something similar
>>>with usenet ..
>>>however i cannot get it to work no matter what I do .. i just get a
>>>permanent hang ...
>>>has anyone ever attempted this or have any solutions?
>>>
>>>i know this is rather open ended but i cant offer any code which even
>>>kind of works..
>>>
>>>it would be much appreciated..
>>>
>>>
>>>--
>>>PHP General Mailing List (http://www.php.net/)
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] telneting sockets help..

2001-12-18 Thread Lawrence . Sheed

Have you tried setting socket blocking?
Here's what I do...

var $connection=0; 
$host = "pericles.ipaustralia.gov.au";
$port=23;

switch( $connection=fsockopen($host,$port) )   { 
   case -3: 
return("-3 socket could not be created"); 
   case -4: 
return("-4 dns lookup on host '$host' failed"); 
   case -5: 
return("-5 connection refused or timed out"); 
   case -6: 
return("-6 fdopen() call failed"); 
   case -7: 
return("-7 setvbuf() call failed"); 
   default: 
//let getline do its job bit by bit rather than timeout by timeout
;)
  set_socket_blocking ($connection,false);
  } 

Function GetLine() {
global $debug,$connection;
$line = fread($connection,128);
while(empty($line)){
$line = fread($connection,128);
usleep(25); 
}

//If debugging on, force output
if ($debug) {
print ($line) ."";
System("echo ''"); 
flush;
}

return ($line);
}


print GetLine();

-Original Message-
From: brendan [mailto:[EMAIL PROTECTED]]
Sent: December 19, 2001 1:04 PM
To: [EMAIL PROTECTED]; James Cox
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] telneting sockets help..


hi james,
thanks for your reply  ..
i was able to connect ( i should have written that in the email) its 
getting the info to flush to the screen that i cant do .. it just hangs..

so if you add
something like

while (!feof($fp)) {
 echo fgets ($fp,128);
 }
 fclose ($fp);

to the end
you get nothing..

...
herein lies my second sleepless day..
i have been tyring to use the sockets() functions which have been 
added.. but they are badly documented and extremely unfriendly..

how did you manage to interact with your telnet server?
cheers
brendan


James Cox wrote:

> Hi,
> 
> I had recent problems like this, and I traced it to firewall issues;
however
> i just checked the destination, and  found it is possible to telnet to
that
> port, so it's not a firewall issue on their side.
> 
> Try using the following code -- and let it run, see what response you get.
> 
>  
> $host = "pericles.ipaustralia.gov.au";
> 
> $fp = fsockopen($host, 23, &$errno, &$errstr, 5);
>if (!($fp)) {
>   echo "SOCKET ERROR: $errno - $errstr\n";
> }
> 
> ?>
> 
> Hope that helps,
> 
> James Cox
> 
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> James Cox :: Senior Support Engineer
> Wherewithal, Inc. e: [EMAIL PROTECTED]
> Wherewithal. Capture Creative Connections.
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> 
>>-Original Message-
>>From: brendan [mailto:[EMAIL PROTECTED]]
>>Sent: 19 December 2001 04:12 AM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP] telneting sockets help..
>>
>>
>>hi
>>
>>i have been trying to write a telnet client to a tn3270 IBM mainframe
>>database ( pericles.ipaustralia.gov.au:23 ) using fsockopen ...
>>i thought it wouldnt be that bad given i have done something similar
>>with usenet ..
>>however i cannot get it to work no matter what I do .. i just get a
>>permanent hang ...
>>has anyone ever attempted this or have any solutions?
>>
>>i know this is rather open ended but i cant offer any code which even
>>kind of works..
>>
>>it would be much appreciated..
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>>
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] telneting sockets help..

2001-12-18 Thread Kancha .

I'm in a smilar situation. I'm trying to telnet to a
RAS server using php and the process justs hangs. I
tried to telnet to other linux servers as well and the
result was same. fsockopen to other ports such as 21
or even 25 workds. It's just the port 23 that's giving
this strange problem.

So far I haven't got a clue.


--- brendan <[EMAIL PROTECTED]> wrote:
> hi
> 
> i have been trying to write a telnet client to a
> tn3270 IBM mainframe 
> database ( pericles.ipaustralia.gov.au:23 ) using
> fsockopen ...
> i thought it wouldnt be that bad given i have done
> something similar 
> with usenet ..
> however i cannot get it to work no matter what I do
> .. i just get a 
> permanent hang ...
> has anyone ever attempted this or have any
> solutions?
> 
> i know this is rather open ended but i cant offer
> any code which even 
> kind of works..
> 
> it would be much appreciated..
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Access rights for php files on Linux?

2001-12-18 Thread scott

For a little bit more security, you could find out what user
apache is running as (look in httpd.conf), and chown the
file to that user:group and set permissions 400.
(So that only the apache process can read the file)

However, this is not very secure, becuase a CGI script
could still read your file.  (Any file that is readable by
the webserver is, in essence, readable by any script being
executed by that webserver - which, to say the least, can
be a rather large security problem)

> -Original Message-
> From: Michael Geier [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] Access rights for php files on Linux?
> 
> Use include files to pass your authentication information.
> 
>  include('auth.php');
> ?>
> 
> auth.php:
>  $username="foo";
> $password="bar";
> ?>
> 
> put auth.php in your home directory with you as owner and apache group id
> as group, or create a group that contains you and apache user (probably
> 'nobody').
> 
> $> chmod 740 /your/home/dir/auth.php
> 
> On Wed, 19 Dec 2001, Daniel Fassnauer wrote:
> 
> > Well, I have encounterd a problem which is quite big (for me), so I hope
> > I find help here.
> > My setup is a Linux Machine, running Apache with php as a module.
> > In order for the webserver to parse the file, i have to give read
> > permission to world.
> > This is a problem, because about 100 people have shell access and could
> > then just cat /www/myphpfile.php, and would thus get passwords which i
> > dont want to share (like mysql password in the phpmyadmin config file)
> > and general access to my code. Also, the different users on the machine
> > want to be able to host php files with everyone else being able to read
> > them. Is there any way i can actually do that?
> > I must say that i am rather new to all this stuff, so i am really
> > confused as what to do, and i would appreciate any help..
> > Thanks in advance...
> >
> > Daniel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] is_reference?

2001-12-18 Thread GaM3R

ok, the idea is this

foreach ( $_user_details as $key=>$value ) {
$return_array["$key"] = &$_user_details["$key"];
}

im doing that and i want that when $return_array gets updated and isnt a reference 
anymore to be able to add it to the sql for an update, thats no problem IF i can work 
out a way to test if its a reference or a new string to update the database with

any suggestions?

i know i can foreach and == test them but an is_reference would be faster if it 
existed :/


Cameron



Re: [PHP] Access rights for php files on Linux?

2001-12-18 Thread Michael Geier

Use include files to pass your authentication information.



auth.php:


put auth.php in your home directory with you as owner and apache group id
as group, or create a group that contains you and apache user (probably
'nobody').

$> chmod 740 /your/home/dir/auth.php

On Wed, 19 Dec 2001, Daniel Fassnauer wrote:

> Well, I have encounterd a problem which is quite big (for me), so I hope
> I find help here.
> My setup is a Linux Machine, running Apache with php as a module.
> In order for the webserver to parse the file, i have to give read
> permission to world.
> This is a problem, because about 100 people have shell access and could
> then just cat /www/myphpfile.php, and would thus get passwords which i
> dont want to share (like mysql password in the phpmyadmin config file)
> and general access to my code. Also, the different users on the machine
> want to be able to host php files with everyone else being able to read
> them. Is there any way i can actually do that?
> I must say that i am rather new to all this stuff, so i am really
> confused as what to do, and i would appreciate any help..
> Thanks in advance...
>
> Daniel
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Error while calling a function

2001-12-18 Thread J.F.Kishor

Hello Sir,

Thanks for spending time for my mail and thanks for you kind
response, but sir though php is a server side scripting language it
supports the following tag

 

This is mentioned in the php manual, and I have done lot of scripts
of same kind using above tags an' all of them are working fine.

This is part of php manual
---

Migrating from PHP/FI 2.0 to PHP 3.0 
Start/end tags

   The first thing you probably will notice is that PHP's start and end
   tags have changed. The old  form has been replaced by three new
   possible forms:

   Example A-1. Migration: old start/end tags


   As of version 2.0, PHP/FI also supports this variation:

   Example A-2. Migration: first new start/end tags

   Notice that the end tag now consists of a question mark and a
   greater-than character instead of just greater-than. However, if you
   plan on using XML on your server, you will get problems with the first
   new variant, because PHP may try to execute the XML markup in XML
   documents as PHP code. Because of this, the following variation was
   introduced:

   Example A-3. Migration: second new start/end tags


   Some people have had problems with editors that don't understand the
   processing instruction tags at all. Microsoft FrontPage is one such
   editor, and as a workaround for these, the following variation was
   introduced as well:

   Example A-4. Migration: third new start/end tags


  echo "This is PHP 3.0 code!\n";


 
Thanking you,

cheers :)
- JFK
kishor
Nilgiri Networks

On Tue, 18 Dec 2001, Jim Lucas wrote:

> Plus, what is the  tag for.
> PHP is a server side language, not client side.
> and you have the above mentioned tag inside of an IF statement.  so, if the
> statement doesn't return true, it will never print the openning tag but it
> will always print the closing "" tag.
> 
> Jim
> - Original Message -
> From: "J.F.Kishor" <[EMAIL PROTECTED]>
> To: "PHP Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 18, 2001 5:26 AM
> Subject: [PHP] Error while calling a function
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] telneting sockets help..

2001-12-18 Thread brendan

hi james,
thanks for your reply  ..
i was able to connect ( i should have written that in the email) its 
getting the info to flush to the screen that i cant do .. it just hangs..

so if you add
something like

while (!feof($fp)) {
 echo fgets ($fp,128);
 }
 fclose ($fp);

to the end
you get nothing..

...
herein lies my second sleepless day..
i have been tyring to use the sockets() functions which have been 
added.. but they are badly documented and extremely unfriendly..

how did you manage to interact with your telnet server?
cheers
brendan


James Cox wrote:

> Hi,
> 
> I had recent problems like this, and I traced it to firewall issues; however
> i just checked the destination, and  found it is possible to telnet to that
> port, so it's not a firewall issue on their side.
> 
> Try using the following code -- and let it run, see what response you get.
> 
>  
> $host = "pericles.ipaustralia.gov.au";
> 
> $fp = fsockopen($host, 23, &$errno, &$errstr, 5);
>if (!($fp)) {
>   echo "SOCKET ERROR: $errno - $errstr\n";
> }
> 
> ?>
> 
> Hope that helps,
> 
> James Cox
> 
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> James Cox :: Senior Support Engineer
> Wherewithal, Inc. e: [EMAIL PROTECTED]
> Wherewithal. Capture Creative Connections.
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> 
>>-Original Message-
>>From: brendan [mailto:[EMAIL PROTECTED]]
>>Sent: 19 December 2001 04:12 AM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP] telneting sockets help..
>>
>>
>>hi
>>
>>i have been trying to write a telnet client to a tn3270 IBM mainframe
>>database ( pericles.ipaustralia.gov.au:23 ) using fsockopen ...
>>i thought it wouldnt be that bad given i have done something similar
>>with usenet ..
>>however i cannot get it to work no matter what I do .. i just get a
>>permanent hang ...
>>has anyone ever attempted this or have any solutions?
>>
>>i know this is rather open ended but i cant offer any code which even
>>kind of works..
>>
>>it would be much appreciated..
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>>
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] fgets and eval

2001-12-18 Thread Gerard Onorato

Hello all,

Okay here is the situation. I am reading a file using fgets up until I hit a certain 
delimiter within the text. No problem there. This text file may or may not 
contain php in the format . So I now have two variables $header and $footer 
which may or may not contain some php within them. I need to echo 
the variables at the top and bottom of other files but need any php that may be in 
there to execute.

 I tried echo(eval($header)) 

and I also tried

$header = addslashes($header); 
eval("\$header = \"$header\";"); 
$header= stripslashes($header); 
echo($header); 

The first produces and error, the second produces no error however only variables 
evaluate while actual commands, such as echo just get written into the 
code.

Any idea  what I may be doing wrong here?

Thanks,

Gerard



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] telneting sockets help..

2001-12-18 Thread James Cox

Hi,

I had recent problems like this, and I traced it to firewall issues; however
i just checked the destination, and  found it is possible to telnet to that
port, so it's not a firewall issue on their side.

Try using the following code -- and let it run, see what response you get.

\n";
}

?>

Hope that helps,

James Cox

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
James Cox :: Senior Support Engineer
Wherewithal, Inc. e: [EMAIL PROTECTED]
Wherewithal. Capture Creative Connections.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> -Original Message-
> From: brendan [mailto:[EMAIL PROTECTED]]
> Sent: 19 December 2001 04:12 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] telneting sockets help..
>
>
> hi
>
> i have been trying to write a telnet client to a tn3270 IBM mainframe
> database ( pericles.ipaustralia.gov.au:23 ) using fsockopen ...
> i thought it wouldnt be that bad given i have done something similar
> with usenet ..
> however i cannot get it to work no matter what I do .. i just get a
> permanent hang ...
> has anyone ever attempted this or have any solutions?
>
> i know this is rather open ended but i cant offer any code which even
> kind of works..
>
> it would be much appreciated..
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] telneting sockets help..

2001-12-18 Thread brendan

hi

i have been trying to write a telnet client to a tn3270 IBM mainframe 
database ( pericles.ipaustralia.gov.au:23 ) using fsockopen ...
i thought it wouldnt be that bad given i have done something similar 
with usenet ..
however i cannot get it to work no matter what I do .. i just get a 
permanent hang ...
has anyone ever attempted this or have any solutions?

i know this is rather open ended but i cant offer any code which even 
kind of works..

it would be much appreciated..


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Question

2001-12-18 Thread Fred

Don't recall seeing them here, but many of us have read their book if that
is of any help.

Fred

Phillip B. Bruce <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
>By any chance that Luke Welling or Laura Thomson is on this list?
>
> --
> 
> *** Phillip B. Bruce ***
> *** http://pbbruce.home.mindspring.com   ***
> *** [EMAIL PROTECTED]   ***
> ***  ***
> *** "Have you ever noticed? Anybody going slower than***
> *** you is an idiot, and anyone going faster than you***
> *** is a maniac." - George Carlin***
> 
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread Fred

Maybe you have never had to deal with a dreamweaver created web page, but it
deposits little javascript code all over the page for decoration.
Apparently the dreamweaver designers pick components like rollover menu
images etc and dreamweaver gladly disperses the javascript code throughout
the document.  Assuming the href's are going to be dynamic to account for
GET variables then the php coder has to dig through the javascript to place
a php element or generate the javascript dynamically, which is apparently
what these designers were trying to avoid.  i.e. they did not want anyone
touching their beautifully created dreamweaver document.

Fred

Mark <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Tue, 18 Dec 2001 16:00:09 -0800, Fred wrote:
>
>Mark <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>well, you don't have to wade through all that html, just put an
>include() in there to a file that has all the php in it. then
>dreamweaver should leave it alone.
>
>Huh?
>
>Obviously the logic can be included, but the output functions need
>to be
>burried deep in dreamweaver created nested tables and javascripts.

hmm,
I'm assuming that javascript is the programmer's responsibility, not
the designer's. Maybe the javascript needs to be dynamically
generated, probably it doesn't. either way it's in a separate file
doesn't get edited in dreamweaver.

I understand that the php will probably have to be in a table and the
designer's will want to be able to change it's appearance, and that's
where css comes in. i.e.:


  

  

  


yes, there's some html in the included file, but the designer's don't
need to have access to it because they can just change how it looks
in the stylesheet.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Access rights for php files on Linux?

2001-12-18 Thread Jim Lucas

your scripts have to have to be readable by your apache user/group  if it
can't read them then it can't run them.  now as for being allowed to only
view files of yours, you would want to place the apache user in your group.
this will give it access to read your files, but so will others running
apache, ie a person writes a php script that is ran by apache and then can
read your files because the process is running as the apache user which can
see your files.  so, to answer your question, no, there isn't a simple way
to do this.


- Original Message -
From: "Daniel Fassnauer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 4:56 PM
Subject: [PHP] Access rights for php files on Linux?


> Well, I have encounterd a problem which is quite big (for me), so I hope
> I find help here.
> My setup is a Linux Machine, running Apache with php as a module.
> In order for the webserver to parse the file, i have to give read
> permission to world.
> This is a problem, because about 100 people have shell access and could
> then just cat /www/myphpfile.php, and would thus get passwords which i
> dont want to share (like mysql password in the phpmyadmin config file)
> and general access to my code. Also, the different users on the machine
> want to be able to host php files with everyone else being able to read
> them. Is there any way i can actually do that?
> I must say that i am rather new to all this stuff, so i am really
> confused as what to do, and i would appreciate any help..
> Thanks in advance...
>
> Daniel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] addslash/stripslashes

2001-12-18 Thread Michael Sims

At 09:49 PM 12/18/2001 +0100, TD - Sales International Holland B.V. wrote:
>Also I'm looking for a small feature of HTML. I know this isn't the right
>list so if you guys don't reply no hard feelings. At this moment I use meta
>to refresh (go back to the form) after entering the data, you'll see a page
>that it's succeeded (or failed for that matter) and than after 3 secs you'll
>go back to the main empty form. However, I'd like to know a way other than
>meta, since when an error occurs it can happen the HTML header is already
>printed out and thus I can't use the meta tag anymore. I was thinking about
>javascript or something but other ways are welcome since javascript can be
>disabled in the browser.

Unless I'm misunderstanding you, something like:

http://www.php.net/";);
?>

should do the trick.  No need to mess with meta refresh tags.  Have your 
form post to itself and at the top of the page do your data validation.  If 
the validation failed, set an error string and display it at the top of the 
form.  Otherwise, use the header() function to direct them to the next page 
on your site.  The only drawback is that if you need variables on the next 
page you'll have to pass them as an URL parameter...

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


-
Michael Sims
mhsims at midsouth dot rr dot com

"The Web site you seek
Can not be located but
Countless more exist."
-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Access rights for php files on Linux?

2001-12-18 Thread Daniel Fassnauer

Well, I have encounterd a problem which is quite big (for me), so I hope 
I find help here.
My setup is a Linux Machine, running Apache with php as a module.
In order for the webserver to parse the file, i have to give read 
permission to world.
This is a problem, because about 100 people have shell access and could 
then just cat /www/myphpfile.php, and would thus get passwords which i 
dont want to share (like mysql password in the phpmyadmin config file) 
and general access to my code. Also, the different users on the machine 
want to be able to host php files with everyone else being able to read 
them. Is there any way i can actually do that?
I must say that i am rather new to all this stuff, so i am really 
confused as what to do, and i would appreciate any help..
Thanks in advance...

Daniel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] JavaScript & php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-18 Thread Mark

On Tue, 18 Dec 2001 16:16:20 -0800, Jim Lucas wrote:
>the bad thing is, it will still stop the browser from finishing the
>loading
>of the page.

not in any browser I've tried.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread Mark

On Tue, 18 Dec 2001 16:37:07 -0800, Jim Lucas wrote:
>well, the class tag in the tr won't work with ns6 , but fortunately
>for you
>( sigh ) ns 6 does include the div tag.

well, I don't know what a designer would really want to do with tr
anyway but you got the general idea of what I'm saying.



>- Original Message -
>From: "Mike Eheler" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Tuesday, December 18, 2001 4:28 PM
>Subject: Re: [PHP] Working with designers...
>
>
>> LOL.
>>
>> Use Netscape 4.
>>
>> Now there's a condtradiction you don't hear every day.
>>
>> Mike
>>
>> Jim Lucas wrote:
>>
>> > hope you don't plan to use that example table in netscape 4.x
>> >
>> > - Original Message -
>> > From: "Mark" <[EMAIL PROTECTED]>
>> > To: <[EMAIL PROTECTED]>; >[EMAIL PROTECTED]>
>> > Sent: Tuesday, December 18, 2001 4:10 PM
>> > Subject: Re: [PHP] Working with designers...
>> >
>> >
>> > On Tue, 18 Dec 2001 16:00:09 -0800, Fred wrote:
>> >
>> >>Mark <[EMAIL PROTECTED]> wrote in message
>> >>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> >>well, you don't have to wade through all that html, just put an
>> >>include() in there to a file that has all the php in it. then
>> >>dreamweaver should leave it alone.
>> >>
>> >>Huh?
>> >>
>> >>Obviously the logic can be included, but the output functions
>>need
>> >>to be
>> >>burried deep in dreamweaver created nested tables and
>>javascripts.
>> >>
>> >
>> > hmm,
>> > I'm assuming that javascript is the programmer's responsibility,
>>not
>> > the designer's. Maybe the javascript needs to be dynamically
>> > generated, probably it doesn't. either way it's in a separate
>>file
>> > doesn't get edited in dreamweaver.
>> >
>> > I understand that the php will probably have to be in a table
>>and the
>> > designer's will want to be able to change it's appearance, and
>>that's
>> > where css comes in. i.e.:
>> >
>> > 
>> >  
>> >   
>> >>$dynamic_content?>
>> >   
>> >  
>> > 
>> >
>> > yes, there's some html in the included file, but the designer's
>>don't
>> > need to have access to it because they can just change how it
>>looks
>> > in the stylesheet.
>> >
>> >
>> >
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: php-list-
>>[EMAIL PROTECTED]
>>
>>
>
>




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Question: Should exit() print out the integer exit-status?

2001-12-18 Thread Yasuo Ohgaki

Jani Taskinen wrote:

> background information:
> 
> http://bugs.php.net/bug.php?edit=1&id=11008
> http://bugs.php.net/bug.php?edit=1&id=14574
> 
> exit() function is broken. Fixing the broken behaviour is the
> only real solution, IMO.


Since some people prefer to keep current behavior (for a while?)

How about just keep current behavior until ZE2? (PHP 5?)
ZE2 will break some ZE1 behavior, I suppose.
Making exit() to return "return code" is nice and would be
OK for ZE2. IMHO.

We really need to consider removing/changing legacy feature &
behavior at some point...

Error Level and Message handling in current source is one other
thing I would like to change :)
Do you want consistent error levels, error id, localized error
messges? I guess lots of you do ;)

> 
> One solution:
> 
> - When passed argument is string: print out this string
> - When passed argument is integer: Don't print it, use it as exit-status
> 
> This is what is the expected behaviour is and I really can't think
> of any good examples where this would fail. Nobody ever gave any.
> And to get the REAL users (not only Zeev's opinion) I'm sending
> this also to php-general.
> 
> From manual:
> 
> "The exit() function terminates execution of the script. It prints
> status just before exiting. If status is an integer, that value will be
> used as exit-status."
> 
> This can be understood in many ways. If the status is integer,
> it is used as exit-status..but it's not clear that it's ALSO printed out
> which is simply buggy behaviour.

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



I agree. It's possilbe do this now, w/o much BC problem.

die()/exit() is identical in ZE1. How about make them separate?

If type is integer, die() for print and return exit code and exit()
for only return "return code".

-- 
Yasuo Ohgaki


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread Jim Lucas

well, the class tag in the tr won't work with ns6 , but fortunately for you
( sigh ) ns 6 does include the div tag.
- Original Message -
From: "Mike Eheler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 4:28 PM
Subject: Re: [PHP] Working with designers...


> LOL.
>
> Use Netscape 4.
>
> Now there's a condtradiction you don't hear every day.
>
> Mike
>
> Jim Lucas wrote:
>
> > hope you don't plan to use that example table in netscape 4.x
> >
> > - Original Message -
> > From: "Mark" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 18, 2001 4:10 PM
> > Subject: Re: [PHP] Working with designers...
> >
> >
> > On Tue, 18 Dec 2001 16:00:09 -0800, Fred wrote:
> >
> >>Mark <[EMAIL PROTECTED]> wrote in message
> >>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >>well, you don't have to wade through all that html, just put an
> >>include() in there to a file that has all the php in it. then
> >>dreamweaver should leave it alone.
> >>
> >>Huh?
> >>
> >>Obviously the logic can be included, but the output functions need
> >>to be
> >>burried deep in dreamweaver created nested tables and javascripts.
> >>
> >
> > hmm,
> > I'm assuming that javascript is the programmer's responsibility, not
> > the designer's. Maybe the javascript needs to be dynamically
> > generated, probably it doesn't. either way it's in a separate file
> > doesn't get edited in dreamweaver.
> >
> > I understand that the php will probably have to be in a table and the
> > designer's will want to be able to change it's appearance, and that's
> > where css comes in. i.e.:
> >
> > 
> >   
> > 
> >   
> > 
> >   
> > 
> >
> > yes, there's some html in the included file, but the designer's don't
> > need to have access to it because they can just change how it looks
> > in the stylesheet.
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 4.10

2001-12-18 Thread Mark

On Tue, 18 Dec 2001 19:11:02 -0500, Brian Clark wrote:
>* Mark ([EMAIL PROTECTED]) [Dec 18. 2001 17:44]:
>
>> Hi, I'm trying to build php 4.10 with Ming support.
>> (the ming I get from cvs that is supposed to work with 4.10)
>
>[...]
>
>> Configuring libtool
>> checking build system type... i686-pc-linux-gnu
>> checking for ld used by GCC... /usr/bin/ld
>> checking if the linker (/usr/bin/ld) is GNU ld... yes
>> checking for BSD-compatible nm... /usr/bin/nm -B
>> updating cache ./config.cache
>> ./ltconfig: ./ltconfig: No such file or directory
>> configure: error: libtool configure failed
>
>See:
>
>

Thanks Brian,
I tried that suggestion but it didn't work for me. I really wish I
didn't update libtool because configure was working fine before that.
Maybe I'll try to go back.

o- Mark


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] OPEN_BASEDIR from user point of view (instead server admin)

2001-12-18 Thread M

Jim Lucas wrote:

> php will return you four $vars to work with.
> check this out.
> http://www.php.net/manual/en/features.file-upload.php
>
> then work with the tmp file and get done with it what needs to be done
> before the script closes cause php will delete the file when the script is
> done.
>
> jim

Thanks Jim. Yes, I know about these variables. I am using there (specially
$userfile) to fopen. Problem is with file permission on server side. I don't
know how to bypass this problem unless I could say to HTTP where to store temp
files instead storing in tmp default dir. Support people insists I am trying
to read files with different owner, but I am just client.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread Mike Eheler

LOL.

Use Netscape 4.

Now there's a condtradiction you don't hear every day.

Mike

Jim Lucas wrote:

> hope you don't plan to use that example table in netscape 4.x
> 
> - Original Message - 
> From: "Mark" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, December 18, 2001 4:10 PM
> Subject: Re: [PHP] Working with designers...
> 
> 
> On Tue, 18 Dec 2001 16:00:09 -0800, Fred wrote:
> 
>>Mark <[EMAIL PROTECTED]> wrote in message
>>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>>well, you don't have to wade through all that html, just put an
>>include() in there to a file that has all the php in it. then
>>dreamweaver should leave it alone.
>>
>>Huh?
>>
>>Obviously the logic can be included, but the output functions need
>>to be
>>burried deep in dreamweaver created nested tables and javascripts.
>>
> 
> hmm,
> I'm assuming that javascript is the programmer's responsibility, not 
> the designer's. Maybe the javascript needs to be dynamically 
> generated, probably it doesn't. either way it's in a separate file 
> doesn't get edited in dreamweaver.
> 
> I understand that the php will probably have to be in a table and the 
> designer's will want to be able to change it's appearance, and that's 
> where css comes in. i.e.:
> 
> 
>   
> 
>   
> 
>   
> 
> 
> yes, there's some html in the included file, but the designer's don't 
> need to have access to it because they can just change how it looks 
> in the stylesheet.
> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP4 on Windows98 with PWS4

2001-12-18 Thread Alex Shi

Thank you!

I copied all the .dlls and point extension_dir to corrent path...Okay,
the "library file not found" problem seems fixed but now the problem
changed to 500 internal server error! I typed "php -i" from dos shell
and it print correct html code. And I tried both cgi and isapi mode
but got same error. It seems like this must be a web server config
problem but I don't how to find out a clue.

Alex



- Original Message -
From: "Jim Lucas" <[EMAIL PROTECTED]>
To: "Alex Shi" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 6:52 PM
Subject: Re: [PHP] PHP4 on Windows98 with PWS4


> make sure you copy all the correct dll's into the c:\windows\system or
> system32 directory.  the dll's have to be in a location that is included
in
> the window PATH in the autoexec.bat
> Jim
> - Original Message -
> From: "Alex Shi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 18, 2001 2:51 PM
> Subject: [PHP] PHP4 on Windows98 with PWS4
>
>
> > Hello, folks!
> >
> > I installed PHP4 on Windows 98 with PWS4. When I try to
> > run a very simple script, I got a just one line error message
> > "One of the library files needed to run this application cannot
> > be found". The script is very simple: "", so
> > I don't think the error has anything to do with it. Anyone has
> > idea what's wrong with it? Please help me out if you know
> > this issue. Thanks in advance!
> >
> > Alex Shi
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] JavaScript & php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-18 Thread Jim Lucas

the bad thing is, it will still stop the browser from finishing the loading
of the page.

- Original Message -
From: "Mark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Martin Towell" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 4:16 PM
Subject: Re: [PHP] JavaScript & php question - mainly JS though so slightly
OT but hep needed!!! :o)


On Tue, 18 Dec 2001 15:58:10 -0800, Jim Lucas wrote:
>actually Martin, that is what Martin was doing.
>href="javascript:function_name()"  calls to a js function.
>
>my suggestion would be to write it this way.
>
>text

better yet:
text

to keep weird browsers from doing things you don't expect (like
jumping to the top)

>that way, if the client clicks the link/button before the page is
>done
>downloading the page. it won't stop the page from finishing.  if you
>do it
>the way you wrote below.  the page will stop downloading, including
>the
>images that havn't finished.
>
>Jim
>- Original Message -
>From: "Martin Towell" <[EMAIL PROTECTED]>
>To: "'Martin Hughes'" <[EMAIL PROTECTED]>; [EMAIL PROTECTED]>
>Sent: Tuesday, December 18, 2001 3:05 PM
>Subject: RE: [PHP] JavaScript & php question - mainly JS though so
>slightly
>OT but hep needed!!! :o)
>
>
>> if you have lots of links, then doing it this way, IMO, would be
>> easier/better - so:
>> 
>> function windowPopup(xx) { window.open("info.php?patch="+xx,
>>"_new",
>> "windowattribs"); }
>> 
>>
>> but if there's only a few links, then placing the window.open code
>>in the
>> link would be easiest, i think.
>>
>> -Original Message-
>> From: Martin Hughes [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, December 19, 2001 9:54 AM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] JavaScript & php question - mainly JS though so
>>slightly
>> OT but hep needed!!! :o)
>>
>>
>> How could I write the function windowPopup(XX) where XX is a
>>variable that
>> can change from link to link, for a popup info window to load a
>>php file
>> with the variable XX in the url?
>>
>> So the link would look like:
>> Link Text
>>
>> and I want that link to open the page info.php?patch=XX in a new
>>popup
>> window
>>
>> Do I do it something like this, or is there a faster/better way??
>>
>> Cheers & Merry X-Mas!
>>
>> Martin
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: php-list-
>>[EMAIL PROTECTED]
>>
>
>






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] JavaScript & php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-18 Thread Mark

On Tue, 18 Dec 2001 15:58:10 -0800, Jim Lucas wrote:
>actually Martin, that is what Martin was doing.
>href="javascript:function_name()"  calls to a js function.
>
>my suggestion would be to write it this way.
>
>text

better yet:
text

to keep weird browsers from doing things you don't expect (like
jumping to the top)

>that way, if the client clicks the link/button before the page is
>done
>downloading the page. it won't stop the page from finishing.  if you
>do it
>the way you wrote below.  the page will stop downloading, including
>the
>images that havn't finished.
>
>Jim
>- Original Message -
>From: "Martin Towell" <[EMAIL PROTECTED]>
>To: "'Martin Hughes'" <[EMAIL PROTECTED]>; [EMAIL PROTECTED]>
>Sent: Tuesday, December 18, 2001 3:05 PM
>Subject: RE: [PHP] JavaScript & php question - mainly JS though so
>slightly
>OT but hep needed!!! :o)
>
>
>> if you have lots of links, then doing it this way, IMO, would be
>> easier/better - so:
>> 
>> function windowPopup(xx) { window.open("info.php?patch="+xx,
>>"_new",
>> "windowattribs"); }
>> 
>>
>> but if there's only a few links, then placing the window.open code
>>in the
>> link would be easiest, i think.
>>
>> -Original Message-
>> From: Martin Hughes [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, December 19, 2001 9:54 AM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] JavaScript & php question - mainly JS though so
>>slightly
>> OT but hep needed!!! :o)
>>
>>
>> How could I write the function windowPopup(XX) where XX is a
>>variable that
>> can change from link to link, for a popup info window to load a
>>php file
>> with the variable XX in the url?
>>
>> So the link would look like:
>> Link Text
>>
>> and I want that link to open the page info.php?patch=XX in a new
>>popup
>> window
>>
>> Do I do it something like this, or is there a faster/better way??
>>
>> Cheers & Merry X-Mas!
>>
>> Martin
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: php-list-
>>[EMAIL PROTECTED]
>>
>
>




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread Jim Lucas

hope you don't plan to use that example table in netscape 4.x

- Original Message - 
From: "Mark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 4:10 PM
Subject: Re: [PHP] Working with designers...


On Tue, 18 Dec 2001 16:00:09 -0800, Fred wrote:
>
>Mark <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>well, you don't have to wade through all that html, just put an
>include() in there to a file that has all the php in it. then
>dreamweaver should leave it alone.
>
>Huh?
>
>Obviously the logic can be included, but the output functions need
>to be
>burried deep in dreamweaver created nested tables and javascripts.

hmm,
I'm assuming that javascript is the programmer's responsibility, not 
the designer's. Maybe the javascript needs to be dynamically 
generated, probably it doesn't. either way it's in a separate file 
doesn't get edited in dreamweaver.

I understand that the php will probably have to be in a table and the 
designer's will want to be able to change it's appearance, and that's 
where css comes in. i.e.:


  

  

  


yes, there's some html in the included file, but the designer's don't 
need to have access to it because they can just change how it looks 
in the stylesheet.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 4.10

2001-12-18 Thread Brian Clark

* Mark ([EMAIL PROTECTED]) [Dec 18. 2001 17:44]:

> Hi, I'm trying to build php 4.10 with Ming support.
> (the ming I get from cvs that is supposed to work with 4.10)

[...]

> Configuring libtool
> checking build system type... i686-pc-linux-gnu
> checking for ld used by GCC... /usr/bin/ld
> checking if the linker (/usr/bin/ld) is GNU ld... yes
> checking for BSD-compatible nm... /usr/bin/nm -B
> updating cache ./config.cache
> ./ltconfig: ./ltconfig: No such file or directory
> configure: error: libtool configure failed

See:



-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
$ mount -t neuro /dev/brain /mnt/head


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread Mark

On Tue, 18 Dec 2001 16:00:09 -0800, Fred wrote:
>
>Mark <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>well, you don't have to wade through all that html, just put an
>include() in there to a file that has all the php in it. then
>dreamweaver should leave it alone.
>
>Huh?
>
>Obviously the logic can be included, but the output functions need
>to be
>burried deep in dreamweaver created nested tables and javascripts.

hmm,
I'm assuming that javascript is the programmer's responsibility, not
the designer's. Maybe the javascript needs to be dynamically
generated, probably it doesn't. either way it's in a separate file
doesn't get edited in dreamweaver.

I understand that the php will probably have to be in a table and the
designer's will want to be able to change it's appearance, and that's
where css comes in. i.e.:


  

  

  


yes, there's some html in the included file, but the designer's don't
need to have access to it because they can just change how it looks
in the stylesheet.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] JavaScript & php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-18 Thread Jim Lucas

actually Martin, that is what Martin was doing.
href="javascript:function_name()"  calls to a js function.

my suggestion would be to write it this way.

text

that way, if the client clicks the link/button before the page is done
downloading the page. it won't stop the page from finishing.  if you do it
the way you wrote below.  the page will stop downloading, including the
images that havn't finished.

Jim
- Original Message -
From: "Martin Towell" <[EMAIL PROTECTED]>
To: "'Martin Hughes'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 3:05 PM
Subject: RE: [PHP] JavaScript & php question - mainly JS though so slightly
OT but hep needed!!! :o)


> if you have lots of links, then doing it this way, IMO, would be
> easier/better - so:
> 
>  function windowPopup(xx) { window.open("info.php?patch="+xx, "_new",
> "windowattribs"); }
> 
>
> but if there's only a few links, then placing the window.open code in the
> link would be easiest, i think.
>
> -Original Message-
> From: Martin Hughes [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 19, 2001 9:54 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] JavaScript & php question - mainly JS though so slightly
> OT but hep needed!!! :o)
>
>
> How could I write the function windowPopup(XX) where XX is a variable that
> can change from link to link, for a popup info window to load a php file
> with the variable XX in the url?
>
> So the link would look like:
> Link Text
>
> and I want that link to open the page info.php?patch=XX in a new popup
> window
>
> Do I do it something like this, or is there a faster/better way??
>
> Cheers & Merry X-Mas!
>
> Martin
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Question

2001-12-18 Thread Phillip B. Bruce

Hi,

   By any chance that Luke Welling or Laura Thomson is on this list?

--

*** Phillip B. Bruce ***
*** http://pbbruce.home.mindspring.com   ***
*** [EMAIL PROTECTED]   ***
***  ***
*** "Have you ever noticed? Anybody going slower than***
*** you is an idiot, and anyone going faster than you***
*** is a maniac." - George Carlin***





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread Fred


Mark <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
well, you don't have to wade through all that html, just put an
include() in there to a file that has all the php in it. then
dreamweaver should leave it alone.

Huh?

Obviously the logic can be included, but the output functions need to be
burried deep in dreamweaver created nested tables and javascripts.

Fred



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP4 on Windows98 with PWS4

2001-12-18 Thread Jim Lucas

make sure you copy all the correct dll's into the c:\windows\system or
system32 directory.  the dll's have to be in a location that is included in
the window PATH in the autoexec.bat
Jim
- Original Message -
From: "Alex Shi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 2:51 PM
Subject: [PHP] PHP4 on Windows98 with PWS4


> Hello, folks!
>
> I installed PHP4 on Windows 98 with PWS4. When I try to
> run a very simple script, I got a just one line error message
> "One of the library files needed to run this application cannot
> be found". The script is very simple: "", so
> I don't think the error has anything to do with it. Anyone has
> idea what's wrong with it? Please help me out if you know
> this issue. Thanks in advance!
>
> Alex Shi
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP4 on Windows98 with PWS4

2001-12-18 Thread Alex Shi

Now I set extension_dir point to correct path in php.ini, the 
problem changed: it shows 500 internal server error.


- Original Message - 
From: "Alex Shi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 5:51 PM
Subject: [PHP] PHP4 on Windows98 with PWS4


> Hello, folks!
> 
> I installed PHP4 on Windows 98 with PWS4. When I try to
> run a very simple script, I got a just one line error message 
> "One of the library files needed to run this application cannot 
> be found". The script is very simple: "", so
> I don't think the error has anything to do with it. Anyone has
> idea what's wrong with it? Please help me out if you know
> this issue. Thanks in advance!
> 
> Alex Shi
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Question: Should exit() print out the integer exit-status?

2001-12-18 Thread Jani Taskinen


background information:

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

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

One solution:

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

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

>From manual:

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

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

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

--Jani




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] OPEN_BASEDIR from user point of view (instead server admin)

2001-12-18 Thread Jim Lucas

php will return you four $vars to work with.
check this out.
http://www.php.net/manual/en/features.file-upload.php

then work with the tmp file and get done with it what needs to be done
before the script closes cause php will delete the file when the script is
done.

jim
- Original Message -
From: "M" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 2:45 PM
Subject: [PHP] OPEN_BASEDIR from user point of view (instead server admin)


> Hello, I posted a question some days ago, but no answers received. I
> notice many people discussing OPEN_BASEDIR apache restriction here, but
> all discussion are from server admin point of view.
>
> Let me ask question in another way:
>
> Is it possible to tell HTTP  command the complete path/name
> into local server for file being uploaded?. Note upload made by  type=file  ..> command.
>
> The reason for this question is posted into my original question (below)
>
> Thanks
>
> Miguel
>
> = previous msg posted at 10/12/01 =
>
> Now a question about uploading files (.gif .jpg) using  method=post> to be stored into Mysql blob fields.
>
> I hope somebody here having sites on www.blueboxinternet.com hosting
> company, because I have big trouble there I can't solve, and support
> says I first shoud read faq because they have lot of customers with no
> problems.
>
> I make industrial and commercial catalogs, so my customers should be
> able to send (upload) pictures of products and goodies directly from
> their HD to site, these pictures stored in Mysql tables and shown when
> customer pages are called by someone.
> The only way I know to perform this is
>
> 
> 
> Enter filename 
> 
> 
>
>if($upload)
>   {
> $fp=Fopen ($myfile,"r");
>
>/* here lot of commands to store file into mysql tables */
> ...
>   }
> ?>
> 
>
> This script will store picture-file into some tmp directory on bluebox
> servers and will return tmp file name into $myfile var when script
> called again by 'form action' command. Then I can treat file and store
> in DB.
>
> This script worked fine on bluebox servers  until NOVEMBER 1st ,
> when they made some important changes on their servers. When this change
>
> happened, my script began to receive this error:
>
> Warning: open_basedir restriction in effect. File is in wrong directory
> in
> /home/httpd/vhosts/meucatalogo.com/web_users/gratis/rest_prox.php on
> line 25
>
> Bluebox support says I am recording my files on tmp directory with owner
>
> 'someowner' and trying to read file with 'anotherowner' owner.
> I argue I have no control about owners and file modes into their servers
>
> (specially into their tmp directories), and that PHP performs this task
> in a transparent way for me. Thats to say, I have no tools to bypass
> this problem.
> Then they answer I shoud read faq.
>
> Case some of you have site using this (otherwise excellent web hosting)
> company, I would greatly appreciate what solution for upload files thru
> HTML forms there exists.
> =
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] JavaScript & php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-18 Thread Martin Towell

if you have lots of links, then doing it this way, IMO, would be
easier/better - so:

 function windowPopup(xx) { window.open("info.php?patch="+xx, "_new",
"windowattribs"); }


but if there's only a few links, then placing the window.open code in the
link would be easiest, i think.

-Original Message-
From: Martin Hughes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 19, 2001 9:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] JavaScript & php question - mainly JS though so slightly
OT but hep needed!!! :o)


How could I write the function windowPopup(XX) where XX is a variable that
can change from link to link, for a popup info window to load a php file
with the variable XX in the url?

So the link would look like:
Link Text

and I want that link to open the page info.php?patch=XX in a new popup
window

Do I do it something like this, or is there a faster/better way??

Cheers & Merry X-Mas!

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] JavaScript & php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-18 Thread Martin Hughes

How could I write the function windowPopup(XX) where XX is a variable that
can change from link to link, for a popup info window to load a php file
with the variable XX in the url?

So the link would look like:
Link Text

and I want that link to open the page info.php?patch=XX in a new popup
window

Do I do it something like this, or is there a faster/better way??

Cheers & Merry X-Mas!

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Crashing in Win2K with IIS and latest PHP installed when loading an open page...

2001-12-18 Thread Martin Hughes

Help!!! If I'm editing a php file & have it open (or have recently done so)
in notepad sometimes when i do "reload" or open the file in IE6 my computer
pauses for a second, then shuts itself off with a resounding click of the
hard disks and promptly restarts.

I don't think it's a disk problem - it ONLY happens when I'm loading a php
file via http://localhost

I'm confused... help!!

Thanks

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: postgres session handling

2001-12-18 Thread Yasuo Ohgaki

For reference, I attached README for pgsql session save handler.
It's NOT in 4.2.0-dev, yet.

James Gregory wrote:

> I have need to get php to use postgres to store session information. 
> I've changed the directive in php.ini and written a set of functions 
> that should do the job and I've made the call to set the session 
> handler. The following simple test case works:
> 
>  
> require_once ('database.php');
> require_once ('sess_handler.php');
> 
> //session_start ();
> 
> session_register ('asdf');
> 
> $asdf = 123;
> 
> print $asdf;
> 
> ?>
> 
> the idea being that the line where $asdf is assigned is commented out in 
> the second execution of it and the value is still there upon reloading.
> 
> That works fine. But, when I try to use it with the code for which it 
> was originally intended I get this error:
> 
> *Fatal error*: Failed to initialize session module in 
> */usr/local/apache/vhosts/600xl/httpdocs/fe_login.php* on line *44*
> 
> Keep in mind that this is all code which worked perfectly with the bulit 
> in session handler before. Any ideas?
> 
> Thanks,
> 
> James.
> 



-- 
Yasuo Ohgaki



README.MOD_PGSQL

mod_pgsql is a session save handler module. It provides session strage
with PostgreSQL database. This module is written by [EMAIL PROTECTED] 
Please report problems to http://bugs.php.net/ or [EMAIL PROTECTED]

Session Table Definition

CREATE TABLE php_sessoin (
  sess_idchar(32) PRIMARY KEY  CHECK strlen(sess_id) = 32,
  sess_name  char(32) NOT NULL,
  sess_created   integer, -- UNIX time
  sess_modified  integer, -- UNIX time
  sess_data  text,-- Max 1GB for 7.1, about 8KB for 7.0 or lower.
  sess_reserved1 integer,
  sess_reserved2 integer,
  sess_reserved3 integer,
  sess_reserved4 integer
);

User may *append* additional fields, sess_reserved* fields are place
holder for additional feture. Since mod_pgsql accesses field using
field index, user must use this field order.

How to use

To compile PHP with mod_pgsql, you need "--with-session-pgsql[=DIR]"
when you configure PHP. [=DIR] is installation path for
PostgreSQL. You don't have to compile PHP with PostgreSQL module, but
your system must have libpq and headers installed.

Following php.ini directives has special meanings for mod_pgsql

session.save_handler : "pgsql" for mod_pgsql session.
session.save_path: Valid PostgreSQL database connection string. 

How it works

It uses libpq which is written in C. It also uses aync query for
garbage collection. Therefore, user will not experience deley even if
barbage collection is performed. This module is much more efficient
than user handlers written in PHP.

How to customize

Since mod_pgsql uses PostgreSQL database. User can add more fields to
session database and create session access functions as user
want. Keep in mind that user is not supposed to order of standard
fields. User fields are must be defined after mod_pgsql fields.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP] Re: postgres session handling

2001-12-18 Thread Yasuo Ohgaki

You have bug in your session handler script.
In code exchange at zend.com, you can find mine.
Search HTTP section.

BTW, I'll add pgsql session handler module.
Anyone could use PosrgreSQL for session storage w/o writing script
from 4.2.0. It's written in C and more efficient ;)

James Gregory wrote:

> I have need to get php to use postgres to store session information. 
> I've changed the directive in php.ini and written a set of functions 
> that should do the job and I've made the call to set the session 
> handler. The following simple test case works:
> 
>  
> require_once ('database.php');
> require_once ('sess_handler.php');
> 
> //session_start ();
> 
> session_register ('asdf');
> 
> $asdf = 123;
> 
> print $asdf;
> 
> ?>
> 
> the idea being that the line where $asdf is assigned is commented out in 
> the second execution of it and the value is still there upon reloading.
> 
> That works fine. But, when I try to use it with the code for which it 
> was originally intended I get this error:
> 
> *Fatal error*: Failed to initialize session module in 
> */usr/local/apache/vhosts/600xl/httpdocs/fe_login.php* on line *44*
> 
> Keep in mind that this is all code which worked perfectly with the bulit 
> in session handler before. Any ideas?
> 
> Thanks,
> 
> James.
> 

-- 
Yasuo Ohgaki


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread Steve Osborne

As a designer and a coder, I have always found that it is easiest to have
the layout of the page done before adding the dynamic content.  If the
layout is done correctly, it should not be necessary to put in sample data
that has to be removed after.

After joining the workforce, as a database programmer, I now strictly code
the backend stuff, and as before, the layouts are done and I simply add the
dynamic content.

Whatever arrangement you end up with, just make sure the ground rules are in
place before you start.  It may help to have them written down (I know,
coders hate to document), as it will protect you in the future if problems
do arise.

Good luck,

Steve Osborne
Database Programmer
Chinook Multimedia Inc.
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP4 on Windows98 with PWS4

2001-12-18 Thread Alex Shi

Hello, folks!

I installed PHP4 on Windows 98 with PWS4. When I try to
run a very simple script, I got a just one line error message 
"One of the library files needed to run this application cannot 
be found". The script is very simple: "", so
I don't think the error has anything to do with it. Anyone has
idea what's wrong with it? Please help me out if you know
this issue. Thanks in advance!

Alex Shi



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread Mark

well, you don't have to wade through all that html, just put an
include() in there to a file that has all the php in it. then
dreamweaver should leave it alone.

really if they don't want to chop the files up into header/footer
that shouldn't bother you, it makes their job harder since they have
to make changes to hundreds of files instead of one, but the dynamic
stuff will still all be in one file that gets include'd a hundred
times.

- Mark

On Tue, 18 Dec 2001 14:39:14 -0800, Fred wrote:
>Yikes!  You mean they don't use a text editor to for html?
>
>Seriously, you do have two choices here and I certainly prefer the
>one
>suggested below.  You may have to talk to the project manager about
>the
>designer's refusal to allow thier precious dreamweaver source files
>to be
>chopped up.  On the other hand, their insistance on using CSS is
>ideal.
>
>If the project manager does not want the html chopped up then it is
>not the
>end of the world.
>
>I recently completed a project where the designer insisted on using
>dreamweaver and leaving the html as single files.  I wrote the
>functions for
>everything I needed and placed them in include files.  I then
>replaced his
>sample data with  statements and all is well.  I'd give you
>the URL to
>see how seemlessly it works, but it is a porn site and i'd rather
>not link
>it on the list.
>
>The moral is that you can certainly be successful in approaching the
>project
>this way.  Personally, I do not like wading through all that html to
>figure
>out where to put my precious php code, but then again they were
>paying the
>bills that month.
>
>Fred
>
>
>Mike Eheler <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> They sound like good ideas, with one quisp.. the sites are
>>currently
>> being designed in *shudder* Dreamweaver.
>>
>> They absolutely refuse to chop files up into header/footer
>>includes, and
>> they want to be able to do all their colour customisation through
>>their
>> beloved .css files.
>>
>> Mike
>>
>> Jimtronic wrote:
>>
>> >
>> > I try to seperate the php code from the html as much as
>>possible. So, if
>> > a page is dynamic, have php figure out the dynamic parts first,
>>put them
>> > into variables such as $html, or $pull_down_menu, or whatever.
>>Then all
>> > that needs to replaced in the html is that section. HTML coders
>>aren't
>> > dumb, so they can be trusted with a simple 
>>placement.
>> >
>> > Additionally, I try to seperate php logic from php presentation
>>as much
>> > as possible. This means creating as many variables as possible
>>that
>> > affect how things look and then including a conf.php file that
>>the
>> > coders can also change pretty easily with good documentation.
>> >
>> > Moving even further in this direction, my logic code calls many
>> > presentation functions which I find HTML coders can also
>>decipher rather
>> > well. You can put these in another include file so your
>>designers don't
>> > ever have to touch any of your precious logic.
>> >
>> > Then ... if you have time ... you can make an admin screen to
>>change,
>> > edit, and preview the finished product.
>> >
>> > Jim
>> >
>> >> Hi There,
>> >>
>> >> I'm looking for some community feedback on being a coder
>>working with
>> >> designers. Techniques that work that allow my php-inept
>>page/graphic
>> >> designer comrade make changes to the layout of the page without
>> >> destroying my code, or requiring me to make any changes
>>whatsoever.
>> >>
>> >> Or what is the best process? Code the dynamicity (heh -- sad
>>thing is
>> >> you know what i mean by it) of the site, then integrate a
>>designers
>> >> HTML into your code, *or* the other way around.. have the
>>designer
>> >> create the site using all static html files, then go in and
>>remove
>> >> sample data to be replaced with dynamic data (pulled from a DB,
>>for
>> >> example).
>> >>
>> >> I'm about to enter a very large project working with about 3 or
>>4
>> >> designers and 2 other coders and any suggestions on making this
>> >> relationship work is greatly appreciated.
>> >>
>> >> Mike
>> >>
>> >>
>> >> --
>> >> PHP General Mailing List (http://www.php.net/)
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >> To contact the list administrators, e-mail:
>[EMAIL PROTECTED]
>> >
>> >
>> >
>>
>
>
>




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] 4.10

2001-12-18 Thread Mark

sorry, jumped the gun on that last one...

Hi, I'm trying to build php 4.10 with Ming support.
(the ming I get from cvs that is supposed to work with 4.10)

I build ming and follow the instructions in the Readme file.
then I move into php and go:
./configure --with-apache=../apache_1.3.22 --with-gd
--with-ming=../ming

I get the following error:
configure: error: Please reinstall libming.so - I cannot find
libming.so

libming.so is in ../ming

so I open configure in emacs and see that it's looking for libming.so
in ../ming/lib

ok, I copy it over there. then I try again and get this error:

Configuring libtool
checking build system type... i686-pc-linux-gnu
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD-compatible nm... /usr/bin/nm -B
updating cache ./config.cache
./ltconfig: ./ltconfig: No such file or directory
configure: error: libtool configure failed

now, I had just installed libtool 1.42 because buildconf complained
about not having it. It got put into /usr/local/bin/ and buildconf
couldn't find it there so I put a link to it in /usr/bin

that made buildconf work but gave me this error for configure.

any ideas what I should try next?

thanks,
- Mark


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] OPEN_BASEDIR from user point of view (instead server admin)

2001-12-18 Thread M

Hello, I posted a question some days ago, but no answers received. I
notice many people discussing OPEN_BASEDIR apache restriction here, but
all discussion are from server admin point of view.

Let me ask question in another way:

Is it possible to tell HTTP  command the complete path/name
into local server for file being uploaded?. Note upload made by  command.

The reason for this question is posted into my original question (below)

Thanks

Miguel

= previous msg posted at 10/12/01 =

Now a question about uploading files (.gif .jpg) using  to be stored into Mysql blob fields.

I hope somebody here having sites on www.blueboxinternet.com hosting
company, because I have big trouble there I can't solve, and support
says I first shoud read faq because they have lot of customers with no
problems.

I make industrial and commercial catalogs, so my customers should be
able to send (upload) pictures of products and goodies directly from
their HD to site, these pictures stored in Mysql tables and shown when
customer pages are called by someone.
The only way I know to perform this is



Enter filename 






This script will store picture-file into some tmp directory on bluebox
servers and will return tmp file name into $myfile var when script
called again by 'form action' command. Then I can treat file and store
in DB.

This script worked fine on bluebox servers  until NOVEMBER 1st ,
when they made some important changes on their servers. When this change

happened, my script began to receive this error:

Warning: open_basedir restriction in effect. File is in wrong directory
in
/home/httpd/vhosts/meucatalogo.com/web_users/gratis/rest_prox.php on
line 25

Bluebox support says I am recording my files on tmp directory with owner

'someowner' and trying to read file with 'anotherowner' owner.
I argue I have no control about owners and file modes into their servers

(specially into their tmp directories), and that PHP performs this task
in a transparent way for me. Thats to say, I have no tools to bypass
this problem.
Then they answer I shoud read faq.

Case some of you have site using this (otherwise excellent web hosting)
company, I would greatly appreciate what solution for upload files thru
HTML forms there exists.
=




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread Fred

Yikes!  You mean they don't use a text editor to for html?

Seriously, you do have two choices here and I certainly prefer the one
suggested below.  You may have to talk to the project manager about the
designer's refusal to allow thier precious dreamweaver source files to be
chopped up.  On the other hand, their insistance on using CSS is ideal.

If the project manager does not want the html chopped up then it is not the
end of the world.

I recently completed a project where the designer insisted on using
dreamweaver and leaving the html as single files.  I wrote the functions for
everything I needed and placed them in include files.  I then replaced his
sample data with  statements and all is well.  I'd give you the URL to
see how seemlessly it works, but it is a porn site and i'd rather not link
it on the list.

The moral is that you can certainly be successful in approaching the project
this way.  Personally, I do not like wading through all that html to figure
out where to put my precious php code, but then again they were paying the
bills that month.

Fred


Mike Eheler <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> They sound like good ideas, with one quisp.. the sites are currently
> being designed in *shudder* Dreamweaver.
>
> They absolutely refuse to chop files up into header/footer includes, and
> they want to be able to do all their colour customisation through their
> beloved .css files.
>
> Mike
>
> Jimtronic wrote:
>
> >
> > I try to seperate the php code from the html as much as possible. So, if
> > a page is dynamic, have php figure out the dynamic parts first, put them
> > into variables such as $html, or $pull_down_menu, or whatever. Then all
> > that needs to replaced in the html is that section. HTML coders aren't
> > dumb, so they can be trusted with a simple  placement.
> >
> > Additionally, I try to seperate php logic from php presentation as much
> > as possible. This means creating as many variables as possible that
> > affect how things look and then including a conf.php file that the
> > coders can also change pretty easily with good documentation.
> >
> > Moving even further in this direction, my logic code calls many
> > presentation functions which I find HTML coders can also decipher rather
> > well. You can put these in another include file so your designers don't
> > ever have to touch any of your precious logic.
> >
> > Then ... if you have time ... you can make an admin screen to change,
> > edit, and preview the finished product.
> >
> > Jim
> >
> >> Hi There,
> >>
> >> I'm looking for some community feedback on being a coder working with
> >> designers. Techniques that work that allow my php-inept page/graphic
> >> designer comrade make changes to the layout of the page without
> >> destroying my code, or requiring me to make any changes whatsoever.
> >>
> >> Or what is the best process? Code the dynamicity (heh -- sad thing is
> >> you know what i mean by it) of the site, then integrate a designers
> >> HTML into your code, *or* the other way around.. have the designer
> >> create the site using all static html files, then go in and remove
> >> sample data to be replaced with dynamic data (pulled from a DB, for
> >> example).
> >>
> >> I'm about to enter a very large project working with about 3 or 4
> >> designers and 2 other coders and any suggestions on making this
> >> relationship work is greatly appreciated.
> >>
> >> Mike
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >> To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> >
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] 4.10

2001-12-18 Thread Mark

Hi, I'm trying to build php 4.10 with Ming support.
(the ming I get from cvs that is supposed to work with 4.10)

I build ming and follow the instructions in the Readme file.
then I move into php and go:
./configure --with-apache=../apache_1.3.22 --with-gd
--with-ming=../ming

I get the following error:
configure: error: Please reinstall libming.so - I cannot find
libming.so

libming.so is in ../ming

so I open configure in emacs and


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Error while calling a function

2001-12-18 Thread Fred

Steve is right on the money.

Your function definitions are inside a conditional if statement which means
that they may or may not be parsed.  Your call to the function, on the other
hand, is not within that same conditional if statement.  That means your
functions is getting called unconditionally, but the function has not yet
been defined because the condition failed (!Phone) and the code was skipped.

Rule of thumb:

Don't put your function definitions inside of conditionals.

Fred

Steve Cayford <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I don't know all the details about how PHP compiles a program, but
> having your function definitions in an if-else statement that may not be
> executed looks suspicious to me.
>
> You've got
> if(!$Phone)
> {
>  do something
> }
> else
> {
>  function is_phone() { ...blah, blah...}
> }
>
> is_phone($Phone);
>
> If you don't hit the else block, your is_phone function is probably not
> defined.
>
> -Steve
>
> On Tuesday, December 18, 2001, at 07:26  AM, J.F.Kishor wrote:
>
> > hi all,
> >
> > I have got a problem, when I execute the following script it gives
> > a Fatal error, could any one tell me why is it ?, If this is a silly
> > problem please execuse me but, plz do reply me.
> >
> > The script is
> > -
> > 
> > 
> >  > if(!$Phone)
> > {
> >   ?>
> >  
> > 
> > Telephone Number : 
> > 
> > 
> > 
> > }
> > else
> > {
> >
> >   function is_allnumbers ($text)
> > {
> >   if( (gettype($text)) == "integer")
> > {
> > print "the value is an integer";
> >   return true;
> > }
> >
> >   $Bad = $this->strip_numbers($text);
> >
> >   if(empty($Bad))
> > {
> > print "the value is  empty";
> >   return true;
> > }
> >   return false;
> > }
> >
> >   function clear_error ()
> > {
> >   $this->ERROR = "this is an error";
> > }
> >
> >
> >   function is_phone ($Phone ="")
> > {
> >   if($this->CLEAR)
> > {
> >   $this->clear_error();
> > }
> >
> >   if(empty($Phone))
> > {
> >   $this->ERROR = "is_phone: No Phone number
> > submitted";
> >   return false;
> > }
> >
> >   $Num = $Phone;
> >   $Num = $this->strip_space($Num);
> >   $Num = eregi_replace("(\(|\)|\-|\+)","",$Num);
> >   if(!$this->is_allnumbers($Num))
> > {
> >   $this->ERROR = "is_phone: bad data in phone
> > number";
> >   return false;
> > }
> >
> >   if ( (strlen($Num)) < 7)
> > {
> > print "the number is less then 7";
> >   $this->ERROR = "is_phone: number is too short
> > [$Num][$Phone]";
> >   return false;
> > }
> >
> >   if( (strlen($Num)) > 13)
> > {
> > print "the number is > then 13";
> >   $this->ERROR = "is_phone: number is too long
> > [$Num][$Phone]";
> >   return false;
> > }
> >
> >   return true;
> > }
> > }
> > $result = is_phone($Phone);
> > if($result == "true")
> > {
> >  echo "success";
> > }
> > else
> > {
> >   echo "failure";
> > }
> >
> > 
> > 
> > 
> >
> > The error is
> > 
> > Fatal error: Call to undefined function: is_phone() in
> > /home/kuruvi1/kishor/public_html/IMS/ADMIN/test/is_phone.php on line 87
> >
> >
> > Thanks for your tolerance,
> >
> > - JFK
> >  kishor
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread Mike Eheler

They sound like good ideas, with one quisp.. the sites are currently 
being designed in *shudder* Dreamweaver.

They absolutely refuse to chop files up into header/footer includes, and 
they want to be able to do all their colour customisation through their 
beloved .css files.

Mike

Jimtronic wrote:

> 
> I try to seperate the php code from the html as much as possible. So, if 
> a page is dynamic, have php figure out the dynamic parts first, put them 
> into variables such as $html, or $pull_down_menu, or whatever. Then all 
> that needs to replaced in the html is that section. HTML coders aren't 
> dumb, so they can be trusted with a simple  placement.
> 
> Additionally, I try to seperate php logic from php presentation as much 
> as possible. This means creating as many variables as possible that 
> affect how things look and then including a conf.php file that the 
> coders can also change pretty easily with good documentation.
> 
> Moving even further in this direction, my logic code calls many 
> presentation functions which I find HTML coders can also decipher rather 
> well. You can put these in another include file so your designers don't 
> ever have to touch any of your precious logic.
> 
> Then ... if you have time ... you can make an admin screen to change, 
> edit, and preview the finished product.
> 
> Jim
> 
>> Hi There,
>>
>> I'm looking for some community feedback on being a coder working with 
>> designers. Techniques that work that allow my php-inept page/graphic 
>> designer comrade make changes to the layout of the page without 
>> destroying my code, or requiring me to make any changes whatsoever.
>>
>> Or what is the best process? Code the dynamicity (heh -- sad thing is 
>> you know what i mean by it) of the site, then integrate a designers 
>> HTML into your code, *or* the other way around.. have the designer 
>> create the site using all static html files, then go in and remove 
>> sample data to be replaced with dynamic data (pulled from a DB, for 
>> example).
>>
>> I'm about to enter a very large project working with about 3 or 4 
>> designers and 2 other coders and any suggestions on making this 
>> relationship work is greatly appreciated.
>>
>> Mike
>>
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Working with designers...

2001-12-18 Thread jimtronic


I try to seperate the php code from the html as much as possible. So, 
if a page is dynamic, have php figure out the dynamic parts first, 
put them into variables such as $html, or $pull_down_menu, or 
whatever. Then all that needs to replaced in the html is that 
section. HTML coders aren't dumb, so they can be trusted with a 
simple  placement.

Additionally, I try to seperate php logic from php presentation as 
much as possible. This means creating as many variables as possible 
that affect how things look and then including a conf.php file that 
the coders can also change pretty easily with good documentation.

Moving even further in this direction, my logic code calls many 
presentation functions which I find HTML coders can also decipher 
rather well. You can put these in another include file so your 
designers don't ever have to touch any of your precious logic.

Then ... if you have time ... you can make an admin screen to change, 
edit, and preview the finished product.

Jim

>Hi There,
>
>I'm looking for some community feedback on being a coder working 
>with designers. Techniques that work that allow my php-inept 
>page/graphic designer comrade make changes to the layout of the page 
>without destroying my code, or requiring me to make any changes 
>whatsoever.
>
>Or what is the best process? Code the dynamicity (heh -- sad thing 
>is you know what i mean by it) of the site, then integrate a 
>designers HTML into your code, *or* the other way around.. have the 
>designer create the site using all static html files, then go in and 
>remove sample data to be replaced with dynamic data (pulled from a 
>DB, for example).
>
>I'm about to enter a very large project working with about 3 or 4 
>designers and 2 other coders and any suggestions on making this 
>relationship work is greatly appreciated.
>
>Mike
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: sql password

2001-12-18 Thread Mike Eheler

yeah

if you just installed, root doesn't have a password.. so you need to not 
specify -p (this tells the server to try and authenticate with an empty 
password, as opposed to attempting to authenticate with no password.. 
there is a difference):

mysqladmin -u root password mypassword

Mike

Jeremiah Jester wrote:

> Im attempting to install mysql. The service started and everything seems to
> be going ok except for that I can't set the root password for the mysql
> server.
> 
> To reset password i type:
> 
> /usr/bin/mysqladmin -u root -p mypassword
> 
> Then I get the following error:
> 
> /usr/bin/mysqladmin: connect to server at 'localhost' failed
> error: 'Access denied for user: 'root@localhost' (Using password: YES)'
> 
> Can anyone help?
> Thanks,
> JJ
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Working with designers...

2001-12-18 Thread Mike Eheler

Hi There,

I'm looking for some community feedback on being a coder working with 
designers. Techniques that work that allow my php-inept page/graphic 
designer comrade make changes to the layout of the page without 
destroying my code, or requiring me to make any changes whatsoever.

Or what is the best process? Code the dynamicity (heh -- sad thing is 
you know what i mean by it) of the site, then integrate a designers HTML 
into your code, *or* the other way around.. have the designer create the 
site using all static html files, then go in and remove sample data to 
be replaced with dynamic data (pulled from a DB, for example).

I'm about to enter a very large project working with about 3 or 4 
designers and 2 other coders and any suggestions on making this 
relationship work is greatly appreciated.

Mike


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Error while calling a function

2001-12-18 Thread Jim Lucas

Try putting a closing "?>" php tag just before the final HTML.
Jim
- Original Message - 
From: "J.F.Kishor" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 5:26 AM
Subject: [PHP] Error while calling a function


> hi all,
> 
> I have got a problem, when I execute the following script it gives
> a Fatal error, could any one tell me why is it ?, If this is a silly
> problem please execuse me but, plz do reply me.
> 
> The script is 
> -
> 
> 
>  if(!$Phone)
> { 
>   ?>
>  
> 
> Telephone Number : 
>  
> 
> 
> }
> else
> {
> 
>   function is_allnumbers ($text)
> {
>   if( (gettype($text)) == "integer") 
> {
> print "the value is an integer";
>   return true; 
> }
>   
>   $Bad = $this->strip_numbers($text);
>   
>   if(empty($Bad))
> {
> print "the value is  empty"; 
>   return true;
> }
>   return false;
> }
>   
>   function clear_error ()
> {
>   $this->ERROR = "this is an error";
> }
>   
> 
>   function is_phone ($Phone ="")
> {
>   if($this->CLEAR) 
> {
>   $this->clear_error(); 
> }
>   
>   if(empty($Phone))
> {
>   $this->ERROR = "is_phone: No Phone number
> submitted";
>   return false;
> }
> 
>   $Num = $Phone;
>   $Num = $this->strip_space($Num);
>   $Num = eregi_replace("(\(|\)|\-|\+)","",$Num);
>   if(!$this->is_allnumbers($Num))
> {
>   $this->ERROR = "is_phone: bad data in phone
> number";
>   return false;
> }
>   
>   if ( (strlen($Num)) < 7)
> {
> print "the number is less then 7";
>   $this->ERROR = "is_phone: number is too short
> [$Num][$Phone]";
>   return false;
> }
>   
>   if( (strlen($Num)) > 13)
> {
> print "the number is > then 13";
>   $this->ERROR = "is_phone: number is too long
> [$Num][$Phone]";
>   return false;
> }
>   
>   return true;
> }
> }  
> $result = is_phone($Phone);
> if($result == "true")
> {
>  echo "success";
> }
> else
> {
>   echo "failure";
> }
> 
> 
> 
> 
> 
> The error is 
> 
> Fatal error: Call to undefined function: is_phone() in
> /home/kuruvi1/kishor/public_html/IMS/ADMIN/test/is_phone.php on line 87
> 
> 
> Thanks for your tolerance,
> 
> - JFK
>  kishor
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Error while calling a function

2001-12-18 Thread Steve Cayford

I don't know all the details about how PHP compiles a program, but 
having your function definitions in an if-else statement that may not be 
executed looks suspicious to me.

You've got
if(!$Phone)
{
 do something
}
else
{
 function is_phone() { ...blah, blah...}
}

is_phone($Phone);

If you don't hit the else block, your is_phone function is probably not 
defined.

-Steve

On Tuesday, December 18, 2001, at 07:26  AM, J.F.Kishor wrote:

> hi all,
>
>   I have got a problem, when I execute the following script it gives
> a Fatal error, could any one tell me why is it ?, If this is a silly
> problem please execuse me but, plz do reply me.
>
> The script is
> -
> 
> 
>  if(!$Phone)
> {
>   ?>
>  
> 
> Telephone Number : 
> 
> 
> 
> }
> else
> {
>
>   function is_allnumbers ($text)
> {
>   if( (gettype($text)) == "integer")
>   {
>   print "the value is an integer";
> return true;
>   }
>
>   $Bad = $this->strip_numbers($text);
>
>   if(empty($Bad))
>   {
>   print "the value is  empty";
> return true;
>   }
>   return false;
> }
>
>   function clear_error ()
> {
>   $this->ERROR = "this is an error";
> }
>
>
>   function is_phone ($Phone ="")
> {
>   if($this->CLEAR)
>   {
> $this->clear_error();
>   }
>
>   if(empty($Phone))
>   {
> $this->ERROR = "is_phone: No Phone number
> submitted";
> return false;
>   }
>
>   $Num = $Phone;
>   $Num = $this->strip_space($Num);
>   $Num = eregi_replace("(\(|\)|\-|\+)","",$Num);
>   if(!$this->is_allnumbers($Num))
>   {
> $this->ERROR = "is_phone: bad data in phone
> number";
> return false;
>   }
>
>   if ( (strlen($Num)) < 7)
>   {
>   print "the number is less then 7";
> $this->ERROR = "is_phone: number is too short
> [$Num][$Phone]";
> return false;
>   }
>
>   if( (strlen($Num)) > 13)
>   {
>   print "the number is > then 13";
> $this->ERROR = "is_phone: number is too long
> [$Num][$Phone]";
> return false;
>   }
>
>   return true;
> }
> }
> $result = is_phone($Phone);
> if($result == "true")
> {
>  echo "success";
> }
> else
> {
>   echo "failure";
> }
>
> 
> 
> 
>
> The error is
> 
> Fatal error: Call to undefined function: is_phone() in
> /home/kuruvi1/kishor/public_html/IMS/ADMIN/test/is_phone.php on line 87
>
>
> Thanks for your tolerance,
>
>   - JFK
>  kishor
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: while...if statements???

2001-12-18 Thread Chris Lee

because the while() statement works like this

- do something while x is true. if x is not true dont do anything.
- do something while conent is in the db. if there is no conent in the db
dont do anything.

your if() statement is never run if there is no content.

$return = mysql_fetch_row($result);
if ( isset($return['pet_name']) )
do
{
echo $return['pet_name'] ."";
} while( $return = mysql_fetch_row($result) );
else
echo " No Pets ";

its ugly but it works. I dont like ugly, so I wrote my own db wrappers.

http://www.mediawaveonline.com/examples/

foreach( $db->select_array('', 'petinfo', '') as $pos => $val )
echo $val['pet_name'] ."";
if ( !isset($val['pet_name']) )
echo " No Pets ";

I like that more. but whatever.

--

  Chris Lee
  [EMAIL PROTECTED]



"Jay Fitzgerald" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does anyone know why this isn't working?? What I am trying to do is
display
> photos from a database based on each month. This part works fine when I
set
> it to the current month of December (today) as that is when I uploaded the
> photos.
>
> However, when I manually set the date to a month that has no photos in it,
> I want it to echo the No Animals string belowThis is only working
> half-way...meaning that it will display a blank page with nothing on it
> instead of actually echoing the No Animals string
>
> Can anyone please help?? Is there really a way to have a "while...if"
> statement
>
>
>
> =
>  $connection = mysql_connect($hostname, $user, $pass) or die ("Unable to
> connect!");
> $query = "SELECT petname, petDesc, petpicture FROM petinfo WHERE petmonth
=
> 'Apr'";
> $result = mysql_db_query($database, $query, $connection) or die ("Error in
> query: $query. " . mysql_error());
>
> while (list($pet_name, $pet_Desc, $pet_picture) =
mysql_fetch_row($result))
> {
> if ($pet_picture == "")
> {
> echo "No Animals have been posted for $date at this moment. Please check
> back soon.";
> exit;
> }
>
> else
> {
> echo "
> Pet of the month
>
> 
> 
SRC=\"http://moss.bayou.com:/oppj/admin/animalcontrol/photos/$pet_pictur
e\"
> HEIGHT=150>
>
> 
> $pet_Desc
>
> 
> To adopt $pet_name please visit the Ouachita Parish Animal Shelter.
> The adoption fee is \$50.00 which includes Spade, Neutering and 7-N-1
> Shot.
>
> 
> Sorry, we can not hold $pet_name for you (First come first serve
> basis).
> ";
> }
> }
> ?>
> =
>
> Thanks,
>
>
> Confus3d
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] while...if statements???

2001-12-18 Thread Jim Lucas

I would do a mysql_num_row(); on your results to see if it returning
anything at all.

Jim
- Original Message -
From: "Jay Fitzgerald" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 12:08 PM
Subject: [PHP-DB] while...if statements???


> Does anyone know why this isn't working?? What I am trying to do is
display
> photos from a database based on each month. This part works fine when I
set
> it to the current month of December (today) as that is when I uploaded the
> photos.
>
> However, when I manually set the date to a month that has no photos in it,
> I want it to echo the No Animals string belowThis is only working
> half-way...meaning that it will display a blank page with nothing on it
> instead of actually echoing the No Animals string
>
> Can anyone please help?? Is there really a way to have a "while...if"
> statement
>
>
>
> =
>  $connection = mysql_connect($hostname, $user, $pass) or die ("Unable to
> connect!");
> $query = "SELECT petname, petDesc, petpicture FROM petinfo WHERE petmonth
=
> 'Apr'";
> $result = mysql_db_query($database, $query, $connection) or die ("Error in
> query: $query. " . mysql_error());
>
> while (list($pet_name, $pet_Desc, $pet_picture) =
mysql_fetch_row($result))
> {
> if ($pet_picture == "")
> {
> echo "No Animals have been posted for $date at this moment. Please check
> back soon.";
> exit;
> }
>
> else
> {
> echo "
> Pet of the month
>
> 
> 
SRC=\"http://moss.bayou.com:/oppj/admin/animalcontrol/photos/$pet_pictur
e\"
> HEIGHT=150>
>
> 
> $pet_Desc
>
> 
> To adopt $pet_name please visit the Ouachita Parish Animal Shelter.
> The adoption fee is \$50.00 which includes Spade, Neutering and 7-N-1
> Shot.
>
> 
> Sorry, we can not hold $pet_name for you (First come first serve
> basis).
> ";
> }
> }
> ?>
> =
>
> Thanks,
>
>
> Confus3d
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] how to get postscript to work with php/gd?

2001-12-18 Thread Joelmon2001

Does anybody know?

I know gd I edit the  makefile and can support older version of freetype
however, for certain reasons I can't install freetype 2, and I was considering
postscript fonts

Does anybody know from experience how to get gd/php working with them?

the goal is just better font support with gd/php instead of the default text 
that is displayed

Thanks. I have had trouble finding for sure which course of action to take 
for linux (raq 3) so I hope this isn't too off topic

joel



[PHP] Error while calling a function

2001-12-18 Thread J.F.Kishor

hi all,

I have got a problem, when I execute the following script it gives
a Fatal error, could any one tell me why is it ?, If this is a silly
problem please execuse me but, plz do reply me.

The script is 
-



 

Telephone Number : 
 


}
else
{

  function is_allnumbers ($text)
{
  if( (gettype($text)) == "integer") 
{
print "the value is an integer";
  return true; 
}
  
  $Bad = $this->strip_numbers($text);
  
  if(empty($Bad))
{
print "the value is  empty";
  return true;
}
  return false;
}
  
  function clear_error ()
{
  $this->ERROR = "this is an error";
}
  

  function is_phone ($Phone ="")
{
  if($this->CLEAR) 
{
  $this->clear_error(); 
}
  
  if(empty($Phone))
{
  $this->ERROR = "is_phone: No Phone number
submitted";
  return false;
}

  $Num = $Phone;
  $Num = $this->strip_space($Num);
  $Num = eregi_replace("(\(|\)|\-|\+)","",$Num);
  if(!$this->is_allnumbers($Num))
{
  $this->ERROR = "is_phone: bad data in phone
number";
  return false;
}
  
  if ( (strlen($Num)) < 7)
{
print "the number is less then 7";
  $this->ERROR = "is_phone: number is too short
[$Num][$Phone]";
  return false;
}
  
  if( (strlen($Num)) > 13)
{
print "the number is > then 13";
  $this->ERROR = "is_phone: number is too long
[$Num][$Phone]";
  return false;
}
  
  return true;
}
}  
$result = is_phone($Phone);
if($result == "true")
{
 echo "success";
}
else
{
  echo "failure";
}





The error is 

Fatal error: Call to undefined function: is_phone() in
/home/kuruvi1/kishor/public_html/IMS/ADMIN/test/is_phone.php on line 87


Thanks for your tolerance,

- JFK
 kishor



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] while...if statements???

2001-12-18 Thread Jay Fitzgerald

Does anyone know why this isn't working?? What I am trying to do is display 
photos from a database based on each month. This part works fine when I set 
it to the current month of December (today) as that is when I uploaded the 
photos.

However, when I manually set the date to a month that has no photos in it, 
I want it to echo the No Animals string belowThis is only working 
half-way...meaning that it will display a blank page with nothing on it 
instead of actually echoing the No Animals string

Can anyone please help?? Is there really a way to have a "while...if" 
statement



=
Pet of the month


http://moss.bayou.com:/oppj/admin/animalcontrol/photos/$pet_picture\"; 
HEIGHT=150>


$pet_Desc


To adopt $pet_name please visit the Ouachita Parish Animal Shelter.
The adoption fee is \$50.00 which includes Spade, Neutering and 7-N-1 
Shot.


Sorry, we can not hold $pet_name for you (First come first serve 
basis).
";
}
}
?>
=

Thanks,


Confus3d



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] "Email-based PHP-Script"

2001-12-18 Thread Attila Strauss

Hi


http://www.linuks.net/robot.phps

best regards
attila strauss




> Hello List,
>
> I'm currently trying to setup a script which is processing incomming
emails.
> So I setup PHP as CGI and did configurate the email like
>
> robot "|/path/to/the/script.php"
>
> The little testscript I tried looks like that:
>
>  $fp = fopen("php://stdin","r");
> while (!feof($fp))
> { $BUFFER = fgets($fp);
>$INPUT .= $BUFFER;
> }
> mail ("[EMAIL PROTECTED]", "Test", "$INPUT", "From: [EMAIL PROTECTED]");
> fclose($fp);
> ?>
>
> The error which I get is
>
> /path/to/the/script.php: cannot open ?: no such file
> 554 5.3.0 unknown mailer error 2
>
>
> Does anybody have some PHP code which would work to readout incomming
emails
> or knows that's wrong with my little script?
>
> Thanks a lot.
>
> Juergen
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] "Email-based PHP-Script"

2001-12-18 Thread J.Mueller, pro.vider.de GmbH

Hello List,

I'm currently trying to setup a script which is processing incomming emails.
So I setup PHP as CGI and did configurate the email like

robot "|/path/to/the/script.php"

The little testscript I tried looks like that:



The error which I get is

/path/to/the/script.php: cannot open ?: no such file
554 5.3.0 unknown mailer error 2


Does anybody have some PHP code which would work to readout incomming emails
or knows that's wrong with my little script?

Thanks a lot.

Juergen




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php htpasswd

2001-12-18 Thread Chris Lee

\n";
  exit();
 }

 if ( isset($PHP_AUTH_USER) AND isset($PHP_AUTH_PW) AND $peop_r =
fetch_db_value('people_manager', "WHERE username = '$PHP_AUTH_USER' AND
password = '$PHP_AUTH_PW' ") )
  $SessionID = $peop_r['peopleID'];
 else
 {
  Header("WWW-Authenticate: Basic realm='$SERVER_NAME' ");
  Header("HTTP/1.0 401 Unauthorized");
  bad_passwd();
 }
?>

http://www.mediawaveonline.com/examples/

--

  Chris Lee
  [EMAIL PROTECTED]


"Jtjohnston" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Jack,
>
> > not sure i follow...you open it with php do whatever you need and close
> > it...its just a text file...
>
> It's not just a text file delimited by a colon. You can indeed just type:
>
> user:password
>
> but it should be:
>
> user:crypt(password)
>
> When I perled, I knew how to database a text file delimited by :
> Now that I'm saved :) I'm learning MySQL, but I don't want to MySQL my
> htpasswd.users file.
> I don't even know if I can?
>
> Can I anyone? How would I?
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] sql password

2001-12-18 Thread Jeremiah Jester

Im attempting to install mysql. The service started and everything seems to
be going ok except for that I can't set the root password for the mysql
server.

To reset password i type:

/usr/bin/mysqladmin -u root -p mypassword

Then I get the following error:

/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'

Can anyone help?
Thanks,
JJ


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php htpasswd

2001-12-18 Thread jtjohnston

Jack,

> not sure i follow...you open it with php do whatever you need and close
> it...its just a text file...

It's not just a text file delimited by a colon. You can indeed just type:

user:password

but it should be:

user:crypt(password)

When I perled, I knew how to database a text file delimited by :
Now that I'm saved :) I'm learning MySQL, but I don't want to MySQL my
htpasswd.users file.
I don't even know if I can?

Can I anyone? How would I?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] sql password

2001-12-18 Thread Jeremiah Jester

Im attempting to install mysql. The service started and everything seems to
be going ok except for that I can't set the root password for the mysql
server. Whenever i type:

I get the following error:


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php htpasswd

2001-12-18 Thread Jack Dempsey

not sure i follow...you open it with php do whatever you need and close
it...its just a text file...

-Original Message-
From: jtjohnston [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 1:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php htpasswd


I'm sure question has been asked. How can I edit a htpasswd (apache)
file using a php script? Does anyone have a piece of code? I would like
to see the crypted passwords, but will live without.

Thanks,
J


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php htpasswd

2001-12-18 Thread jtjohnston

I'm sure question has been asked. How can I edit a htpasswd (apache)
file using a php script? Does anyone have a piece of code? I would like
to see the crypted passwords, but will live without.

Thanks,
J


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general@lists.php.net

2001-12-18 Thread Andrei Zmievski

I found this message on php-general list, and I'm cross-posting the
reply to Smarty list.

I see a couple of issues with passing Smarty object to modifiers.

1. You want to use _current_file and _current_lineno member variables,
but they are only defined in Smarty_Compiler class, and what actually
runs the modifiers is Smarty class. Check Smarty::_run_mod_handler().

2. The only reasonable way to make Smarty object available to modifiers
is to pass it as a last parameter. However, you run into problems when
your modifier has default parameters. For example:

function x_mod($arg1, $arg2 = 5, &$smarty)
{
  ...
}

If you call modifier as {$foo|x}, $arg2 would actually point to the
Smarty object, and you will get a notice complaining about $smarty
parameter not being passed. So, it would not be possible to use default
parameters for modifiers which is a big step back IMO.

Can you provide alternative ideas?

> Hi,
> 
> is there a way to access the calling smarty object from withing a 
> modifier callback function?
> 
> Regular smarty callback functions get passed a list of "parameters" of 
> the function call as a first argument and a reference to the calling 
> smarty object as a second argument.
> 
> function my_smary_func($params, &$smarty) {
> ...
> 
>  if (my_smarty_check_params($params, $allowed)) {
>return true;
>  }
> 
> $smarty->assign();
> ...
> }
> 
> 
> That way you can not only modify the smarty object but access properties 
>of the object. Two of them help me to generate error messages: 
> $smarty->_current_line_no and $smarty->_current_file (btw. one should 
> "make them public").
> 
> function my_smarty_check_params($params, $allowed, &$smarty) {
>
>if (...) {
>   return sprintf("Error on %s %d", $smarty->_current_file, ...);
>}
>...
> }
> 
> Can I do something similar with modifiers, which seem to have this
> format. Is there a way to access the calling smarty object?
> 
> function my_smarty_modifier($value, $option = '', ...) {
> ??? $smarty->... ???
> }

-Andrei

When we eliminate the impossible, whatever remains,
however improbable, must be true. -- Sherlock Holmes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] preg_grep() and limit parameter

2001-12-18 Thread Jack Dempsey

only thing i could think up would be if a user is dealing with huge amounts
of text and only needs to have the first ten returned, returning/continuing
past that would be wastefulnot confident on how often this would really
happen and what the actual difference would be...

Jack

-Original Message-
From: Andrei Zmievski [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 12:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP] preg_grep() and limit parameter


Does anyone see a need for a limit parameter to preg_grep() that would
limit the number of array entries returned?

-Andrei
* My wishlist: http://www.amazon.com/exec/obidos/wishlist/2Q2DIPY7BZLSH/ *

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP module for modem???

2001-12-18 Thread Chris Lee

configure --help

in other words, no. but there is nothing from stopping you from writing a
module :) im sure there are others out there that would like such a feature,
ie for fax's

--

  Chris Lee
  [EMAIL PROTECTED]



"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi!
>
> Is there any module or software that I can use and compile it with PHP
> for working with hte modem???
> For example, I have cURL but it is a seperate software and can be
> compile with PHP for certain things like FTP, Internet socket, etc.  So,
is
> there ever one for the modem?
>
> Thanks,
>  Scott
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: MySQL Native Function in PHP Query Not Working?

2001-12-18 Thread Chris Lee

that command doesnt even work from the mysql command prompt for me, Ive
never used LAST_INSERT_ID(), but it dont work for me. try it on your mysql
command prompt.

--

  Chris Lee
  [EMAIL PROTECTED]


"Ise" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> Can someone explain to me why the below SQL query when executed with the
PHP
> mysql functions does not work? (it returns nothing)
>
> SELECT * FROM table WHERE aid=LAST_INSERT_ID()
>
> If I replace the MySQL function "LAST_INSERT_ID()" with a integer, it
works
> fine so its not the query.  Further, I was returned results on the above
> query when I ran it directly from a MySQL client.  Does PHP not support
> certain MySQL native functions?
>
>
> Thanks,
>
> Michael Caplan
> Institute for Social Ecology
> http://www.social-ecology.org/
>
> 1118 Maple Hill Road
> Plainfield, VT, 05667 USA
>
> Tel.: 1 (514) 421-3515
> General Tel. / Fax.: 1 (802) 454-8493
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Header error while creating an Image

2001-12-18 Thread Chris Lee

you dont have output buffering on, check php.ini or add it manually to an
.htaccess.

--

  Chris Lee
  [EMAIL PROTECTED]



"J.F.Kishor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hello,
>
> I'am trying to create an image using php image functions
> it gives a warning and outputs a image with GIF87a format, why does
> this happen, could some help me out in this problem.
>
> This is the script
> --
>  Header("Content-type: image/gif");
> $string=implode($argv," ");
> $im = imagecreatefromgif("images/Next.gif");
> $orange = ImageColorAllocate($im, 220, 210, 60);
> $px = (imagesx($im)-7.5*strlen($string))/2;
> ImageString($im,3,$px,9,$string,$orange);
> ImageGif($im);
> imagecolortransparent($im);
> ImageDestroy($im);
> ?>
>
> Warning alerted is
> --

> Warning: Cannot add header information - headers already sent by
> (output started at /home/kuruvi1/kishor/public_html/GD/creatingIMG.php:2)
in
> /home/kuruvi1/kishor/public_html/GD/creatingIMG.php on line 4
> --

>
> Junk output is
> ---
>
> --
---
> GIF87a9CU_11EraalUYIAAf11__O<99 @ ` @\*6Z>@<6#%,9I#< A"A CI"ACA E#YU ( @
> a#",EX(R X#Y"*(B H#I3> " EC< A []
> --
---
>
> Thanks for sparing time for this mail
>
> with regards
>
>  -JFK
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: including outside pages

2001-12-18 Thread Chris Lee

include() will not handel ssl. include() on a remote site obv. will not
transer access to the variables to the remote site.

your best bet is to encode your session, session_encode(), and either store
it in a common mysql table that both servers have access to (best method) or
to pass it in the url to the ssl site, if this is done then you have to
treat your session data as if it were cookie data, dont trust it.

--

  Chris Lee
  [EMAIL PROTECTED]




"Jordan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hello all,
>
> Two questions
>
> 1) Is it possible to pass a session to another server?  I'm creating a
> secure order form for a shopping cart but the ssl service of my provider
is
> on a different server.  Is there anyway to carry a users session over to
> this box?
>
> 2) If it is not possible to carry a session...is there anyway I could
> include this page on the ssl server into my main server from my host?  If
I
> could do an include I could continue the session and use it's stored
> variables.
>
> Thank you for the help.
>
> -Jordan
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Text file busy

2001-12-18 Thread Chris Lee

try php.ca or any of the other mirrors when php.net is down.

I bet you got that file your running open in an editor eh? close the file in
the editor then run the file, no problems.

--

  Chris Lee
  [EMAIL PROTECTED]



"Boaz Yahav" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
HI

I'm trying to run a php file in CGI mode and I get : Text file busy
I'm running many other files like that for years and this is the 1st
time I see such a message.

php.net seems to be down for me, any idea?

berber






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Still need help with miscount

2001-12-18 Thread Chris Lee

need more info buddy. does this query work at the mysql command prompt? show
us an example, show us 10 records and accual query being exec and what the
returned result is and what you think it should be.

--

  Chris Lee
  [EMAIL PROTECTED]



"Fîk ì?çìsâî" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,

i still need help with this query:

$t = 7;
$shot_counts = "SELECT COUNT(*) FROM statistik WHERE
shooter='$shooter_login' AND (shot_one = '$t' OR shot_two = '$t' OR
shot_three = '$t' OR shot_four = '$t' OR shot_five = '$t')";

It doesn´t return the correct count. I have tried to tweak the syntax
around, excluding one or more columns to count etc. But it still gives the
wrong count. What´s wrong?

- Daniel




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] preg_grep() and limit parameter

2001-12-18 Thread Andrei Zmievski

Does anyone see a need for a limit parameter to preg_grep() that would
limit the number of array entries returned?

-Andrei
* My wishlist: http://www.amazon.com/exec/obidos/wishlist/2Q2DIPY7BZLSH/ *

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP and plugin detection

2001-12-18 Thread Chris Lee

it has to be done via javascript.

javascript = clientside
php = serverside

if the plugins are on the clientside then javascript is needed. and no,
sorry, I dont know how.

--

  Chris Lee
  [EMAIL PROTECTED]



"Daniel Reichenbach" <[EMAIL PROTECTED]> wrote in message
01c1816b$ae010230$796010ac@danielmob">news:01c1816b$ae010230$796010ac@danielmob...
> Hy,
>
> is there any way to detect the plugins a user has installed in his
> browser with PHP? I want to write a page where users get a plugin
> depending on their installation. If none of the required plugins
> is available an error page should be viewed.
>
> If it's not possible using PHP, can it be done with JavaScript?
>
> Greetings,
> Daniel
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: What is the best way to reorder table columns...temp tables?

2001-12-18 Thread Chris Lee

man that is nasty, but imho because of the constant in and out of php

echo "
link 
";

I came across this same problem, I hate the long urls, their ugly, so I
wrote a simple session class to carry my prefs across a page.

carry_class.egn

http://www.mediawaveonline.com/examples/

 $carry->add('position');
 $carry->add('order_by');
 $carry->add('order_by_dir');
 $carry->add('search');
 $carry->add('search_keyword');
 $carry->add('search_category');

 echo "
 order by name
 order by email
address
 up
 down

 back
 home
 next
 ";

--

  Chris Lee
  [EMAIL PROTECTED]




"J. Roberts" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm trying to update a report generator I have, using php and mysql.
> The setup is essentially listing employees and production data.
>
> What I did when I created it was for the column headers, made them links
> to requery the database..sample link follows (inside an anchor tag):
> "reports.php?userid=&date_start= $date_start; ?>&date_end= ?>&orderby=trans_per_req%20desc&groupby= ?>&type=other&daterange="
>
> As you can see that is very ugly, and inefficient.
>
> I was thinking that one way to get around passing so many parameters was
> after the initial query, have that inserted into a temporary table.  Then
> all that would need to be passed with the query string would be an ORDER
BY
> clause, at which time I would do a SELECT * FROM TEMP_TABLE ORDER BY
> $orderby.
>
> One thing im not sure about, is if temporary tables are unique to each
user.
> That is to say if two people were running reports at the same time with
> different
> parameters, would that work?  If so, how long before the connection dies?
> If
> it is at the end of script execution, that wouldn't be much help.
>
> Does anyone have any better ideas as well?  I thought about using a
> multi-dimensional
> array, but was told that that would be a bad idea to keep a large array
> alive
> in memory.
>
> Thanks,
>
> -Jamison
>
> (hope this makes some sense)
>
>
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Rational Rose plugin for generating php code ?

2001-12-18 Thread Chris Lee

configure --help

ie. nope, nothing there.

--

  Chris Lee
  [EMAIL PROTECTED]



"Arne Brune Olsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi
Does anyone know if there is a module for rational rose for generating php
code from UML diagrams ?

Arne






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Using @file

2001-12-18 Thread Chris Lee

haha, I bet it cant resolve, and I doubt it works on other machines :)

www.myserver,com
www.myserver.com

see the diff? ditch the comma and put a period in insted :) trust me it
happens to the best of us.

--

  Chris Lee
  [EMAIL PROTECTED]



"Jeff Lewis" <[EMAIL PROTECTED]> wrote in message
013901c181b8$a4acd400$76a1a8c0@LEWISJCIT">news:013901c181b8$a4acd400$76a1a8c0@LEWISJCIT...
I am using this line in part of my code but am getting an error that looks
like below:

Code:
$serverDetails =
@file("http://www.myserver,com/versions.php?l=$scripturl&v=$version";);

Error:
2: php_network_getaddresses: gethostbyname failed
(c:\inetpub\wwwroot\yabbse\Sources\Admin.php ln 43)

What would be causing this error?  It works on some machines but not others?

Jeff




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: max # of characters for links to work in emails?

2001-12-18 Thread Chris Lee

a good guess would be every email client does it differnetly. unfort Id have
to say try it yourself. Id imagine its long enough that you shouldnt have to
worry about it, but I could be wrong.

--

  Chris Lee
  [EMAIL PROTECTED]


"Tom Churm" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi,
>
> i'm working on an eCard project and somehow need to find out what the
> reasonable limit is on characters for urls in email bodies (normal text,
> not mime).
>
> i know that some mail clients will cut off urls that are too long or
> else throw a line break in the middle of them--thus rendering them
> 'unclickable'.  and this is exactly what i wanna avoid.
>
> anyone have any advice to offer in this area?
>
> muchos gracias,
>
> tom



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: need some help

2001-12-18 Thread Chris Lee

I'll try and answer your questions as will the rest off the forum Im sure,
just post away.

--

  Chris Lee
  [EMAIL PROTECTED]



"Melva Garcia" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am looking for a mentor to help me along with
> using php and mysql
>
> i am a designer for over 9 years now..and will
> in return help you with anything pertaining to
> layout and design
>
> i have alot of dumb questions pertianing to
> php and mysql dba can someone help me
> i would appreciate any help I can get
>
> thanks
> Mel
>
> __
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Header redirecting with POST

2001-12-18 Thread Chris Lee

2k is alot of data to be sending using GET or POST, just leave it on the
server in a session variable.

redirect server 2000 bytes -> client
GET client 2000 bytes -> server

or via sessions

redirect server 50 bytes -> client
GET client 50 bytes -> server

--

  Chris Lee
  [EMAIL PROTECTED]




"Jim Lucas" <[EMAIL PROTECTED]> wrote in message
001b01c18363$cd008990$[EMAIL PROTECTED]">news:001b01c18363$cd008990$[EMAIL PROTECTED]...
> is it possible to use header() to redirect and have it act as a post
>
> I know about this method
> header("Location: http://www.yahoo.com/?variable=value";);
> but this is the GET method
> I don't want to have to know every single (variable|value) combination
that
> will be sent to a page
>
> Sadly though, GET has a size limit on the amount of data you can send
> throught the URL, 2kb.  I want to be able to send larger amounts with a
> header() redirect.
>
> Any ideas on how to send the data in a POST with header(); woud be
> appreciated.
>
> Thanks Jim Lucas
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Logout problem

2001-12-18 Thread Chris Lee

  Header("WWW-Authenticate: Basic realm='$SERVER_NAME' ");
  Header("HTTP/1.0 401 Unauthorized");

is the proper http auth hearders, change the realm and you'll have to
re-authenticate.

--

  Chris Lee
  [EMAIL PROTECTED]



"J.F.Kishor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hello all,
>
>I have designed a web page using php, as a security measure I have
>  kept it password protected. I have used Apache authentication, using
>  htpasswd file. Now I want to keep a logout in this web page, I tried to
>  send a header request "http/1.0 401 Unauthorized" to force it to
>  reauthenticate when the logout link is clicked in the form, but this dose
>  not work.
>
>  I tried using session_destroy() even that does not work.
>
>  To get the authenticated users name I have used GetEnv("REMOTE_USER") in
>  all the form and with that username I'am handling mysql and other
requests.
>  I don't know where exactly the REMOTE_USER gets stored.
>
>  So please help me out in this problem. I want to remove the
>  window's authentication cache.
>
>  Please give me some ideas and suggestion to remove the user name and make
>  the page fresh for the other user to log in.
>
>  If possible please send me a sample script.
>
>
>
>
> kishor
> Nilgiri Networks
>
>
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: http referer problems

2001-12-18 Thread Chris Lee

break it down.

if ( $ef != 'nm' )
echo "a : $ef";
else
echo "b : $ef ";
if ( $HTTP_REFERER !=
'http://www.globalhealth.org/news/article.php3?id=1526' )
echo "c : $HTTP_REFERER";
else
echo "d : $HTTP_REFERER";

now you can see where the bug is.

--

  Chris Lee
  [EMAIL PROTECTED]


<[EMAIL PROTECTED]> wrote in message
BB6D932A42D6D211B4AC0090274EBB1DA0F1E8@GLOBAL1">news:BB6D932A42D6D211B4AC0090274EBB1DA0F1E8@GLOBAL1...
> For some reason, the following if  statement isn't working.  Maybe I
haven't
> had enough coffee to drink or maybe I've had too much - what am I missing?
>
> if ($efa != "nm" || $HTTP_REFERER !=
> "http://www.globalhealth.org/news/article.php3?id=1526";){do this);}
>
> Thank you, Shawna



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Single character input on command line

2001-12-18 Thread Chris Lee

take them from the arguments list

$argv[]

I know its not what you asked, its just what I answered.

--

  Chris Lee
  [EMAIL PROTECTED]


"August Zajonc" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Interested in getting a single character at a time on the command line
using
> php.
>
> ie, I'd like to type 2 and be able to trap that keystroke right away and
act
> on it.
>
> Before spending a lot of time tracking down possibilites (readline
> input_buffer, reading the stdin pipe) thought I'd ask if anyone's done
this
> already and has an elegant way I'm missing.
>
> Thanks,
>
> - August
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: php sessions limit

2001-12-18 Thread Chris Lee

its irrelevant. now there is a file system dependancy. in linux is inodes,
not enough and you'll have some problems, win2k I dont know.

--

  Chris Lee
  [EMAIL PROTECTED]


"Aaustin" <[EMAIL PROTECTED]> wrote in message
002101c18293$671c5d00$0300a8c0@tomato">news:002101c18293$671c5d00$0300a8c0@tomato...
> Hi
> This may sound strange. but ...
> Is there a  limit to the number of sessions one can/should have using the
> same identity details at one time. ie if beta testing a website with the
> same password details etc. or is it irrelevant.
>
> Thanks
>
>
> Andrew
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Cookie Retrieval

2001-12-18 Thread Chris Lee

I know this isnt answering your question, but skip cookies and goto
sessions, easier to work with.

now the answer to your question, you need to set the domain and path on your
setcookie()

setcookie('name', 'value', $exp, '/', $SERVER_NAME);

--

  Chris Lee
  [EMAIL PROTECTED]



"Steve Osborne" <[EMAIL PROTECTED]> wrote in message
001701c1829d$90a519a0$[EMAIL PROTECTED]">news:001701c1829d$90a519a0$[EMAIL PROTECTED]...
> Can someone tell me if there is a bit of code I need to put on pages so I
> can retrieve a cookie.
> The cookie was set with the following code:
>
> //(D) Set Cookie
>$encoded_login = encode_string($login);
>if ( $remember == "yes" ){
> // set login to expire in 1000 days
> $time = (time() + ( 24 * 3600 * 365 ));
> SetCookie ( "poccd_session", $encoded_login, $time);
>}else{
> SetCookie ( "poccd_session", $encoded_login );
>}
>
> I am trying to retrieve it with the following code (for testing purposes
> only, right now):
>
> if($poccd_session)
> {
>  header("location: index.php");
> }else{
>  print("The cookie plan didn't work.");
> }
>
> Any suggestions would be appreciated.
>
> Steve Osborne
> Database Programmer
> Chinook Multimedia Inc.
> [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: sessions

2001-12-18 Thread Chris Lee

take a look at my session.egn file.

http://www.mediawaveonline.com/examples/

--

  Chris Lee
  [EMAIL PROTECTED]



"Anthony" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I need some help with sessions.  I read the sections in the manual and
> searched for tutorials, but I still can't get a straight forward example
> of how sessions work.  I need to pass variables to a page that will load
> in a new browser window.  I used session_register, but when I look in
> the $HTTP_SESSION_VARS, it doesn't exist.  I tried using start_session
> and still no luck.  Once I get the session vars registered, how do I
> access them.  I am able to pass the session id as a var, I'm going it
> like page.php?sid=$.  Is there a better way, do I need to do
> this at all?  I'm confused as hell and can't find a working example
> anywhere. Help!
>
> - Anthony
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Passing through Array's to another script

2001-12-18 Thread Chris Lee

foreach( $array_name as $pos => $val )
echo "

";

or use sessions.

--

  Chris Lee
  [EMAIL PROTECTED]


"Gkin" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I want to pass through an array with content to another script. The array
is
> correctly filled with data. To do this I use the following code:
>  
>
> The content of the array is not recognised in the script.php. What is the
> best way to do this?
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: online editor

2001-12-18 Thread Chris Lee

online editor? you got 1mb free? no? buy a floppy. install ultraedit, it's
the best editor around imho.

--

  Chris Lee
  [EMAIL PROTECTED]


"R. Lindeman" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> can someone help get a online editor
>
> thanx
>
> R. Lindeman
>
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Remote image

2001-12-18 Thread Chris Lee

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

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

--

  Chris Lee
  [EMAIL PROTECTED]



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

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

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

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

I hope someone can help me.

Cheers,
Martin.






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Problem with fopen / url

2001-12-18 Thread Chris Lee

sounds like php is having a problem resolving the dns. could be 1 of a 100
things ...

try putting the IP of the machine in vs the domain name.

--

  Chris Lee
  [EMAIL PROTECTED]



"Martin Leclair" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I have a problem doing a fopen("http:///index.php","r";) on a
particular
> server it's extreamly slow (about 2 minutes to get the content of a
webpage
> on a server that pings at 1ms) on another server it's getting the content
in
> less than 5 seconds (same script). Same URL, servers are side to side on
the
> same network, almost same hardware, uptime is fine. The server that causes
> problem is with 4.0.6.
>
> Would someone have some hints on what could cause it to work on one server
> and take more than 2 minutes on the other?
>
> Martin
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php mail problems

2001-12-18 Thread Mike Jarosch

Hello,

Using a Solaris box with php 4.0.6 I am having a problem sending mail using
mail().  Sendmail is installed and works.  Php.ini points to sendmail.  What
do the -t and -i options do?  Are they required?  Any ideas what could be
wrong?

Here is my code:
if( mail( "myemailaddresshere", "Test", "test", "From: myemailaddresshere" )
== FALSE )
{
 print( 'Error sending email 1.' );
}

Thanks,
Mike



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP module for modem???

2001-12-18 Thread Scott Fletcher

  What application would I need to use this.  In this case, no appication.
Just writting the PHP code on the webpage that would work with the modem and
stuffs like that.

Scott

"Nathan Cassano" <[EMAIL PROTECTED]> wrote in message
778f01c187e3$b84b8ed0$2925ae3f@amos">news:778f01c187e3$b84b8ed0$2925ae3f@amos...
>
> There aren't any modem modules that I am aware of but if you are using
> UNIX you can just open the modem device and talk to it directly. What is
> your application that would need to use a modem?
>
>   /* Something like this */
>  $fp = fopen("/dev/modem", "rw");
>  fwrite($fp, "ATA");
>  echo fgets($fp, 128)
>  fclose($fp);
> ?>
>
> -Original Message-
> From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 18, 2001 8:11 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP module for modem???
>
>
> Hi!
>
> Is there any module or software that I can use and compile it with
> PHP for working with hte modem???
> For example, I have cURL but it is a seperate software and can be
> compile with PHP for certain things like FTP, Internet socket, etc.  So,
> is there ever one for the modem?
>
> Thanks,
>  Scott
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >