RE: [PHP] PDFlib 4.0.0.... any experiences..

2001-04-20 Thread Taylor, Stewart

Dean,

I too want to instal pdflib4, however I can't see a reference to pdflib4 on
the web page you've given (unless my visions not working correctly of
course).  All the links are for pdflib3.3

Are they on this actual page or are they hidden somewhere.


-Stewart

-Original Message-
From: Grimes, Dean [mailto:[EMAIL PROTECTED]]
Sent: 20 April 2001 13:23
To: 'David Bouw'; [EMAIL PROTECTED]
Subject: RE: [PHP] PDFlib 4.0.0 any experiences..


I just sent a post yesterday on how to get this to work. I does work well.
Here is the post I sent yesterday:


Try using the new pdflib-4.0.0  It works great.
Here is what you have to do:

Goto: http://www.pdflib.com/pdflib/download/index.html

and download the source for unix.

Unzip and untar.

cd to pdflib-4.0.0/bind/php/ext/pdf

copy * php-4.0.4pl1/ext/pdf --- You may want to remove the current contents
of this directory first...

cd pdflib-4.0.0
configure --enable-php
make - you will get an error indicating that a makefile was not found ...
just ignore it.
make install

Link the newly created libraries to the /usr/lib directory:
ln -s /usr/local/lib/libpdf* /usr/lib

Next just rebuild PHP as normal only add --with-pdflib.

Have fun...


Dean



-Original Message-
From: David Bouw [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 6:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PDFlib 4.0.0 any experiences..


Hi there,

Months ago I had a bad time getting PDFlib 3.0.0 to compile with PHP.. After
I succeeded I was so glad I promised myself to never touch it again.. :-)

Well, I now have a barcode font which I need to embed into a PDF document..
I did this a long time ago, but have forgotten what the exact settings were
that I used to accomplish this...

With some searching I suddenly saw that PDFlib 4.0.0 was available.. !! When
I looked at the documentation I got a tinteling feeling in my stomach..
Finally the package comes with all the Tif/Png etc libraries which you first
had to download seperately and try to compile with PDFlib.. Further this
package has also been adapted to PHP (they even talk about it in the
manual!!!) and it seems that you can also load the pdf as some kind of
library when starting the script via the 'dl' function.. ( which I don't yet
have any experience with..)

My question: Who has got some experience with this..? I grabbed a tarball of
php-4.0.4pl1 and pdflib4.0.0..
Compiled both and tried to load the library via de dl option.. PHP can't
seem to find this..

I am now busy to try and do it the old way and compile PHP with the PDFlib
option enabled..
(did copy the /ext/pdf directory from pdflib to my php!)
But if possible I would rather use the option in which the library is loaded
into PHP as an library.. Speed isues aren't important, I want an easy and
flexible way the change PDFlib versions without needing to recompile
anything..
I also read that this was possible with the GD library..

I will be glad if I can hear anyone with some experiences with this new
PDFlib.. I look forward getting this to work!

Thanks in advance..
With kind regards
David Bouw


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

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

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




[PHP] unserialize returns nothing.

2001-04-21 Thread Taylor, Stewart

I'm fetching a serialized array from a database but when I call
unserialize() the function returns false.
 
Any suggestions as to why unserialize is returning false?
 
Regards,
 
-Stewart
 

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




RE: [PHP] if... then... else with HTML

2001-04-23 Thread Taylor, Stewart


   HTML

   HTML


-Stewart

-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: 23 April 2001 13:41
To: [EMAIL PROTECTED]
Subject: [PHP] if... then... else with HTML


Hello !

I want to do something like

if (condition)
output this html-block
else
output that html-block


Without printig or echoing the html-block out (because the block has a
lot of  ", which I all would have to slash out...)

How can I do that ?

Martin




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

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




RE: [PHP] Newbie Question

2001-04-23 Thread Taylor, Stewart

You've got some typo's
if (my_type != "0"){  --> if ($my_type != "0") {

Plus you forgot to use the print function (or to turn off php ?>) to output
the Select HTML.

-Stewart

-Original Message-
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: 23 April 2001 16:15
To: [EMAIL PROTECTED]
Subject: [PHP] Newbie Question


I wanted to say thanks to all those that have helped me. This is really a
great language and I am doing things I never thought I'd be able to do!

Now to my question:

I am doing some form validation, where I check the values entered by the
user. If the value is correct, I format the results and print it out. If it
is not correct, I want to allow them to fix it. When I have a text field,
like first_name, I'm ok. But when I do an HTML list menu, I'm having
troubles.

Basically, this is what I want to do. If the value is correct, print the
value. If it is not correct, display the list box. Here's an example (but
you can see my else statement is wrong, and this is what I need help with):

  if (my_type != "0"){
switch($my_type){
case "one":
print "";
print " One";
break;
case "two":
print "";
print " Two";
break;
case "three":
print "";
print " Three";
break;
   }
  }
  else {
  
Select a Value
One
Two
Three
  
 }
 }



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

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




RE: [PHP] Links

2001-04-28 Thread Taylor, Stewart

How about something like.

'start_page.php'
Some HTML...
display screen 1
display screen 2
More HTML...

'index.php'





-Original Message-
From: Ben Quinn [mailto:[EMAIL PROTECTED]]
Sent: 28 April 2001 11:57
To: [EMAIL PROTECTED]
Subject: [PHP] Links


Hi all,

I've been trying for many hours to find information on this, but not having
much luck.  What i want to do is have an index.php page, and then each link
on that page has a URL like index.php?linkidie.  index.php?links  etc

Can anyone point me in the right direction?




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

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




RE: [PHP] sorting filenames using opendir and readdir

2001-04-28 Thread Taylor, Stewart

Read them into an array then sort the array.


while more files
{
  get file name
  $arrFilenames[] = $filename;
  $arrFilenames = array_sort($arrFilenames);
}

The above sorts the array each time a file is read as you requested, 
however its more efficient to read them all in then sort

while more files
{
   get file name
   $arrFilenames[] = $filename;
}

$arrFilenames = array_sort($arrFilenames);

-Stewart;
 

-Original Message-
From: Johannes Rumpf [mailto:[EMAIL PROTECTED]]
Sent: 28 April 2001 13:43
To: [EMAIL PROTECTED]
Subject: [PHP] sorting filenames using opendir and readdir


Hi!
I wanted to get a txt files in a dircetory, I wrote the script using 
opendir and readdir functions. But now I would like to sort the files 
while I read them in. how could I solve this problem?
Greetings,
  Johannes Rumpf


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

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




RE: [PHP] Sessions

2001-04-29 Thread Taylor, Stewart

The SID will only be added automatically if -enable-trans-sid is set and
your browser has cookies switched off.  When cookies are on the session id
is propagated using a cookie.  So likewise the  constant will only
be expanded when cookies are switched off.

Anyway, yes you will have to add  to all your URL's if you want
people to be able to access it with cookies disabled.  Plus you will need to
add a hidden field on all your forms i.e. 
 so
that the session_id is propagated when ther form is submitted.

When you changed you session_name did you remember to call session_start
again.

session_name("TESTSESSID");// session i want to use
session_start();   // start specified session.

-Stewart


-Original Message-
From: Jennifer [mailto:[EMAIL PROTECTED]]
Sent: 29 April 2001 09:51
To: [EMAIL PROTECTED]
Subject: [PHP] Sessions


I have been doing a few test pages trying to figure out how
sessions work.

The SID is not being automatically added to my urls so I assume
that means that php was not compiled with -enable-trans-sid  (I'm
on a virtual server so I can't access php.ini)

So that means that I need to add  to all my urls,
correct?

Can I change the value of session_name() and still have the above
work for the new session name?

I tried it and the session_name was changed to the new value, but
then SID seemed to be empty after that.  Is there something I am
missing or is that the way it is supposed to work?

Jennifer

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

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




RE: [PHP] getting sessions lifetime

2001-04-29 Thread Taylor, Stewart

You can get the lifetime of a session cookie by calling the
get_cookie_params function
http://www.php.net/manual/en/function.session-get-cookie-params.php.

How do you propose to hit a hidden frame just before the session times out?

A better solution would be to increase the session cookie timeout value so
that long enough for your purposes.

I think you can do this by creating a new cookie variable with the lifetime
that you require.  Then set the cookie value with the current session_id.
And finally start your sessions with the following code.  
session_id($yourcookie);
session_start();

-Stewart

-Original Message-
From: Jens Kisters [mailto:[EMAIL PROTECTED]]
Sent: 29 April 2001 13:06
To: [EMAIL PROTECTED]
Subject: [PHP] getting sessions lifetime


Hi there!

Is there a way to determine the session timeout of the currents servers
PHP configuration, e.g. by reading values from the php.ini?

i want to manage the timeout of the session myself, no matter what the
server is set to, i want to try to hit a session page in a hidden frame
just before the session would time out so that there won't be a session
timeout.

--
Grüße aus dem schönen Kleve
Jens Kisters

rosomm et partner
Agentur für neue Medien GmbH
Dienstleistungszentrum am
Weißen Tor - Eingang B
Gocher Landstrasse 2
47551 Kleve / Bedburg-Hau

Telefon: 02821 - 97856-20
Telefax: 02821 - 97856-77
[EMAIL PROTECTED]
http://www.rosomm-partner.de



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

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




RE: [PHP] getting sessions lifetime

2001-04-29 Thread Taylor, Stewart

Yes your right that would not work with cookies turned off.

You might instead get the session timeout details from the php.ini file by
using the
http://www.php.net/manual/en/function.get-cfg-var.php  function.  
And base you timeout settings on these values.

-Stewart

-Original Message-
From: Jens Kisters [mailto:[EMAIL PROTECTED]]
Sent: 29 April 2001 14:27
To: Taylor, Stewart
Subject: Re: [PHP] getting sessions lifetime


> How do you propose to hit a hidden frame just before the session times
out?

javascript window.setTimeout

> A better solution would be to increase the session cookie timeout value so
> that long enough for your purposes.

But what if the user has cookies disabled?
--
Grüße aus dem schönen Kleve
Jens Kisters

rosomm et partner
Agentur für neue Medien GmbH
Dienstleistungszentrum am
Weißen Tor - Eingang B
Gocher Landstrasse 2
47551 Kleve / Bedburg-Hau

Telefon: 02821 - 97856-20
Telefax: 02821 - 97856-77
[EMAIL PROTECTED]
http://www.rosomm-partner.de


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




RE: [PHP] Choosing a random value out of two

2001-05-04 Thread Taylor, Stewart

srand((double) microtime() * 100);
$which = rand(0,1);
$variable = ($which)? $value1 : $ value2;

-Stewart

-Original Message-
From: Sebastian Sprenger [mailto:[EMAIL PROTECTED]]
Sent: 04 May 2001 10:21
To: [EMAIL PROTECTED]
Subject: [PHP] Choosing a random value out of two


hi. i want to randomly assign either "value1" or "value2" to a $variable.
how can that be done?
thanks,
Sebastian



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

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




RE: [PHP] Variables in variable names

2001-05-09 Thread Taylor, Stewart

Maybe an array would be more appropriate.
e.g.

$name[$i] = 
.
.




-Stewart
-Original Message-
From: seriousj [mailto:[EMAIL PROTECTED]]
Sent: 09 May 2001 12:09
To: [EMAIL PROTECTED]
Subject: [PHP] Variables in variable names


Hello,

 I need some help (newbie).

I have some variable names with the form:
$name_1
$name_2
$name_3
$name_4...

I want to access them by doing something like this:
$i=0
$name_$i

This doesn't work, how do I include another variable in the name of a
variable?.

Cheers
John





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

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




RE: [PHP] Variables in variable names

2001-05-09 Thread Taylor, Stewart

Yes!

Add '[]' to the end of the name.
This will inform php that all fields with that name should be put into an
array after submission.

e.g.



...


After submit php will have created an array called $name with 3 entries.


-Stewart


-Original Message-
From: seriousj [mailto:[EMAIL PROTECTED]]
Sent: 09 May 2001 12:20
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Variables in variable names


The info is stored in the variables intitally by information entered by a
user on a webpage, can you have the browser store the info in an array and
have it passed by a form "post"  command?

""Taylor, Stewart"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Maybe an array would be more appropriate.
> e.g.
>
> $name[$i] =
> .
> .
>
>
>
>
> -Stewart
> -Original Message-
> From: seriousj [mailto:[EMAIL PROTECTED]]
> Sent: 09 May 2001 12:09
> To: [EMAIL PROTECTED]
> Subject: [PHP] Variables in variable names
>
>
> Hello,
>
>  I need some help (newbie).
>
> I have some variable names with the form:
> $name_1
> $name_2
> $name_3
> $name_4...
>
> I want to access them by doing something like this:
> $i=0
> $name_$i
>
> This doesn't work, how do I include another variable in the name of a
> variable?.
>
> Cheers
> John
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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

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




RE: [PHP] Search a string between

2001-05-09 Thread Taylor, Stewart

Try using the perl regular expressions and setting the quantifier to
ungreedy

e.g. This should work.

$pat = "/(.*)<\/url>/U";
$rep = "\\1";
$string = preg_replace($pat, $rep, $string);


-Stewart


-Original Message-
From: Luiz Vitor [mailto:[EMAIL PROTECTED]]
Sent: 09 May 2001 15:14
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Search a string between 


It's still not working.
I'm using the pattern ([^]*) and I'm getting the first match correct,
but it's not getting all the other matches.


Thanks,
Luiz Vitor

 - Original Message -
> From: "Toby Dacre" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 09, 2001 9:06 AM
> Subject: Re: [PHP] Search a string between 
>
>
 > .* in your patten will match everything  It's greedy like perl (unless
you
> compiled php not to be)
>
> add a ? and it will make it none greedy
>
> ^[]*   will not work  ^ needs to be in [] to mean not else it means
> start of string
>
>
> > ""Luiz Vitor"" <[EMAIL PROTECTED]> wrote in message
> > 011201c0d87d$57f8ab00$[EMAIL PROTECTED]">news:011201c0d87d$57f8ab00$[EMAIL PROTECTED]...
> > Hi...
> >
> > I have a text and, some words of the text have the tags 
> between
> > them.
> > What i'm trying to do is to replace the word between that tags for a
url,
> > wich I'll search them in a database and convert to a url.
> >
> > It's working fine when I have only one , but when there are
> more
> > than one, the script converts all the text between the first 
> and
> > the last .
> >
> > I'm using this code:
> >
> > if (eregi("(.*)", $string, $result)) {
> >$string = str_replace($result[1], ' > href="'.$result[1].'">'.$result[1].'', $string);
> > }
> >
> >
> > Someone knows what I have to do to put it to work???
> >
> >
> > Thanks in advance.
> >
> > Luiz Vitor
> > Brazil
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>


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

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




RE: [PHP] progession bar

2001-05-09 Thread Taylor, Stewart

You might use the following method, which will work under Internet Explorer.



.. etc





  " " " TD2
etc
TD6






var which=1;

function progress_bar()
{
   eval("TD"+which+".className='DONE'");
   which++;
   if (which>6) clearTimeout();
}


window.setTimeout('progress_bar()',1);

...etc



-Original Message-
From: Reuben D Budiardja [mailto:[EMAIL PROTECTED]]
Sent: 09 May 2001 16:24
To: Jacky; [EMAIL PROTECTED]
Subject: Re: [PHP] progession bar


I remember that a somewhat similar issues was discussed here sometime ago. 
Check the list archives ( I think the subject was "Progress Bar").

Hope that will give you some ideas also.

Reuben D. B

At 12:32 PM 5/9/01 -0500, Jacky wrote:
>Hi all
>Does any one know how to do the progession bar to mesure the time out? 
>Like give it 1 minute for the bar to progress, I got some logic here but 
>something still unclear to me.
>The procedures I see are
>1. get curren time when the page is loaded
>2. add 60 seconds on that current time value to tell when to stop the bar
>3. make a table , 6 rows so each row repersent every 10 seconds
>4. This is the bit where I got stuck, how do I change the color of table 
>cell every 10 secs for 6 times.
>any help will be thankful
>Jack
>[EMAIL PROTECTED]
>"There is nothing more rewarding than reaching the goal you set for
yourself"


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

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




RE: [PHP] SESSIONS: What does this error mean

2001-05-10 Thread Taylor, Stewart

This error occurrs when you start a session that recreates an object
variable but does not know the class definition for it.
You need to make sure you include the class source before you start the
session.

-Stewart

-Original Message-
From: Davor Pleskina [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 08:18
To: [EMAIL PROTECTED]
Subject: [PHP] SESSIONS: What does this error mean


Fatal error: The script tried to execute a method or access a property of an
incomplete object. Please ensure that the class definition cl_korisnik_data
of the object you are trying to operate on was loaded _before_ the session
was started in user_info.php on line 72

I declared class like following in the first script file:

   class cl_korisnik_data {
var $kname, $ime, $kid, $prezime, $jmbg, $klevel;
};

session_register("korisnik_data");
$korisnik_data = new cl_korisnik_data;
// Then loaded some data into $korisnik_data, all passed OK

In called script user_info.php i wrote code:

ime);
?>

... and got upper error. Now, what is wrong?

Just to make better question,

do classes also need to be registered within a session?
If so, how?

TIA,
Davor



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

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




RE: [PHP] Defining the Return-Path in an email header?

2001-05-10 Thread Taylor, Stewart

Maybe try using "Reply-To" instead of "Return-Path"

-Stewart
-Original Message-
From: Kevin Price-Ward [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 11:18
To: [EMAIL PROTECTED]
Subject: [PHP] Defining the Return-Path in an email header?


Hi,

I am setting up a php emailer facility using the 'mail' function, I have
defined the 'Return-Path:' in the fourth argument of 'mail', but this keeps
getting overwritten by sendmail:

my code says: 
$headers .= "Return-Path: <[EMAIL PROTECTED]>\n";

but the source on the resulting email says:
Return-Path: <[EMAIL PROTECTED]>

(Where vweb9.hiway.co.uk is our ISP's server)


the problem with this is that emails that might have delivery problems,
don't get returned to me and I will never know that they haven't been
delivered.

Any ideas?

Thanks
the_lar


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

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




RE: [PHP] split string

2001-05-11 Thread Taylor, Stewart

$test = "1,2,3";
$arrTest = explode(",",$test);
foreach($arrTest as $k=>$v)
{
   $vname = "test".(!$k?"":$k);

   // global for use later
   global $$vname;

   $GLOBALS[$vname] = $v;
}

// now global $test, $test1, $test2 exist etc


-Original Message-
From: Jacky [mailto:[EMAIL PROTECTED]]
Sent: 11 May 2001 16:24
To: [EMAIL PROTECTED]
Subject: [PHP] split string


I got series of string value like this 1,2,3. And the seires are dynamaic,
which means it is not always 1,2,3 but could be more, but always in this
format that is separated by "," .
How do I pick each of value in the series and assign it into new vairiable,
like from:
$test = 1,2,3;
and assign to be
$test =1;
$test1=2;
$test2 =3;
Is theer any function that could help me with that? because I need to update
table using those value but I cannot use series of value to update, have to
break them down to each variable like that.
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"

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




RE: [PHP] include("../file.inc");

2001-05-11 Thread Taylor, Stewart

Either of the first two should work under linux.

I have done similar many times myself
e.g.
require_once "../common/localvars.php";


-Stewart

-Original Message-
From: Matthew Ralston [mailto:[EMAIL PROTECTED]]
Sent: 11 May 2001 11:40
To: [EMAIL PROTECTED]
Subject: [PHP] include("../file.inc");


How do you include or require a file that is above the current script in the
directory hierarchy? For example how would I include or require a file whose
path is "../file.inc" relative to the current script? I tried all of:

include("../file.inc");
require("../file.inc");
include("/file.inc");
require("/file.inc");
include("..\file.inc");
require("..\file.inc");
include("\file.inc");
require("\file.inc");

but it doen't like any of them. :(
I don't want to use a full path relative to the root of the drive or
webserver folder because the included file and the script may move as the
development server is setup differently to the real web server.

Any ideas?

--
Thanks,

Matt
[EMAIL PROTECTED]
< www.mralston.co.uk />




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

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




RE: [PHP] Remove duplicates, as long as you have it.

2001-04-22 Thread Taylor, Stewart

Have you tried the array_unique function
http://www.php.net/manual/en/function.array-unique.php


-Stewart

-Original Message-
From: Richard [mailto:[EMAIL PROTECTED]]
Sent: 22 April 2001 12:36
To: [EMAIL PROTECTED]
Subject: [PHP] Remove duplicates, as long as you have it.


Greetings.

I have this link file which has been active for quite a while, but the
problem is that when I used a "admin" program to manage the links
(admin.php) it kinda wrote the file multiple times, which means that it has
sorted the file and added multiple instances of the lines.

How I managed to create it? Well, by using the free linkadd/linkmanager
PHP script. Anyhow, what I need is how can I remove duplicates that are
sorted in arrays? Or does anyone of you has such a script or C++ program, so
you could sort the file for me or something?

Thanks
- Richard



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

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




RE: [PHP] still not friends with RegExps..

2001-05-15 Thread Taylor, Stewart

preg_replace does not seem to agree with '\\'.
Below seems to work with ereg_replace.



-Stewart
~

-Original Message-
From: elias [mailto:[EMAIL PROTECTED]]
Sent: 15 May 2001 23:37
To: [EMAIL PROTECTED]
Subject: [PHP] still not friends with RegExps..


Hello,

Maybe RegExps are still my point of weakness...but I still like them as much
as I like the Self-Reference phrases...

Okay now, how can i replace all the matches of "\" , "*", "+", "-" and ";"
with an empty string by calling once the preg_replace() or str_replace() or
any string replace function? ("")

Do i have to call it as many times as i got different replacments?

-elias




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

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




RE: [PHP] detecting HTML tags

2001-05-15 Thread Taylor, Stewart

You could try something like

if (strlen($string) != strlen(strip_tags($string))
{
  // maybe some html in string
}

-Stewart

-Original Message-
From: bill [mailto:[EMAIL PROTECTED]]
Sent: 15 May 2001 15:40
To: [EMAIL PROTECTED]
Subject: [PHP] detecting HTML tags


Is there a way to detect the presence of HTML tags?

I don't want them stripped out, I just want to know if a string contains
them.

I'm rolling my own mailing program and want it to detect the HTML if
present and send it appropriately.

kind regards,

bill hollett


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

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




RE: [PHP] group comparision

2001-05-17 Thread Taylor, Stewart

How about

if (($add + $remove + $view) > 1)
{
   //error
}

-Stewart


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 17 May 2001 09:45
To: php-gen
Subject: [PHP] group comparision


i have a php script that has three variables that could be set to "1"
depending on the values of a form being sent to the .php file.

$add
$remove
$view

i need to do some error control in my script to make certain that one and
only one of these is set to "1". i am coming up with a very long
control structure:

  if (($add="1") && ($remove="1") || ($add="1") && ($view="1") || etc...))

is there a shorter method to do this? and can i break this up onto
multiple lines to make my code a bit cleaner? can i do something like:

if (
   ($add="1") && ($remove="1") ||
   ($add="1") && ($view="1") ||
   ($remove="1") && ($view="1")
   ) {


Thanks! -Charles


-- 
**
There are two major products to come out of Berkeley:
LSD and UNIX.  We don't believe this to be a coincidence.
**


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

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




RE: [PHP] UGH

2001-05-17 Thread Taylor, Stewart

SCHOOL'S OUT FOR SUMMER!!!
*guitar ballad*";
} else {
 echo "Only $math days until
school's out!!! w00p w00p!";
}
?>

-Original Message-
From: chris herring [mailto:[EMAIL PROTECTED]]
Sent: 17 May 2001 09:56
To: [EMAIL PROTECTED]
Subject: [PHP] UGH


This is really bugging me. I don't see any reason why it shouldn't work, yet
it doesn't.

SCHOOL'S OUT FOR SUMMER!!!
*guitar ballad*";
} else {
 echo "Only $math days until
school's out!!! w00p w00p!";
}
?>

any help is appreciated

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




RE: [PHP] Making a string from an Array

2001-10-25 Thread Taylor, Stewart

 $ignored = "";
 $include = "";


 {
  $ignored.= $words[$i];
 }
 else 
 {
  $included.= $words[$i];

-Stewart
-Original Message-
From: Sam [mailto:[EMAIL PROTECTED]]
Sent: 25 October 2001 16:18
To: 'php'
Subject: [PHP] Making a string from an Array


Hi all, 
this may be an easy question, but I'm stuck...

how can this,

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

for ( $i = 0; $i < count( $words ); $i++ )
{
 if ($words[$i]=="on" OR $words[$i]=="the" OR $words[$i]=="in"
OR$words[$i]=="at" OR $words[$i]=="is" OR $words[$i]=="it")
 {
  $ignored[] = $words[$i];
 }
 else 
 {
  $included[] = $words[$i];
 }   
} 

How can I make $included and $ignored a string instead of an array. 

Thanks
Sam Rose

p.s. Also I'm only on the digest, so if you could reply directly to me as
well, that would be a bonus.

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




RE: [PHP] Databases?

2001-10-25 Thread Taylor, Stewart

http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html

-Stewart

-Original Message-
From: Kyle Smith [mailto:[EMAIL PROTECTED]]
Sent: 26 October 2001 00:49
To: [EMAIL PROTECTED]
Subject: [PHP] Databases?


Can someone please give me the simplest tutorial to databases they can find?

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




RE: [PHP] Real Problem: Accessing Array In A Class

2001-04-09 Thread Taylor, Stewart

Try,
 
print "blah blah blah {$this->arrayname['value']} blah";

-Stewart

-Original Message-
From: DELAP, SCOTT F (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: 09 April 2001 15:28
To: [EMAIL PROTECTED]
Subject: [PHP] Real Problem: Accessing Array In A Class


I've been trying to figure this out for a day or so now.  Someone needs to
do a concise tutorial with arrays, references, etc. with PHP.  I've got a
class that has a member variable that is an array.  When I try to access it
in a function like this:

print "blah blah blah $this->arrayname['value'] blah";

$this->arrayname evaluates to an array object and ['value'] comes out as a
string.  If I assign it to a variable first like so:

$arraytemp = $this->arrayname; 
print "blah blah blah $arraytemp['value'] blah";

it works fine.  However, I know there should be a way to reference it
directly.  Any suggestions on what I have do to as far as brackets, etc. to
force php to evaluate it they way I want?


Scott Delap
SBC Services, Inc.
[EMAIL PROTECTED]
314-235-6216


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

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




RE: [PHP] what does this error means?

2001-04-10 Thread Taylor, Stewart

You are trying to add a record whose primary key/unique index already exists
in the database.

-Stewart

-Original Message-
From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
Sent: 10 April 2001 23:25
To: [EMAIL PROTECTED]
Subject: [PHP] what does this error means?


When Itried to insert a record into a table, It looks like the record was
never inserted into table so I use mysql_error() and the error message show
up:
"Duplicate entry '10' for key 1"
What does that tell me?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"


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

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




RE: [PHP] HELP with (Fatal Error: Call to a member function on a non-object)

2001-04-12 Thread Taylor, Stewart

This error suggests the $tpl is undefined i.e. you forget to create it using
new.

-Stewart

-Original Message-
From: g0thic [mailto:[EMAIL PROTECTED]]
Sent: 12 April 2001 01:17
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP] HELP with (Fatal Error: Call to a member function on a
non-object)


Hi guys,

Below is the error message that I am receiving, and 3 or 4 lines around
the code that seems to be causing the issue.  Lines are numbered so it gives
you a good idea of line 183.  What I need to know, is in my context, what is
the error saying, and if there is a variable (or function or class) to
define, how can I tell which one it is?

Fatal error: Call to a member function on a non-object in
/home/httpd/www/g0thic/cawood_a4/edit_f.php on line 183

178-  if($seditFileErr == "")
179-  {
180-// Load primary key and form parameters
181-$fldf_id = get_param("f_id");
182-$fldu_id = get_param("u_id");
183-$tpl->set_var("Trn_u_id", get_param("u_id"));
184-$pf_id = get_param("f_id");
185-$tpl->set_var("editFileError", "");
186-  }

Get_param is a function to get the variable "u_id" that would have been sent
back with the page url (e.g.: page.php?u_id=3993)

Any ideas?

Cheers,

Sean


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

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




RE: [PHP] Error Handling class

2001-04-12 Thread Taylor, Stewart

the PEAR library has an error class

-Stewart.

-Original Message-
From: Boget, Chris [mailto:[EMAIL PROTECTED]]
Sent: 12 April 2001 16:19
To: Php (E-mail)
Subject: [PHP] Error Handling class


I've looked around but haven't really found one...
Does anyone know where I can find a class (or a
set of functions) that handles errors gracefully?
I'm about to write something to do this but would
rather not reinvent the wheel.

thnx,
Chris

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




[PHP] Oracle Database keeps disconnecting - or something

2001-06-22 Thread Taylor, Stewart

Hello,
 
Just in case anyones got any ideas.
 
I've been testing an application for a few weeks on a test server without
any problems.
After releasing it onto the live server, which is - according to the
administrator - setup exactly the same as the test server I've been running
into problems.
 
Apparently the database seems to be disconnecting randomly see log file
extract below.
 
I already had a application on the live server which has been working
perfectly for a year or so.  Now the new application is live it is having
the same problem as well.
 
The test version of the already live application is also on the same test
server and both databases on live and test are setup exactly the same way.
 
 
My administrator tells me that we have a license for unlimited connections
to the database etc..
 
My setup us
OCI8 Revision 1.96
Oracle Version 8.1
Apache Apache/1.3.11
Redhat Linux 6.2
php 4.0.2
I'm also using phplib 7.2c to manage authentication/sessions and database
access.
 
 
I would be very grateful if anyone has got any suggestions
 
 
Regards,
 
-Stewart
 
 
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
logged on
 in Unknown on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
logged on
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
logged on
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
logged on
 in /usr/local/apache/phplib/session.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
logged on
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
 
 

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




[PHP] Oracle Database keeps disconnecting - or something

2001-06-22 Thread Taylor, Stewart

Hello,
 
Just in case anyones got any ideas.
 
I've been testing an application for a few weeks on a test server without
any problems.
After releasing it onto the live server, which is - according to the
administrator - setup exactly the same as the test server I've been running
into problems.
 
Apparently the database seems to be disconnecting randomly see log file
extract below.
 
I already had a application on the live server which has been working
perfectly for a year or so.  Now the new application is live it is having
the same problem as well.
 
The test version of the already live application is also on the same test
server and both databases on live and test are setup exactly the same way.
 
 
My administrator tells me that we have a license for unlimited connections
to the database etc..
 
My setup us
OCI8 Revision 1.96
Oracle Version 8.1
Apache Apache/1.3.11
Redhat Linux 6.2
php 4.0.2
I'm also using phplib 7.2c to manage authentication/sessions and database
access.
 addition I have modified the phplib db class so that it does not use
peristant connections.
 
I would be very grateful if anyone has got any suggestions
 
 
Regards,
 
-Stewart
 
 
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
logged on
 in Unknown on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
logged on
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
logged on
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
logged on
 in /usr/local/apache/phplib/session.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
logged on
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-24324:
service handle not initialized
 in /usr/local/apache/phplib/auth.inc on line 0
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
 
 

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




RE: [PHP] Oracle Database keeps disconnecting - or something

2001-06-26 Thread Taylor, Stewart

Thies,

Thanks for your reply.

So far I've been unable to further investigate my problem and send to you a
toy script to demonstrate it.  For since Monday both applications have been
working fine. Yipee!
They began working again after the server was rebooted - which the
Administrator claimed he had already done one evening, but he had actually
just restarted apache, this I had to point out to him in the log files.  

However, when the new application was rolled out, initially it worked for a
couple of days before the errors showed their ugly faces, so I my not have
seen the last of them yet.  And obviously I'd like to find out exactly what
caused the errors in the first place - it was a little embarrassing
releasing a new high profile company wide application that I had nutured
since it's birth, only for it to stab me in the back after a couple of days
in use.

However I have noticed in the test servers log the message
PHP Warning:  failed to rollback outstanding transactions!: also but without
noticeably causing any ill effects (unlike for the live apps which caused
people to loose their session information and be logged out etc). I've asked
my Administrator to apply the your suggested fix below to the test server to
see what happens and I'll let you know the results after he gets round to
doing it.


Best regards,


-Stewart

-Original Message-
From: Thies C. Arntzen [mailto:[EMAIL PROTECTED]]
Sent: 22 June 2001 19:11
To: Taylor, Stewart; Zeev Suraski
Cc: [EMAIL PROTECTED]; '[EMAIL PROTECTED]'
Subject: Re: [PHP] Oracle Database keeps disconnecting - or something


On Fri, Jun 22, 2001 at 02:23:14PM +0100, Taylor, Stewart wrote:
> Hello,
>  
> Just in case anyones got any ideas.
>  
> I've been testing an application for a few weeks on a test server without
> any problems.
> After releasing it onto the live server, which is - according to the
> administrator - setup exactly the same as the test server I've been
running
> into problems.
>  
> Apparently the database seems to be disconnecting randomly see log file
> extract below.
>  
> I already had a application on the live server which has been working
> perfectly for a year or so.  Now the new application is live it is having
> the same problem as well.
>  
> The test version of the already live application is also on the same test
> server and both databases on live and test are setup exactly the same way.
>  
>  
> My administrator tells me that we have a license for unlimited connections
> to the database etc..
>  
> My setup us
> OCI8 Revision 1.96
> Oracle Version 8.1
> Apache Apache/1.3.11
> Redhat Linux 6.2
> php 4.0.2
> I'm also using phplib 7.2c to manage authentication/sessions and database
> access.

i've found somebody in hamburg (which is where i live) who
could show me the problem. his setup is rather complex - so
if you could send me a _short_ testcase (_without_ phplib)
that reproduces you problem i would be very happy to work on
it!

are you using oracle-MTS by any chance?


BTW: could you please comment out the call to
php_config_ini_shutdown() in main/main.c and see if it makes
any difference for you?

(zeev: the call to php_config_ini_shutdown is too early, if a
module calls php_error in the MSHUTDOWN
core_globals->error_log is already freed - i think we need to
fix this!)

regards,
tc

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

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




RE: [PHP] passing variables from - to frames

2001-06-27 Thread Taylor, Stewart

The correct javascript syntax is.

parent.frames[1].document.formb.varb.value =
parent.frames[0].document.forma.vara.value;

-Stewart

-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]]
Sent: 26 June 2001 16:18
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] passing variables from - to frames


> Hello, sorry this question here (it is not true PHP question), but I use
> some variables into PHP scripts and need
> pass these variables from one frame to another.
>
> I want pass variable values between frames, these definded via input
> hidden tags into form definition.
> I have first frame name=framea containing form name=forma
> then second frame name=frameb form name=formb
> I have forma input type=hidden name=vara value=valuea and want to pass
> this value to formb type=hidden name=varb
>
> I wrote little javascript into framea something like
> frameb.formb.varb.value = framea.forma.vara.value  but only got
> 'javascript error'. Java doesnt reckognizes frameb.formb.varb names at
> all. I tried also by creating  into frameb header
> but this also didnt work.
> Is there some other solution?


If you're using Apache, you can use $QUERY_STRING



destiney - (des-ti-ny) - n. 1. deity of all things "html", 2. common
internet addict, 3. lover of late 80's heavy metal music, 4. Activist
for the terminally un-elite; see also - cool guy, des, mr. php...

It's 4:00am, your web site is still up, why are you?
http://phplinks.org/ http://destiney.com/





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

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




[PHP] Oracle 8i + non perstistant database connections remaining open.

2001-07-10 Thread Taylor, Stewart

Hello,
 
 
I'm using
OCI8 Revision 1.96
Oracle Version 8.1
Apache Apache/1.3.11
Redhat Linux 6.2
php 4.0.2
 
I am connecting to my database using a non-persistant connection (ocilogin).
My applications run with no problems during the day.However, at the end
of the day there is about 20 database connections still open.  This has
caused a problem because when the database is shutdown to backup (overnight)
and then restarted apache still retains the 20 connections.   This means
that when users begin using the applications again in the morning apache
starts reusing the old connections plus creating some new ones and causes
users to be intermittently logged out/refused access/random query failures
etc..  The error messages logged when this happens are below:
PHP Warning:  failed to rollback outstanding transactions!: ORA-01012: not
logged on
PHP Warning:  failed to rollback outstanding transactions!:
ORA-24324:service handle not initialized
 
A quick fix to this problem is to shutdown apache when the backup is run so
all the connections are dropped/
 
Hovever, should these connections be remaining open in the first place?  Has
anyone got any ideas?
 
 
-Stewart.
 
 
 

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




RE: [PHP] NT Authentication

2001-07-19 Thread Taylor, Stewart

You can install an apache module which does this.
Then all you do is edit apache's httpd.conf file to say which directories
you want to be authenticated and information about your NT domain and backup
servers etc...
e.g.


Authname"Company Intranet Server"
AuthTypeBasic
Auth_SMBon
Auth_SMB_Authoritative  on
Auth_SMB_Server SERVER1
Auth_SMB_Backup SERVER2
Auth_SMB_Domain DOMAIN1
#had to modify code for multiple domain access
#Auth_SMB_Server1SERVER1a
#Auth_SMB_Backup1SERVER2a
#Auth_SMB_Domain1DOMAIN2
#Auth_SMB_Server2SERVER1b
#Auth_SMB_Backup2SERVER2b
#Auth_SMB_Domain2DOMAIN3
require valid-user


When a user tries to access an authenticated directory via their browser a
login prompt will be displayed, they will not be able to progress until they
have entered their correct NT username/password.  Once they do apache then
passes their NT username on to your app in the $REMOTE_USER global variable.



The module is located at:
http://guru.josefine.at/~mfischer/mod_auth_smb/



-Stewart



-Original Message-
From: Warren Vail [mailto:[EMAIL PROTECTED]]
Sent: 18 July 2001 15:23
To: [EMAIL PROTECTED]
Subject: [PHP] NT Authentication


I am running php4/mysql/apache in a large NT complex, behind a firewall.
How can I authenticate users to my site using NT authentication?  Has anyone
done this?

thanks,

Warren Vail


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

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




RE: [PHP] Prevent user to close web browser

2001-07-19 Thread Taylor, Stewart

Then you should be using the ignore_user_abort function which keeps a script
running even if a user shuts own their browser.

http://www.php.net/manual/en/function.ignore-user-abort.php


-Stewart

-Original Message-
From: Mihailo Dzigurski [mailto:[EMAIL PROTECTED]]
Sent: 19 July 2001 13:47
To: kath; Mihailo Dzigurski
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Prevent user to close web browser


I need it for my intranet web site, some of my users close browser on long
lasting script and I need to prevent this.

Thanks,
Mihailo.

-Original Message-
From: kath [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 2:39 PM
To: Mihailo Dzigurski
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Prevent user to close web browser


Not with PHP.  Maybe some Javascript could.

But why would you want this?  Planning some infinite spawning pop up
website?
=)

- k

On Thursday 19 July 2001 08:28 am, you wrote:
> Hello,
>
> I need to prevent user to close the web browser on close button or by
> pressing ALT+F4.
>
> Is this possible?
>
> Thanks,
> Mihailo.
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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




RE: [PHP] array question

2001-07-19 Thread Taylor, Stewart

Try using mysql_fetch_array instead of mysql_fetch_object.

You then then use a simple loop to assign your variables
e.g.

foreach($row as $k=>$v)
{
   $GLOBALS[$k] = $v; // or $GLOBALS[$k][$i++] = $v if multiple records
being read
}

This will result in a set of global variables matching your database fields
names.

-Stewart

-Original Message-
From: James W Greene [mailto:[EMAIL PROTECTED]]
Sent: 19 July 2001 18:37
To: php-general
Subject: [PHP] array question


Hi All,
I am trying to pull info out of a table and assign a var name to each
field...  I seem to be having trouble.  I have tried to do $var = $row[0]
but that does not seem to do it.  I have included what is working below.  I
would like to have each element of the array stored in a seperate variable
for use on a  web page. Thanks
JG

UserName) ;
// **Would like to do something like**//
// $user = $row[0]; //

}
mysql_free_result($result);
?>


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

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




RE: [PHP] Prevent user to close web browser

2001-07-20 Thread Taylor, Stewart

That should not be a problem because if a user shuts down their web browser
this means they no longer want to see the report.


-Stewart
-Original Message-
From: Mihailo Dzigurski [mailto:[EMAIL PROTECTED]]
Sent: 19 July 2001 23:06
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Prevent user to close web browser


Partly can help, but user cannot see report output in web browser.

Mihailo.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 20, 2001 12:05 AM
To: Mihailo Dzigurski
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Prevent user to close web browser


Is this something that "ignore_user_abort" could help with?

On Thu, 19 Jul 2001, Mihailo Dzigurski wrote:

> I need it for my intranet web site, some of my users close browser on long
> lasting script and I need to prevent this.
>
> Thanks,
> Mihailo.
>
> -Original Message-
> From: kath [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 19, 2001 2:39 PM
> To: Mihailo Dzigurski
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Prevent user to close web browser
>
>
> Not with PHP.  Maybe some Javascript could.
>
> But why would you want this?  Planning some infinite spawning pop up
> website?
> =)
>
> - k
>
> On Thursday 19 July 2001 08:28 am, you wrote:
> > Hello,
> >
> > I need to prevent user to close the web browser on close button or by
> > pressing ALT+F4.
> >
> > Is this possible?
> >
> > Thanks,
> > Mihailo.
> >
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>

--
July 19, 2001: Thursday is a choice.
 Freedom lives best by ending in decision.
  --http://artwells.com/oracula/


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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




RE: [PHP] fopen - warnings

2001-07-26 Thread Taylor, Stewart

Assuming that your code works fine apart from the warning message you can
use @ so suppress any warning messages
e.g. @fopen(

-Stewart

-Original Message-
From: Vanessa [mailto:[EMAIL PROTECTED]]
Sent: 26 July 2001 17:06
To: [EMAIL PROTECTED]
Subject: [PHP] fopen - warnings


Hello List,

this is probably a very stupid question, but I dont know how to solve this
little problem:
I have a script with which text files (exported access db data sheets) can
be uploaded to the mysql tables.
It all works fine, but very annoyingly I get warning messages, if the text
file is not resident on the server. But I want it in a way that it doesnt
have
to be on the server...a catch. The php manual says that if the file
cannot be opened fopen returns false. All nice and good working, but I get
those additional warning messages. Im not sure if it has maybe something
to do with the server, but I am not convinced. Ill put the code below.
Any suggestions are highly appreciated (I tried die command but it somehow
messed up the routine).

[schnipp]

$file = array ("colours.txt", "categories.txt", "stockmain.txt", 
"stockcolours.txt");
$i = 0;
while ($file[$i])
{
//öffne das textfile
 $datei = "";

 if ($datei = fopen($file[$i], "r+"))
 {
 $zaehler = 0;
//check wieviele zeilen das textfile hat
//um zu verhindern, dass es leer ist!
 while (!feof ($datei)) //liest jede zeile einzeln mit
fget()
 {
 $buffer = fgets($datei, 1000);
 //echo $buffer;
 //echo "";
 $zaehler++;
 } //end while (!feof ($datei))

 // MORE CODE AFTER THIS
 // .

 }
 else
 {
?>
 
 The file  could not be 
opened: no Mysql insert.
 
http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: HTTP header question.

2001-07-30 Thread Taylor, Stewart

The easiest solution is to create the failure variable as a session
variable.

-Stewart

-Original Message-
From: Matt Rogers [mailto:[EMAIL PROTECTED]]
Sent: 30 July 2001 04:00
To: [EMAIL PROTECTED]
Subject: [PHP] Re: HTTP header question.


I don't know how to solve your problem, but I do know what you are talking
about..  People just aren't understanding.

All he wants is if you go to "login.php" in your browser, the Location will
show:

http://his.website.com/rams/login.php

Okay?  Got it?  NOW...  If you attempt to log in and give the form an
INCORRECT login, he wants to SOMEHOW (and currently trying by headers) wants
the location to show this:

http://his.website.com/rams/login.php

AND NOT:

http://his.website.com/rams/login.php?failure=true

Is that hard to understand?
I hope I have helped to some degree.
--
---
-- M&D Creations
- Matt Rogers
- Web Design Dept.
- [EMAIL PROTECTED]
"Ben Bleything" <[EMAIL PROTECTED]> wrote in message
01c11891$447271c0$0201a8c0@allegro">news:01c11891$447271c0$0201a8c0@allegro...
> Hey all,
>
> I want to craft a header such that it seems to the page that data has
> been POST'ed to it... Here's the situation:  I'm writing a login page to
> my application, and if they log in incorrectly, I want the page to
> redisplay, but I want it to throw out an error message.  I'm currently
> doing it by
>
> header("Location: login.php?failure=true");
>
> but I'd like to make it transparent.  Any ideas?
>
> Thanks,
> Ben
>



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

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




RE: [PHP] associative arrays in html forms and javascript

2001-08-08 Thread Taylor, Stewart

This is because you currently only have one field on your form named
arraystuff.  The browser only creates an array of elements if there is more
than one of them.  arraystuff.focus(), would work at present.

-Stewart

-Original Message-
From: Daniel James [mailto:[EMAIL PROTECTED]]
Sent: 08 August 2001 12:56
To: [EMAIL PROTECTED]
Subject: [PHP] associative arrays in html forms and javascript


Hi everyone :)

imagine this if you will..


  

  

  


ugly form with a text input field that is focussed when the form loads,
erm.. nice.

now, I like to put all my form stuff into associative arrays, makes things
a lot nicer when I am doing things later... but this... means something
completely different to javascript:


  

  

  


and like that the text field won't focus and the parser tells me that
arraystuff has no properties and that inputfield is undefined.

I've tried all sorts of stuff, at the moment when I do a form I choose
between javascript and associative arrays, depending on what I need... but
I *want* both >;-) 

anyone have any ideas? I keep getting errors myself.

Twigman...

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

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




RE: [PHP] How to get the query string?

2001-08-13 Thread Taylor, Stewart

foreach ($HTTP_POST_VARS as $key=>$value)
{
   echo "$key = $value";
}

-Stewart

-Original Message-
From: Tamas Bucsu [mailto:[EMAIL PROTECTED]]
Sent: 13 August 2001 14:07
To: [EMAIL PROTECTED]
Subject: [PHP] How to get the query string?


hi guys,

I'd like to get the query string the browser sends to the script. The
problem is that since the $HTTP_POST_VARS (or $HTTP_GET_VARS ) is an
associative array I can't use numbers to point to the elements of this
array. This piece of code does not work:

for ($a=1;$a<=sizeof($HTTP_POST_VARS);$a++){
 echo "$a. ".$HTTP_POST_VARS[$a]."";
}

Please help

Tamas Bucsu

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




RE: [PHP] Re: PHP indexOf()?

2001-08-21 Thread Taylor, Stewart

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

-Stewart

-Original Message-
From: Kevin P [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2001 20:44
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP indexOf()?


For someone used to Java & JavaScript..  what function would replace
myString.indexOf(myStringPiece) ??

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




RE: [PHP] Database editor

2001-10-05 Thread Taylor, Stewart

http://www.phpwizard.net/projects/phpMyAdmin/

-Stewart

-Original Message-
From: -:-Doigy-:- [mailto:[EMAIL PROTECTED]]
Sent: 05 October 2001 12:34
To: [EMAIL PROTECTED]
Subject: [PHP] Database editor


Hi Folks,

I'm after a quick and easy way to edit tables in a mySQL database, much like
you would in ms excel.  I'm thinking I'll do it with forms...

Is there a non-commerical solution in existance already?

Cheers,

Steve



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

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