[PHP] pdf with POST

2002-05-30 Thread Josep R. Raurell

Hello.

I do a pdf with a lot of variables from a form, with a GET method.

After make the pdf (in the same script) I sent the headers and the user 
can see the document in your browser:

   $data = $albara->retorna();
   $len=strlen($data);

   header("Content-Type: application/pdf");
   header("Content-Length: $len");
   header("Content-Disposition: inline; filename=$fileName");
   header("Pragma: no-cache");
   header("Expires: 0");
 
   print $data;
   $albara->deleteDoc();

This work OK.
But I want use POST because there are so much variables in the URL, whit 
post the result is a blank scrren (the pdf never apears).
Somebody nows if is posible (with another headers or with other 
solution) to use a POST method to get a pdf made on the fly ?


Thanks.
Josep. R. Raurell



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




[PHP] compile problem with gd 2.0.1

2002-05-30 Thread Michael Geier

Linux Redhat 7.3
PHP 4.2.0
GD 2.0.1

during make:
/bin/sh /root/php-4.2.0/libtool --silent --mode=compile gcc  -I. -I/root/php-
4.2.0/ext/gd -I/root/php-4.2.0/main -I/root/php-4.2.0 -
I/usr/local/apache/include -I/root/php-4.2.0/Zend -I/usr/local/mysql/include -
I/usr/local/easysoft/oob/client/include -I/root/php-4.2.0/ext/xml/expat  -
DLINUX=22 -DUSE_HSREGEX -I/root/php-4.2.0/TSRM -g -O2 -prefer-pic  -c gd.c
gd.c: In function `zm_startup_gd':
gd.c:303: `gdArc' undeclared (first use in this function)
gd.c:303: (Each undeclared identifier is reported only once
gd.c:303: for each function it appears in.)
gd.c:304: `gdPie' undeclared (first use in this function)
gd.c:305: `gdChord' undeclared (first use in this function)
gd.c:306: `gdNoFill' undeclared (first use in this function)
gd.c:307: `gdEdged' undeclared (first use in this function)
gd.c: In function `zif_imagecreatetruecolor':
gd.c:588: warning: assignment makes pointer from integer without a cast
gd.c: In function `zif_imagecolorat':
gd.c:1626: structure has no member named `tpixels'
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/root/php-4.2.0/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/php-4.2.0/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/php-4.2.0/ext'
make: *** [all-recursive] Error 1


configure:
 --with-apxs=/usr/local/apache/bin/apxs
 --enable-ftp
 --with-gd
 --enable-force-cgi-redirect
 --with-pear
 --enable-mailparse
 --enable-sockets
 --with-esoob
 --with-mysql=/usr/local/mysql
 --with-zlib-dir=/usr/include
 --with-jpeg-dir=/usr/lib
 --with-png-dir=/usr/lib

any help appreciated
-- 
Michael Geier
email: [EMAIL PROTECTED]




-
This mail sent through CDM Sports Webmail.

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




[PHP] Graphs using PHP

2002-05-30 Thread Jason Soza

Just want to run this by you all to check the feasibility of it.

I run a site that deals with cars, people can upload pics of their vehicle
and tell everyone else its year, color, 'generation', and where they're
located.

What I'd like to do is make some graphs on the front page that look like
gauges you'd see in a car, i.e. speedometer, tachometer, oil, etc. but these
would actually be graphs showing, for instance, how many of the cars on the
site are red, or whatever the most popular color is. So if a majority of the
cars were red, and red cars made up 57% of the total cars on the site, I'd
want a graphic of a speedometer with a needle that would be in a position
that represented 57%.

How difficult is this? I looked at some of the imagecreate() functions in
the manual, but they look like a language all their own and I'd like to know
if there's any easier way to do this that I'm overlooking. I'm thinking
doing some kind of image overlay is the way to go, but not sure. Any ideas
or pointers would be great, links to sample scripts would be excellent.
Thanks!

Jason Soza


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




RE: [PHP] Undefined variables

2002-05-30 Thread Martin Towell

if you want to do the same thing for "no task supplied" and "unknown task"
then you could do this:

switch(@$Task)
{
  case 'ShowVersion':
ShowVersion();
break;
  case 'GetData':
GetData;
print $DataOutput;
break;
  case 'CreateImage':
CreateImage();
break;
  default:
print 'Unknown function or No function supplied';
}

basically, suppress warnings

-Original Message-
From: Christopher J. Crane [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 2:33 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Undefined variables


I like this piece of code. In fact, I convert all my scripts that use the
older If/Else  code. What would happen if the "break; " wasn't used. Would
it just continue through the rest of the function to find another match???

"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 30 May 2002, Crane, Christopher wrote:
> > if ($Task == "ShowVersion") { function ShowVersion(); }
> > elseif ($Task == "GetData") { function GetData(); print "$DataOutput"; }
> > elseif ($Task == "CreateImage") { function CreateImage(); }
> > else { print "Incorrect Variable or no Variable Supplies"; }
>
> if (isset($Task))
> {
>   switch($Task)
>   {
>   case 'ShowVersion':
> ShowVersion();
> break;
>   case 'GetData':
> GetData;
> print $DataOutput;
> break;
>   case 'CreateImage':
> CreateImage();
> break;
>   default:
> print 'Unknown function';
>   }
> } else {
>   print 'No function supplied';
> }
>
>



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

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




Re: [PHP] Undefined variables

2002-05-30 Thread Christopher J. Crane

I like this piece of code. In fact, I convert all my scripts that use the
older If/Else  code. What would happen if the "break; " wasn't used. Would
it just continue through the rest of the function to find another match???

"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 30 May 2002, Crane, Christopher wrote:
> > if ($Task == "ShowVersion") { function ShowVersion(); }
> > elseif ($Task == "GetData") { function GetData(); print "$DataOutput"; }
> > elseif ($Task == "CreateImage") { function CreateImage(); }
> > else { print "Incorrect Variable or no Variable Supplies"; }
>
> if (isset($Task))
> {
>   switch($Task)
>   {
>   case 'ShowVersion':
> ShowVersion();
> break;
>   case 'GetData':
> GetData;
> print $DataOutput;
> break;
>   case 'CreateImage':
> CreateImage();
> break;
>   default:
> print 'Unknown function';
>   }
> } else {
>   print 'No function supplied';
> }
>
>



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




[PHP] PHP.INI Lockdown

2002-05-30 Thread David Redmond

Hi All,

Is there anyway to lockdown PHP so that only the INI file from C:\WinNT\ is
used?  Currently, you can place an INI file into the same directory as the
php script your viewing through a browser and instead of loading the INI
file located in the C:\WinNT\ directory, it will load the INI file that is
in the current working directory.  Same thing applies to putting the INI
file in the directory where the PHP executable is stored.

Using the -c  command line switch forces PHP to check the directory
that you've specified for the INI file, however setting up the following in
IIS Application Mappings fails to work, although running it from the command
line works fine.

e:\php\php.exe -c C:\WinNT\ %s %s

I've also tried a multitude of variants using "'s, forward-slashes, etc.
without any luck.

Cheers

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




Re: [PHP] Mcrypt Function - New to it

2002-05-30 Thread Tom Ray

Well now I have the Encryption problem figured out but when I try to 
decrypt the information, I'm getting this error:

Warning: mcrypt module initialization failed in test.php on line 11

Here's Line 11:

$text = mcrypt_decrypt (MCRYPT_TripleDES, $key, $lockdata, 
MCRPYT_MODE_ECB, $iv);

again any help would be appreciated.

Tom Rogers wrote:

> Hi
> Here are a couple of functions that should help to get you started, iv 
> is set to all 0's so it does not have to be passed around or stored in 
> sessions. It is base64 encoded so it can be stored or passed to the 
> browser.
>
> Function Code_id($id,$password){
> $eid = 0;
> $td = mcrypt_module_open (MCRYPT_TripleDES, "", 
> MCRYPT_MODE_ECB, "");
> $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv);
> mcrypt_generic_init ($td, $password, $iv);
> $eid = base64_encode(mcrypt_generic ($td, $id));
> mcrypt_generic_end ($td);
>   return $eid;
> }
> Function Get_id($eid,$password){
> $id = 0;
> $td = mcrypt_module_open (MCRYPT_TripleDES, "", 
> MCRYPT_MODE_ECB, "");
> $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv);
> mcrypt_generic_init ($td, $password, $iv);
> $id = mdecrypt_generic ($td, base64_decode($eid));
> mcrypt_generic_end ($td);
> return $id;
> }
> Tom
>
>
> At 11:07 PM 30/05/2002 -0400, Tom Ray wrote:
>
>> Hi there..some what a new programmer when it comes to all this. I'm 
>> trying to encrypt some data and then decrypt it. It doesn't have to 
>> be high bit encryption just something simple like 3DES. But I keep 
>> getting it wrong. Any help would be greatful. Here's the piece of code:
>>
>> $iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_3DES, 
>> MCRYPT_MODE_ECB), MCRYPT_RAND);
>>
>> $key = md5("Secret Key");
>> $sample2 = "Hello";
>>
>> $lockdata = mcrypt_encrypt (MCRYPT_3DES, $key, $sample2, 
>> MCRYPT_MODE_ECB, $iv);
>>
>> echo "$lockdata\n";
>>
>> $text = mcrypt_decrypt (MCRYPT_3DES, $key, $lockdata, 
>> MCRPYT_MODE_ECB, $iv);
>>
>> echo "$text\n";
>>
>>
>>
>>
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>




Re: [PHP] user auth

2002-05-30 Thread Miguel Cruz

On Thu, 30 May 2002, Justin Blake wrote:
> I will soon be developing a user authentication system with different
> access levels. I will need to check the users against a mysql database.
> How secure is checking for a session var, and then redirecting with
> header('Location:...') ? Is there a way to get around this method of
> protection?

That's the worst security scheme I've ever heard of.

Anyone can just look at where the redirect points to and go there.

You should keep the session active throughout your secured area and check 
against a session variable at the top of each page.

miguel


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




Re: [PHP] user auth

2002-05-30 Thread Daniel Tryba

On Thu, May 30, 2002 at 11:46:29PM -0400, Justin Blake wrote:
> I will soon be developing a user authentication system with different
> access levels. I will need to check the users against a mysql
> database. How secure is checking for a session var, and then
> redirecting with header('Location:...') ? Is there a way to get around
> this method of protection?

I'm no expert on this but I don't think session in PHP them selves have
any security embedded in it by them selves, you could just try to do a
bruteforce attack on sessionIDs (good luck :). 

But what you yourself could do is keep track of eg. the IP adress of the
user and check if it doesn't change... if it does then maybe someone is
trying something fishy.

-- 

  Daniel Tryba


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




Re: [PHP] Mcrypt Function - New to it

2002-05-30 Thread Tom Rogers

Hi
Here are a couple of functions that should help to get you started, iv is 
set to all 0's so it does not have to be passed around or stored in 
sessions. It is base64 encoded so it can be stored or passed to the browser.

Function Code_id($id,$password){
 $eid = 0;
 $td = mcrypt_module_open (MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
 $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv);
 mcrypt_generic_init ($td, $password, $iv);
 $eid = base64_encode(mcrypt_generic ($td, $id));
 mcrypt_generic_end ($td);
   return $eid;
}
Function Get_id($eid,$password){
 $id = 0;
 $td = mcrypt_module_open (MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
 $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv);
 mcrypt_generic_init ($td, $password, $iv);
 $id = mdecrypt_generic ($td, base64_decode($eid));
 mcrypt_generic_end ($td);
 return $id;
}
Tom


At 11:07 PM 30/05/2002 -0400, Tom Ray wrote:
>Hi there..some what a new programmer when it comes to all this. I'm trying 
>to encrypt some data and then decrypt it. It doesn't have to be high bit 
>encryption just something simple like 3DES. But I keep getting it wrong. 
>Any help would be greatful. Here's the piece of code:
>
>$iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_3DES, MCRYPT_MODE_ECB), 
>MCRYPT_RAND);
>
>$key = md5("Secret Key");
>$sample2 = "Hello";
>
>$lockdata = mcrypt_encrypt (MCRYPT_3DES, $key, $sample2, MCRYPT_MODE_ECB, 
>$iv);
>
>echo "$lockdata\n";
>
>$text = mcrypt_decrypt (MCRYPT_3DES, $key, $lockdata, MCRPYT_MODE_ECB, 
>$iv);
>
>echo "$text\n";
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] user auth

2002-05-30 Thread Justin Blake

I will soon be developing a user authentication system with different access levels. I 
will need to check the users against a mysql database. How secure is checking for a 
session var, and then redirecting with header('Location:...') ? Is there a way to get 
around this method of protection?

-- 
Justin Blake
http://blaix.org/


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




Re: [PHP] newbie: cron jobs

2002-05-30 Thread Miguel Cruz

crontab -e

You'd have to write a pretty clever script. SSH in (or telnet if you 
absolutely must).

miguel

On Thu, 30 May 2002, Edgard Berendsen wrote:
> but how can I acces cron -e?
> with a php script or I have to use telnet?
> 
> "Cal Evans" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > 1: Yes, if your host has given you permission to run cron jobs. Some hosts
> > lock cron to only root or to a specific subset of users. If you have
> > permission to create them, crontab -e will give you the editor to edit
> them.
> > (hint: man crontab.  read it. Now read it again.)
> >
> > 2: man cron,  man crontab,
> > http://www.google.com/search?hl=en&q=cron+tutorial
> >
> > 3: This is one of those, "If you have to ask, you can't afford it"
> > questions. Technically, no, there is nothing special about a "cron job"
> cron
> > is a program that runs other programs or shell scripts at pre-determined
> > intervals. However, it doesn't bother to check to see if it's a good idea
> to
> > run the job or if you are going to eradicate all life on earth by running
> > this job. cron just runs the job.  If I were you, I'd consult with a
> > professional or at least a ranking armature before trying to implement a
> > cron job on any machine you care about.
> >
> > My $0.02 worth,
> > =C=
> > *
> > * Cal Evans
> > * Journeyman Programmer
> > * Techno-Mage
> > * http://www.calevans.com
> > *
> >
> >
> > -Original Message-
> > From: Edgard Berendsen [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 30, 2002 8:11 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] newbie: cron jobs
> >
> >
> > Hi,
> > I'm new to cron jobs and I need to do one.
> >
> > 1- It's possible to program cron jobs in a remote server where
> > you can't modify something, for example, a normal web-hosting?
> >
> > 2-Where can I find more informationa about?
> >
> > 3-It's there something special I should know to program one?
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 
> 
> 


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




[PHP] Mcrypt Function - New to it

2002-05-30 Thread Tom Ray

Hi there..some what a new programmer when it comes to all this. I'm 
trying to encrypt some data and then decrypt it. It doesn't have to be 
high bit encryption just something simple like 3DES. But I keep getting 
it wrong. Any help would be greatful. Here's the piece of code:

$iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_3DES, 
MCRYPT_MODE_ECB), MCRYPT_RAND);  

$key = md5("Secret Key");
$sample2 = "Hello";

$lockdata = mcrypt_encrypt (MCRYPT_3DES, $key, $sample2, 
MCRYPT_MODE_ECB, $iv);

echo "$lockdata\n";

$text = mcrypt_decrypt (MCRYPT_3DES, $key, $lockdata, MCRPYT_MODE_ECB, 
$iv);  

echo "$text\n";





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




Re: [PHP] Design Problem

2002-05-30 Thread Miguel Cruz

On Thu, 30 May 2002 [EMAIL PROTECTED] wrote:
> search engine spiders will usually disregard the search string of a URL,
> i.e. everything after and including the "?" character.

Not sure about the others, but Google does follow GET args.

miguel


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




Re: [PHP] Creating IMAP accounts

2002-05-30 Thread Miguel Cruz

On 30 May 2002, Jackson Miller wrote:
> Is there a way to create IMAP accounts using PHP? I have looked through
> all of the IMAP functions in PHP and do not see one for creating a new
> account.
> 
> I would like to create a new IMAP account when a user registers for a
> website account.

I don't think the IMAP protocol has a mechanism for creating new accounts.

How you do it depends on the IMAP server you have.

If it's something like UW-IMAP, then you just need to create a standard 
login account (though hopefully without a usable shell). Search the 
archive for many discussions of the pros, cons, and mechanics of creating 
Unix system accounts through PHP.

If you're using Cyrus IMAP or some other system that keeps its own 
private account data, then you'll have to go through the API they provide. 
This is a preferable scenario for security reasons, but it's probably not 
an open choice at this point.

miguel


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




Re: [PHP] Newbie redirect problem

2002-05-30 Thread Miguel Cruz

On Thu, 30 May 2002, Jason Tobias wrote:
> When a user submits a form, it redirects them to login if they are not
> logged in.
> Once the user logs in. I want to redirect them to the form that they
> originaly filled out.
> I can define a static redirect and that works fine, just not very practical.
> 
> Is there any way to do this?

The easiest thing is probably to rework your login mechanism so that it
can just be included at the top of each PHP file. That way all your
variables remain in context - you can just post them from page to page in
a big serialized array, or whatever.

miguel


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




Re: [PHP] PHP commands inside a MySQL Database

2002-05-30 Thread Miguel Cruz

On Thu, 30 May 2002, Taylor York wrote:
> I am inserting html/php code into a database that would look something like
> default page 
> 
> now the problem is, I am getting the field, title, and echoing as so (after
> using mysql_fetch_array and extract
> 
> echo "$title\n";
> 
> the acual title of the page in IE is
> 
> default page 
> 
> It doesnt parse or execute any of the php.  Any suggestions?

http://php.net/eval


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




Re: [PHP] fdup & Pipes? (New Thread)

2002-05-30 Thread Miguel Cruz

On Thu, 30 May 2002, Jonathan Rosenberg wrote:
> It's been a long time since I've programmed on Unix, but there
> was a common technique used in C programs for invoking a program
> & allowing the invoker to read & write via standard input/output.
> I believe it used a combination of pipes & the fdup function.
> 
> Is it possible to emulate this behavior in PHP?

You may be able to get a bi-directional pipe out of popen. Depends on your 
particular OS.

miguel


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




Re: [PHP] Slow Access to SMTP is Causing Slow mail()

2002-05-30 Thread Miguel Cruz

On Thu, 30 May 2002, Bruce Vander Werf wrote:
> My calls to mail() take a very long time to resolve, so I did a little
> investigating. If I try to Telnet to port 25, it takes about 30 seconds for
> the SMTP server to respond. Telnet to port 23 on the same address resolves
> immediately, as does normal web access (using the same address so I don't
> believe DNS is the culprit. Besides, mail() is slow, and that is accessing
> the SMTP server locally. What would be taking SMTP so long to respond? Any
> configuration parameters I need to look at?

Check to make sure your machine's IP address has a PTR record. It's 
probably trying to look up your machine's name to stick in the Received: 
headers, and timing out.

miguel


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




Re: [PHP] Undefined variables

2002-05-30 Thread Miguel Cruz

On Thu, 30 May 2002, Crane, Christopher wrote:
> if ($Task == "ShowVersion") { function ShowVersion(); }
> elseif ($Task == "GetData") { function GetData(); print "$DataOutput"; }
> elseif ($Task == "CreateImage") { function CreateImage(); }
> else { print "Incorrect Variable or no Variable Supplies"; }

if (isset($Task))
{
  switch($Task)
  {
  case 'ShowVersion':
ShowVersion();
break;
  case 'GetData':
GetData;
print $DataOutput;
break;
  case 'CreateImage':
CreateImage();
break;
  default:
print 'Unknown function';
  }
} else {
  print 'No function supplied';
}



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




Re: [PHP] Undefined variables

2002-05-30 Thread Christopher J. Crane

Darren,
Thanks for the tip on direction to head in. Could you provide an example of
what you are referring to?


"Darren Gamble" <[EMAIL PROTECTED]> wrote in message
078EC26E265CD411BD9100508BDFFC860ED3E64E@shawmail02">news:078EC26E265CD411BD9100508BDFFC860ED3E64E@shawmail02...
> Good day,
>
> Just to clarify, Perl will, in fact, complain if you have undefined
> variables (or variables that you use once) if you have warnings and/or
> strict mode in effect.  Using at least one is strongly recommended.
>
> In PHP, the method you're using for getting form data is deprecated.  You
> should use $HTTP_POST_VARS or $_POST, depending on your version.  Check
the
> docco for more info on those.
>
> If you really have to check variables using this method, use isset() to
see
> if the variables ... have been set. =)
>
> 
> Darren Gamble
> Planner, Regional Services
> Shaw Cablesystems GP
> 630 - 3rd Avenue SW
> Calgary, Alberta, Canada
> T2P 4L4
> (403) 781-4948
>
>
> > -Original Message-
> > From: Crane, Christopher [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 30, 2002 3:07 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: [PHP] Undefined variables
> >
> >
> > I have an annoying problem, that I know is my own ignorance
> > to PHP. I came
> > from PERL and this was not a problem there but is with PHP.
> >
> > Here's the issue.
> > I have a number of scripts that use a "index.php?Task='some
> > sort of task
> > name'", for example, http://www.foo.com/index.php?Task=ShowVersion
> >  .  Then I use
> > an if/else
> > statement to tell the script what to do if it sees the
> > ShowVersion variable.
> > In the ShowVersion example, I would call a function that displays the
> > version information I defined in the script. As a back up, I
> > always provide
> > an else statement to catch variables I have no functions for.
> >
> > If I have a ShowVersion function, GetData function and a CreateImage
> > function and the Task variable is empty or a variable that
> > does not exists
> > comes in like http://www.foo.com/index.php?Task=SomethingDumb
> >   it would go to the
> > default function of something by using the ELSE part of the if/else
> > statements.
> >
> > I hope I am describing this correctly.now here is the
> > problem. If I have
> > warnings turned on, or if I have a log written for warnings,
> > the log fills
> > up if someone goes to http://www.foo.com/index.php
> >   or http://www.foo.com
> 
> will error messages like undefine variable TASK on line 255. I understand
> the reason, that PHP was expecting the variable Task when it got to the
> if/else statements. So I put in something like if(!($Task)) { function
> Something(); } but it still is looking for the variable so it still
errors.
>
> In Perl, it would simply be ignored. What do I do here.
>
> Here is a simple example of the code.
>
> if ($Task == "ShowVersion") { function ShowVersion(); }
> elseif ($Task == "GetData") { function GetData(); print "$DataOutput"; }
> elseif ($Task == "CreateImage") { function CreateImage(); }
> else { print "Incorrect Variable or no Variable Supplies"; }
>
>
>
>
>
> Christopher J. Crane
> Network Operations Manager
>
> IKON Office Solutions
> 860.659.6464
>
>



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




[PHP] Re: Slow Access to SMTP is Causing Slow mail()

2002-05-30 Thread Manuel Lemos

Hello,

On 05/30/2002 10:29 PM, Bruce Vander Werf wrote:
> Hi,
> 
> My calls to mail() take a very long time to resolve, so I did a little
> investigating. If I try to Telnet to port 25, it takes about 30 seconds for
> the SMTP server to respond. Telnet to port 23 on the same address resolves
> immediately, as does normal web access (using the same address so I don't
> believe DNS is the culprit. Besides, mail() is slow, and that is accessing
> the SMTP server locally. What would be taking SMTP so long to respond? Any
> configuration parameters I need to look at?

Maybe reverse DNS resolution of the client machine IP and anti-spam 
blackhole verification.


-- 

Regards,
Manuel Lemos


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




[PHP] Slow Access to SMTP is Causing Slow mail()

2002-05-30 Thread Bruce Vander Werf

Hi,

My calls to mail() take a very long time to resolve, so I did a little
investigating. If I try to Telnet to port 25, it takes about 30 seconds for
the SMTP server to respond. Telnet to port 23 on the same address resolves
immediately, as does normal web access (using the same address so I don't
believe DNS is the culprit. Besides, mail() is slow, and that is accessing
the SMTP server locally. What would be taking SMTP so long to respond? Any
configuration parameters I need to look at?

I am using SendMail 8.10.2 on a Cobalt RAQ4.

--
Bruce Vander Werf
[EMAIL PROTECTED]


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




Re: [PHP] Failed opening '' for inclusion...

2002-05-30 Thread Jeff Lewis

Martin,

I appreciate the help...still have NO idea where the php4\pear was coming
from. However, fixed things by turning on register_globals for now. The old
scripts need to be brought up to par to the new methods...so when I was
doing an include_once it wasn't looking for any file.

So off to update the scripts!

Jeff
- Original Message -
From: "Martin Towell" <[EMAIL PROTECTED]>
To: "'Jeff Lewis'" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 8:33 PM
Subject: RE: [PHP] Failed opening '' for inclusion...


> Do you have an auto-prepend file? If so, maybe it's in there ???
> If not, I'm stumped
>
> -Original Message-
> From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 31, 2002 10:31 AM
> To: Martin Towell; PHP General
> Subject: Re: [PHP] Failed opening '' for inclusion...
>
>
> Yes and that isn't in there (php4\pear). I looked in the php.ini in
windows
> and in php folders...
>
> Jeff
> - Original Message -
> From: "Martin Towell" <[EMAIL PROTECTED]>
> To: "'Jeff Lewis'" <[EMAIL PROTECTED]>; "PHP General"
> <[EMAIL PROTECTED]>
> Sent: Thursday, May 30, 2002 8:20 PM
> Subject: RE: [PHP] Failed opening '' for inclusion...
>
>
> > have you looked in php.ini ?
> >
> > -Original Message-
> > From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, May 31, 2002 10:19 AM
> > To: PHP General
> > Subject: [PHP] Failed opening '' for inclusion...
> >
> >
> > I am running PHP 4.2.1 on Windows XP. I had 4.1.2 running perfectly fine
> and
> > then decided to get MSSQl running as well. So I ran into a problem where
> it
> > failed to load the DLL. I read through the archives and it said to make
> sure
> > I have the most up to date DLL, so I then installed 4.2.1.
> >
> > Now, when I run my scripts I get this error:
> >
> > 2: Failed opening '' for inclusion (include_path='.;c:\php4\pear')
> >
> > I can NOT find anywhere that this php4\pear is set!
> >
> > Would appreciate any help that could be offered.
> >
> > Jeff
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>



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




[PHP] 'Couldn't compile code. And I'm not smart enough to tell you why, sorry.' -- Any ideas?

2002-05-30 Thread Sqlcoders.com Programming Dept

Hiya,
I've been getting the strangest error:
"Couldn't compile code. And I'm not smart enough to tell you why, sorry. in
c3.php on line 25"

Here's a code listing, if anyone can give me a hint as to what's up that
would be great, this is the first time the PHP interpreter has thrown a
wobbly like this on me. Although I have a feeling that this is really a Ming
error which is bubbling up through to the web server for output.
setrate(2);
 $movie->setbackground(0xfff,0xfff,0xfff);

 $font = new SWFFont("_sans");
 $text = new SWFTextField(SWFTEXTFIELD_DRAWBOX );
 $text->setBounds(100,15);
 $text->setFont($font);
 $text->setColor(0xff, 0, 0);
 $text->setname("display");

 $container = new SWFSprite();
 $container->add($text);
 $container->nextFrame();

 $handle2 = $movie->add($container);
 $handle2->setname("container");
 $handle2->moveto(10,10);

 $movie->nextframe();
 $movie->nextframe();
$movie->add(new SWFAction("loadVariables('vars.php','_root');"));
 $movie->add(new SWFAction("_root.container.display = _root.date"));
 header('Content-type: application/x-shockwave-flash');
 $movie->output();
?>


Any help would be appreciated,
TIA,
Dw.


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




RE: [PHP] Failed opening '' for inclusion...

2002-05-30 Thread Martin Towell

Do you have an auto-prepend file? If so, maybe it's in there ???
If not, I'm stumped

-Original Message-
From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 10:31 AM
To: Martin Towell; PHP General
Subject: Re: [PHP] Failed opening '' for inclusion...


Yes and that isn't in there (php4\pear). I looked in the php.ini in windows
and in php folders...

Jeff
- Original Message -
From: "Martin Towell" <[EMAIL PROTECTED]>
To: "'Jeff Lewis'" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 8:20 PM
Subject: RE: [PHP] Failed opening '' for inclusion...


> have you looked in php.ini ?
>
> -Original Message-
> From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 31, 2002 10:19 AM
> To: PHP General
> Subject: [PHP] Failed opening '' for inclusion...
>
>
> I am running PHP 4.2.1 on Windows XP. I had 4.1.2 running perfectly fine
and
> then decided to get MSSQl running as well. So I ran into a problem where
it
> failed to load the DLL. I read through the archives and it said to make
sure
> I have the most up to date DLL, so I then installed 4.2.1.
>
> Now, when I run my scripts I get this error:
>
> 2: Failed opening '' for inclusion (include_path='.;c:\php4\pear')
>
> I can NOT find anywhere that this php4\pear is set!
>
> Would appreciate any help that could be offered.
>
> Jeff
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>


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




Re: [PHP] Failed opening '' for inclusion...

2002-05-30 Thread Jeff Lewis

Yes and that isn't in there (php4\pear). I looked in the php.ini in windows
and in php folders...

Jeff
- Original Message -
From: "Martin Towell" <[EMAIL PROTECTED]>
To: "'Jeff Lewis'" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 8:20 PM
Subject: RE: [PHP] Failed opening '' for inclusion...


> have you looked in php.ini ?
>
> -Original Message-
> From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 31, 2002 10:19 AM
> To: PHP General
> Subject: [PHP] Failed opening '' for inclusion...
>
>
> I am running PHP 4.2.1 on Windows XP. I had 4.1.2 running perfectly fine
and
> then decided to get MSSQl running as well. So I ran into a problem where
it
> failed to load the DLL. I read through the archives and it said to make
sure
> I have the most up to date DLL, so I then installed 4.2.1.
>
> Now, when I run my scripts I get this error:
>
> 2: Failed opening '' for inclusion (include_path='.;c:\php4\pear')
>
> I can NOT find anywhere that this php4\pear is set!
>
> Would appreciate any help that could be offered.
>
> Jeff
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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




RE: [PHP] Failed opening '' for inclusion...

2002-05-30 Thread Martin Towell

have you looked in php.ini ?

-Original Message-
From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 10:19 AM
To: PHP General
Subject: [PHP] Failed opening '' for inclusion...


I am running PHP 4.2.1 on Windows XP. I had 4.1.2 running perfectly fine and
then decided to get MSSQl running as well. So I ran into a problem where it
failed to load the DLL. I read through the archives and it said to make sure
I have the most up to date DLL, so I then installed 4.2.1.

Now, when I run my scripts I get this error:

2: Failed opening '' for inclusion (include_path='.;c:\php4\pear')

I can NOT find anywhere that this php4\pear is set!

Would appreciate any help that could be offered.

Jeff



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

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




[PHP] Failed opening '' for inclusion...

2002-05-30 Thread Jeff Lewis

I am running PHP 4.2.1 on Windows XP. I had 4.1.2 running perfectly fine and
then decided to get MSSQl running as well. So I ran into a problem where it
failed to load the DLL. I read through the archives and it said to make sure
I have the most up to date DLL, so I then installed 4.2.1.

Now, when I run my scripts I get this error:

2: Failed opening '' for inclusion (include_path='.;c:\php4\pear')

I can NOT find anywhere that this php4\pear is set!

Would appreciate any help that could be offered.

Jeff



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




Re: [PHP] Re: Help with a trivial session example.

2002-05-30 Thread Michael Davey

> Given $myvar = 5;
>
> If you use session_register('myvar');
>
> Then on another page, do you just access it via $myvar?

That is exactly how it works - I also have session.auto_start turned on as
well.

> And if that's the case, isn't it the same to set
>
> $HTTP_SESSION_VARS['myvar'] = $myvar;
> Or even
> $GLOBALS['myvar'] = $myvar;
> Or
> $_SESSION['myvar'] = $myvar;
>
> Not that ANY of these are working for me *sigh*

As I said - I wouldn't know as I haven't used them yet - but it seems like
it should having read the manual briefly.

> 4.0.6 according to the phpinfo link on the page ;-)

I realised that just after I sent the mail - doh!

Mikey



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




RE: [PHP] Help with example session class (second request)

2002-05-30 Thread John Holmes

This object $login (wherever that comes from) doesn't have one of the
functions you are trying to call. 

---John Holmes...

> -Original Message-
> From: Daevid Vincent [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 30, 2002 6:07 PM
> To: 'PHP general mailing list'
> Cc: '1LT John W. Holmes'
> Subject: RE: [PHP] Help with example session class (second request)
> 
> Thank you john for the prompt reply, however I must be completely
> retarded. I do this:
> 
>session_start();
> 
>   if( $login->getSessionVar("login") )
>   {
>   $booth_id = $login->getSessionVar("booth_id");
>   $booth_name = $login->getSessionVar("booth_name");
>   echo "\nbooth_id = $booth_id and booth_name =
> $booth_name\n";
>   }
>   else
>   {
>   Header("Location: ../index.phtml\n\n");
>   exit;
>   }
> 
>   echo "this session is named: ".session_name()."\n";
> 
>   include("../globalassets/include/header.phtml");
> ?>
> 
> And I get this error:
> 
> Fatal error: Call to a member function on a non-object in
content.phtml
> on line 4
> 
> > -Original Message-
> > From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 30, 2002 12:19 PM
> > To: Daevid Vincent; PHP general mailing list
> > Subject: Re: [PHP] Help with example session class (second request)
> >
> >
> > Call session_start() on your second page...
> >
> > ---John Holmes...
> >
> > - Original Message -
> > From: "Daevid Vincent" <[EMAIL PROTECTED]>
> > To: "PHP general mailing list" <[EMAIL PROTECTED]>
> > Sent: Thursday, May 30, 2002 3:10 PM
> > Subject: [PHP] Help with example session class (second request)
> >
> >
> > > Sorry for posting this again so soon, but until I get sessions
> > > working, I'm blocked on this project.
> > >
> > > D.
> > > ---
> > >
> > > I'm just learning sessions, and thought the class looked
> > interesting
> > > on this page: http://www.php.net/manual/en/ref.session.php
> > >
> > > So I have this on an index.phtml page and I can see the
> > variables are
> > > being set and all looks good there, however upon successful
> > "login" I
> > > wish to redirect to content.phtml At the very top of content.phtml
I
> > > have:
> > >
> > >  > > if( $login->getSessionVar("login") )
> > > {
> > > $booth_id = $login->getSessionVar("booth_id");
> > > $booth_name = $login->getSessionVar("booth_name");
> > > echo "\nbooth_id = $booth_id and booth_name =
> > > $booth_name\n";
> > > }
> > > else
> > > {
> > > Header("Location: ../index.phtml\n\n");
> > > exit;
> > > }
> > > ?>
> > >
> > > But it doesn't seem that $login exists or is defined now on
> > this page?
> > >
> > > So my question is basically, how can I use the class and
> > the session
> > > variables across multiple pages? Do I need to move the class to an
> > > include file? Do I need to re-create it on each page somehow? Can
> > > someone show me a real working example of this scenario?
> > >
> > > Daevid Vincent
> > > http://daevid.com
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



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




RE: [PHP] Re: Help with a trivial session example.

2002-05-30 Thread John Holmes

You have to use session_register() with 4.0.6

---John Holmes...

> -Original Message-
> From: Daevid Vincent [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 30, 2002 7:46 PM
> To: [EMAIL PROTECTED]
> Cc: 'Michael Davey'
> Subject: RE: [PHP] Re: Help with a trivial session example.
> 
> > I can't say that I have moved over to the new superglobals
> > yet - I prefer register_globals cos I am lazy ;)
> 
> Given $myvar = 5;
> 
> If you use session_register('myvar');
> 
> Then on another page, do you just access it via $myvar?
> 
> And if that's the case, isn't it the same to set
> 
> $HTTP_SESSION_VARS['myvar'] = $myvar;
> Or even
> $GLOBALS['myvar'] = $myvar;
> Or
> $_SESSION['myvar'] = $myvar;
> 
> Not that ANY of these are working for me *sigh*
> 
> > But it does seem that there are two possible variables that
> > you need to use - the one in your script
> > ($HTTP_SESSION_VARS), but this is only for 4.0.6 or less, it
> > is $_SESSION otherwise - what version do you have installed?
> 
> 4.0.6 according to the phpinfo link on the page ;-)
> 
> > I made a very simple test page, and even that doesn't work:
> >
> > http://daevid.com/examples/index.phtml
> >
> > Notice how I have the right session_id, but the variable didn't pass
> > onto the second page.
> >
> > Can someone please explain to me what I am doing wrong?
> > Do I not have PHP.ini configured properly or something?
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



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




RE: [PHP] Re: Help with a trivial session example.

2002-05-30 Thread Daevid Vincent

> I can't say that I have moved over to the new superglobals 
> yet - I prefer register_globals cos I am lazy ;)

Given $myvar = 5;

If you use session_register('myvar');

Then on another page, do you just access it via $myvar?

And if that's the case, isn't it the same to set

$HTTP_SESSION_VARS['myvar'] = $myvar;
Or even
$GLOBALS['myvar'] = $myvar;
Or 
$_SESSION['myvar'] = $myvar;

Not that ANY of these are working for me *sigh*

> But it does seem that there are two possible variables that 
> you need to use - the one in your script 
> ($HTTP_SESSION_VARS), but this is only for 4.0.6 or less, it 
> is $_SESSION otherwise - what version do you have installed?

4.0.6 according to the phpinfo link on the page ;-)

> I made a very simple test page, and even that doesn't work:
>
> http://daevid.com/examples/index.phtml
>
> Notice how I have the right session_id, but the variable didn't pass 
> onto the second page.
>
> Can someone please explain to me what I am doing wrong?
> Do I not have PHP.ini configured properly or something?


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




[PHP] Apache 1.3.24 + PHP 4.2.1 Install Problem - Undefined Symbol

2002-05-30 Thread Samantha Savvakis

HI,

Server Details:
OpenUnix 8
Apache 1.3.24
PHP 4.2.1
LIBXML 2.4.16
gcc 2.95.3pl1

I am trying to compile Apache and PHP on OpenUnix 8.

Managed to get PHP to successfully compile and build a module for Apache.

Trying to compile apache, and I'm getting undefined symbol errors with PHP:


gcc  -DTARGET=\"httpsd\" -I/home/samsa/archives/php-4.2.1 -I/home/samsa/arch
ives/php-4.2.1/main -I/home/samsa/archives/php-4.
2.1/main -I/home/samsa/archives/php-4.2.1/Zend -I/home/samsa/archives/php-4.
2.1/Zend -I/home/samsa/archives/php-4.2.1/TSRM -I/home/sa
msa/archives/php-4.2.1/TSRM -I/home/samsa/archives/php-4.2.1 -DUSE_EXPAT -I.
/lib/expat-lite -DAPACHE_SSL `./apaci`\
  -o httpsd buildmark.o modules.o  modules/ssl/libssl.a
modules/php4/libphp4.a  modules/standard/libstandard.a  main/lib
main.a  ./os/unix/libos.a  ap/libap.a
lib/expat-lite/libexpat.a  -L/usr/ucblib -L/usr/local/lib -L/usr/local/mysql
/lib  -L/usr/ucbli
b -L/usr/local/lib -L/usr/local/mysql/lib -Lmodules/php4 -L../modules/php4 -
L../../modules/php4 -lmodphp4   -lmysqlclient -lz -lnsl -
lsocket -lm -lz -lxml2 -lz -lcrypt -lresolv -lresolv -lm -ldl -lsocket  -lso
cket -lcrypt   -L/usr/local/ssl/lib -lssl -lcrypto
Undefined   first referenced
symbol  in file
php_register_variable_exlibphp4.a(rfc1867.o)
php_std_post_handlerlibphp4.a(php_content_types.o)
php_treat_data  libphp4.a(main.o)
tsrm_strtok_r   libphp4.a(tsrm_virtual_cwd.o)
__builtin_generic   libphp4.a(formatted_print.o)
php_register_variable   libphp4.a(mod_php4.o)
php_import_environment_variableslibphp4.a(main.o)
UX:ld: ERROR: Symbol referencing errors. No output written to httpsd
collect2: ld returned 1 exit status
*** Error code 1 (bu21)
UX:make: ERROR: fatal error.

Any ideas? I don't know what library has been left out. PHP built
successfully with gcc.

Thanks,
Sam


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




[PHP] Trouble with PHP XMLRPC on Solaris

2002-05-30 Thread Michael Sweeney


I'm trying to get some xmlrpc connectivity working through PHP. Current 
configuration is Apache 1.3.22/PHP 4.2.0 on Solaris 7. I've linked to the 
current expat libraries. Configure and compile don't show any problems and 
other PHP scripts (including phpinfo) work fine. The problem is that an 
xmlrpc call to the Solaris host invariably returns a "Method not found" error 
message. The same xmlrpc server code works flawlessly on a Linux system 
similarly configured (Apache 1.3.24/PHP 4.2) with the same requests.

The only thing I can find is that libxml.so is not installed on the Solaris 
system, but my understanding is that that is a gnome specific library and I'm 
not running gnome on the Solaris box - I haven't been able to find any 
indication that that particular library is required for xmlrpc. 

I've looked everywhere I can think of for a hint, but haven't been able to 
find anything so far. Can anyone shed any light on this problem for me?

Michael
[EMAIL PROTECTED]


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




Re: [PHP] Re: Help with a trivial session example.

2002-05-30 Thread Michael Davey

Hmm...

I can't say that I have moved over to the new superglobals yet - I prefer
register_globals cos I am lazy ;)

But it does seem that there are two possible variables that you need to
use - the one in your script ($HTTP_SESSION_VARS), but this is only for
4.0.6 or less, it is $_SESSION otherwise - what version do you have
installed?

regards,

Mikey

"Daevid Vincent" <[EMAIL PROTECTED]> wrote in message
003d01c20830$3d814690$45193e04@telecom">news:003d01c20830$3d814690$45193e04@telecom...
> Okay, now I'm completely confused...
>
> I made a very simple test page, and even that doesn't work:
>
> http://daevid.com/examples/index.phtml
>
> Notice how I have the right session_id, but the variable didn't pass
> onto the second page.
>
> Can someone please explain to me what I am doing wrong?
>
> Do I not have PHP.ini configured properly or something?
>
> D.
>



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




Re: [PHP] array question

2002-05-30 Thread Analysis & Solutions

On Thu, May 30, 2002 at 07:24:49PM -0400, Michelle wrote:

> Phone Number:
> 
> 
> which finally leads to my question how do I do the $_POST[var] when
> it's an array(checkbox or radio button)?
> 
> ex: red

   echo 'red';

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




RE: [PHP] Re: Help with a trivial session example.

2002-05-30 Thread Daevid Vincent

Okay, now I'm completely confused...

I made a very simple test page, and even that doesn't work:

http://daevid.com/examples/index.phtml

Notice how I have the right session_id, but the variable didn't pass
onto the second page.

Can someone please explain to me what I am doing wrong? 

Do I not have PHP.ini configured properly or something?

D.


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




RE: [PHP] array question

2002-05-30 Thread Martin Towell

$_POST["product"][0]
$_POST["product"][1]
etc.


-Original Message-
From: Michelle [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 9:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP] array question


I'm a newbie at php and I'm sure you will be able to tell by my question.
I'm just doing a simple form but my head is hurting from trying to figure
out the correct syntax. 

I'm posting the form to $PHP_SELF

an example from my $form_block =

*Your Name:

 
*Your E-Mail Address:


Phone Number:


which finally leads to my question how do I do the $_POST[var] when it's an
array(checkbox or radio button)?

ex: red

Am I making sense? If not please let me know :-) and I will try to remedy
it.

Michelle

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




[PHP] array question

2002-05-30 Thread Michelle

I'm a newbie at php and I'm sure you will be able to tell by my question. I'm just 
doing a simple form but my head is hurting from trying to figure out the correct 
syntax. 

I'm posting the form to $PHP_SELF

an example from my $form_block =

*Your Name:

 
*Your E-Mail Address:


Phone Number:


which finally leads to my question how do I do the $_POST[var] when it's an 
array(checkbox or radio button)?

ex: red

Am I making sense? If not please let me know :-) and I will try to remedy it.

Michelle



Re: [PHP] win32: migrating PWS to Apache

2002-05-30 Thread Analysis & Solutions

On Thu, May 30, 2002 at 04:17:58PM -0400, Steve Clay wrote:
> Hello,
> 
> On winNT I have Personal Web Server, PHP4.1.1, MySQL.
> My target is Apache1.3, PHP4.2.2, Perl, MySQL.

Delete PHP 4.1.1
Download Apache and install.
Download Perl and install.
Download PHP and install.

Edit Apache's httpd.conf file:

   AddType application/x-httpd-cgi .cgi
   Action application/x-httpd-cgi "c:/perl/bin/perl"
   ScriptAlias /cgi-bin/ "c:/perl/bin/perl"
   ScriptInterpreterSource registry

   AddType application/x-httpd-php .html .php
   Action application/x-httpd-php "/phpxyz/php.exe"
   ScriptAlias /phpxyz/ "c:/Program Files/php4/"


Open up Windows Explorer:  View | Options | File Types.  Now, add/or 
edit the Registered File Types for the files you want parsed by Perl.
"Edit" the command for the "open" action by put the following in the 
"Application used to perform action" box:
   c:\Perl\bin\Perl.exe "%1" %*

Of course, put Apache in your system's services startup list, as per 
Apache's instructions.  

If you already have Apached started, your changes to httpd.conf don't 
take effect till the next startup.  If you're editing the file while 
it's running, make sure to make a backup, because errors in the file can 
stop Apache from shutting down.

Pretty simple.

I don't belive there's a need to uninstall PWS, though you might want to 
turn it off.

Enjoy,

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] Help with example session class (second request)

2002-05-30 Thread Michael Davey

As I said...

>Not quite sure where you got this $login class instance from, but it
>appears to be from thin air.  If you have a session class then you would
need >to instantiate it first with:
>
>$login = new XYZSessionClass(); // plus any constructor arguments

And to quote from the manual page you gave the link to:

"To use this class, simply create a new object $login = new
mySession("name");"

"Daevid Vincent" <[EMAIL PROTECTED]> wrote in message
003c01c20826$451f3dd0$45193e04@telecom">news:003c01c20826$451f3dd0$45193e04@telecom...
> Thank you john for the prompt reply, however I must be completely
> retarded. I do this:
>
>  session_start();
>
> if( $login->getSessionVar("login") )
> {
> $booth_id = $login->getSessionVar("booth_id");
> $booth_name = $login->getSessionVar("booth_name");
> echo "\nbooth_id = $booth_id and booth_name =
> $booth_name\n";
> }
> else
> {
> Header("Location: ../index.phtml\n\n");
> exit;
> }
>
> echo "this session is named: ".session_name()."\n";
>
> include("../globalassets/include/header.phtml");
> ?>
>
> And I get this error:
>
> Fatal error: Call to a member function on a non-object in content.phtml
> on line 4
>
> > -Original Message-
> > From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 30, 2002 12:19 PM
> > To: Daevid Vincent; PHP general mailing list
> > Subject: Re: [PHP] Help with example session class (second request)
> >
> >
> > Call session_start() on your second page...
> >
> > ---John Holmes...
> >
> > - Original Message -
> > From: "Daevid Vincent" <[EMAIL PROTECTED]>
> > To: "PHP general mailing list" <[EMAIL PROTECTED]>
> > Sent: Thursday, May 30, 2002 3:10 PM
> > Subject: [PHP] Help with example session class (second request)
> >
> >
> > > Sorry for posting this again so soon, but until I get sessions
> > > working, I'm blocked on this project.
> > >
> > > D.
> > > ---
> > >
> > > I'm just learning sessions, and thought the class looked
> > interesting
> > > on this page: http://www.php.net/manual/en/ref.session.php
> > >
> > > So I have this on an index.phtml page and I can see the
> > variables are
> > > being set and all looks good there, however upon successful
> > "login" I
> > > wish to redirect to content.phtml At the very top of content.phtml I
> > > have:
> > >
> > >  > > if( $login->getSessionVar("login") )
> > > {
> > > $booth_id = $login->getSessionVar("booth_id");
> > > $booth_name = $login->getSessionVar("booth_name");
> > > echo "\nbooth_id = $booth_id and booth_name =
> > > $booth_name\n";
> > > }
> > > else
> > > {
> > > Header("Location: ../index.phtml\n\n");
> > > exit;
> > > }
> > > ?>
> > >
> > > But it doesn't seem that $login exists or is defined now on
> > this page?
> > >
> > > So my question is basically, how can I use the class and
> > the session
> > > variables across multiple pages? Do I need to move the class to an
> > > include file? Do I need to re-create it on each page somehow? Can
> > > someone show me a real working example of this scenario?
> > >
> > > Daevid Vincent
> > > http://daevid.com
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>



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




RE: [PHP] Help with example session class (second request)

2002-05-30 Thread Daevid Vincent

Thank you john for the prompt reply, however I must be completely
retarded. I do this:

getSessionVar("login") ) 
{ 
$booth_id = $login->getSessionVar("booth_id");
$booth_name = $login->getSessionVar("booth_name");
echo "\nbooth_id = $booth_id and booth_name =
$booth_name\n";
}
else
{
Header("Location: ../index.phtml\n\n"); 
exit;
}

echo "this session is named: ".session_name()."\n";

include("../globalassets/include/header.phtml");
?>

And I get this error:

Fatal error: Call to a member function on a non-object in content.phtml
on line 4

> -Original Message-
> From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, May 30, 2002 12:19 PM
> To: Daevid Vincent; PHP general mailing list
> Subject: Re: [PHP] Help with example session class (second request)
> 
> 
> Call session_start() on your second page...
> 
> ---John Holmes...
> 
> - Original Message - 
> From: "Daevid Vincent" <[EMAIL PROTECTED]>
> To: "PHP general mailing list" <[EMAIL PROTECTED]>
> Sent: Thursday, May 30, 2002 3:10 PM
> Subject: [PHP] Help with example session class (second request)
> 
> 
> > Sorry for posting this again so soon, but until I get sessions 
> > working, I'm blocked on this project.
> > 
> > D.
> > ---
> > 
> > I'm just learning sessions, and thought the class looked 
> interesting 
> > on this page: http://www.php.net/manual/en/ref.session.php
> > 
> > So I have this on an index.phtml page and I can see the 
> variables are 
> > being set and all looks good there, however upon successful 
> "login" I 
> > wish to redirect to content.phtml At the very top of content.phtml I
> > have:
> > 
> >  > if( $login->getSessionVar("login") )
> > { 
> > $booth_id = $login->getSessionVar("booth_id");
> > $booth_name = $login->getSessionVar("booth_name");
> > echo "\nbooth_id = $booth_id and booth_name =
> > $booth_name\n";
> > }
> > else
> > {
> > Header("Location: ../index.phtml\n\n"); 
> > exit;
> > }
> > ?>
> > 
> > But it doesn't seem that $login exists or is defined now on 
> this page?
> > 
> > So my question is basically, how can I use the class and 
> the session 
> > variables across multiple pages? Do I need to move the class to an 
> > include file? Do I need to re-create it on each page somehow? Can 
> > someone show me a real working example of this scenario?
> > 
> > Daevid Vincent
> > http://daevid.com
> > 
> > 
> > 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 


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




RE: [PHP] Undefined variables

2002-05-30 Thread Darren Gamble

Good day,

Just to clarify, Perl will, in fact, complain if you have undefined
variables (or variables that you use once) if you have warnings and/or
strict mode in effect.  Using at least one is strongly recommended.

In PHP, the method you're using for getting form data is deprecated.  You
should use $HTTP_POST_VARS or $_POST, depending on your version.  Check the
docco for more info on those.

If you really have to check variables using this method, use isset() to see
if the variables ... have been set. =)


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


> -Original Message-
> From: Crane, Christopher [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 30, 2002 3:07 PM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP] Undefined variables
> 
> 
> I have an annoying problem, that I know is my own ignorance 
> to PHP. I came
> from PERL and this was not a problem there but is with PHP.
>  
> Here's the issue.
> I have a number of scripts that use a "index.php?Task='some 
> sort of task
> name'", for example, http://www.foo.com/index.php?Task=ShowVersion
>  .  Then I use 
> an if/else
> statement to tell the script what to do if it sees the 
> ShowVersion variable.
> In the ShowVersion example, I would call a function that displays the
> version information I defined in the script. As a back up, I 
> always provide
> an else statement to catch variables I have no functions for.
>  
> If I have a ShowVersion function, GetData function and a CreateImage
> function and the Task variable is empty or a variable that 
> does not exists
> comes in like http://www.foo.com/index.php?Task=SomethingDumb
>   it would go to the
> default function of something by using the ELSE part of the if/else
> statements. 
>  
> I hope I am describing this correctly.now here is the 
> problem. If I have
> warnings turned on, or if I have a log written for warnings, 
> the log fills
> up if someone goes to http://www.foo.com/index.php
>   or http://www.foo.com 

will error messages like undefine variable TASK on line 255. I understand
the reason, that PHP was expecting the variable Task when it got to the
if/else statements. So I put in something like if(!($Task)) { function
Something(); } but it still is looking for the variable so it still errors.
 
In Perl, it would simply be ignored. What do I do here.
 
Here is a simple example of the code.
 
if ($Task == "ShowVersion") { function ShowVersion(); }
elseif ($Task == "GetData") { function GetData(); print "$DataOutput"; }
elseif ($Task == "CreateImage") { function CreateImage(); }
else { print "Incorrect Variable or no Variable Supplies"; }
 
 
 
 

Christopher J. Crane
Network Operations Manager

IKON Office Solutions
860.659.6464

 

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




[PHP] Class/Objects

2002-05-30 Thread Gerard Samuel

Im still green with writing with class, but I just want to check with 
you all.
I started creating a class file that also using 2 other classes.
class.php
---
db_obj = &new abc($db);

require_once('./that.class.php');
$this->tpl_obj = &new xwy;
}
}

?>
--

Then in my actual page I started this
--
db_obj->run_some_code($bar);
$bar->tpl_obj->do_this_for_me($bar);

?>


It works but was wondering if its 'legal' to use it like this ->
$lcre->db_obj->run_some_code($bar);
$lcre->tpl_obj->do_this_for_me($bar);

Im not extending the classes, just using them, so is what Im doing ok??
Thanks

-- 
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/



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




RE: [PHP] Undefined variables

2002-05-30 Thread Leotta, Natalie (NCI/IMS)

You could try using isset first.  I'm not sure where your log is, but if you
check to see if task is set, then maybe that will eliminate the problem :-)

-Natalie

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

-Original Message-
From: Crane, Christopher [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 30, 2002 5:07 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Undefined variables


I have an annoying problem, that I know is my own ignorance to PHP. I came
from PERL and this was not a problem there but is with PHP.
 
Here's the issue.
I have a number of scripts that use a "index.php?Task='some sort of task
name'", for example, http://www.foo.com/index.php?Task=ShowVersion
 .  Then I use an if/else
statement to tell the script what to do if it sees the ShowVersion variable.
In the ShowVersion example, I would call a function that displays the
version information I defined in the script. As a back up, I always provide
an else statement to catch variables I have no functions for.
 
If I have a ShowVersion function, GetData function and a CreateImage
function and the Task variable is empty or a variable that does not exists
comes in like http://www.foo.com/index.php?Task=SomethingDumb
  it would go to the
default function of something by using the ELSE part of the if/else
statements. 
 
I hope I am describing this correctly.now here is the problem. If I have
warnings turned on, or if I have a log written for warnings, the log fills
up if someone goes to http://www.foo.com/index.php
  or http://www.foo.com 
will error messages like undefine variable TASK on line 255. I understand
the reason, that PHP was expecting the variable Task when it got to the
if/else statements. So I put in something like if(!($Task)) { function
Something(); } but it still is looking for the variable so it still errors.
 
In Perl, it would simply be ignored. What do I do here.
 
Here is a simple example of the code.
 
if ($Task == "ShowVersion") { function ShowVersion(); }
elseif ($Task == "GetData") { function GetData(); print "$DataOutput"; }
elseif ($Task == "CreateImage") { function CreateImage(); } else { print
"Incorrect Variable or no Variable Supplies"; }
 
 
 
 

Christopher J. Crane
Network Operations Manager

IKON Office Solutions
860.659.6464

 

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




[PHP] Undefined variables

2002-05-30 Thread Crane, Christopher

I have an annoying problem, that I know is my own ignorance to PHP. I came
from PERL and this was not a problem there but is with PHP.
 
Here's the issue.
I have a number of scripts that use a "index.php?Task='some sort of task
name'", for example, http://www.foo.com/index.php?Task=ShowVersion
 .  Then I use an if/else
statement to tell the script what to do if it sees the ShowVersion variable.
In the ShowVersion example, I would call a function that displays the
version information I defined in the script. As a back up, I always provide
an else statement to catch variables I have no functions for.
 
If I have a ShowVersion function, GetData function and a CreateImage
function and the Task variable is empty or a variable that does not exists
comes in like http://www.foo.com/index.php?Task=SomethingDumb
  it would go to the
default function of something by using the ELSE part of the if/else
statements. 
 
I hope I am describing this correctly.now here is the problem. If I have
warnings turned on, or if I have a log written for warnings, the log fills
up if someone goes to http://www.foo.com/index.php
  or http://www.foo.com 
will error messages like undefine variable TASK on line 255. I understand
the reason, that PHP was expecting the variable Task when it got to the
if/else statements. So I put in something like if(!($Task)) { function
Something(); } but it still is looking for the variable so it still errors.
 
In Perl, it would simply be ignored. What do I do here.
 
Here is a simple example of the code.
 
if ($Task == "ShowVersion") { function ShowVersion(); }
elseif ($Task == "GetData") { function GetData(); print "$DataOutput"; }
elseif ($Task == "CreateImage") { function CreateImage(); }
else { print "Incorrect Variable or no Variable Supplies"; }
 
 
 
 

Christopher J. Crane
Network Operations Manager

IKON Office Solutions
860.659.6464

 



Re: [PHP] setting the IMAP on php4?

2002-05-30 Thread The Gabster

thank you

it sais: IMAP c-Client Version - enabled...

Gabi.


"Adam Voigt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Yeah, put: 
>
> on a PHP page and go to it in your
> web browser.
> Scroll down the page, if IMAP is listed
> under one of the big bold subheadings
> (like MySQL and the others), then it worked.
>
> Adam Voigt
> [EMAIL PROTECTED]
>
> On Thu, 2002-05-30 at 16:54, The Gabster wrote:
> > thanks a lot, Adam...
> >
> > Is there a short way to check if that works on my system?
> >
> > gabi.
> >
> >
> > "Adam Voigt" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Yes, the --with-imap refers to Unix, Linux and other OS's using
compiled
> > > source code rather then the standard windows pre-compiled binary.
> > >
> > > Adam Voigt
> > > [EMAIL PROTECTED]
> > >
> > > On Thu, 2002-05-30 at 16:43, The Gabster wrote:
> > > > Hello all!
> > > >
> > > > I have an Apache server + Php on a win2k machine...
> > > > When people talk about "you have to compile PHP with --with-imap",
(for
> > some
> > > > of my web email applications that require IMAP) do they mean that I
have
> > to
> > > > uncomment the line "extension=php_imap.dll" in my php.ini?
> > > >
> > > > thanks a lot,
> > > > gabi.
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>



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




Re: [PHP] setting the IMAP on php4?

2002-05-30 Thread Adam Voigt

Yeah, put: 

on a PHP page and go to it in your
web browser.
Scroll down the page, if IMAP is listed
under one of the big bold subheadings
(like MySQL and the others), then it worked.

Adam Voigt
[EMAIL PROTECTED]

On Thu, 2002-05-30 at 16:54, The Gabster wrote:
> thanks a lot, Adam...
> 
> Is there a short way to check if that works on my system?
> 
> gabi.
> 
> 
> "Adam Voigt" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Yes, the --with-imap refers to Unix, Linux and other OS's using compiled
> > source code rather then the standard windows pre-compiled binary.
> >
> > Adam Voigt
> > [EMAIL PROTECTED]
> >
> > On Thu, 2002-05-30 at 16:43, The Gabster wrote:
> > > Hello all!
> > >
> > > I have an Apache server + Php on a win2k machine...
> > > When people talk about "you have to compile PHP with --with-imap", (for
> some
> > > of my web email applications that require IMAP) do they mean that I have
> to
> > > uncomment the line "extension=php_imap.dll" in my php.ini?
> > >
> > > thanks a lot,
> > > gabi.
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



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




Re: [PHP] setting the IMAP on php4?

2002-05-30 Thread The Gabster

thanks a lot, Adam...

Is there a short way to check if that works on my system?

gabi.


"Adam Voigt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Yes, the --with-imap refers to Unix, Linux and other OS's using compiled
> source code rather then the standard windows pre-compiled binary.
>
> Adam Voigt
> [EMAIL PROTECTED]
>
> On Thu, 2002-05-30 at 16:43, The Gabster wrote:
> > Hello all!
> >
> > I have an Apache server + Php on a win2k machine...
> > When people talk about "you have to compile PHP with --with-imap", (for
some
> > of my web email applications that require IMAP) do they mean that I have
to
> > uncomment the line "extension=php_imap.dll" in my php.ini?
> >
> > thanks a lot,
> > gabi.
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>



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




Re: [PHP] setting the IMAP on php4?

2002-05-30 Thread Adam Voigt

Yes, the --with-imap refers to Unix, Linux and other OS's using compiled
source code rather then the standard windows pre-compiled binary.

Adam Voigt
[EMAIL PROTECTED]

On Thu, 2002-05-30 at 16:43, The Gabster wrote:
> Hello all!
> 
> I have an Apache server + Php on a win2k machine...
> When people talk about "you have to compile PHP with --with-imap", (for some
> of my web email applications that require IMAP) do they mean that I have to
> uncomment the line "extension=php_imap.dll" in my php.ini?
> 
> thanks a lot,
> gabi.
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



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




[PHP] setting the IMAP on php4?

2002-05-30 Thread The Gabster

Hello all!

I have an Apache server + Php on a win2k machine...
When people talk about "you have to compile PHP with --with-imap", (for some
of my web email applications that require IMAP) do they mean that I have to
uncomment the line "extension=php_imap.dll" in my php.ini?

thanks a lot,
gabi.




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




Re: [PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread 1LT John W. Holmes

You can use $_SERVER['QUERY_STRING'] if register_globals is off.

---John Holmes...

- Original Message -
From: "Leotta, Natalie (NCI/IMS)" <[EMAIL PROTECTED]>
To: "'1LT John W. Holmes'" <[EMAIL PROTECTED]>; "Igor Portnoy"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 4:31 PM
Subject: RE: [PHP] Problem running script after installing PHP 4.2.1


> One more question - could you just use $_GET[$QUERY_STRING} then?  Our URL
> doesn't even have IDs - it's just 001&06&055&...  Then I explode it and
put
> it into variables.  There are up to 12 vars that we pass that way so we
> didn't label them.
>
> Thank you!!  We're not worried about security - if someone tampers with
the
> URL then the database query doesn't work and they get an error message (my
> vote was for "don't be an idiot and play with things you don't
understand")
> but my boss didn't think it was cute.  :-)
>
> Thanks again!
>
> -Natalie
>
> -Original Message-
> From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 30, 2002 4:29 PM
> To: Leotta, Natalie (NCI/IMS); Igor Portnoy; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: Re: [PHP] Problem running script after installing PHP 4.2.1
>
>
> Okay, the only issue with the upgrade is that register_globals defaults to
> off. That is because of security reasons so it's not _quite_ as easy to
> write insecure scripts.
>
> With register_globals off, a URL like index.php?page=4 will not give you a
> $page variable, only $_GET['page'], or $HTTP_GET_VARS['page']. If your
using
> HTTP_GET_VARS now, then you'll be fine. The new $_GET[] array is just like
> HTTP_GET_VARS except its easier to type and it's always global (even in
> functions and classes, etc).
>
> If you turn on register_globals, any script you have now will run just
fine
> on the latest PHP as far as accessing GET, POST, COOKIE, etc data is
> concerned.
>
> Hope that helps. Let me know if there are any other questions.
>
> ---John Holmes...
>
> - Original Message -
> From: "Leotta, Natalie (NCI/IMS)" <[EMAIL PROTECTED]>
> To: "'1LT John W. Holmes'" <[EMAIL PROTECTED]>; "Igor Portnoy"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Thursday, May 30, 2002 4:18 PM
> Subject: RE: [PHP] Problem running script after installing PHP 4.2.1
>
>
> > I have a quick question.  I've been reading all of this about the
> upgrade -
> > we're just waiting for our network guy to do it.
> >
> > We need to use the query string for parameters so our URL is
> > "cut-and-paste-able."  Is that going to be a problem?  We were using
> > $HTTP_POST_VARS until someone decided that they wanted people to be
> > able
> to
> > direct someone else to the exact same graph.
> >
> > I just thought that I might as well get some info now, so that I can
> > be prepared if everything is going to break :-)
> >
> > Thanks!!
> >
> > -Natalie
> >
> > -Original Message-
> > From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 30, 2002 4:16 PM
> > To: Igor Portnoy; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Problem running script after installing PHP 4.2.1
> >
> >
> > You probably still have register globals off still and  your URL
> > variables aren't being accessed correctly. Use $_GET['page'] or
> > $HTTP_GET_VARS['page'], or turn on register_globals...
> >
> > ---John Holmes...
> >
> > - Original Message -
> > From: "Igor Portnoy" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Thursday, May 30, 2002 4:03 PM
> > Subject: [PHP] Problem running script after installing PHP 4.2.1
> >
> >
> > Hello,
> >
> >
> >
> > I am using MySQL to display some data to the users.  I have upgraded
> > to
> PHP
> > Version 4.2.1 on my FreeBSD Apache server, and now data from the
> > database
> is
> > not displayed correctly. Well, the page with the data shows up, and it
> > actually shows correct number of records.  However, when I click on
> > the "next" or "2" buttons the next page with records doesn't show up.
> > See example here: http://www.gibsonusa.com/test2/page/index.php
> >
> >
> >
> > Before I upgraded to PHP 4.2.1 everything was working perfectly. Any
> > ideas what could cause this, and how can it be fixed?
> >
> >
> >
> > Thanks.
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >


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




RE: [PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread Leotta, Natalie (NCI/IMS)

One more question - could you just use $_GET[$QUERY_STRING} then?  Our URL
doesn't even have IDs - it's just 001&06&055&...  Then I explode it and put
it into variables.  There are up to 12 vars that we pass that way so we
didn't label them.

Thank you!!  We're not worried about security - if someone tampers with the
URL then the database query doesn't work and they get an error message (my
vote was for "don't be an idiot and play with things you don't understand")
but my boss didn't think it was cute.  :-)

Thanks again!

-Natalie

-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 30, 2002 4:29 PM
To: Leotta, Natalie (NCI/IMS); Igor Portnoy; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [PHP] Problem running script after installing PHP 4.2.1


Okay, the only issue with the upgrade is that register_globals defaults to
off. That is because of security reasons so it's not _quite_ as easy to
write insecure scripts.

With register_globals off, a URL like index.php?page=4 will not give you a
$page variable, only $_GET['page'], or $HTTP_GET_VARS['page']. If your using
HTTP_GET_VARS now, then you'll be fine. The new $_GET[] array is just like
HTTP_GET_VARS except its easier to type and it's always global (even in
functions and classes, etc).

If you turn on register_globals, any script you have now will run just fine
on the latest PHP as far as accessing GET, POST, COOKIE, etc data is
concerned.

Hope that helps. Let me know if there are any other questions.

---John Holmes...

- Original Message -
From: "Leotta, Natalie (NCI/IMS)" <[EMAIL PROTECTED]>
To: "'1LT John W. Holmes'" <[EMAIL PROTECTED]>; "Igor Portnoy"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 4:18 PM
Subject: RE: [PHP] Problem running script after installing PHP 4.2.1


> I have a quick question.  I've been reading all of this about the
upgrade -
> we're just waiting for our network guy to do it.
>
> We need to use the query string for parameters so our URL is 
> "cut-and-paste-able."  Is that going to be a problem?  We were using 
> $HTTP_POST_VARS until someone decided that they wanted people to be 
> able
to
> direct someone else to the exact same graph.
>
> I just thought that I might as well get some info now, so that I can 
> be prepared if everything is going to break :-)
>
> Thanks!!
>
> -Natalie
>
> -Original Message-
> From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 30, 2002 4:16 PM
> To: Igor Portnoy; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] Problem running script after installing PHP 4.2.1
>
>
> You probably still have register globals off still and  your URL 
> variables aren't being accessed correctly. Use $_GET['page'] or 
> $HTTP_GET_VARS['page'], or turn on register_globals...
>
> ---John Holmes...
>
> - Original Message -
> From: "Igor Portnoy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, May 30, 2002 4:03 PM
> Subject: [PHP] Problem running script after installing PHP 4.2.1
>
>
> Hello,
>
>
>
> I am using MySQL to display some data to the users.  I have upgraded 
> to
PHP
> Version 4.2.1 on my FreeBSD Apache server, and now data from the 
> database
is
> not displayed correctly. Well, the page with the data shows up, and it 
> actually shows correct number of records.  However, when I click on 
> the "next" or "2" buttons the next page with records doesn't show up. 
> See example here: http://www.gibsonusa.com/test2/page/index.php
>
>
>
> Before I upgraded to PHP 4.2.1 everything was working perfectly. Any 
> ideas what could cause this, and how can it be fixed?
>
>
>
> Thanks.
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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




Re: [PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread 1LT John W. Holmes

Okay, the only issue with the upgrade is that register_globals defaults to
off. That is because of security reasons so it's not _quite_ as easy to
write insecure scripts.

With register_globals off, a URL like index.php?page=4 will not give you a
$page variable, only $_GET['page'], or $HTTP_GET_VARS['page']. If your using
HTTP_GET_VARS now, then you'll be fine. The new $_GET[] array is just like
HTTP_GET_VARS except its easier to type and it's always global (even in
functions and classes, etc).

If you turn on register_globals, any script you have now will run just fine
on the latest PHP as far as accessing GET, POST, COOKIE, etc data is
concerned.

Hope that helps. Let me know if there are any other questions.

---John Holmes...

- Original Message -
From: "Leotta, Natalie (NCI/IMS)" <[EMAIL PROTECTED]>
To: "'1LT John W. Holmes'" <[EMAIL PROTECTED]>; "Igor Portnoy"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 4:18 PM
Subject: RE: [PHP] Problem running script after installing PHP 4.2.1


> I have a quick question.  I've been reading all of this about the
upgrade -
> we're just waiting for our network guy to do it.
>
> We need to use the query string for parameters so our URL is
> "cut-and-paste-able."  Is that going to be a problem?  We were using
> $HTTP_POST_VARS until someone decided that they wanted people to be able
to
> direct someone else to the exact same graph.
>
> I just thought that I might as well get some info now, so that I can be
> prepared if everything is going to break :-)
>
> Thanks!!
>
> -Natalie
>
> -Original Message-
> From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 30, 2002 4:16 PM
> To: Igor Portnoy; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] Problem running script after installing PHP 4.2.1
>
>
> You probably still have register globals off still and  your URL variables
> aren't being accessed correctly. Use $_GET['page'] or
> $HTTP_GET_VARS['page'], or turn on register_globals...
>
> ---John Holmes...
>
> - Original Message -
> From: "Igor Portnoy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, May 30, 2002 4:03 PM
> Subject: [PHP] Problem running script after installing PHP 4.2.1
>
>
> Hello,
>
>
>
> I am using MySQL to display some data to the users.  I have upgraded to
PHP
> Version 4.2.1 on my FreeBSD Apache server, and now data from the database
is
> not displayed correctly. Well, the page with the data shows up, and it
> actually shows correct number of records.  However, when I click on the
> "next" or "2" buttons the next page with records doesn't show up. See
> example here: http://www.gibsonusa.com/test2/page/index.php
>
>
>
> Before I upgraded to PHP 4.2.1 everything was working perfectly. Any ideas
> what could cause this, and how can it be fixed?
>
>
>
> Thanks.
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] help with a rewrite directive

2002-05-30 Thread Dennis Gearon

Can anyone tell me the rewrite instruction for apache-mod_rewrite for:

original -> TangoClass.doc
final-> TangoClass.htm

and it shows up in the browser window?
-- 

If You want to buy computer parts, see the reviews at:
http://www.cnet.com/
**OR EVEN BETTER COMPILATIONS**!!
http://sysopt.earthweb.com/userreviews/products/

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




RE: [PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread Leotta, Natalie (NCI/IMS)

I have a quick question.  I've been reading all of this about the upgrade -
we're just waiting for our network guy to do it.

We need to use the query string for parameters so our URL is
"cut-and-paste-able."  Is that going to be a problem?  We were using
$HTTP_POST_VARS until someone decided that they wanted people to be able to
direct someone else to the exact same graph.

I just thought that I might as well get some info now, so that I can be
prepared if everything is going to break :-)

Thanks!!

-Natalie

-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 30, 2002 4:16 PM
To: Igor Portnoy; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Problem running script after installing PHP 4.2.1


You probably still have register globals off still and  your URL variables
aren't being accessed correctly. Use $_GET['page'] or
$HTTP_GET_VARS['page'], or turn on register_globals...

---John Holmes...

- Original Message -
From: "Igor Portnoy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 4:03 PM
Subject: [PHP] Problem running script after installing PHP 4.2.1


Hello,



I am using MySQL to display some data to the users.  I have upgraded to PHP
Version 4.2.1 on my FreeBSD Apache server, and now data from the database is
not displayed correctly. Well, the page with the data shows up, and it
actually shows correct number of records.  However, when I click on the
"next" or "2" buttons the next page with records doesn't show up. See
example here: http://www.gibsonusa.com/test2/page/index.php



Before I upgraded to PHP 4.2.1 everything was working perfectly. Any ideas
what could cause this, and how can it be fixed?



Thanks.






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

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




[PHP] win32: migrating PWS to Apache

2002-05-30 Thread Steve Clay

Hello,

On winNT I have Personal Web Server, PHP4.1.1, MySQL.

My target is Apache1.3, PHP4.2.2, Perl, MySQL.

Should I uninstall both PHP and PWS then install Apache, then PHP?
Would it be easier to uninstall mySQL and use a package like PHPtriad
than to set up Apache & PHP seperately?  A package of Apache, PHP and
Perl for win32 would be ideal for me.  Know of one?

What kind of problems would I expect by choosing Apache2.0?

This is for development so I like that I can bind Apache to
127.0.0.1 and have several virtual hosts..

I'm on digest so please, CC me.  Thanks for any advice.

Steve
-- 
[EMAIL PROTECTED] ** http://mrclay.org


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




Re: [PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread 1LT John W. Holmes

You probably still have register globals off still and  your URL variables
aren't being accessed correctly. Use $_GET['page'] or
$HTTP_GET_VARS['page'], or turn on register_globals...

---John Holmes...

- Original Message -
From: "Igor Portnoy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 4:03 PM
Subject: [PHP] Problem running script after installing PHP 4.2.1


Hello,



I am using MySQL to display some data to the users.  I have upgraded to
PHP Version 4.2.1 on my FreeBSD Apache server, and now data from the
database is not displayed correctly. Well, the page with the data shows
up, and it actually shows correct number of records.  However, when I
click on the "next" or "2" buttons the next page with records doesn't
show up. See example here: http://www.gibsonusa.com/test2/page/index.php



Before I upgraded to PHP 4.2.1 everything was working perfectly. Any
ideas what could cause this, and how can it be fixed?



Thanks.






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




[PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread Igor Portnoy

Hello,

 

I am using MySQL to display some data to the users.  I have upgraded to
PHP Version 4.2.1 on my FreeBSD Apache server, and now data from the
database is not displayed correctly. Well, the page with the data shows
up, and it actually shows correct number of records.  However, when I
click on the "next" or "2" buttons the next page with records doesn't
show up. See example here: http://www.gibsonusa.com/test2/page/index.php

 

Before I upgraded to PHP 4.2.1 everything was working perfectly. Any
ideas what could cause this, and how can it be fixed?

 

Thanks. 

 




[PHP] Using Named Pipes

2002-05-30 Thread Jonathan Rosenberg

I'm trying to use a named pipe in PHP, but I have a feeling I'm
misunderstanding something.  I'm hoping someone might have some
insight.  Here's the basic outline of what I'm doing

posix_mkfifo($argfile, 0600)
$argp = fopen($argfile, "w+");
$command = "program $argfile";
$fp = popen($command, "r");
fputs($argp, 'data = ' . $post);
$response = fgetcsv($fp, 1000);

The named pipe is being created ok.  But my page hangs while
trying to read the response in the last line.  Everything works
fine if I replace the named pipe with a standard file.  So it
really seems that it is the use of the named pipe that is wedging
me.

Any thoughts?

--
JR


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




[PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread Igor P.

Hello,

I am using MySQL to display some data to the users.  I have upgraded to PHP
Version 4.2.1 on my FreeBSD Apache server, and now data from the database is
not displayed correctly. Well, the page with the data shows up, and it
actually shows correct number of records.  However, when I click on the
"next" or "2" buttons the next page with records doesn't show up. See
example here: http://www.gibsonusa.com/test2/page/index.php

Before I upgraded to PHP 4.2.1 everything was working perfectly. Any ideas
what could cause this, and how can it be fixed?

Thanks.



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




[PHP] PHP commands inside a MySQL Database

2002-05-30 Thread Taylor York

I am inserting html/php code into a database that would look something like

default page 

now the problem is, I am getting the field, title, and echoing as so (after
using mysql_fetch_array and extract

echo "$title\n";

the acual title of the page in IE is

default page 

It doesnt parse or execute any of the php.  Any suggestions?

Thanks
Taylor York



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




[PHP] Re: Help with example session class (second request)

2002-05-30 Thread Michael Davey

Oops - should have read down a lot further...


"Michael Davey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Not quite sure where you got this $login class instance from, but it
appears
> to be from thin air.  If you have a session class then you would need to
> instantiate it first with:
>
> $login = new XYZSessionClass(); // plus any constructor arguments
>
> However, I am a bit confused as you mention using PHP session management -
> this doesn't require any objects at all, and definately doesn't invlove a
> getSessionVar() method.
>
> To register a session var, use:
>
> session_register ("var_name");
>
> And then you just simply use it as you would any normal variable on other
> pages.
>
> regards,
>
> Mikey
>
> "Daevid Vincent" <[EMAIL PROTECTED]> wrote in message
> 001801c2080d$b67c4630$45193e04@telecom">news:001801c2080d$b67c4630$45193e04@telecom...
> > Sorry for posting this again so soon, but until I get sessions working,
> > I'm blocked on this project.
> >
> > D.
> > ---
> >
> > I'm just learning sessions, and thought the class looked interesting on
> > this page: http://www.php.net/manual/en/ref.session.php
> >
> > So I have this on an index.phtml page and I can see the variables are
> > being set and all looks good there, however upon successful "login" I
> > wish to redirect to content.phtml At the very top of content.phtml I
> > have:
> >
> >  > if( $login->getSessionVar("login") )
> > {
> > $booth_id = $login->getSessionVar("booth_id");
> > $booth_name = $login->getSessionVar("booth_name");
> > echo "\nbooth_id = $booth_id and booth_name =
> > $booth_name\n";
> > }
> > else
> > {
> > Header("Location: ../index.phtml\n\n");
> > exit;
> > }
> > ?>
> >
> > But it doesn't seem that $login exists or is defined now on this page?
> >
> > So my question is basically, how can I use the class and the session
> > variables across multiple pages? Do I need to move the class to an
> > include file? Do I need to re-create it on each page somehow? Can
> > someone show me a real working example of this scenario?
> >
> > Daevid Vincent
> > http://daevid.com
> >
> >
>
>



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




Re: [PHP] Multiple File Uploads and me....

2002-05-30 Thread Kevin Stone

Actually there is a tiny bit of information in the manual about handling
multiple uploads here..
http://www.php.net/manual/en/features.file-upload.multiple.php
-Kevin

- Original Message -
From: "Nick Patsaros" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 1:17 PM
Subject: [PHP] Multiple File Uploads and me


> I need to have a brief class on how to handle multiple
> file uploads (they are going to all be text files)
> from one HTML form.
>
> I've scoured the PHP manual and I've only found stuff
> relating to single file uploads.
>
> Any help is appreciated and I thank you all in
> advance!
>
>
> --Nick P
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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




[PHP] Re: Help with example session class (second request)

2002-05-30 Thread Michael Davey

Not quite sure where you got this $login class instance from, but it appears
to be from thin air.  If you have a session class then you would need to
instantiate it first with:

$login = new XYZSessionClass(); // plus any constructor arguments

However, I am a bit confused as you mention using PHP session management -
this doesn't require any objects at all, and definately doesn't invlove a
getSessionVar() method.

To register a session var, use:

session_register ("var_name");

And then you just simply use it as you would any normal variable on other
pages.

regards,

Mikey

"Daevid Vincent" <[EMAIL PROTECTED]> wrote in message
001801c2080d$b67c4630$45193e04@telecom">news:001801c2080d$b67c4630$45193e04@telecom...
> Sorry for posting this again so soon, but until I get sessions working,
> I'm blocked on this project.
>
> D.
> ---
>
> I'm just learning sessions, and thought the class looked interesting on
> this page: http://www.php.net/manual/en/ref.session.php
>
> So I have this on an index.phtml page and I can see the variables are
> being set and all looks good there, however upon successful "login" I
> wish to redirect to content.phtml At the very top of content.phtml I
> have:
>
>  if( $login->getSessionVar("login") )
> {
> $booth_id = $login->getSessionVar("booth_id");
> $booth_name = $login->getSessionVar("booth_name");
> echo "\nbooth_id = $booth_id and booth_name =
> $booth_name\n";
> }
> else
> {
> Header("Location: ../index.phtml\n\n");
> exit;
> }
> ?>
>
> But it doesn't seem that $login exists or is defined now on this page?
>
> So my question is basically, how can I use the class and the session
> variables across multiple pages? Do I need to move the class to an
> include file? Do I need to re-create it on each page somehow? Can
> someone show me a real working example of this scenario?
>
> Daevid Vincent
> http://daevid.com
>
>



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




Re: [PHP] Help with example session class (second request)

2002-05-30 Thread 1LT John W. Holmes

Call session_start() on your second page...

---John Holmes...

- Original Message - 
From: "Daevid Vincent" <[EMAIL PROTECTED]>
To: "PHP general mailing list" <[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 3:10 PM
Subject: [PHP] Help with example session class (second request)


> Sorry for posting this again so soon, but until I get sessions working,
> I'm blocked on this project.
> 
> D.
> ---
> 
> I'm just learning sessions, and thought the class looked interesting on
> this page: http://www.php.net/manual/en/ref.session.php
> 
> So I have this on an index.phtml page and I can see the variables are
> being set and all looks good there, however upon successful "login" I
> wish to redirect to content.phtml At the very top of content.phtml I
> have:
> 
>  if( $login->getSessionVar("login") ) 
> { 
> $booth_id = $login->getSessionVar("booth_id");
> $booth_name = $login->getSessionVar("booth_name");
> echo "\nbooth_id = $booth_id and booth_name =
> $booth_name\n";
> }
> else
> {
> Header("Location: ../index.phtml\n\n"); 
> exit;
> }
> ?>
> 
> But it doesn't seem that $login exists or is defined now on this page? 
> 
> So my question is basically, how can I use the class and the session
> variables across multiple pages? Do I need to move the class to an
> include file? Do I need to re-create it on each page somehow? Can
> someone show me a real working example of this scenario?
> 
> Daevid Vincent
> http://daevid.com
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




[PHP] Multiple File Uploads and me....

2002-05-30 Thread Nick Patsaros

I need to have a brief class on how to handle multiple
file uploads (they are going to all be text files)
from one HTML form.  

I've scoured the PHP manual and I've only found stuff
relating to single file uploads. 

Any help is appreciated and I thank you all in
advance!


--Nick P

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




RE: [PHP] One more try

2002-05-30 Thread Sander, Ryan

The reason no one has helped you is probably due to the fact you are being
very vague.

How are they 'not working together'? 

Error messages, maybe the steps you used to install apache and php (probably
where the problem will be found).

Good Luck,

Ryan Sander
Web Developer
[EMAIL PROTECTED]
http://cantonrep.com

> --
> From: Taylor Lewick
> Sent: Thursday, May 30, 2002 2:47 PM
> To:   [EMAIL PROTECTED]
> Subject:  [PHP] One more try
> 
> Okay, I dont know if anyone out there just doesnt know the answer to my
> question or what...
> 
> I tried to install PHP and apache.  I have apache 2.0.36 installed
> correctly and php-4.2.1 installed.  The trouble is getting them to work
> together...
> I have read numerous web articles and manuals saying do this and do that,
> but no one seems to have a comprehensive or accurate steps available..
> Could someone help me with this please...
> 
> Thanks
> 
> Taylor Lewick
> Unix System Administrator
> Fortis Benefits
> 816 881 6073
> 
> "Help Wanted.  Seeking Telepath..."
> "You Know where to apply."
> 
> 
>   Please Note
> The information in this E-mail message is legally privileged
> and confidential information intended only for the use of the
> individual(s) named above. If you, the reader of this message,
> are not the intended recipient, you are hereby notified that 
> you should not further disseminate, distribute, or forward this
> E-mail message. If you have received this E-mail in error,
> please notify the sender. Thank you
> *
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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




Re: [PHP] Re: SQL question, getting error and not sure why

2002-05-30 Thread Michael Virnstein

yes, in that way the query i suggested would look like:

insert into acteursenc
   (nomacteur)
values
   ('Michael Sweeney')

and nuacteur would be provided by the before insert
trigger automatically. that's like mysqls autoincrement.

Michael

"Rouvas Stathis" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I would use a trigger with a sequence, as in:
>
> CREATE SEQUENCE _SEQ
>  INCREMENT BY 1
>  START WITH -99
>  MAXVALUE 99
>  MINVALUE -9
>  CYCLE CACHE 5 ORDER;
>
> create or replace trigger _autonum_ins
> before insert on 
> for each row
> begin
>if :new. is null then
>   select _seq.nextval into :new. from dual;
>end if;
> end;
>
> -Stathis.
>
> Michael Sweeney wrote:
> >
> > lol sorry, buttons are too close together in OE.
> >
> > Anyon ehave a sugestion on a different way of doing what I want to do?
> > Should be easy but i;m starting to get a headache from this (6-7 years
not
> > doing SQL doesn't help either)
> >
>
> --
> Rouvas Stathis
> [EMAIL PROTECTED]
> http://www.di.uoa.gr/~rouvas



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




[PHP] Re: Posting to a form - When user hits BACK button all the data isgone

2002-05-30 Thread Michael Davey

The best way to do this is to register your form data as session variable
when it is processed on the second page.  Then add some scripting in the
first page to check for these variables and pre-populate the form as
necessary...

Mikey

"Phil Schwarzmann" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> When a user is posting data to a form and hits SUBMIT the user is taken
> to another page.  But when the user hits the BACK button on his browser,
> all the posted data is gone.
>
> How can I get this data to remain there when a user hits BACK ?
>
> Thanks!!
>



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




Re: [PHP] Problems with upload

2002-05-30 Thread Jason Wong

On Friday 31 May 2002 01:57, Aaron wrote:
> I am trying to upload files to a server.  I have the script and it works on
> other servers but when I try to upload to this paticular server, I get the
> following:
>
> Warning: Max file size of 2 bytes exceeded - file [userfile] not saved in
> Unknown on line 0

Is that a typo? Does it really say 2 bytes? If it's not a typo ...

> I have checked the php.ini file and the upload_max_filesize = 2M.  I
> checked with phpinfo and verified that it is set for 2M.

... then increase the upload_max_filesize

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

/*
Mr and Mrs PED, can I borrow 26.7% of the RAYON TEXTILE production of
the INDONESIAN archipelago?
*/


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




Re: [PHP] Hi all & Help :D

2002-05-30 Thread Adam Voigt

Try reversing the filelocations in your ftp_put, like
if you have "remotelocation" and "mylocation", switch
them to say "mylocation" then "remotelocation". Just
a thought.

Adam Voigt
[EMAIL PROTECTED]

On Thu, 2002-05-30 at 22:26, Anthony wrote:
> Hi all, this is my first post on the php news groups, and im sure it wont be
> my last so I will first introduce my self, because im sure there are some
> regualar posters ;)
> 
> My name is Anthony.. Im 14 years old and live in england, anything else you
> want to know ask :)
> 
> Im working on a FTP uploader in php, but not for my own site, I want to
> offer it was a service to so over people can upload to there sites using my
> FTP script... but when you put the destonation (once they have connected) to
> / it trys to upload to a path in my site.. can any one explain why this is
> and how to correct it, It would be aprechiated a lot, thanks
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




[PHP] Help with example session class (second request)

2002-05-30 Thread Daevid Vincent

Sorry for posting this again so soon, but until I get sessions working,
I'm blocked on this project.

D.
---

I'm just learning sessions, and thought the class looked interesting on
this page: http://www.php.net/manual/en/ref.session.php

So I have this on an index.phtml page and I can see the variables are
being set and all looks good there, however upon successful "login" I
wish to redirect to content.phtml At the very top of content.phtml I
have:

getSessionVar("login") ) 
{ 
$booth_id = $login->getSessionVar("booth_id");
$booth_name = $login->getSessionVar("booth_name");
echo "\nbooth_id = $booth_id and booth_name =
$booth_name\n";
}
else
{
Header("Location: ../index.phtml\n\n"); 
exit;
}
?>

But it doesn't seem that $login exists or is defined now on this page? 

So my question is basically, how can I use the class and the session
variables across multiple pages? Do I need to move the class to an
include file? Do I need to re-create it on each page somehow? Can
someone show me a real working example of this scenario?

Daevid Vincent
http://daevid.com



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




[PHP] Re: I want a script to run after a page already loads.

2002-05-30 Thread Michael Davey

It would be possible to flush the output of your page (i.e. your HTML) and
then put the PHP code after this... however, the page wouldn't appear to be
fully loaded until the script had finished processing...

Mikey

"Phil Schwarzmann" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> I have a script that takes a VERY long time to run.  So the page just
> kinda hangs for a minute if not longer before the script is complete.
>
> I want a page to fully load, then I want this script to run.  Is this
> possible?
>



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




Re: [PHP] Posting to a form - When user hits BACK button all the data isgone

2002-05-30 Thread 1LT John W. Holmes

One way is to use a GET method instead of POST.

---John Holmes...
- Original Message -
From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 2:43 PM
Subject: [PHP] Posting to a form - When user hits BACK button all the data
isgone


> When a user is posting data to a form and hits SUBMIT the user is taken
> to another page.  But when the user hits the BACK button on his browser,
> all the posted data is gone.
>
> How can I get this data to remain there when a user hits BACK ?
>
> Thanks!!
>


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




[PHP] Problems with upload

2002-05-30 Thread Aaron

I am trying to upload files to a server.  I have the script and it works on
other servers but when I try to upload to this paticular server, I get the
following:

Warning: Max file size of 2 bytes exceeded - file [userfile] not saved in
Unknown on line 0


I have checked the php.ini file and the upload_max_filesize = 2M.  I checked
with phpinfo and verified that it is set for 2M.

Any ideas?



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




Re: [PHP] Posting to a form - When user hits BACK button all thedata is gone

2002-05-30 Thread Duncan Hill

On Thu, 30 May 2002, Ed Gorski wrote:

> At 02:43 PM 5/30/2002 -0400, Phil Schwarzmann wrote:
> >When a user is posting data to a form and hits SUBMIT the user is taken
> >to another page.  But when the user hits the BACK button on his browser,
> >all the posted data is gone.
> >
> >How can I get this data to remain there when a user hits BACK ?

I've noticed that this behaviour varies between browsers.  Moreover, some 
browsers (IE) do it intermittently.  Go figure.

-- 

Sapere aude
My mind not only wanders, it sometimes leaves completely.
Never attribute to malice that which can be adequately explained by stupidity.


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




Re: [PHP] Posting to a form - When user hits BACK button all the data is gone

2002-05-30 Thread Ed Gorski

The posted data on which page?  The one submitted to?

ed

At 02:43 PM 5/30/2002 -0400, Phil Schwarzmann wrote:
>When a user is posting data to a form and hits SUBMIT the user is taken
>to another page.  But when the user hits the BACK button on his browser,
>all the posted data is gone.
>
>How can I get this data to remain there when a user hits BACK ?
>
>Thanks!!


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




Re: [PHP] Hi all & Help :D

2002-05-30 Thread Ed Gorski

hehI laugh but it's not past the realm of what people do...

JH>For all we know, the problem is because you actually wrote the program 
in Pascal, but thought it was PHP because you renamed your computer to PHP 
and you are trying to load the code up in MS Word on Windows 3.11.


ed
At 02:47 PM 5/30/2002 -0400, 1LT John W. Holmes wrote:
>Two things you should learn:
>
>1. Use a informative Subject. Give a description of the problem instead of 
>Hi and Help...
>
>2. We can't help you if you don't give us code and error messages. For all 
>we know, the problem is because you actually wrote the program in Pascal, 
>but thought it was PHP because you renamed your computer to PHP and you 
>are trying to load the code up in MS Word on Windows 3.11.
>
>---John Holmes...
>
>"Anthony" <[EMAIL PROTECTED]> wrote in message 
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi all, this is my first post on the php news groups, and im sure it 
> wont be
> > my last so I will first introduce my self, because im sure there are some
> > regualar posters ;)
> >
> > My name is Anthony.. Im 14 years old and live in england, anything else you
> > want to know ask :)
> >
> > Im working on a FTP uploader in php, but not for my own site, I want to
> > offer it was a service to so over people can upload to there sites using my
> > FTP script... but when you put the destonation (once they have 
> connected) to
> > / it trys to upload to a path in my site.. can any one explain why this is
> > and how to correct it, It would be aprechiated a lot, thanks
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >


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




Re: [PHP] I want a script to run after a page already loads.

2002-05-30 Thread Ed Gorski

well what does the script do?  Is it integral to the page?

ed

At 02:42 PM 5/30/2002 -0400, Phil Schwarzmann wrote:
>I have a script that takes a VERY long time to run.  So the page just
>kinda hangs for a minute if not longer before the script is complete.
>
>I want a page to fully load, then I want this script to run.  Is this
>possible?


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




[PHP] Hi all & Help :D

2002-05-30 Thread Anthony

Hi all, this is my first post on the php news groups, and im sure it wont be
my last so I will first introduce my self, because im sure there are some
regualar posters ;)

My name is Anthony.. Im 14 years old and live in england, anything else you
want to know ask :)

Im working on a FTP uploader in php, but not for my own site, I want to
offer it was a service to so over people can upload to there sites using my
FTP script... but when you put the destonation (once they have connected) to
/ it trys to upload to a path in my site.. can any one explain why this is
and how to correct it, It would be aprechiated a lot, thanks




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




[PHP] Re: [PHP-WIN] GD & Freetype on W2K/Apache1.3.2/PHP4.2.0

2002-05-30 Thread Michael Davey

Ignore this - I have managed to get them to work in Unix - now onto
Windows... sigh!
"Michael Davey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I know this is cross-posting, but I have no luck with finding a solution
to
> this problem on PHP-WIN, and I have since tried running my code on a Linux
> server and have had the same problems... so here goes!
>
> -- Original Post --
> Sorry if this has been posted a hundred times already - but I am trying to
>
> use TrueType fonts with GD.
>
> I can create images fine, and have managed to gather from previous
postings
>
> that there was an error with post-4.0.5 versions of php_gd.dll that cause
>
> Freetype to fail, but the install of PHP I have installs php_gd2.dll and
any
>
> attempts to use php_gd.dll fail when I restart the server.
>
> Has anyone else has experience of this issue?
>
> Mikey
>
>
>



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




Re: [PHP] fdup & Pipes?

2002-05-30 Thread 1LT John W. Holmes

> Yes, I realized this after I sent my reply.
> 
> And, please try hard to forgive those of us who do not use the
> "real" software approved by you & the other gods.  We beg your
> forgiveness, oh lord.

You are forgiven, my child.

---John Holmes...

> 
> > -Original Message-
> > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 30, 2002 10:45 AM
> > To: Jonathan Rosenberg
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [PHP] fdup & Pipes?
> >
> >
> > Yes it was.  In your message you had this header:
> >
> > In-Reply-To:
> > <[EMAIL PROTECTED]>
> >
> > Which means you hit 'Reply' in your crappy Outlook
> > program, deleted the
> > Subject line and posted your message that way.  Please
> > don't do that.
> > Those of us with real email clients see your "new"
> > message inside a thread
> > on a completely different topic.
> >
> > -Rasmus
> >
> > On Thu, 30 May 2002, Jonathan Rosenberg wrote:
> > > I have no idea what you are talking about.  My
> > message was NOT a
> > > reply to a previous post.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




Re: [PHP] Store in XML -> process w/ PHP -> Display in XHTML ?

2002-05-30 Thread Thalis A. Kalfigopoulos

On Thu, 30 May 2002, Timothy J. Luoma wrote:

> 
> Summary: I've been looking for a resource (book, website, etc) that will
> address how to write/store information in XML and deliver it as XHTML
> (using PHP for the processing), but haven't had much luck.

I'm not sure what you want is feasible as automagically as you'd like to i.e. it won't 
be PHP that will do the transformation for you. From my understanding of the XML 
universe, XHTML is an XMLized variant of HTML4.0 i.e. a 'very well shaped' HTML that 
fits the strictness of XML syntax. To get XHTML from an arbitrary XML document you'd 
need to use XSLT which is an XML application (don't misunderstand the term 
'application' here).
Take a look at http://www.php.net/manual/en/ref.xslt.php

good luck,
--thalis


> 
> 
> I know a little bit of PHP (just enough to be dangerous, but also to
> recognize how cool it is) and love the idea of XML.
> 
> The only drawback to XML at this point is that so few browsers can deal
> with it.
> 
> So I'm wondering if there is a way to use PHP to do the transformation.
> I see there are several XML functions in the PHP manual, but nothing
> seemed "on point" from my investigation.
> 
> Thanks for any help.
> 
> TjL
> 
> ps -- I know this is 'php-general' but a lot of the conversation here is
> pretty far over my head.  Is there a 'php-newbie' list?
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




Re: [PHP] your philosophy on php-design

2002-05-30 Thread Justin French


>So, If I were to use frames It could be done, but now I'm not thinking of
>frames but of displaying content dynamically in a tabe cell.

A few points:

1.  you cannot reliably have content updated on the screen from information
on the server (eg changing the "# of items in your shopping cart" display)
without refreshing the page.  options possibly include frames, iframes and
javascript, but good results will be hard to achieve to say the least,
depending on the viewer's browser configuration

2.  unless your users are adding many many items to their cart, or page
rendering is particularly slow, you'd be a lot better off refreshing the
page... I've done a lot of useability testing, and in short, people feel
like "something happened" when the page refreshes... this is confirmed by
their cart items increasing, and possibly their total $'s.  a bit of user
feedback (via a page refresh and new content) may be a whole lot better for
the user than saving a few seconds on a page refresh.


As far as your template stuff goes, I'd keep it simple with some include()'d
files, for headers, sub menus, menus, footers, etc... it makes management of
content s easy.  Happy to provide more information if needed.


Justin


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




[PHP] Store in XML -> process w/ PHP -> Display in XHTML ?

2002-05-30 Thread Timothy J. Luoma


Summary: I've been looking for a resource (book, website, etc) that will
address how to write/store information in XML and deliver it as XHTML
(using PHP for the processing), but haven't had much luck.


I know a little bit of PHP (just enough to be dangerous, but also to
recognize how cool it is) and love the idea of XML.

The only drawback to XML at this point is that so few browsers can deal
with it.

So I'm wondering if there is a way to use PHP to do the transformation.
I see there are several XML functions in the PHP manual, but nothing
seemed "on point" from my investigation.

Thanks for any help.

TjL

ps -- I know this is 'php-general' but a lot of the conversation here is
pretty far over my head.  Is there a 'php-newbie' list?



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




[PHP] Re: sms to web

2002-05-30 Thread Peter Clarke

Basically you'll need to have a mobile number set up with an SMSC who will
extract the data from the message and send it on to the url that you provide
them with.

Peter

"Deniz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> can anybody advice me some source about how to channel sms messages to a
> webserver and parse it with php?
>
> thanks
> -d
>
>


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




[PHP] fdup & Pipes? (New Thread)

2002-05-30 Thread Jonathan Rosenberg

It's been a long time since I've programmed on Unix, but there
was a common technique used in C programs for invoking a program
& allowing the invoker to read & write via standard input/output.
I believe it used a combination of pipes & the fdup function.

Is it possible to emulate this behavior in PHP?


--
JR


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




Re: [PHP] Newbie redirect problem

2002-05-30 Thread Analysis & Solutions

On Thu, May 30, 2002 at 10:38:33AM -0500, Jason Tobias wrote:

> When a user submits a form, it redirects them to login if they are not
> logged in.
> Once the user logs in. I want to redirect them to the form that they
> originaly filled out.
> I can define a static redirect and that works fine, just not very
> practical.

Care to define what you mean by "static redirect" and why that's 
impractical?  You may already be thinking of what I'd suggest, so don't 
want to waste time going into it.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] Is there a way to keep variables between php scrits ?

2002-05-30 Thread Analysis & Solutions

On Thu, May 30, 2002 at 03:55:47PM +0200, Anne Le Bot wrote:

> I need to keep the values of variables from one php page to another : is
> there a way to do this ?

Three options:

sessions
pass the values in hidden fields of a form
pass them in the query strings of hyperlinks

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




[PHP] Re: JAVA extension install

2002-05-30 Thread fincom

I have send before my problem about ext/java.
It doesn't work until i désactive the ext/xslt. Curious
the problem is mentionned in bugs.php.net ID : 13344. but it still not
corriged.
Hope this help some one.
Just put ";" before the xslt.so and all will be fine

Have fun :)

Fincom

"Fincom" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Hi,
>
> I have some problems with installing the java extension for php.
>
> My Config :
>
> Os : Linux (Mandrake 8.1)
> PHP 4.1.2
> Apache 1.3.23
> J2SDK.1.4.0
>
> I had downloaded the source for php 4.1.2 from rpmfind.
> I compiled the extensions, i had the two necessary files : libphp_java.do
> and php_java.jar.
>
> When i try to access excute a simple script done with the java extension,
i
> have no response,  it's take a long time before it's tell me that the page
> is not found. When i read the apache log , i see that Apache had crached
the
> child.
>
> My config in php.ini :
>
> java.class.path=/usr/lib/php/extensions/php_java.jar
> java.home=/usr/java/java
> java.library=/usr/java/java/jre/lib/i386/libjava.so
>
java.library.path=/usr/lib/php/extensions:/usr/java/java/jre/lib/i386/native
>
_threads:/usr/java/java/jre/lib/i386/client:/usr/java/java/jre/lib/i386/serv
> er:/usr/java/java/jre/lib/i386
>
>
> Can anybody help me ??
> Thanks
>
>
>
>



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




[PHP] Is there a way to keep variables between php scrits ?

2002-05-30 Thread Anne Le Bot

I need to keep the values of variables from one php page to another : is
there a way to do this ?

Thanks,

Anne

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




Re: [PHP] .php3 extension?

2002-05-30 Thread The Gabster

Thanks a lot to all!!!


gabi.



"Nicole Lallande" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> If you want your home page to be a .php3 file then you must add
> index.php3 to your DirectoryIndex directive:
>
> DirectoryIndex index.html index.htm index.cgi index.php3 index.php  ---
> and so on.
>
> In addition, .php3 should be added to your AddType directive
>
> AddType application/x-httpd-php .php .php3 .php4 .phtml
>
> If you cannot access your httpd.conf file on your server, the same
> directives can be modified using a .htaccess file in the appropriate
> directive.
>
> HTH,
>
> Nicole
>
>
> The Gabster wrote:
>
> >Hello all...
> >
> >I have Apache 2.0.35 and PHP 4.2.0 on a win2k machine... Everything works
> >fine, etc. The question I have, how can I configure PHP (or Apache?) to
> >support (and run) .php3 extension files?
> >
> >Thanks a lot,
> >Gabi.
> >
> >
> >
>
> --
> 
> Nicole Lallande
> [EMAIL PROTECTED]
> 760.753.6766
> 
>
>
>



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




[PHP] PHP Warning: ['xxxx']: Unable to initialize module

2002-05-30 Thread Steve G

Hello,

I'm running Linux 7.2 and apache.  Also PostgreSQL.

After upgrading from 4.0.4 I receive all of these errors and I have no idea
what API=xxx means.  I followed the instructions for upgrading to 4.2.1 and
everything apparently went well, but still have module errors.

Also, phpinfo() still echo'es 4.0, but the CLI sys 4.2.1!!??  What gives??


Is there somewhere to download modules from?  A separate way to install
them?

 Any help would be appreciated.

Thanks.


-steve

[root@Zeus /root]# php -m

Content-type: text/html



PHP Warning:  imap: Unable to initialize module

Module compiled with module API=20001214, debug=0, thread-safety=0

PHPcompiled with module API=20020429, debug=0, thread-safety=0

These options need to match

 in Unknown on line 0

PHP Warning:  ldap: Unable to initialize module

Module compiled with module API=20001214, debug=0, thread-safety=0

PHPcompiled with module API=20020429, debug=0, thread-safety=0

These options need to match

 in Unknown on line 0

PHP Warning:  pgsql: Unable to initialize module

Module compiled with module API=20001214, debug=0, thread-safety=0

PHPcompiled with module API=20020429, debug=0, thread-safety=0

These options need to match

 in Unknown on line 0

Running PHP 4.2.1

Zend Engine v1.2.0, Copyright (c) 1998-2002 Zend Technologies


[PHP Modules]

xml

standard

sockets

session

posix

pcre

mysql

ctype


[Zend Modules]


[root@Zeus /root]#





[PHP] Array of COM objects doesn't work in PHP but does in ASP?

2002-05-30 Thread Noah

Hey guys,

OK I favor PHP so far above ASP however it doesnt seem like PHP can
handle an array of COM Objects.

Here's the scenario:

Within the 'Deal' object contains an array of 'Bonds'.
I want to access each bond by doing: $comDeal->Bonds->Item[$i];
( btw Item is part of the com object to access each)
However i get this error: Warning: PropGet() failed: Invalid number of
parameters

In ASP I can do:
comDeal.Bonds.Item(i) and it works fine

Any suggestions?

Thanks!

- Noah





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




[PHP] Newbie redirect problem

2002-05-30 Thread Jason Tobias

When a user submits a form, it redirects them to login if they are not
logged in.
Once the user logs in. I want to redirect them to the form that they
originaly filled out.
I can define a static redirect and that works fine, just not very practical.

Is there any way to do this?



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




[PHP] Re: Apache, html, PHP and global variables

2002-05-30 Thread Daniel Grace

This was originally sent to the httpd-users mailing list, I'm moving it to
the php-general list to bring it on-topic and because I think it's something
worth sharing. I'm also hoping I actually remembered the address for the
php-general list since I typically post there via the newsgroup.

On Thursday, May 30, 2002 at 7:34 AM, "Peter" <[EMAIL PROTECTED]>
wrote:

[...]
> I am designing a web site which has a number of  pages. One of these
> provides the facility for the user to log onto a mysql database.  Other
web
> pages allow the user to query and update different tables in the database.
[...]
> I used the mysql_pconnect function in the login page and assumed that the
> connection would automatically be available to all other pages in the site
> as hey are invoked, but find that I have to include it in every page that
> access the data base.
>

mysql_pconnect creates a persistent database connection that survives across
multiple page loads, however, the connection is NOT always available to all
other pages. Specifically:
1. You still must call mysql_pconnect in each page that accesses the db.
What mysql_pconnect does is avoid the overhead of reconnecting -- but you'll
need to call it again on each page to get the connection handle. Read more
at http://www.php.net/mysql_pconnect

2. If you are running your webserver in multiple processes (99% of the time
this is true with Apache, which you are using) and the same user happens to
be served by multiple processes, each process will require its own
connection to the server -- which will be made the first time that process
calls mysql_pconnect. Since your particular setup has a user logging into a
mysql database (presumably with their own account instead of one shared db
account that takes care of db management via your code), this means you can
have a theoretical maximum of users * processes connections to your
database. Make sure MySQL is configured to allow that many connections. (20
apache processes and 10 users is 200 connections that stick around a long
time...it adds up real fast!). If the ability to raise the connection limit
isn't available, you may want to use mysql_connect instead -- slightly
slower, but you won't have to worry about unused connections lingering.
(It's still possible to hit the limit, though, just not as likely.)

-- Daniel Grace


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




[PHP] Re: make install error on HP-UX 11.00

2002-05-30 Thread Taylor Lewick

Hi all. To clarify, all of the software need for php I built, except apache. I need to 
know if I need to download the apache source
and build it in a particular way. i.e., statically, or what...

This is regarding my earlier message in which when I did a make install I received the 
following error...

/opt/php-4.2.1/build/shtool mkdir -p "/opt/apache/lib/modules" && /opt/apache/bin/apxs 
-S LIBEXECDIR="/opt/apache/lib/modules" -i -a -n php4 libs/libphp4.sl
apxs:Error: file libs/libphp4.sl is not a DSO

I could really use some guidance, thanks...
Taylor

Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073

"Help Wanted.  Seeking Telepath..."
"You Know where to apply."


Please Note
The information in this E-mail message is legally privileged
and confidential information intended only for the use of the
individual(s) named above. If you, the reader of this message,
are not the intended recipient, you are hereby notified that 
you should not further disseminate, distribute, or forward this
E-mail message. If you have received this E-mail in error,
please notify the sender. Thank you
*

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




Re: [PHP] Re: SQL question, getting error and not sure why

2002-05-30 Thread Rouvas Stathis

I would use a trigger with a sequence, as in:

CREATE SEQUENCE _SEQ
 INCREMENT BY 1
 START WITH -99
 MAXVALUE 99
 MINVALUE -9
 CYCLE CACHE 5 ORDER;

create or replace trigger _autonum_ins
before insert on 
for each row
begin
   if :new. is null then
  select _seq.nextval into :new. from dual;
   end if;
end;

-Stathis.

Michael Sweeney wrote:
> 
> lol sorry, buttons are too close together in OE.
> 
> Anyon ehave a sugestion on a different way of doing what I want to do?
> Should be easy but i;m starting to get a headache from this (6-7 years not
> doing SQL doesn't help either)
> 

-- 
Rouvas Stathis
[EMAIL PROTECTED]
http://www.di.uoa.gr/~rouvas

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




  1   2   >