RE: [PHP] Unserialize stopped working after php & db upgrade

2002-09-18 Thread Martin Towell

If you've seen a serialised variable a few times, you get to know how one is
set up and how to interpret it. If you're using serialised variables, I'd
suggest serialising a few simple ones and see what the output looks like so
that you can see when things are going amiss.

This is one way that I debug things. Instead of var_dump()ing or
print_r()ing something, I'll "echo serialize(...)". It's more compact than
var_dump/print_r

Martin

-Original Message-
From: Geoff Caplan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 3:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Unserialize stopped working after php & db upgrade


Paul,

PN> It looks like that string has been serialized multiple times

Many thanks - that is the problem! I think that this qualifies as one
of my more creative bugs...

Can I ask you how you spotted this? Pretty impressive, considering you
only had the string itself to go on.

Thanks again,

-- 
Geoff Caplan
Advantae Ltd

mailto:[EMAIL PROTECTED]
http://www.advantae.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] how to time an http request

2002-09-18 Thread Petr Tomenendál

If you want a tool to test HTTP server responses, then i can recommend
Siege. You can specify number of simultaneous requests and 
URL/URLs to be tested. For more info look at: 
http://www.joedog.org/siege/index.shtml

P.


On Thu, 2002-09-19 at 01:12, Lee Doolan wrote:
> 
> 
> is there a program which i can run in a unix environment (FreeBSD or
> redhat) which can run, say, 100 requests on a url and then report the
> total time spent on the requests?  i know that i could run curl or
> wget in a loop, but i would have to account for the fork-exec time
> somehow.  i hope that the question is clear.
> 
> 
> -- 
> Flowers of morning glory.  +-+
> The sky above this street  |donate to causes I care about:   |
> Begins to overcast.|  http://svcs.affero.net/rm.php?r=leed_25|
>--Sugita+-+
> 
> -- 
> 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] Need some help please.

2002-09-18 Thread David Freeman


 > Thats a Nice feaure you have, How do you do that?

I have a cron event on my server that grabs the relevant page from the
web site soon after it is updated (around 20 past each hour) using "lynx
-dump url" which then pipes the resulting page dump through grep to grab
just the line of data that includes my town and dumps that output to a
file.

The file contains a single line of data that includes all of the
information I display plus some other stuff on the page that I don't
use.

Within my php page I open that small file and load it into an array for
display on the page.

Obviously there's some error checking in there for various fail
conditions and some other stuff too but that's the basics of it.

I've looked at doing something similar for forecasts but as I don't
(yet) have a need to display them I haven't got around to it.

The main advantage of this method is that you're not grabbing the data
on every page load but, instead, only when the data on the source web
site can reasonably be expected to have changed.

As well as running a business with my wife I work for the BoM
and have done for about 18 years now

CYA, Dave




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




[PHP] Unserialize stopped working after php & db upgrade

2002-09-18 Thread Geoff Caplan

Paul,

PN> It looks like that string has been serialized multiple times

Many thanks - that is the problem! I think that this qualifies as one
of my more creative bugs...

Can I ask you how you spotted this? Pretty impressive, considering you
only had the string itself to go on.

Thanks again,

-- 
Geoff Caplan
Advantae Ltd

mailto:[EMAIL PROTECTED]
http://www.advantae.com


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




[PHP] New problem - preg_match?

2002-09-18 Thread Chad Winger

Yes, I'm STILL a newbie :) I've gotten pretty far in a few days thanks to
you all. I have a new question for you, maybe this is a bit easier than my
last issue.

Still using my text file example, which has lines such as:

0706010102|01.01.02|16:00|Serie C2|02|Forlì|Florentia Viola|
0610010102|01.07.02|16:00|Serie C2|05|Florentia Viola|Gubbio|
1806190702|19.07.02|16:00|Serie C2|05|Savona|Florentia Viola|

I am able to with a form, create a new addition to the file. What I'd like
to do now however, is before writing to the file, check the second field
(the date in this case) and if it is the same as what is being submitted,
then I want to buy using an if...else statement stop it from being written.

What I tried was to create an array called $getdate by exploding the file
that has the text above. Then, I also created a variable called $datetest
which was from the form such as: $datetest = ("$day.$month.$year");

so Now i wanted to compare $getdate[1] to $datetest and if any of the
exploded arrays from $getdate[1] matched up with $getdate, i.e. what is
being submitted from the form, then it would not go to write the file.

I tried it like so:

$fd = fopen ($schedule, "r");
while (!feof ($fd))
{
$currentlines = fgets($fd, 4096);
$getdate = explode("|", $currentlines);
$datetest = ("$day.$month.$year");
if (preg_match ($getdate[1] , $datetest)) {
echo 'date already listed';
} else {
$fp = fopen($schedule, "w");
fwrite($fp,
"$current\n$homename[0]$awayname[0]$day$month$year|$day.$month.$year|$matcht
ime|$competition|$round|$homename[1]|$awayname[1]|");
fclose($fp);
echo 'success';
}

I am not even sure if this is the function i need to use, but if it is, my
syntaxt must be wrong, because I have tried all combinaions and I keep
getting errors.

Any suggestions?

Thanks as always

-Tree



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




[PHP] Re: Good OO PHP resources? Open Source APIs?

2002-09-18 Thread Manuel Lemos

Hello,

On 09/19/2002 01:50 AM, Michael Zornek wrote:
> I've been doing PHP for about 2 years now. The code I write is generally
> procedural although I have been using a MySQL class to do some db stuff as
> of late.
> 
> Over last few months, I've been learning Cocoa. If you don't know its an
> OBJ-C based API to develop apps for Mac OS X.
> 
> By doing so I  want more and more of my PHP to be purely OO. I'm fairly
> aware of how to write my own classes for data but are their any frameworks
> out there to do the foundation stuff already?

Have you looked at the http://www.phpclasses.org/ site?

What kind of frameworks are you looking for?


-- 

Regards,
Manuel Lemos


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




[PHP] Good OO PHP resources? Open Source APIs?

2002-09-18 Thread Michael Zornek

I've been doing PHP for about 2 years now. The code I write is generally
procedural although I have been using a MySQL class to do some db stuff as
of late.

Over last few months, I've been learning Cocoa. If you don't know its an
OBJ-C based API to develop apps for Mac OS X.

By doing so I  want more and more of my PHP to be purely OO. I'm fairly
aware of how to write my own classes for data but are their any frameworks
out there to do the foundation stuff already?

Thanks :-)

~ Mike
-- 
Mike Zornek | Project Leader
Apple Student Developers
The Insanely Great Site with the Insanely Long URL
http://www.applestudentdevelopers.org

Personal Site: 
http://www.mikezornek.com


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




[PHP] redefining a function

2002-09-18 Thread David T-G

Hi, all --

Is there any way to redefine or undefine (to then redefine) a function?
We have an image handling function, for instance, and would like to let
our users put in their own definition instead.  I haven't yet found
anything that will allow this...


TIA & HAND

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg79103/pgp0.pgp
Description: PGP signature


Re: [PHP] header() and POST

2002-09-18 Thread Chris Shiflett

Here is an example of how to manually perform an HTTP POST with PHP. If 
you execute this code, you should see the search results of searching 
the PHP manual for the term "curl" (using language en_US). Curl is 
another option for people who need to do this sort of thing.

Happy hacking.

Chris

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




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




[PHP] Re: how to time an http request

2002-09-18 Thread Jason Morehouse

What's wrong with fopen?

On Wed, 18 Sep 2002 16:12:05 +, Lee Doolan wrote:

> 
> 
> is there a program which i can run in a unix environment (FreeBSD or
> redhat) which can run, say, 100 requests on a url and then report the
> total time spent on the requests?  i know that i could run curl or
> wget in a loop, but i would have to account for the fork-exec time
> somehow.  i hope that the question is clear.

-- 
 Jason Morehouse (jm[@]netconcepts[.]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand

 Linux: Because rebooting is for adding hardware.


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




[PHP] Re: inheriting default constructor behavior?

2002-09-18 Thread Jason Morehouse

Try:

function archive ($max_size = 20560, $archive_dir = ${DOCUMENT_ROOT}.'/tmp/')

On Wed, 18 Sep 2002 23:25:08 +, Monique Y. Herman wrote:

> 
> My question is regarding default arguments -- is it possible to define a default
> argument that is itself a variable?
> 
> I'd like to do the following:
> 
> function archive ($max_size = 20560, $archive_dir = "${DOCUMENT_ROOT}/tmp/") 
> 
> but I seem to get parse errors unless I do the following:
> 
> function archive ($max_size = 20560, $archive_dir = "/var/www/tmp/")
> 
> Is it possible to do something approaching the latter?
> 
> Monique Y. Herman
> [EMAIL PROTECTED]

-- 
 Jason Morehouse (jm[@]netconcepts[.]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand

 Linux: Because rebooting is for adding hardware.


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




[PHP] compiling a regexp

2002-09-18 Thread David T-G

Hi, all --

Can I compile a regexp as I can in perl?

We have various possible values that we want to strip out of a string and
we store them in an array so that users can update with their own.  To
wit:

  $noadobe =
array
  (
"File written by Adobe Photoshop",
"LEAD Technologies Inc." ,
"more pesky text" ,
  ) ;

We want to make it easy on the users, so we're not going to figure any
regular expressions belong in there; I'll just use a greedy .* to suck up
everything that starts with any of these matches.

In my code I can certainly 

  $noadoberegexp = "(" . join("|",$noadobe) . ").*" ;

and then

  $cleanstring = eregi_replace("$noadoberegexp","",$stripstring) ;

but 1) I haven't tested this code yet :-) and 2) I wonder if I'll run
into long runtimes when we get lots of strings to match.


TIA & HAND

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg79099/pgp0.pgp
Description: PGP signature


[PHP] pardon the previous mis-topic

2002-09-18 Thread Monique Y. Herman


I'd started another question, realized the answer to it, and typed in another
question without checking the subject ... mea culpa!

Monique Y. Herman
[EMAIL PROTECTED]



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




Re: [PHP] Strange submission problem

2002-09-18 Thread Jesse Lawrence

Hmmm, that was the solution.  That's kind of a strange
little thing isn't it?

Thanks a lot for your help,

Jesse








I've had this same problem.  It seems that the value
of submit is only sent
if the button is clicked (netscape and internet
explorer).  Could it be
that you're using the enter key to submit the form?

The solution I used was to remove the value assignment
to the submit button
and set it in a hidden variable



- Jacob

At 10:58 09/19/2002, Jesse Lawrence wrote:
>Hello everyone,
>In a simple signup form that I'm using, I send the
>variables to a script, which performs a function if
>($submit == "register") {
>function();
>  }
>
>The problem is, my signup form isn't passing the
>submit variable, though it is passing the other
>variables in the form.
>
>The strange thing is, when I try this in the Opera
web
>browser, the $submit variable does get passed along,
>but in both Mozilla and Konqueror, it does not.
>
>Have I made a little error in the following code? 
Any
>thoughts?
>
>
>
>
>Join ...
>
>
>Username:
>  
>
>Name:
>  
>Email:
>  
>Homepage:
>  
>About you:
>
>
>
>
>Password:
>  
>Confirm Password:
>  
>
>
>  />
>
>
>
>
>
>
>
>Your help is greatly appreciated,
>Jesse Lawrence
>
>


__ 
Post your free ad now! http://personals.yahoo.ca

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




[PHP] inheriting default constructor behavior?

2002-09-18 Thread Monique Y. Herman


My question is regarding default arguments -- is it possible to define a default
argument that is itself a variable?

I'd like to do the following:

function archive ($max_size = 20560, $archive_dir = "${DOCUMENT_ROOT}/tmp/") 

but I seem to get parse errors unless I do the following:

function archive ($max_size = 20560, $archive_dir = "/var/www/tmp/")

Is it possible to do something approaching the latter?

Monique Y. Herman
[EMAIL PROTECTED]


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




Re: [PHP] Strange submission problem

2002-09-18 Thread Jacob Miller

I've had this same problem.  It seems that the value of submit is only sent 
if the button is clicked (netscape and internet explorer).  Could it be 
that you're using the enter key to submit the form?

The solution I used was to remove the value assignment to the submit button 
and set it in a hidden variable



- Jacob

At 10:58 09/19/2002, Jesse Lawrence wrote:
>Hello everyone,
>In a simple signup form that I'm using, I send the
>variables to a script, which performs a function if
>($submit == "register") {
>function();
>  }
>
>The problem is, my signup form isn't passing the
>submit variable, though it is passing the other
>variables in the form.
>
>The strange thing is, when I try this in the Opera web
>browser, the $submit variable does get passed along,
>but in both Mozilla and Konqueror, it does not.
>
>Have I made a little error in the following code?  Any
>thoughts?
>
>
>
>
>Join ...
>
>
>Username:
>  
>
>Name:
>  
>Email:
>  
>Homepage:
>  
>About you:
>
>
>
>
>Password:
>  
>Confirm Password:
>  
>
>
>  />
>
>
>
>
>
>
>
>Your help is greatly appreciated,
>Jesse Lawrence
>
>
>__
>Post your free ad now! http://personals.yahoo.ca
>
>--
>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] Strange submission problem

2002-09-18 Thread Jesse Lawrence

Hello everyone,
In a simple signup form that I'm using, I send the
variables to a script, which performs a function if
($submit == "register") {
   function();
 }

The problem is, my signup form isn't passing the
submit variable, though it is passing the other
variables in the form.

The strange thing is, when I try this in the Opera web
browser, the $submit variable does get passed along,
but in both Mozilla and Konqueror, it does not.

Have I made a little error in the following code?  Any
thoughts?




Join ...


Username:
 

Name:
 
Email:
 
Homepage:
 
About you:




Password:
 
Confirm Password:
 

 
 







Your help is greatly appreciated,
Jesse Lawrence


__ 
Post your free ad now! http://personals.yahoo.ca

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




Re: [PHP] Need some help please.

2002-09-18 Thread Simon Angell

Thats a Nice feaure you have, How do you do that?

I have spoken to guy who made the php file and he will look into the bugs
for me, also i will keep playing around with it.

--
Cheers
-
Simon Angell
Canberra ACT
www.canberra-wx.com
-
Member of:
Australian Severe Weather Association.
www.severeweather.asn.au
-
This email is virus free.
Scanned before leaving my mailbox
using Norton Antivirus 2002 for Win2k
Scanned with the latest definition File.

"David Freeman" <[EMAIL PROTECTED]> wrote in message
005101c25f70$4f197700$3f0a0a0a@skink">news:005101c25f70$4f197700$3f0a0a0a@skink...
>
>  > I am having trouble with a PHP script. I am not the one who
>  > made this and my knowledge on php is very little.
>  > I came across this php script
>  > www.canberra-wx.com/bomonster/bomonster01.php
>
> Tried loading this and had too many page errors to figure out what you
> are doing.
>
>  > www.canberra-wx.com/bomonster/bomonster1.php
>
> Ditto for this one.
>
>  > Any help on how to get it to work would be great.
>
> First comment is a conceptual one rather than a programming one.
>
> I presume you are doing this so that every time someone loads your page
> they get current information?  You do know that the BoM only updates
> forecasts around three to four times per day don't you?  In this case it
> means that every hit on your page is reloading what is, largely, static
> information.  You would be far better off caching the raw data on your
> own server and using it from there.
>
> Use cron and possibly lynx to grab the raw data that you need on an
> appropriate schedule (say every six hours or, alternately, around an
> hour after normal release time for each forecast) and either process it
> straight away to produce the display information you need or store it
> locally to be processed each time the page loads.  Ideally, you'd create
> a static version of the page each time you grab new forecast information
> and just display it.
>
> Once you have the data on your server you can process it accordingly
> which is where the php comes in.  The major hurdle is in pattern
> matching and the like to find the relevant bit.
>
> I am currently doing something moderately similar to this on
> www.outbackqld.net.au (current conditions in top right corner) and it is
> working just fine with an update every hour or so being cached locally.
>
> I'm happy to discuss the issues of doing this further but am not
> actually using php for anything but the last step - the rest of the
> solution is done using a combination of cron, lynx and grep.
>
> CYA, Dave
>
>
>



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




Re[4]: [PHP] numeric to word function

2002-09-18 Thread Tom Rogers

Hi,

Thursday, September 19, 2002, 5:29:06 AM, you wrote:
BY> What does this do?

Here is the class again with all errors fixed and some unfinished bits
but it should be enough to get you started. It uses recursion as it
repeats after one thousand .. ie one, two, three  one thousand,
two thousand, three thousand...


class num_to_text {
var $mode;  //NUMERIC CURRENCY
var $words = 
array(0=>array('zero','one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen','twenty'),

1=>array('zero','one','twenty','thirty','fourty','fifty','sixty','seventy','eighty','ninety'),

2=>array('thousand','million'));
var $money = array(0=>array('Dollar','Dollars'),
 
1=>array('Cent','Cents'));
function num_class($mode = 'NUMERIC'){
$this->mode = $mode;
}
function convert($num){
return $this->num($num,1);
}
function num($num,$key = 0){
static $t;
static $call;
$res = intval($num/100);
$left = $num%100;
if($key == 1){ //first non recursive call reset text and 
thousand/million toggle
$t = "";
$call = 0;
}
else{
// do we need to print thousand as this is a recursive call
if($num%1000 > 0)$t = ' '.$this->words[2][$call].' '.$t;
$call ^= 1; //toggle call for next recursion
}
if($left <= 20){ // no need to split it
if($left == 0){ // is the whole mess just zero
if($res == 0) $t = $this->words[0][$left].$t;
}
else{
$t = $this->words[0][$left].$t;
}
}
else{ //need to split it up
$tens = intval($left/10);
$units = $left%10;
($units > 0)? $units = ' '.$this->words[0][$units] : $units = 
''; // eg thirty or thirty one
$t = $this->words[1][$tens].$units.$t;
}
if($res < 10){
if($res > 0){
($left == 0)? $and = '':$and = ' and '; // do we need 
to print 'and'
if($res > 0) $t = $this->words[0][$res]. " 
hundred".$and.$t;
}
}
else{
$res = $res%10;
if($res > 0){
($left == 0)? $and = '':$and = ' and ';
$t = $this->words[0][$res]. " hundred".$and.$t;
}
else{
if($left > 0)$t = ' and '.$t;
}
$num = intval($num/1000);
$this->num($num);
}
return $t;
}
}

//usage

$n2t = new num_to_text();
for($num = 0;$num < 11;$num++){
echo $num.' '.$n2t->convert($num).'';
}



-- 
regards,
Tom


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




Re: [PHP] reuse database connections

2002-09-18 Thread olinux

When you create a connection it is available to the
end of the script run. You can run as many queries as
you wish in the script and all will use the same
connection.

If you wish for multiple accesses to use the same
connection, I think you will have to use persistent
connections.

olinux



--- Kumar Lakshminarayanan <[EMAIL PROTECTED]> wrote:
> You can use persistent connections from php to mysql
> server
> using mysql_pconnect(host,user,passwd) then go on to
> use the returned link.
> this will open a new connection only if one is not
> available.
> kumar
> 
> "Support @ Fourthrealm.com" wrote:
> 
> > Another question about efficiency / using server
> resources:
> >
> > In another language I use, I can re-use an ODBC
> connection to make further
> > queries/update/etc to the database to save the
> overhead of closing and
> > reopening the connection to the db over and over.
> >
> > It works sometime like this (in the other
> language):
> >   
> # opens the connection
> >  ... display results...
> >   # reuses the
> connection
> >  display other results
> ># closes the connection
> >
> > Is there an equivalent in PHP to this, using the
> mySQL set of tags?
> >
> > Peter
> >
> > - - - - - - - - - - - - - - - - - - - - -
> > Fourth Realm Solutions
> > [EMAIL PROTECTED]
> > http://www.fourthrealm.com
> > Tel: 519-739-1652
> > - - - - - - - - - - - - - - - - - - - - -
> >
> > --
> > 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
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




Re: [PHP] can you recommend PHP shopping cart

2002-09-18 Thread Nicole Lallande

http://www.fishcart.org/  - the guy who wrote this (in PHP) has been 
programming banking gateways for 20 years -- very security conscious. 
 The cart is very robust...

Best,

Nicole

Peter J. Schoenster wrote:

>Hi,
>
>Looking for a shopping cart. I've written plenty in the past but in 
>Perl. I'm looking for one in PHP and I don't want to write my own.
>
>I looked at this:
>
>http://www.x-cart.com/
>
>And I asked to see their code but I have not heard anything back.
>
>I'm already favorable to anything that uses Smarty. I'd like something 
>that is as OO as possible. Something that's got all the core features 
>and is then easy to extend as every customer has their uniqure 
>requirements.
>
>Anyone got some suggestions?
>
>Peter
>
>
>
>http://www.coremodules.com/
>Web Development and Support  at Affordable Prices
>901-757-8322   [EMAIL PROTECTED]
>
>
>
>
>  
>

-- 

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766





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




Re: [PHP] Friend of function??

2002-09-18 Thread Sascha Cunz

Just as Kevin Stone said, you can either use one of these constructions:

function func1() {
  global $myarray;
  array_push($myarray,1);
}
# _or_
function func2() {
  array_push($GLOBALS['myarray'],1);
}

In fact, there is no performance decrease, because PHP will internally use the 
same mechanism to access the array - as it would if you were not in a 
function.

Another way would be to pass the array as a reference:

function func3(&$myarray) {
  array_push($myarray, 1);
}

but this might decrease performace (in compare to the other ways, you will not 
really notice it).

Sascha


Am Mittwoch, 18. September 2002 23:54 schrieb Anup:
> I want to use arrays (that are outside of a function) to be visible to a
> function. I understand that I must you global. But I was wondering is it
> possible to make it visible to only certain functions, similar to the
> 'friend' keyword in C (or C++ ?) ? The reason, is that I don't feel
> comfortable having globals, (I was brought up that way). Also, if you
> actually declare something global are there any disadvantages such as
> performance hits?


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




Re: [PHP] SELECT dropdown from a db query?

2002-09-18 Thread Andre Dubuc

Thanks Jacob and Sascha,

I would've struggled with that one for a day before I realized what was 
wrong. Thanks again -- it works great!

Regards (and thanks yet again :>)
Andre


On Wednesday 18 September 2002 09:54 pm, Jacob Miller wrote:
> Move  outside the do-while loop:
>
> print "";
>
> $row = 0;
> do
> {
>  $myrow = pg_fetch_array($result,$row);
>  if ($myrow['rupload'] != "") {
>
>  print "{$myrow['rfname']}
> {$myrow['rsname']}";
>
>  }
>
>  $row++;
> } while ($row < $numrows);
>
> print "";
>
> pg_close($db);

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




[PHP] RE: Weird problem with Windows XP and IE6

2002-09-18 Thread Jason


As an adendum to this... my initial thoughts are that the forms are not
posting correctly in XP. I'm using the POST method.


Jason Cathcart
Check Out My Site: http://www.biohazardous.org
  -Original Message-
  From: Jason [mailto:[EMAIL PROTECTED]]
  Sent: September 18, 2002 7:50 PM
  To: Php-General
  Subject: Weird problem with Windows XP and IE6


  Hi...

  I've written a shopping cart program that is in use at www.dangeo.com and
I'm having a weird problem that has just been brought to my attention.

  As far as I can tell everything works perfectly fine with the shopping
cart in windows 98, and 2000. However the problem I'm having is that when
customers using XP get into the shopping cart they can't get past the screen
where they put in their address. I haven't been able to duplicate this
problem.

  What I'm hoping is that some of you might be able to take a look at it,
duplicate the problem, and give me some suggestions as to what the problem
is.


  Jason Cathcart
  Check Out My Site: http://www.biohazardous.org




Re: [PHP] SELECT dropdown from a db query?

2002-09-18 Thread Jacob Miller

Move  outside the do-while loop:

print "";

$row = 0;
do
{
 $myrow = pg_fetch_array($result,$row);
 if ($myrow['rupload'] != "") {

 print "{$myrow['rfname']} 
{$myrow['rsname']}";

 }

 $row++;
} while ($row < $numrows);

print "";

pg_close($db);

--

- Jacob

At 09:56 09/19/2002, Andre Dubuc wrote:
> > >  > > . . .
> > > $query = "SELECT * FROM rap WHERE rsponsor = '{$_SESSION['sid']}'";
> > > $result = pg_exec($db, $query);
> > > if (!$result) {exit;}
> > > $numrows = pg_numrows($result);
> > >
> > > if ($numrows == 0) {echo "Sorry!'{$_POST['sid']}' is not in
> > > the our database. Click 'Back' on
> > >  your browser to enter another search."; exit;}
> > >
> > > $row = 0;
> > > do
> > > {
> > > $myrow = pg_fetch_array($result,$row);
> > >  if ($myrow['rupload'] != "")
> > > {
> > >
> > >  print "{$myrow['rfname']}
> > > {$myrow['rsname']}";
> > >
> > > }
> > >
> > > $row++;
> > > }
> > > while ($row < $numrows);
> > > pg_close($db);
> > > ?>


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




Re: [PHP] SELECT dropdown from a db query?

2002-09-18 Thread Andre Dubuc

Thanks Sascha,

Thought that would do the trick (at least I thought it should) but same 
results - a mess of single entry dropdowns. 

Perhaps the code should be after the 'row++;' ?

Sigh  . . . this is frustrating!

Andre



On Wednesday 18 September 2002 09:38 pm, Sascha Cunz wrote:
> Change  to 
>
> Sascha
>
> Am Donnerstag, 19. September 2002 03:34 schrieb Andre Dubuc:
> > I'm trying to generate a dropdown SELECT list from a database query. So
> > far, all I've managed to create is multiple one-item dropdowns for each
> > database entry spread across the page. Bad -- very bad!
> >
> > I'd like normal drop-down SELECT behavior, but somehow the code escapes
> > me. I've tried a bunch of permutations, but I either end up with an empty
> > dropdown or multiple single entry messes.
> >
> > Is there anyway to iterate through this and achieve what I want?
> >
> > I would greatly appreciate any hints what I'm missing here or doing
> > wrong. Code follows.
> > Tia,
> > Andre
> >
> >
> > Code (using PostgreSQL):
> >
> >
> >  > . . .
> > $query = "SELECT * FROM rap WHERE rsponsor = '{$_SESSION['sid']}'";
> > $result = pg_exec($db, $query);
> > if (!$result) {exit;}
> > $numrows = pg_numrows($result);
> >
> > if ($numrows == 0) {echo "Sorry!'{$_POST['sid']}' is not in
> > the our database. Click 'Back' on
> >  your browser to enter another search."; exit;}
> >
> > $row = 0;
> > do
> > {
> > $myrow = pg_fetch_array($result,$row);
> >  if ($myrow['rupload'] != "")
> > {
> >
> >  print "{$myrow['rfname']}
> > {$myrow['rsname']}";
> >
> > }
> >
> > $row++;
> > }
> > while ($row < $numrows);
> > pg_close($db);
> > ?>

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




[PHP] Weird problem with Windows XP and IE6

2002-09-18 Thread Jason

Hi...

I've written a shopping cart program that is in use at www.dangeo.com and
I'm having a weird problem that has just been brought to my attention.

As far as I can tell everything works perfectly fine with the shopping cart
in windows 98, and 2000. However the problem I'm having is that when
customers using XP get into the shopping cart they can't get past the screen
where they put in their address. I haven't been able to duplicate this
problem.

What I'm hoping is that some of you might be able to take a look at it,
duplicate the problem, and give me some suggestions as to what the problem
is.


Jason Cathcart
Check Out My Site: http://www.biohazardous.org




Re: [PHP] SELECT dropdown from a db query?

2002-09-18 Thread Sascha Cunz

Change  to 

Sascha

Am Donnerstag, 19. September 2002 03:34 schrieb Andre Dubuc:
> I'm trying to generate a dropdown SELECT list from a database query. So
> far, all I've managed to create is multiple one-item dropdowns for each
> database entry spread across the page. Bad -- very bad!
>
> I'd like normal drop-down SELECT behavior, but somehow the code escapes me.
> I've tried a bunch of permutations, but I either end up with an empty
> dropdown or multiple single entry messes.
>
> Is there anyway to iterate through this and achieve what I want?
>
> I would greatly appreciate any hints what I'm missing here or doing wrong.
> Code follows.
> Tia,
> Andre
>
>
> Code (using PostgreSQL):
>
>
>  . . .
> $query = "SELECT * FROM rap WHERE rsponsor = '{$_SESSION['sid']}'";
> $result = pg_exec($db, $query);
> if (!$result) {exit;}
> $numrows = pg_numrows($result);
>
> if ($numrows == 0) {echo "Sorry!'{$_POST['sid']}' is not in the
>  our database. Click 'Back' on
>  your browser to enter another search."; exit;}
>
> $row = 0;
> do
> {
> $myrow = pg_fetch_array($result,$row);
>  if ($myrow['rupload'] != "")
> {
>
>  print "{$myrow['rfname']}
> {$myrow['rsname']}";
>
> }
>
> $row++;
> }
> while ($row < $numrows);
> pg_close($db);
> ?>


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




RE: [PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah

Hello people,
Thanks for all your help. I guess I'll go with

$oid = pg_last_oid($result);
select id from table where oid = $oid;

If i'm not mistaken, there will no race issue here:
pg_last_oid($result) has already returned me the row
that 'I' have just inserted, based on $result, regardless whether there is
another
user doing an insert. I already have a reference to a row i just inserted.

On the other hand,
BEGIN
INSERT ... whatever
SELECT idno ORDER BY (idno) DESC LIMIT 1;
END;

will have some 'time' between the 'insert' and the 'select'.
There is no reference to a row based on $result.
There would still probably be a race issue here (just my opinion,
not a fact). But if there's anyone could explain the internals,
I'd be glad.

Thanks for all who helped.

Sincerely,
Faisal




-Original Message-
From: Leonid Mamtchenkov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 5:35 AM
To: Faisal Abdullah
Cc: Marek Kilimajer; PHP
Subject: Re: [PHP] Auto-increment value


Dear Faisal Abdullah,

Once you wrote about "RE: [PHP] Auto-increment value":
> > There is a similar one for postgresql as well: pg_last_oid() .
>
> I tried that. It gives me 24807, instead of 5.
> Or is oid is a reference to something else, which would
> lead me to the '5' i'm looking for?

I'd bet that 24807 is your oid.  Check the difference between
"SELECT * FROM table;" and "SELECT oid,* FROM table;".

HTH.

> -- snip snip --
>
> if($result = pg_exec($db, $sql))
> {
>   $query = "success";
>   echo "oid : " .pg_last_oid($result);
>   }
>
> -- snip snip --

--
Best regards,
  Leonid Mamtchenkov, RHCE
  System Administrator
  Francoudi & Stephanou Ltd.

BOFH: somebody was calculating pi on the server

__


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




Re: [PHP] can you recommend PHP shopping cart

2002-09-18 Thread olinux

I believe that x-cart provides the code when you
purchase. Looks like an inexpensive and full featured
solution. 

Check out www.oscommerce.com for an excellent open
source project that will rival most commercial
solutions. There are some live site examples in the
featured sites section. Many features and new
contributions daily.

olinux


--- "Peter J. Schoenster" <[EMAIL PROTECTED]>
wrote:
> Hi,
> 
> Looking for a shopping cart. I've written plenty in
> the past but in 
> Perl. I'm looking for one in PHP and I don't want to
> write my own.
> 
> I looked at this:
> 
> http://www.x-cart.com/
> 
> And I asked to see their code but I have not heard
> anything back.
> 
> I'm already favorable to anything that uses Smarty.
> I'd like something 
> that is as OO as possible. Something that's got all
> the core features 
> and is then easy to extend as every customer has
> their uniqure 
> requirements.
> 
> Anyone got some suggestions?
> 
> Peter
> 
> 
> 
> http://www.coremodules.com/
> Web Development and Support  at Affordable Prices
> 901-757-8322  [EMAIL PROTECTED]
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




[PHP] SELECT dropdown from a db query?

2002-09-18 Thread Andre Dubuc




I'm trying to generate a dropdown SELECT list from a database query. So far, 
all I've managed to create is multiple one-item dropdowns for each database 
entry spread across the page. Bad -- very bad!

I'd like normal drop-down SELECT behavior, but somehow the code escapes me. 
I've tried a bunch of permutations, but I either end up with an empty 
dropdown or multiple single entry messes. 

Is there anyway to iterate through this and achieve what I want?

I would greatly appreciate any hints what I'm missing here or doing wrong. 
Code follows.
Tia,
Andre


Code (using PostgreSQL):


Sorry!'{$_POST['sid']}' is not in the
 our database. Click 'Back' on
 your browser to enter another search."; exit;}

$row = 0;
do
{
$myrow = pg_fetch_array($result,$row);
 if ($myrow['rupload'] != "")
{

 print "{$myrow['rfname']} 
 
{$myrow['rsname']}";

}

$row++;
}
while ($row < $numrows);
pg_close($db);
?>

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




[PHP] can you recommend PHP shopping cart

2002-09-18 Thread Peter J. Schoenster

Hi,

Looking for a shopping cart. I've written plenty in the past but in 
Perl. I'm looking for one in PHP and I don't want to write my own.

I looked at this:

http://www.x-cart.com/

And I asked to see their code but I have not heard anything back.

I'm already favorable to anything that uses Smarty. I'd like something 
that is as OO as possible. Something that's got all the core features 
and is then easy to extend as every customer has their uniqure 
requirements.

Anyone got some suggestions?

Peter



http://www.coremodules.com/
Web Development and Support  at Affordable Prices
901-757-8322[EMAIL PROTECTED]




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




Re: [PHP] include_path? programmatically

2002-09-18 Thread Matt Wiseman

You could always just use .htacess to do it..

--
Matt "TrollBoy" Wiseman
Webmaster: Shoggoth.net
Site Designer: phpslash.org
The oldest and strongest emotion of mankind is fear,
and the oldest and strongest kind of fear is fear of the unknown.
-H.P. Lovecraft
-
Please do not resell my e-mail address
to anyone or send me unsolicited e-mail
-

"Christian Calloway" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I dont have access to the php.ini file, is there anyway to access the
> "include_path" setting programatically from php? 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] include_path? programmatically

2002-09-18 Thread Christian Calloway

I dont have access to the php.ini file, is there anyway to access the
"include_path" setting programatically from php? Thanks



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




Re: [PHP] reuse database connections

2002-09-18 Thread Kumar Lakshminarayanan

You can use persistent connections from php to mysql server
using mysql_pconnect(host,user,passwd) then go on to use the returned link.
this will open a new connection only if one is not available.
kumar

"Support @ Fourthrealm.com" wrote:

> Another question about efficiency / using server resources:
>
> In another language I use, I can re-use an ODBC connection to make further
> queries/update/etc to the database to save the overhead of closing and
> reopening the connection to the db over and over.
>
> It works sometime like this (in the other language):
># opens the connection
>  ... display results...
>   # reuses the connection
>  display other results
># closes the connection
>
> Is there an equivalent in PHP to this, using the mySQL set of tags?
>
> Peter
>
> - - - - - - - - - - - - - - - - - - - - -
> Fourth Realm Solutions
> [EMAIL PROTECTED]
> http://www.fourthrealm.com
> Tel: 519-739-1652
> - - - - - - - - - - - - - - - - - - - - -
>
> --
> 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] reuse database connections

2002-09-18 Thread Support @ Fourthrealm.com


Another question about efficiency / using server resources:

In another language I use, I can re-use an ODBC connection to make further 
queries/update/etc to the database to save the overhead of closing and 
reopening the connection to the db over and over.

It works sometime like this (in the other language):
   # opens the connection
 ... display results...
  # reuses the connection
 display other results
   # closes the connection


Is there an equivalent in PHP to this, using the mySQL set of tags?


Peter


- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


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




Re: [PHP] use of mysql_free_result (was Re: [PHP] Efficiency)

2002-09-18 Thread Chris Shiflett

This frees the memory that is used to store the results of your query 
(the $result variable in most examples).

Many people leave this out, because PHP does a lot of cleanup for you 
when your script exits. However, it is a good habit to go ahead and free 
your results once you are finished using them. It is never really 
necessary, but imagine if you have an enormous result set that takes a 
great deal of memory, you have many people hitting your site, and you 
have a great deal of logic remaining before your script executes. The 
amount of wasted memory can be significant in some cases, so you can use 
this function to keep the "damage" low.

Happy hacking.

Chris

Support @ Fourthrealm.com wrote:

> Based on what you said below, can you describe for me when the 
> mysql_free_result tag should be used, and when it is not necessary? 



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




Re: [PHP] COOKIE Question.

2002-09-18 Thread Tom Ray

Discovered my cookie issue. I wasn't setting the path in setcookie() so 
it defaulted to what ever directory the script ran in.  I set it so it 
loads from the root of the website now, and it's working like a charm.

Thanks to all that helped!

John Holmes wrote:

>>I do the print $_COOKIE["Acccess]"; and I still don't see any data
>>
>>
>print.
>
>Did you typo in your code like you did here??
>
>Try to dump the whole $_COOKIE[] array and see what's in it. 
>
>print_r($_COOKIE);
>
>Did you mention what version of PHP you were using?
>
>---John Holmes...
>
>
>  
>




[PHP] use of mysql_free_result (was Re: [PHP] Efficiency)

2002-09-18 Thread Support @ Fourthrealm.com

Rick, or anyone,

Based on what you said below, can you describe for me when the 
mysql_free_result tag should be used, and when it is not necessary?

I'm fluent in other web languages (iHTML, ASP), but am fairly new to PHP, 
so I'm still learning the intricacies of the language, and the best way to 
use it

Many thanks,
Peter



At 04:02 PM 9/18/2002 -0600, you wrote:
>If you aren't doing anything else in a script, mysql_free_result is not needed
>in a script like this because the result set will be cleaned up by PHP when
>the script ends.

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


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




RE: [PHP] Need some help please.

2002-09-18 Thread David Freeman


 > I am having trouble with a PHP script. I am not the one who 
 > made this and my knowledge on php is very little.
 > I came across this php script 
 > www.canberra-wx.com/bomonster/bomonster01.php

Tried loading this and had too many page errors to figure out what you
are doing.

 > www.canberra-wx.com/bomonster/bomonster1.php

Ditto for this one.

 > Any help on how to get it to work would be great.

First comment is a conceptual one rather than a programming one.

I presume you are doing this so that every time someone loads your page
they get current information?  You do know that the BoM only updates
forecasts around three to four times per day don't you?  In this case it
means that every hit on your page is reloading what is, largely, static
information.  You would be far better off caching the raw data on your
own server and using it from there.

Use cron and possibly lynx to grab the raw data that you need on an
appropriate schedule (say every six hours or, alternately, around an
hour after normal release time for each forecast) and either process it
straight away to produce the display information you need or store it
locally to be processed each time the page loads.  Ideally, you'd create
a static version of the page each time you grab new forecast information
and just display it.

Once you have the data on your server you can process it accordingly
which is where the php comes in.  The major hurdle is in pattern
matching and the like to find the relevant bit.

I am currently doing something moderately similar to this on
www.outbackqld.net.au (current conditions in top right corner) and it is
working just fine with an update every hour or so being cached locally.

I'm happy to discuss the issues of doing this further but am not
actually using php for anything but the last step - the rest of the
solution is done using a combination of cron, lynx and grep.

CYA, Dave




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




RE: [PHP] Date-format

2002-09-18 Thread Support @ Fourthrealm.com


Thanks everyone for the helpful answers.

I agree that manuals are useful, but there are times when an example works 
better.

I took all of this information, and some details from earlier posts about 
dates, and produced the following function to make it easy to format dates 
without have to go through and change sql stmts.

# --- Function to format date output ---
function makedate($format, $indate)
{
 $temp = explode("-", $indate);
 $fulldate = mktime(0, 0, 0, $temp[1], $temp[2], $temp[0]);
 $temp = date($format, $fulldate);
 return ($temp);
}


The function gets called like this:

makedate('Y/m/d', $row->articledate);or
makedate("F d, Y", $somedate);


Hopefully this will someone else with their date challenges.


Peter


At 02:55 PM 9/18/2002 -0400, Chuck Payne wrote:

>I know everyone love to quote read the manual and forget that we[newbies]
>are only asking here because we need help...so here you go...
>
>You can do the following...
>
>DATE_FORMAT IS THE MySQL Command
>
>And let say you want to format your date as the following mm-dd-yy(US) or
>dd-mm-yy(the rest of the world).
>
>By the way this are format keys
>
>%m the month in numbers,
>%d the days in numbers,
>%y the year in number
>%M spells out the month
>%D gives the date with th, rd, nd all that
>%Y gives all four numbers
>
>So you do the following sql statement...
>
>SELECT DATE_FORMAT(yourdate, '%m-%d-%y') as youwanttocallit FROM yourtable;
>
>So in your php code you can do this from your MySQL statement...
>
>$youwantcallit = $myrow[youwanttoit];
>
>
>
>Advance note
>
>then if you don't want to show 00-00-00 you can do this...
>
>if ($youwanttocallit == "00-00-00") {
>   $youwanttocallit = " ";
>}
>
>that way you don't have a bunch of 00-00-00 showing up.
>
>I hope that helps, because that is what the maillisting is for and not to
>always quote "Read the Book".
>
>Chuck Payne
>Magi Design and Support
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


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




Re: [PHP] header() and POST

2002-09-18 Thread Chris Shiflett

The short answer is no (based on my interpretation of your question).

Consider carefully where you are wanting to send data and when. The 
header() function is specifically for manipulating HTTP headers in the 
response you will send the Web client. You are probably not wanting to 
post data to the client; you want to post data to another Web server, right?

I cannot tell from your question what exactly you are wanting to do, to 
be honest. If you want to automate a post, you should look into the curl 
extension of PHP. If you actually only need to maintain data across 
several pages on your own site, please restate the question.

Happy hacking.

Chris

P.S. You may want to use a proper name in your email client. My guess is 
that "dsfljsdfklj kljvdskljfsdkl" is going to get filtered by some 
people's spam-filtering software.

dsfljsdfklj kljvdskljfsdkl wrote:

>a php page receives POST data from a form, it needs to
>elaborate the data and send it to another page again
>in POST automatically, without the user noticing.
>
>Is it possible to use the header() function to send a
>POST request? If yes how? And how do I send the post
>data?
>


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




Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Chris Shiflett

James's answer is likely what you are looking for. As there are many 
different ways to maintain sessions, you're going to get many different 
answers.

However, the default behavior for PHP sessions is to assign the unique 
identifier to a cookie. If this cookie has a domain of .web.com (see 
James's answer below for how), then Web sites at secure.web.com and 
www.web.com will both be able to read it. Thus, you would need to make 
no adjustments; you will be using the same session. This is not 
cross-domain state management...

The only caveat is the case where you are running these two domains on 
two physically separate machines. If this is the case, the above 
suggestion won't help you without some work. The work in this case would 
be to store your session data in a database, because the default 
behavior is to store it on the filesystem. Since you state, "both web 
sites point to the same set of data," I assume they are either both 
located on the same machine or both have access to a common database, so 
one of these methods will work for you.

Happy hacking.

Chris

James E Hicks III wrote:

>Have a look at this php.ini setting, I think it will help you!
>
>; The domain for which the cookie is valid.
>session.cookie_domain =
>
>-Original Message-
>From: David Buerer [mailto:[EMAIL PROTECTED]]
>
>Suppose I have two websites:
>secure.web.com
>www.web.com 
>


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




[PHP] linux install error

2002-09-18 Thread :B nerdy

i got the following error on install.. any ideas?

In file included from /usr/include/math.h:348,
 from /root/php-4.2.3/main/php_config.h:2107,
 from my_config.h:5,
 from global.h:33,
 from net.c:14:
/usr/include/bits/mathinline.h: In function `pow':
/usr/include/bits/mathinline.h:382: parse error before `0'
make[4]: *** [net.lo] Error 1
make[4]: Leaving directory `/root/php-4.2.3/ext/mysql/libmysql'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/root/php-4.2.3/ext/mysql/libmysql'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/root/php-4.2.3/ext/mysql'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/root/php-4.2.3/ext'
make: *** [install-recursive] Error 1




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




[PHP] how to time an http request

2002-09-18 Thread Lee Doolan



is there a program which i can run in a unix environment (FreeBSD or
redhat) which can run, say, 100 requests on a url and then report the
total time spent on the requests?  i know that i could run curl or
wget in a loop, but i would have to account for the fork-exec time
somehow.  i hope that the question is clear.


-- 
Flowers of morning glory.  +-+
The sky above this street  |donate to causes I care about:   |
Begins to overcast.|  http://svcs.affero.net/rm.php?r=leed_25|
   --Sugita+-+

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




[PHP] Re: Loop through POST-result

2002-09-18 Thread David Robley

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> I would like to get all the data from a POST-result into an array.
> 
> Is there a function like that adds all the vars from the post into an array
> where Key is the name of the form-field and Value is the value entered in
> this field.
> 
> Like this:
> array('firstname' => 'fname', 'lastname' => 'lname');
> 
> Thanks,
> // Michelle

each() From the docs:

Example 125. Traversing $_POST with each() 

echo "Values submitted via POST method:\n";
reset ($_POST);
while (list ($key, $val) = each ($_POST)) {
   echo "$key => $val\n";
} 
After each() has executed, the array cursor will be left on the next 
element of the array, or on the last element if it hits the end of the 
array. You have to use reset() if you want to traverse the array again 
using each. 


-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




[PHP] mysql_query w/ JOIN results giving unexpected results w/ PHP (not regular SQL though)

2002-09-18 Thread Thoenen, Peter Mr. EPS

Hello everybody,

Having an issue where I am getting unexpected results with a simple query
and at a lost to explain why.

At the end is my code.  The problem I believe though I have narrowed down to
the following statement.

1.  When I run SELECT accounts.id, accounts.action, people.last,
people.first, people.rank FROM accounts JOIN people WHERE (accounts.account
= people.id OR accounts.id = people.id) AND accounts.status='submitted';
directly into mysql (NOT USING PHP) I get the proper results.  (1 row)

2.  When I run it below using PHP I get unexpected results.  (All 4 rows)

Database looks like:

-ACCOUNTS---
ID  ACTION  STATUS  DATE_SUBMITTED  ACCOUNT
1   create  pending NULL56
2   modify  pending NULL58  
3   new pending NULL65
4   delete  submitted   2002-09-10  89

PEOPLE--
ID  LASTFIRST   RANK
56  A   GUY NULL
58  B   GUY NULL
65  C   GUY NULL
89  D   GUY NULL

AFTER JOIN STATEMENT SHOULD LOOK LIKE: (when ran directly with mysql
bypassing PHP)

ID  ACTION  LASTFIRST   RANK
4   delete  D   GUY NULL

Instead I am getting (when  using below code): (when ran with PHP)
ID  ACTION  LASTFIRST   RANK
1   create  A   GUY NULL
2   modify  B   GUY NULL
3   new C   GUY NULL
4   delete  D   GUY NULL

Debugging:

Have did mysql_num_rows($query); on the JOIN query and it returns 1 so it is
returning the proper number of rows.
Have also added an iterator to the while($row) to verify loop count == row
count.  This also returns 1=1

Yet somehow the 'users' file has ALL 4 entries in it at end of the run.

At a complete loss how this can be so.

Any help on this would be appreciated.

Thanks,

-Peter

# START CODE ###

  require_once 'auth.php';
  $date=date("ymd");
  if (isset($submit)){
foreach ($submit as $value){
  digit($value);
  mysql_query("UPDATE accounts SET status='submitted',
date_submitted='$date' WHERE id=$value;");
}
  }
  $query=mysql_query("SELECT site, address FROM unit WHERE
name='$unit'");
  $row=mysql_fetch_array($query);
  extract($row);
  $query=mysql_query("SELECT accounts.id, accounts.action,
people.last, people.first, people.rank FROM accounts JOIN people WHERE
(accounts.account = people.id OR accounts.id = people.id) AND
accounts.status='submitted';");
  if (mysql_num_rows($query)>0){
$fp=fopen('users', 'w');
while ($row=mysql_fetch_array($query)){
  extract($row);
  $s="MAILBOX";
  $s.="\t$action";
  $s.="\tKFOR\\$last".substr($first,0,1);
  $s.="\t$last".substr($first,0,1);
  $s.="\t$first";
  $s.="\t$last";
  $s.=isset($middle)?"\t$middle":'';
  $s.="\t$rank";
  $s.="\tBONDSTEEL2";
  $s.="\t$last, $first";
  $s.=isset($middle)?"$middle.":'';
  $s.="  $rank";
  $s.=$rank=='CIV'?$unit:'';
  $s.="\t$phone";
  $s.="\t$unit";
  $s.="\t$address, $site";
  $s.="\tYugo";
  $s.="\t09340";
  $s.="\tAE";
  $s.="\tAPO\n";
  fwrite($fp, $s);
}
fclose($fp);
unlink('users');
  }


##
Peter Thoenen - Systems Programmer
Commercial Communications
Camp Bondsteel, Kosovo
##

"Stumbled Upon"...heh (Score:5, Funny) /.
by $carab on 23:00 23 August 2002 (#4131637)

"ForensicTec officials said they stumbled upon the military networks about
two months ago, while checking on network security for a private-sector
client."

Someone new to a Dvorak probably tried to type in "lynx
http://www.google.com"; but instead got "nmap -v -p 1-1024 -sS -P0 army.mil
-T paranoid".

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




[PHP] Re: Join in MySQL-select doesn't work

2002-09-18 Thread David Robley

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> Hello
> I'm using PHP4 and MySQL on Apache webserver.
> I have a table valled "liste" with names of some people, and a table 
> called "postnummer" with zip-codes and citynames.
> My select should join the adress and zip from one table with the 
> cityname from the other table.
> But my join-line does not work.   =:(
> 
> My code results in this line:
> 
> Warning: Supplied argument is not a valid MySQL result resource in 
> /var/www/html/find/resultat.php on line 27
> 
> The code is:
> mysql_select_db("adresser");
> $query = ("SELECT fornavn, efternavn, gade, postnummer.postnummer, 
> postnummer.postbynavn FROM liste
> left outer join postnummer on liste.postnummer = postnummer.postnummer
> WHERE MATCH (fornavn, efternavn) AGAINST ('$search');");
> $result = mysql_query($query);

Add here

echo mysql_error();

which will return you an error string from mysql which will probably be an 
error in your query syntax. It might also be useful to echo $query to 
ensure that it contains what you expect it does (possible register_globals 
problem?)

> while(list($cpr, $fornavn, $efternavn, $gade, $postnummer, $postbynavn) =
> mysql_fetch_row($result))
> 
> What is going on?
> The select is ok if I do not join, but then I'm not able to get the 
> field "postbynavn" from the other table.
> 
> PLEASE HELP!


-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




[PHP] How to approach a new project?

2002-09-18 Thread Wm

I'm trying to work out the best way to approach a new project, and would
appreciate any suggestions/"beware of"s from the experienced PHPers out
there.  I want to build a project where I can enter data from a gym routine
online and generate graphs of the data.  I'm not familiar with GDLIB, but is
this something that can help generate a graph from mySQL data?  Is this
project feasible/realistic for a new PHP programmer?

Also, any suggestions on the structure of the mySQL database would be
appreciated.  The general data that would need to be input would be:

Date
Group
Exercise1
Ex1Weight
Ex1Reps
Ex2Weight
Ex2Reps
Ex3Weight
Ex3Reps
Exercise2
Ex1Weight
Ex1Reps
Ex2Weight
Ex2Reps
Ex3Weight
Ex3Reps
etc...

Plus several calculations would need to be made, which I could presumably do
with PHP when I extract the data.

Any/all suggestions on how to plan this process would be greatly
appreciated!  I'm hoping to have a sound game plan for beginning this
process.

Thanx!
Wm
luvs2shootAThotmailDOTcom





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




Fw: [PHP] Friend of function??

2002-09-18 Thread Kevin Stone

I don't think there is a way to do pull a variable into the local scope of a
function without passing it as a value to the function.  But you can always
do this..

myfunction() {
global $myarray;
//..use myarray..//
unset $GLOBALS['myarray'];
}

You're in no danger this way.

-Kevin

- Original Message -
From: "Anup" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 18, 2002 3:54 PM
Subject: [PHP] Friend of function??


> I want to use arrays (that are outside of a function) to be visible to a
> function. I understand that I must you global. But I was wondering is it
> possible to make it visible to only certain functions, similar to the
> 'friend' keyword in C (or C++ ?) ? The reason, is that I don't feel
> comfortable having globals, (I was brought up that way). Also, if you
> actually declare something global are there any disadvantages such as
> performance hits?
>
>
>
> --
> 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] Efficiency

2002-09-18 Thread Rick Widmer

At 04:41 PM 9/18/02 -0400, Support @ Fourthrealm.com wrote:
>Which is more efficient?

Considering that the difference in efficiency is so small, a more important
question is which is clearer to the programmer?

I prefer b, except that I allow short tags and use the magic print/echo 
function:

  thusly...


$result = mysql_query( ... );

?>


Title





   








PHP by itself is a fantastic template language!

If you aren't doing anything else in a script, mysql_free_result is not needed
in a script like this because the result set will be cleaned up by PHP when
the script ends.

Rick



>a) a sql loop where everything is displayed/formatted using echo stmts, 
>like this:
>
>$result = mysql_query("SELECT * FROM news WHERE active=1");
>while ($row = mysql_fetch_object($result)) {
> echo "$row->title ";
>}
>mysql_free_result($result);
>
>?>
>
>
>OR
>b) a sql loop where you break in and out of php tags as needed:
>
>$result = mysql_query("SELECT * FROM news WHERE active=1");
>while ($row = mysql_fetch_object($result)) {
>?>
>
> title"; ?>
>
>
>}
>mysql_free_result($result);
>
>?>
>
>
>Obviously, these are really simplified examples.  Typically the html code 
>gets much more complicated.
>
>
>Peter
>
>
>- - - - - - - - - - - - - - - - - - - - -
>Fourth Realm Solutions
>[EMAIL PROTECTED]
>http://www.fourthrealm.com
>Tel: 519-739-1652
>- - - - - - - - - - - - - - - - - - - - -
>
>
>--
>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] Friend of function??

2002-09-18 Thread Anup

I want to use arrays (that are outside of a function) to be visible to a
function. I understand that I must you global. But I was wondering is it
possible to make it visible to only certain functions, similar to the
'friend' keyword in C (or C++ ?) ? The reason, is that I don't feel
comfortable having globals, (I was brought up that way). Also, if you
actually declare something global are there any disadvantages such as
performance hits?



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




Re: [PHP] Auto-increment value

2002-09-18 Thread Leonid Mamtchenkov

Dear Faisal Abdullah,

Once you wrote about "RE: [PHP] Auto-increment value":
> > There is a similar one for postgresql as well: pg_last_oid() .
> 
> I tried that. It gives me 24807, instead of 5.
> Or is oid is a reference to something else, which would 
> lead me to the '5' i'm looking for?

I'd bet that 24807 is your oid.  Check the difference between
"SELECT * FROM table;" and "SELECT oid,* FROM table;".

HTH.

> -- snip snip --
> 
> if($result = pg_exec($db, $sql))
> {
>   $query = "success";
>   echo "oid : " .pg_last_oid($result);
>   }
> 
> -- snip snip --

-- 
Best regards,
  Leonid Mamtchenkov, RHCE
  System Administrator
  Francoudi & Stephanou Ltd.

BOFH: somebody was calculating pi on the server

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




[PHP] Re: Unserialize stopped working after php & db upgrade

2002-09-18 Thread Paul Nicholson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Geoff,
It looks like that string has been serialized multiple times.
Update your serialized string to:
- -
a:2:{s:10:"attributes";a:32:{s:13:"attr
ibute_204";s:1:"4";s:13:"attribute_205";s:1:"5";s:13:"attribute_206";s:3:"Ye
s";s:13:"attribute_207";s:3:"Yes";s:13:"attribute_208";s:3:"Yes";s:13:"attri
bute_209";s:3:"Yes";s:13:"attribute_210";s:2:"No";s:13:"attribute_211";s:2:"
No";s:13:"attribute_212";s:1:"2";s:13:"attribute_213";s:2:"No";s:13:"attribu
te_214";s:2:"No";s:13:"attribute_215";s:2:"No";s:13:"attribute_216";s:3:"Yes
";s:13:"attribute_217";s:2:"No";s:13:"attribute_218";s:2:"No";s:13:"attribut
e_219";s:2:"No";s:13:"attribute_220";s:2:"No";s:13:"attribute_221";s:2:"No";
s:13:"attribute_222";s:2:"No";s:13:"attribute_223";s:2:"No";s:13:"attribute_
224";s:15:"Residual
 drying";s:13:"attribute_225";s:3:"Yes";s:13:"attribute_226";s:2:"No";s:13:"
attribute_227";s:2:"12";s:13:"attribute_228";s:2:"53";s:13:"attribute_229";s
:5:"White";s:13:"attribute_230";s:3:"651";s:13:"attribute_231";s:3:"555";s:1
3:"attribute_232";s:3:"460";s:13:"attribute_233";s:1:"C";s:13:"attribute_234
";s:1:"B";s:13:"attribute_235";s:1:"C";}s:5:"lists";a:20:{s:14:"list_2_1_lab
el";s:0:"";s:17:"list_2_1_man_code";s:0:"";s:13:"list_2_1_code";s:0:"";s:13:
"list_2_1_sort";s:0:"";s:14:"list_2_2_label";s:0:"";s:17:"list_2_2_man_code"
;s:0:"";s:13:"list_2_2_code";s:0:"";s:13:"list_2_2_sort";s:0:"";s:14:"list_2
_3_label";s:0:"";s:17:"list_2_3_man_code";s:0:"";s:13:"list_2_3_code";s:0:""
;s:13:"list_2_3_sort";s:0:"";s:14:"list_2_4_label";s:0:"";s:17:"list_2_4_man
_code";s:0:"";s:13:"list_2_4_code";s:0:"";s:13:"list_2_4_sort";s:0:"";s:14:"
list_2_5_label";s:0:"";s:17:"list_2_5_man_code";s:0:"";s:13:"list_2_5_code";
s:0:"";s:13:"list_2_5_sort";s:0:"";}}
- 
Yes, you'll need to delete the line breaks and make that one line.
As far as the format, I'm not sure of a url/manpageI just know a little 
of the format.
The basic is:
var type : var length : var value;
For arrays you have the format reoccur inside of braces.
~Pauly
 
On Wednesday 18 September 2002 04:19 pm, Geoff Caplan wrote:
> Paul,
>
> PN> There must be an error in the serialized stringswould you mind
> PN> posting  one for us to look at? How about posting some code?
>
> This is all very strange. The code has been working in production for
> months. Since the upgrade of PHP and the DB, some are working and some
> not. I can't see any pattern.
>
> Where can I find info of the serialize format so I can look for
> damage?
>
> Here is one of the strings that is not unserializing - sorry it is so
> long.
>
>--  Geoff
> Caplan Advantae Ltd
>
> mailto:[EMAIL PROTECTED]
> http://www.advantae.com

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
"The webthe way you want it!"
[EMAIL PROTECTED]

"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9iOfEDyXNIUN3+UQRAkt6AJwIFoicQsDCIXCsaU1VmTqLYM1ysACZAdvP
S2JTvSK3vZnn/aV4thj++bE=
=NGC+
-END PGP SIGNATURE-

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




[PHP] Efficiency

2002-09-18 Thread Support @ Fourthrealm.com

Which is more efficient?

a) a sql loop where everything is displayed/formatted using echo stmts, 
like this:

$result = mysql_query("SELECT * FROM news WHERE active=1");
while ($row = mysql_fetch_object($result)) {
 echo "$row->title ";
}
mysql_free_result($result);

?>


OR
b) a sql loop where you break in and out of php tags as needed:



 title"; ?>





Obviously, these are really simplified examples.  Typically the html code 
gets much more complicated.


Peter


- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


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




Re: [PHP] Re: replacing mail()

2002-09-18 Thread Rick Widmer


>"Liam Mackenzie" <[EMAIL PROTECTED]> wrote in message
>002a01c25f00$54a01050$0b00a8c0@enigma">news:002a01c25f00$54a01050$0b00a8c0@enigma...
>  I've spent over 6 months trying to get sendmail to work to my liking,
>don't
>  talk to me about sendmail!
>  :-P

I know the feeling.  I use qmail now.


> >
> > eXtremail does the job real good  ;-)
> > www.extremail.com
> >
> > Is there any way of EASILY rewriting PHP's mail() function?

No.  Qmail provides a sendmail wrapper that replaces the sendmail program 
and injects
mail onto the qmail queue.  I just replaced the /sbin/sendmail program with 
a link to
  /var/qmail/bin/sendmail and all programs on the server, including PHP 
send mail through
it.

Rick


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




[PHP] Re: Global Vars

2002-09-18 Thread David Eggler

In article <004b01c25f36$961fbbd0$6200a8c0@squitta>,
 [EMAIL PROTECTED] (Sascha Braun) wrote:

> But how can i make definitions like  method="post">

Those variables can be accesd via the global $_POST['varname']

> working without usage of hidden fields.
> 
> Or links like test.php?action=update and so on.

These can be reached vie $_GET['varname']
 
> Please gimme a hint
> 
> Sascha
Thats what works for me.

greets David

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




[PHP] Re: Unserialize stopped working after php & db upgrade

2002-09-18 Thread Geoff Caplan

Paul,

PN> There must be an error in the serialized stringswould you mind
PN> posting  one for us to look at? How about posting some code?

This is all very strange. The code has been working in production for
months. Since the upgrade of PHP and the DB, some are working and some
not. I can't see any pattern.

Where can I find info of the serialize format so I can look for
damage?

Here is one of the strings that is not unserializing - sorry it is so
long.

s:1745:"s:1735:"s:1725:"s:1715:"s:1705:"s:1695:"s:1685:"s:1675:"s:1665:"s:1655:"s:1645:"s:1635:"s:1625:"s:1615:"a:2:{s:10:"attributes";a:32:{s:13:"attribute_204";s:1:"4";s:13:"attribute_205";s:1:"5";s:13:"attribute_206";s:3:"Yes";s:13:"attribute_207";s:3:"Yes";s:13:"attribute_208";s:3:"Yes";s:13:"attribute_209";s:3:"Yes";s:13:"attribute_210";s:2:"No";s:13:"attribute_211";s:2:"No";s:13:"attribute_212";s:1:"2";s:13:"attribute_213";s:2:"No";s:13:"attribute_214";s:2:"No";s:13:"attribute_215";s:2:"No";s:13:"attribute_216";s:3:"Yes";s:13:"attribute_217";s:2:"No";s:13:"attribute_218";s:2:"No";s:13:"attribute_219";s:2:"No";s:13:"attribute_220";s:2:"No";s:13:"attribute_221";s:2:"No";s:13:"attribute_222";s:2:"No";s:13:"attribute_223";s:2:"No";s:13:"attribute_224";s:15:"Residual
drying";s:13:"attribute_225";s:3:"Yes";s:13:"attribute_226";s:2:"No";s:13:"attribute_227";s:2:"12";s:13:"attribute_228";s:2:"53";s:13:"attribute_229";s:5:"White";s:13:"attribute_230";s:3:"651";s:13:"attribute_231";s:3:"555";s:13:"attribute_232";s:3:"460";s:13:"attribute_233";s:1:"C";s:13:"attribute_234";s:1:"B";s:13:"attribute_235";s:1:"C";}s:5:"lists";a:20:{s:14:"list_2_1_label";s:0:"";s:17:"list_2_1_man_code";s:0:"";s:13:"list_2_1_code";s:0:"";s:13:"list_2_1_sort";s:0:"";s:14:"list_2_2_label";s:0:"";s:17:"list_2_2_man_code";s:0:"";s:13:"list_2_2_code";s:0:"";s:13:"list_2_2_sort";s:0:"";s:14:"list_2_3_label";s:0:"";s:17:"list_2_3_man_code";s:0:"";s:13:"list_2_3_code";s:0:"";s:13:"list_2_3_sort";s:0:"";s:14:"list_2_4_label";s:0:"";s:17:"list_2_4_man_code";s:0:"";s:13:"list_2_4_code";s:0:"";s:13:"list_2_4_sort";s:0:"";s:14:"list_2_5_label";s:0:"";s:17:"list_2_5_man_code";s:0:"";s:13:"list_2_5_code";s:0:"";s:13:"list_2_5_sort";s:0:"";}}";";";";";";";";";";";";";";
--  Geoff Caplan Advantae Ltd

mailto:[EMAIL PROTECTED]
http://www.advantae.com


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




Re: [PHP] imagettftext function does not handle combining characterproperly

2002-09-18 Thread Ziying Sherwin

Rasmus,

Thanks for the suggestion. We tried to compile php 4.2.2 with freetype 2.1.2
and gd 2.0.1, but during the configuration, we kept getting the following 
error messages:

configure: error: Unable to find required gettext library

And the following lines in config.log:

configure:26000: gcc -o conftest -g -O2  -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=280 
-DMOD_SSL=208105 -DMOD_PERL -DUSE_PERL_SSI -DEAPI -DEAPI_MM -DUSE_EXPAT -DSHARED_CORE  
-R/usr/ucblib -L/usr/ucblib -R/depot/package/openssl_0.9.6b/vendor/lib 
-L/depot/package/openssl_0.9.6b/vendor/lib 
-R/depot/package/gcc_3.0/lib/gcc-lib/sparc-sun-solaris2.8/3.0 
-L/depot/package/gcc_3.0/lib/gcc-lib/sparc-sun-solaris2.8/3.0 
-R/depot/package/zlib_1.1.4/lib -L/depot/package/zlib_1.1.4/lib 
-R/depot/package/bzip2_1.0.1/lib -L/depot/package/bzip2_1.0.1/lib 
-R/depot/package/cracklib_2.7/vendor/lib -L/depot/package/cracklib_2.7/vendor/lib 
-R/depot/package/curl_7.9.2/lib -L/depot/package/curl_7.9.2/lib -R/depot/lib 
-L/depot/lib -R/depot/package/rsaref_2.0/lib -L/depot/package/rsaref_2.0/lib 
-R/depot/package/openssl_0.9.6b/lib -L/depot/package/openssl_0.9.6b/lib 
-R/depot/package/gdbm_1.8/lib -L/depot/package/gdbm_1.8/lib 
-R/depot/package/berkeley_db_3.2.9/lib -L/depot/package/berkeley_db_3.2.9/lib 
-R/depot/package/libxml_2.4.13/vendor/lib -L/depot/package/libxml_2.4.13/vendor/lib 
-R/depot/package/zlib_1.1.3/lib -L/depot/package/zlib_1.1.3/lib 
-R/depot/package/libiconv_1.7/lib -L/depot/package/libiconv_1.7/lib
-R/depot/package/jpeg_6b/lib -L/depot/package/jpeg_6b/lib 
-R/depot/package/libpng_1.2.3/lib -L/depot/package/libpng_1.2.3/lib 
-R/depot/package/xpm_3.4k/lib -L/depot/package/xpm_3.4k/lib 
-R/depot/package/t1lib_1.1.1/vendor/lib -L/depot/package/t1lib_1.1.1/vendor/lib 
-R/depot/package/gd_2.0.1/lib -L/depot/package/gd_2.0.1/lib 
-L/depot/package/gettext_0.10.40/vendor/lib conftest.c -lc  -lgd -lt1 -lX11 -lXpm 
-lpng -lz -ljpeg -lz -lnsl -lsocket -lm -liconv -lz -lxml2 -ldb-3 -lgdbm -lcurl -lnsl 
-lsocket -ldl -lcrypto -lssl -lrsaref -lcurl -lcrack -lbz2 -lz -lcrypt -lssl -lcrypto 
-lresolv -lresolv -lresolv -lm -ldl -lnsl -lsocket  -lsocket -lgcc -lcrypt 1>&5
Undefined   first referenced
 symbol in file
FT_Init_FreeType/depot/lib/libgd.so
FT_Set_Char_Size/depot/lib/libgd.so
FT_Done_Face/depot/lib/libgd.so
FT_Glyph_Get_CBox   /depot/lib/libgd.so
FT_Glyph_To_Bitmap  /depot/lib/libgd.so
FT_Get_Kerning  /depot/lib/libgd.so
FT_Glyph_Transform  /depot/lib/libgd.so
FT_Done_Glyph   /depot/lib/libgd.so
FT_Load_Glyph   /depot/lib/libgd.so
FT_Get_Char_Index   /depot/lib/libgd.so
FT_New_Face /depot/lib/libgd.so
FT_Get_Glyph/depot/lib/libgd.so
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 25989 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply.  */
char bindtextdomain();

int main() {
bindtextdomain()
; return 0; }


The configure options that we use are:

sh ./configure \
  --prefix=/depot/package/php_4.2.2/vendor \
  --with-apxs=/depot/package/apache_1.3.22/vendor/bin/apxs \
  --enable-safe-mode \
  --enable-discard-path \
  --with-exec-dir=/depot/package/apache_1.3.22/vendor/php-bin \
  --with-config-file-path=/depot/package/php_4.2.2/vendor \
  --with-openssl=/depot/package/openssl_0.9.6b/vendor \
  --enable-libgcc \
  --disable-short-tags \
  --with-zlib=/depot/package/zlib_1.1.4 \
  --enable-bcmath \
  --with-bz2=/depot/package/bzip2_1.0.1 \
  --enable-calendar \
  --with-jpeg-dir=/depot/package/jpeg_6b \
  --with-tiff-dir=/depot/package/tiff_3.5.7 \
  --with-crack=/depot/package/cracklib_2.7/vendor \
  --with-curl=/depot/package/curl_7.9.2 \
  --with-gdbm=/depot/package/gdbm_1.8 \
  --with-db3=/depot/package/berkeley_db_3.2.9 \
  --with-dom=/depot/package/libxml_2.4.13/vendor \
  --with-fribidi=/depot/package/fribidi_0.10.0 \
  --enable-ftp \
  --with-gd=/depot/package/gd_2.0.1 \
  --enable-gd-native-tt \
  --enable-gd-imgstrttf \
  --with-png-dir=/depot/package/libpng_1.2.3 \
  --with-xpm-dir=/depot/package/xpm_3.4k \
  --with-imap-ssl=/depot/package/imap_2001a \
  --with-mysql=/depot/package/mysql_3.23.46 \
  --with-ncurses=/depot/package/ncurses_5.2/vendor \
  --with-pdflib=/depot/package/pdflib_4.0.1 \
  --enable-wddx \
  --enable-sockets

Re: [PHP] Installation

2002-09-18 Thread Dan Ostrowski

Well first off... the normal sequence of events goes as thus:

./configure 

./make

./make install


So you are missing a step in there.  Secondarily, a "make clean" will only
go through and tidy up bits of code that need cleaning AFTER an install.
It will not "uninstall and clear space" as it were, so you have probably
not really put yourself in a position to start all over.  However, I am
not sure how easily that can be helped.

The biggest thing about installing ANY software from source is making sure
you run ./configure --help first.  That will show you, in tedious manpage
form, what kind of options are available.

The big thing, when I installed PHP on my machine, was simply to have
apache installed and able to run first before attempting to hook up PHP. Also
i had to dig through ./configure --help because I needed to use PostgreSQL
so i needed to do something like ./configure --enable-pgsql to get things
to run right.

I am by no means an expert on this sort of thing, so perhaps another linux user could 
help? I didn't really use a "configuration script" to install my PHP, but a lot of 
people do, so perhaps they could share?

regards,
dan





On Wed, 18 Sep 2002 21:14:04 +0200
"Sascha Braun" <[EMAIL PROTECTED]> wrote:

> Right now I've made a make clean to start it all over.
> 
> Would you like to help me a little?
> 
> Thanks
> 
> Sascha
> 
> - Original Message -
> From: "Dan Ostrowski" <[EMAIL PROTECTED]>
> To: "Sascha Braun" <[EMAIL PROTECTED]>
> Sent: Wednesday, September 18, 2002 10:12 PM
> Subject: Re: [PHP] Installation
> 
> 
> > I would really never recommend using an RPM to install any server
> components really.  It ends up being more problomatic than it's worth,
and
> the little bit of extra work nessesary for source installs are usually
worth
> it in know how and performance.
> >
> > my 2 cents.
> >
> > dan
> >
> > On Wed, 18 Sep 2002 20:47:45 +0200
> > "Sascha Braun" <[EMAIL PROTECTED]> wrote:
> >
> > > All these installation docs are just driving me crazy.
> > >
> > > How am I installing PHP 4 any version on my RedHat 7.3 Server.
> > >
> > > Isn't it done by an RPM easily?
> > >
> > > Bye
> > >
> > > Sascha
> > >
> >

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




[PHP] test

2002-09-18 Thread Ryan A

Testing



[PHP] Help Fatal Error

2002-09-18 Thread James E Hicks III

[18-Sep-2002 15:19:31] PHP Fatal error:  Unable to start session mm module in
Unknown on line 0

What have I done? I updated my redhat box using up2date. Now I get these errors
when I am running command line scripts only. I'm pretty sure if I reboot the box
my web-scripts will have the same problem. How can I fix this and what is the
problem?


James E Hicks III
Noland Company
2700 Warwick Blvd
Newport News, VA 23607
757-928-9000 ext 435
[EMAIL PROTECTED]


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




[PHP] Re: PHP4 Oracle SELECT statement ERROR

2002-09-18 Thread notoriousvic_ca

I have also noticed that when I retreive values from a view into an
associated array I will not get the proper name of the field. For example if
I create a view like :

create or replace view view_specimen_details
as SELECT a.ITEM_CLASS "order",
   a.FIELD2 "scientific name",
   a.FIELD16"common name",
FROM  catalogue a

 foreach ($resultSet[0] as $fN => $fV)
 {
echo $fN;
echo $fV;
echo "";
 }

I will get :
ITEM_CLASS [value]
FIELD2   [value]
FIELD16 [value]

What I want is :
order [value]
scientific name [value]
common name [value]

Does anyone have a work around?



"Notoriousvic_ca" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi I am a programmer and I just started using PHP4.
>
> I created a view in Oracle (code below) and I added an underscore to the
end
> of one of the column names ("id_number_").
>
> When I use asp code to select from this view I have to write a select
> statement like so:
> "Select * from view_specimen_details where id_number_=1"
>
> However when I use PHP4 with OCI8 I get an error when I try to execute the
> above statement. Although if I remove the underscore of the variable in
the
> where clause everything works.
>
> "Select * from view_specimen_details where id_number=1"
>
> I cannot change the view. Does anyone have a workaround for this problem?
>
> Thanks in Advance
>
> -- Create view
> create or replace view view_specimen_details
>  as SELECT   a.ID_NUMBERid_number_,
>   FROM  catalogue
>
>



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




Re: [PHP] Unserialize stopped working after php & db upgrade

2002-09-18 Thread Paul Nicholson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey,
There must be an error in the serialized stringswould you mind posting 
one for us to look at? How about posting some code?
~Pauly

On Wednesday 18 September 2002 02:02 pm, you wrote:
> Hi folks
>
> Bit of a major panic - any help MUCH appreciated.
>
> I have been storing serialized arrays in MySQL Gemini tables without
> any problems.
>
> But with Gemini looking more and more like a dead duck, I decided to
> take the server down and port from Gemini to InnoDB. I also took the
> opportunity to upgrade from php 4.1 to php 4.2.2
>
> Now, when I run unserialize( ) on the serialized arrays, the strings
> are being returned unchanged. No error - they are simply passing
> through unserialize( ) without being altered.
>
> It is not a backslash issue, as there are no escaped characters in the
> strings affected, nor are the strings urlencoded.
>
> I have no idea how to go about fixing this and I am under serious
> pressure to get the server back up ASAP - so I am very much hoping
> that to get a response from the list.

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
"The webthe way you want it!"
[EMAIL PROTECTED]

"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9iM4vDyXNIUN3+UQRAmhGAJ9jAX88mO1F7MvFPTy/cB0jNf5d0ACeIaDb
jOLego6+k2mIcplJ3y9uUNs=
=a4Br
-END PGP SIGNATURE-


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




Re: [PHP] Re: Large uploads

2002-09-18 Thread Paul Nicholson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey,
You might want to check the archives..I know this came up before.
Anyway, you didn't say if you checked your memory limitthat has to be 
larger than the post_max_size.
HTH!
~Pauly

On Wednesday 18 September 2002 11:54 am, you wrote:
> Hi again,
>
> Is there anyone in this group that has successfully uploaded a file large
> than 10 MB?
>
> Regards, Rickard.
>
>
> "Rickard Dahlstrand" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> > Hi,
> >
> > I have been trying to upload files using PHP 4.1.2. Everything works OK
> > until the filesize gets above 10MB. I have set all the paramaters upload
> > filesize and max postsize in PHP and Apache ini-files but it still
> > doesn't work. The server seems to just drop the connection since IE just
> > tells me that the server didn't respond.
> >
> > Please help.
> >
> > Rickard.

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
"The webthe way you want it!"
[EMAIL PROTECTED]

"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9iM1yDyXNIUN3+UQRAgDXAJ9HFJ0GCINrupusBPM/Eq+LkyRCNQCcCAIc
A5PpKLPaYaRVEb2SHPqmzms=
=Ou2V
-END PGP SIGNATURE-


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




RE: [PHP] Date-format

2002-09-18 Thread Chuck Payne


I know everyone love to quote read the manual and forget that we[newbies]
are only asking here because we need help...so here you go...

You can do the following...

DATE_FORMAT IS THE MySQL Command

And let say you want to format your date as the following mm-dd-yy(US) or
dd-mm-yy(the rest of the world).

By the way this are format keys

%m the month in numbers,
%d the days in numbers,
%y the year in number
%M spells out the month
%D gives the date with th, rd, nd all that
%Y gives all four numbers

So you do the following sql statement...

SELECT DATE_FORMAT(yourdate, '%m-%d-%y') as youwanttocallit FROM yourtable;

So in your php code you can do this from your MySQL statement...

$youwantcallit = $myrow[youwanttoit];



Advance note

then if you don't want to show 00-00-00 you can do this...

if ($youwanttocallit == "00-00-00") {
  $youwanttocallit = " ";
}

that way you don't have a bunch of 00-00-00 showing up.

I hope that helps, because that is what the maillisting is for and not to
always quote "Read the Book".

Chuck Payne
Magi Design and Support



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




[PHP] Installation

2002-09-18 Thread Sascha Braun

All these installation docs are just driving me crazy.

How am I installing PHP 4 any version on my RedHat 7.3 Server.

Isn't it done by an RPM easily?

Bye

Sascha



[PHP] PHP4 Oracle SELECT statement ERROR

2002-09-18 Thread notoriousvic_ca

Hi I am a programmer and I just started using PHP4.

I created a view in Oracle (code below) and I added an underscore to the end
of one of the column names ("id_number_").

When I use asp code to select from this view I have to write a select
statement like so:
"Select * from view_specimen_details where id_number_=1"

However when I use PHP4 with OCI8 I get an error when I try to execute the
above statement. Although if I remove the underscore of the variable in the
where clause everything works.

"Select * from view_specimen_details where id_number=1"

I cannot change the view. Does anyone have a workaround for this problem?

Thanks in Advance

-- Create view
create or replace view view_specimen_details
 as SELECT   a.ID_NUMBERid_number_,
  FROM  catalogue



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




Re: [PHP] Conditionally include file based on document location

2002-09-18 Thread Eric C. Pollitt

Thanks for the insight, but I'm not clear on how to implement this. Here is
what I have so far:



Perhaps $DOCUMENT_URI is not correct...perhaps it should be $PATH_INFO? Or
should I have some sort of return or print statement?

TEST URL: http://globalhemp.phpwebhosting.com/switch.php

Thanks,

Eric C. Pollitt, Founder
401 E. Illinois Ave.
Peoria, IL 61603
Global Hemp - Portal to the hemp community
http://www.globalhemp.com/

"Hemp is of first necessity to commerce and marine, in other words, to the
wealth and protection of the country."
-- Thomas Jefferson

> From: Marek Kilimajer <[EMAIL PROTECTED]>
> Date: Wed, 18 Sep 2002 10:59:46 +0200
> To: PHP <[EMAIL PROTECTED]>
> Subject: Re: [PHP] Conditionally include file based on document location
> 
> switch($DOCUMENT_URI) {
>   case '/':
>   include(" watch you want");
>   break;
>   case 
> 
> }
> 
> Eric C. Pollitt wrote:
> 
>> I would like to know how to conditionally included a file based on the
>> document location.
>> 
>> The purpose is for placement of location-specific navigation menus.
>> 
>> I'm not interested in DHTML hierarchical drop-down menus, rather inserting
>> ready made HTML files using perhaps (?) DOCUMENT_URI (?) and error checking
>> logic.
>> 
>> 
>> EXAMPLE
>> 
>> If DOCUMENT_URI is "/" (home) then the following file included:
>> 
>> URL: 
>> 
>> If DOCUMENT_URI is "/quicktime/" then the following file included:
>> 
>> URL: 
>> 
>> If DOCUMENT_URI is "/quicktime/download/" then the following file included:
>> 
>> URL: 
>> 
>> 
>> The error checking logic would be for child directories that don't have
>> their own include file and thus would use a parent directory include file.
>> If a parent directory file doesn't exist, it would include the top-level
>> (home) include file.
>> 
>> The closest PHP example that I have found thus far follows:
>> 
>> 
>> [INCOMPLETE] PHP CONDITIONAL INCLUDE EXAMPLE
>> Extracted from: 
>> 
>> > if ($location == "quicktime") {
>> include("quicktime.inc");
>> if ($location == "quicktime/download") {
>> include("download.inc");
>> } else {
>> include("home.inc");
>> }
>> ?>
>> 
>> 
>> THANKS!
>> 
>> Eric C. Pollitt, Founder
>> 401 E. Illinois Ave.
>> Peoria, IL 61603
>> Global Hemp - Portal to the hemp community
>> http://www.globalhemp.com/
>> 
>> Create like a god.  Command like a king.  Work like a slave!
>> -- Constantin Brancusi
>> 
>> 
>>  
>> 
> 
> 
> -- 
> 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] Date-format

2002-09-18 Thread Jacob Miller

 From http://www.mysql.com/doc/en/Using_DATE.html


The format of a DATE value is '-MM-DD'. According to ANSI SQL, no other 
format is allowed. You should use this format in UPDATE expressions and in 
the WHERE clause of SELECT statements. For example:

mysql> SELECT * FROM tbl_name WHERE date >= '1997-05-05';


- Jacob

At 02:28 09/19/2002, Support @ Fourthrealm.com wrote:
>Reformatting before an inserting/updating is one option, but how would we 
>change the mySQL database to accept the other format?
>
>Peter
>
>
>At 04:18 PM 9/12/2002 +0800, Jacob Miller wrote:
>>Why can't you just reformat it before inserting it into the db?
>>
>> $date = "31.12.2002";
>>
>> $parts = split("\.", $date);
>> echo $parts[2]."-".$parts[1]."-".$parts[0];
>>
>>- jacob
>>
>>At 16:13 09/12/2002, Tommi Virtanen wrote:
>>>Well, insert format in wrong, but in Finland enter format is dd.mm.,
>>>so I cannot use other insert format (it have to do other way).
>>>
>>>gustavus
>>>
>>> >It looks to me like the database is interpreting your date
>>> >incorrectly.  Try changing the format you use to insert, -mm-dd
>>>
>>>
>>>
>>>--
>>>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
>
>- - - - - - - - - - - - - - - - - - - - -
>Fourth Realm Solutions
>[EMAIL PROTECTED]
>http://www.fourthrealm.com
>Tel: 519-739-1652
>- - - - - - - - - - - - - - - - - - - - -
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


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




RE: [PHP] Sessions /Cross Domain

2002-09-18 Thread James E Hicks III

Have a look at this php.ini setting, I think it will help you!

; The domain for which the cookie is valid.
session.cookie_domain =


James


-Original Message-
From: David Buerer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 1:39 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Sessions /Cross Domain


Are sessions domain specific?
 
What I mean is this.
 
Suppose I have two websites:
secure.web.com
www.web.com  
and both web sites point to the same set of data.
 
If I looking at web page http://www.web.com/index.html
  and have a set of session variables defined
and then I call the page https://secure.web.com/index.html
  do I still have access to the same
session variables?


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




Re: [PHP] Date-format

2002-09-18 Thread Support @ Fourthrealm.com

Reformatting before an inserting/updating is one option, but how would we 
change the mySQL database to accept the other format?

Peter


At 04:18 PM 9/12/2002 +0800, Jacob Miller wrote:
>Why can't you just reformat it before inserting it into the db?
>
> $date = "31.12.2002";
>
> $parts = split("\.", $date);
> echo $parts[2]."-".$parts[1]."-".$parts[0];
>
>- jacob
>
>At 16:13 09/12/2002, Tommi Virtanen wrote:
>>Well, insert format in wrong, but in Finland enter format is dd.mm.,
>>so I cannot use other insert format (it have to do other way).
>>
>>gustavus
>>
>> >It looks to me like the database is interpreting your date
>> >incorrectly.  Try changing the format you use to insert, -mm-dd
>>
>>
>>
>>--
>>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

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


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




Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Sascha Braun

That seems to be a more perfekt way.

Honorabel, nice.

Sascha

- Original Message -
From: "Robert Cummings" <[EMAIL PROTECTED]>
To: "Sascha Braun" <[EMAIL PROTECTED]>
Cc: "PHP Mailingliste" <[EMAIL PROTECTED]>; "David Buerer"
<[EMAIL PROTECTED]>
Sent: Wednesday, September 18, 2002 8:16 PM
Subject: Re: [PHP] Sessions /Cross Domain


> Sascha Braun wrote:
> >
> > Yeah,
> >
> > I believe so, but you could reinitialize them when you jump to the other
> > webserver, or you use one
> > mysql database for sessionmanagement for both webservers.
>
> Not exactly true, since if they jump to another server, you can make the
> assumption they have a session cookie if they referrer is given, or if you
> set their session ID in the URL. This however breaks down if they don't
> click to the second site but go there without using the first as a jump
> point. A sneakier, but more effective solution IMHO, is to bury an
invisible
> 1x1 pixel in the first site which is located on the second server and vice
> versa in the second site. This 1x1 pixel should actually be a PHP script
and
> you pass it the newly generated session ID, or permanent cookie ID, so
that
> the second site can synch up on the same ID, which is only really useful
if
> they use a shared database :)
>
> Cheers,
> Rob.
> --
> .-.
> | Robert Cummings |
> :-`.
> | Webdeployer - Chief PHP and Java Programmer  |
> :--:
> | Mail  : mailto:[EMAIL PROTECTED] |
> | Phone : (613) 731-4046 x.109 |
> :--:
> | Website : http://www.webmotion.com   |
> | Fax : (613) 260-9545 |
> `--'
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Sascha Braun

Normaly you store SESSION Data in variables.

When you make the step to another domain, you should reassign a new Session
and
give to data of the old session to the new one.

Or isn't is possible to put some date behind an url like
www.somedomain.com?check=it&out=mh

If you are working with databases you just have to take some values out of
your session,
like username and password, or some like this and find out, what data in the
database belongs
to this user (basket, or viewed artikels)

But you still need to work with one database for both servers, or write all
data to both databases
(Server1 & Server2)

Am I wrong are would this work out?

Sascha


- Original Message -
From: "David Buerer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 18, 2002 7:48 PM
Subject: RE: [PHP] Sessions /Cross Domain


> I do have control over the content of both domains...in fact right now
it's
> the identical contenteven the same physical data store on the disk, I
> just seem to be losing session variables for one reason or another.
>
> DAvid
>
> -Original Message-
> From: Robert Cummings [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 18, 2002 11:06 AM
> To: David Buerer
> Cc: '[EMAIL PROTECTED]'
> Subject: Re: [PHP] Sessions /Cross Domain
>
>
> Domains are specific, and so you do not get the same sesion variables.
> here's are
> ways around this, but you need control of the content of both servers.
>
> Cheers,
> Rob.
>
> David Buerer wrote:
> >
> > Are sessions domain specific?
> >
> > What I mean is this.
> >
> > Suppose I have two websites:
> > secure.web.com
> > www.web.com 
> > and both web sites point to the same set of data.
> >
> > If I looking at web page http://www.web.com/index.html
> >   and have a set of session variables
> defined
> > and then I call the page https://secure.web.com/index.html
> >   do I still have access to the same
> > session variables?
>
> --
> .-.
> | Robert Cummings |
> :-`.
> | Webdeployer - Chief PHP and Java Programmer  |
> :--:
> | Mail  : mailto:[EMAIL PROTECTED] |
> | Phone : (613) 731-4046 x.109 |
> :--:
> | Website : http://www.webmotion.com   |
> | Fax : (613) 260-9545 |
> `--'
>


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




Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Robert Cummings

Sascha Braun wrote:
> 
> Yeah,
> 
> I believe so, but you could reinitialize them when you jump to the other
> webserver, or you use one
> mysql database for sessionmanagement for both webservers.

Not exactly true, since if they jump to another server, you can make the
assumption they have a session cookie if they referrer is given, or if you
set their session ID in the URL. This however breaks down if they don't
click to the second site but go there without using the first as a jump
point. A sneakier, but more effective solution IMHO, is to bury an invisible
1x1 pixel in the first site which is located on the second server and vice
versa in the second site. This 1x1 pixel should actually be a PHP script and
you pass it the newly generated session ID, or permanent cookie ID, so that
the second site can synch up on the same ID, which is only really useful if
they use a shared database :)

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




RE: [PHP] Sessions /Cross Domain

2002-09-18 Thread David Buerer

I do have control over the content of both domains...in fact right now it's
the identical contenteven the same physical data store on the disk, I
just seem to be losing session variables for one reason or another.

DAvid

-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 11:06 AM
To: David Buerer
Cc: '[EMAIL PROTECTED]'
Subject: Re: [PHP] Sessions /Cross Domain


Domains are specific, and so you do not get the same sesion variables.
here's are
ways around this, but you need control of the content of both servers.

Cheers,
Rob.

David Buerer wrote:
> 
> Are sessions domain specific?
> 
> What I mean is this.
> 
> Suppose I have two websites:
> secure.web.com
> www.web.com 
> and both web sites point to the same set of data.
> 
> If I looking at web page http://www.web.com/index.html
>   and have a set of session variables
defined
> and then I call the page https://secure.web.com/index.html
>   do I still have access to the same
> session variables?

-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'



Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Jacob Miller

My first assumption would be yes they are domain specific, but it might be 
possible to cross domains if both domains were run from the same web server 
and you were to pass the session id between pages manually rather than it 
being stored in a cookie..

What does everyone else think?

- Jacob

At 02:06 09/19/2002, Robert Cummings wrote:
>Domains are specific, and so you do not get the same sesion variables. 
>here's are
>ways around this, but you need control of the content of both servers.
>
>Cheers,
>Rob.
>
>David Buerer wrote:
> >
> > Are sessions domain specific?
> >
> > What I mean is this.
> >
> > Suppose I have two websites:
> > secure.web.com
> > www.web.com 
> > and both web sites point to the same set of data.
> >
> > If I looking at web page http://www.web.com/index.html
> >   and have a set of session variables 
> defined
> > and then I call the page https://secure.web.com/index.html
> >   do I still have access to the same
> > session variables?
>
>--
>.-.
>| Robert Cummings |
>:-`.
>| Webdeployer - Chief PHP and Java Programmer  |
>:--:
>| Mail  : mailto:[EMAIL PROTECTED] |
>| Phone : (613) 731-4046 x.109 |
>:--:
>| Website : http://www.webmotion.com   |
>| Fax : (613) 260-9545 |
>`--'
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Sascha Braun

Yeah,

I believe so, but you could reinitialize them when you jump to the other
webserver, or you use one
mysql database for sessionmanagement for both webservers.

Ciao

Sascha


- Original Message -
From: "David Buerer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 18, 2002 7:38 PM
Subject: [PHP] Sessions /Cross Domain


> Are sessions domain specific?
>
> What I mean is this.
>
> Suppose I have two websites:
> secure.web.com
> www.web.com 
> and both web sites point to the same set of data.
>
> If I looking at web page http://www.web.com/index.html
>   and have a set of session variables
defined
> and then I call the page https://secure.web.com/index.html
>   do I still have access to the same
> session variables?
>


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




Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Robert Cummings

Domains are specific, and so you do not get the same sesion variables. here's are
ways around this, but you need control of the content of both servers.

Cheers,
Rob.

David Buerer wrote:
> 
> Are sessions domain specific?
> 
> What I mean is this.
> 
> Suppose I have two websites:
> secure.web.com
> www.web.com 
> and both web sites point to the same set of data.
> 
> If I looking at web page http://www.web.com/index.html
>   and have a set of session variables defined
> and then I call the page https://secure.web.com/index.html
>   do I still have access to the same
> session variables?

-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




[PHP] PHP Installation

2002-09-18 Thread Sascha Braun

Hi Peops,

I need some help for an PHP Installation.

I did uninstall my apache on my domain. I reinstalled it again and now want to install 
PHP again.

I believe all option in httpd.conf are correct. My Linux Distribution is: RedHat 7.3

I looked into the Modules Direktory from Apache and I could find an libphp4.so, but no 
mod_php.
I did download the final release of PHP 4.2.3 and started to ./configure it.

It told me at last something about the cgi installation and some things i dont 
understand,
so i feel very insecure.

Please help me a little.

Sascha Braun



[PHP] Sessions /Cross Domain

2002-09-18 Thread David Buerer

Are sessions domain specific?
 
What I mean is this.
 
Suppose I have two websites:
secure.web.com
www.web.com  
and both web sites point to the same set of data.
 
If I looking at web page http://www.web.com/index.html
  and have a set of session variables defined
and then I call the page https://secure.web.com/index.html
  do I still have access to the same
session variables?



[PHP] Unserialize stopped working after php & db upgrade

2002-09-18 Thread Geoff Caplan

Hi folks

Bit of a major panic - any help MUCH appreciated.

I have been storing serialized arrays in MySQL Gemini tables without
any problems.

But with Gemini looking more and more like a dead duck, I decided to
take the server down and port from Gemini to InnoDB. I also took the
opportunity to upgrade from php 4.1 to php 4.2.2

Now, when I run unserialize( ) on the serialized arrays, the strings
are being returned unchanged. No error - they are simply passing
through unserialize( ) without being altered.

It is not a backslash issue, as there are no escaped characters in the
strings affected, nor are the strings urlencoded.

I have no idea how to go about fixing this and I am under serious
pressure to get the server back up ASAP - so I am very much hoping
that to get a response from the list.

-- 

Geoff Caplan
Advantae Ltd

mailto:[EMAIL PROTECTED]
http://www.advantae.com


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




Re: [PHP] Date(), adjusted for one year

2002-09-18 Thread Robert Cummings

Jacob Miller wrote:
> 
> With leap year adjustment...
> 
> strtotime("+1 year", );
> 
> will return a unix timestamp.

Nice, don't think I've ever used that function :)

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP] Date(), adjusted for one year

2002-09-18 Thread Jacob Miller

With leap year adjustment...

strtotime("+1 year", );

will return a unix timestamp.

- Jacob

At 01:49 09/19/2002, Robert Cummings wrote:
>"Support @ Fourthrealm.com" wrote:
> >
> > Hi guys,
> >
> > What is the easiest way to get the date of one year from today?
> > Accommodating for leap years is not essential (but would be a nice bonus).
>
>Without leap year adjustment...
>
>date( "your format string here", time() + 60 * 60 * 24 * 365 );
>
>HTH,
>Rob.
>--
>.-.
>| Robert Cummings |
>:-`.
>| Webdeployer - Chief PHP and Java Programmer  |
>:--:
>| Mail  : mailto:[EMAIL PROTECTED] |
>| Phone : (613) 731-4046 x.109 |
>:--:
>| Website : http://www.webmotion.com   |
>| Fax : (613) 260-9545 |
>`--'
>
>--
>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] Date(), adjusted for one year

2002-09-18 Thread Robert Cummings

"Support @ Fourthrealm.com" wrote:
> 
> Hi guys,
> 
> What is the easiest way to get the date of one year from today?
> Accommodating for leap years is not essential (but would be a nice bonus).

Without leap year adjustment...

date( "your format string here", time() + 60 * 60 * 24 * 365 );

HTH,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




[PHP] Date(), adjusted for one year

2002-09-18 Thread Support @ Fourthrealm.com

Hi guys,

What is the easiest way to get the date of one year from today?
Accommodating for leap years is not essential (but would be a nice bonus).

Thanks,
Peter


- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


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




RE: [PHP] time() problem

2002-09-18 Thread Adam Voigt

Change it to an INT or a VARCHAR datatype, the mysql timestamp field
uses MySQL's date/time formmating. If you decide to let MySQL use it's
own date time format, use UNIX_TIMESTAMP(fieldname) to get the unix
timestamp from that date field.

Adam Voigt
[EMAIL PROTECTED]

On Wed, 2002-09-18 at 13:19, Savaidis wrote:
> 
> 
> Hello all!
> 
> I use time() to keep UNIX seconds from 1970 to a timestamp(14) MySQL field.
> But when I read it (Dt_last) it is TO big compearing with "today=time()" in
> a php script that is only some seconds later.
> today : 1032350421 Dt_last: 20001101165838
> 
> What can I do?
> Thanks!
> Makis
> 
> 
> 
> Makis
> 
> 
> 
> -- 
> 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] Loop through POST-result

2002-09-18 Thread Michelle

I would like to get all the data from a POST-result into an array.

Is there a function like that adds all the vars from the post into an array
where Key is the name of the form-field and Value is the value entered in
this field.

Like this:
array('firstname' => 'fname', 'lastname' => 'lname');

Thanks,
// Michelle



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




RE: [PHP] time() problem

2002-09-18 Thread Savaidis



Hello all!

I use time() to keep UNIX seconds from 1970 to a timestamp(14) MySQL field.
But when I read it (Dt_last) it is TO big compearing with "today=time()" in
a php script that is only some seconds later.
today : 1032350421 Dt_last: 20001101165838

What can I do?
Thanks!
Makis



Makis



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




[PHP] Global Vars

2002-09-18 Thread Sascha Braun

Hi Everone,

for my newest projekt i started to use global var like $_REQUEST['varname'] and so on.

But in some cases i started again to use old var mode.

Finally i have read some about there is need to define the vars, before I'm going to 
create
the source for my webpages.

But how can i make definitions like 
working without usage of hidden fields.

Or links like test.php?action=update and so on.

Please gimme a hint

Sascha



[PHP] Stripping specific tags

2002-09-18 Thread Alexis Antonakis

Hi,

I was wondering is there a way to strip ONLY the tags that you specify from
a page, rather than having to include all the tags you do want (using
strip_tags() )

Cheers
Alexis


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




Re: [PHP] PHP and Flash

2002-09-18 Thread timo stamm

Or let Flash take over the active part.

You can retrieve data from PHP scripts in Flash and build 
dynamic menus, for example. Pretty much everything is possible.


Timo


Am Mittwoch den, 18. September 2002, um 06:11, schrieb Rasmus Lerdorf:
> php.net/ming
>
> On Wed, 18 Sep 2002, [EMAIL PROTECTED] wrote:
>
>> Hi all,
>>
>> I've never combined PHP with Flash, but I do know there's some
>> possibilities. I'm wondering if I can make a dynamic-PHP-site which
>> controls Flash. I need the administrator to be able to upload 
>> a new product
>> to a DB, and then be seen by the visitors in Flash... is this 
>> possible?
>>
>> I want to do something like www.rolex.com but don't want to 
>> make new pages
>> every time a new product is added... Is this possble? Where 
>> can I find the
>> documentation?
>>
>> Thanks in advance,
>>
>> César Aracena
>> On Dial-Up
>>
>> 
>> mail2web - Check your email from the web at
>> http://mail2web.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] Image resolution and php

2002-09-18 Thread pan


> I need to get resolution information (dpi) from any
> image of jpg, gif or png formats.
> 
> It would be sufficient to obtain pixel and inches
> dimension of such images and calculate resolution by
> simply dividing but I haven't found any function that
> gets effective dimensions in inches.
> 

  As Jome wrote - getimagesize.

 Those image formats don't carry any printing format
information. The number of inches an image will be
depends on what is doing the presentation.
 You need to calculate your own inches depending on your
own printing or display environment.

 If you want to learn about image file formats.
http://www.wotsit.org/




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




[PHP] Difficult MIME question

2002-09-18 Thread C.F. Scheidecker Antunes

Hello all,

I have one situation other than the normal that I cannot extract/save the
MIME content of an e-mail which Content-type is different than the normal.

When I get attachments that have the following normal structure:

===
Content-Type: application/x-zip-compressed;
name="file1.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="file1.zip"
===

It works perfectly. But I some e-mail clients e-mail me somthing like
bellow:

===
Content-Type: application/octet-stream;
name="file2.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="file2.zip"
X-MailScanner: Found to be clean
Status:
===

Then, it does not work and the system thinks that the e-mail has NO
ATTACHMENTS.

This is weird. Since the only difference here is the Content-Type besides
the X-MailScanner and Status in the last lines, could anyone help me handle
it?

Also, is there anyway to get arrays for each of then separately like :
Content-Type, Content-Transfer-Encoding and Content-Disposition?

A regular mail client like Netscape and OutlookExpress can easily see the
attachment but I cannot do it with PHP imap.

This is a difficult question. Does anyone know how to answer it?

Thanks,

Carlos Fernando Scheidecker Antunes
Linux User #207984


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




[PHP] Join in MySQL-select doesn't work

2002-09-18 Thread Henning

Hello
I'm using PHP4 and MySQL on Apache webserver.
I have a table valled "liste" with names of some people, and a table 
called "postnummer" with zip-codes and citynames.
My select should join the adress and zip from one table with the 
cityname from the other table.
But my join-line does not work.   =:(

My code results in this line:

Warning: Supplied argument is not a valid MySQL result resource in 
/var/www/html/find/resultat.php on line 27

The code is:
mysql_select_db("adresser");
$query = ("SELECT fornavn, efternavn, gade, postnummer.postnummer, 
postnummer.postbynavn FROM liste
left outer join postnummer on liste.postnummer = postnummer.postnummer
WHERE MATCH (fornavn, efternavn) AGAINST ('$search');");
$result = mysql_query($query);
while(list($cpr, $fornavn, $efternavn, $gade, $postnummer, $postbynavn) =
mysql_fetch_row($result))

What is going on?
The select is ok if I do not join, but then I'm not able to get the 
field "postbynavn" from the other table.

PLEASE HELP!

Henning


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




Re: [PHP] mid-level PHP/MySQL people in Los Angeles?

2002-09-18 Thread Eric C. Pollitt

I recommend checking out websites such as Elance for freelance workers and
employers to find one another.



There are several others out there that are similar as well...try searing
 to find more.

PS I am not affiliated with Elance, just a suggestion.

Eric C. Pollitt, Founder
401 E. Illinois Ave.
Peoria, IL 61603
Global Hemp - Portal to the hemp community
http://www.globalhemp.com/

Create like a god.  Command like a king.  Work like a slave!
-- Constantin Brancusi

> From: PHP freak <[EMAIL PROTECTED]>
> Date: Tue, 17 Sep 2002 22:44:30 -0700
> To: [EMAIL PROTECTED]
> Subject: [PHP] mid-level PHP/MySQL people in Los Angeles?
> 
> I'm looking for 1 or 2 people with good PHP/MySQL experience in the Los
> Angeles area.
> 
> I have a few steady projects that pay $20/hr.
> (All of them 100% PHP/MySQL.  All of them fun/non-corporate music-based
> sites.)
> 
> If interested, please email my personal address:  "[EMAIL PROTECTED]"
> Include your contact info & any sites/projects you've worked on.
> 
> 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] Please, Help dynamicaly creating an Array

2002-09-18 Thread Max Sullivan


Thanks Marek,  That's exactly what I was looking for. I also found
another solution, which was to build a second array with the information
I want and merge the two arrays together with +.  I like eval better :)
thanks again.

For anyone that is interested this works too.

$a = "'THREE'";
$b = "3";

$data1 = array('ONE'=>1,'TWO'=>2);
$data2[$a] = $b;

$test = $data1 + $data2;


-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 18, 2002 1:54 AM
To: PHP
Subject: Re: [PHP] Please, Help dynamicaly creating an Array


Try eval(), like this:

$str= "'THREE'=>3, 'FOUR'=>4";

eval("\$data2 = array('ONE'=>1,'TWO'=>2,$str);");


Max Sullivan wrote:

>I am trying to populate array values and keys from a variable with no
>luck.
>
>Lets say I have the following array.
>
>$data1 = array('ONE'=>1,'TWO'=>2,'THREE'=>3,'FOUR'=>4);
>
>And I want to create part of the array with the string below:
>
>$str= "'THREE'=>3, 'FOUR'=>4";
>$data2 = array('ONE'=>1,'TWO'=>2,$str);
>
>
>How can I create $data2 to work the same as $data1.  When I try the
>above for $data2 a new key is created ([0]) for $str. And I end up with

>...'TWO'=>2, [0] => 'THREE'=>3, 'FOUR'=>4.  It doesn't "interpret" the 
>variable how I expect it to, instead it see's $str as a value.  I guess

>the question is how can I make php use the string literally.
>
>I've tried everything I can think of and I think my head is about to
>explode :).  Is it possible to create an Array this way?  Any help is 
>appreciated!!
>
>
>print_r($data1):
>Array
>(
>[ONE] => 1
>[TWO] => 2
>[THREE] => 3
>[FOUR] => 4
>)
>
>
>print_r($data2):
>Array
>(
>[ONE] => 1
>[TWO] => 2
>[0] => 'THREE'=>3, 'FOUR'=>4
>)
>
>
>  
>


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




Re: [PHP] Re: Image resolution and php

2002-09-18 Thread Eric C. Pollitt

I believe that image files on the Mac platform contain metadata that does in
fact include this information. Sherlock on Mac OS 9 is not capable of
finding this information. However, I did find the following information for
Adobe Photoshop 7 for Mac OS X on how you can achieve this. I don't know if
Adobe Photoshop 7 for Windows can do this.

From: http://www.apple.com/macosx/applications/photoshop/

You have thousands of digital pictures and graphics stored on your hard
disk. Wouldn¹t it be cool to be able to verify what¹s in an image file
before you click on it? Adobe thought so too, which is why the new File
Browser in Photoshop 7.0 lets you do just that. The File Browser lets you
view your thumbnails and image metadata ‹ like color profile, date modified,
and the Exchangeable Image File (EXIF) information generated by digital
cameras ‹ to make sure the images are what you¹re looking for before you
open them. As an added convenience, Photoshop lets you add ranking to your
file criteria. You can have your own ranking system for identifying images
with, for example, rankings such as ³Proof² and ³Final.² You can also sort
images by file name, file width and height, file size, file type,
resolution, color profile, date created, date modified and copyright. The
File Browser also gives you the added advantage of being able to search for
images visually rather than just by file name.

Eric C. Pollitt, Founder
401 E. Illinois Ave.
Peoria, IL 61603
Global Hemp - Portal to the hemp community
http://www.globalhemp.com/

"Prohibition will work great injury to the cause of temperance. It is a
species of intemperance within itself, for it goes beyond the bounds of
reason in that it attempts to control a man's appetite by legislation, and
makes a crime out of things that are not crimes.  A Prohibition law strikes
a blow at the very principles upon which our government was founded."

Abraham Lincoln in a speech to the Illinois House of
Representatives on December 18, 1840.

> From: "Jome" <[EMAIL PROTECTED]>
> Date: Wed, 18 Sep 2002 14:10:58 +0200
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Image resolution and php
> 
>> I need to get resolution information (dpi) from any
>> image of jpg, gif or png formats.
>> 
>> It would be sufficient to obtain pixel and inches
>> dimension of such images and calculate resolution by
>> simply dividing but I haven't found any function that
>> gets effective dimensions in inches.
> 
> http://www.php.net/manual/en/function.getimagesize.php
> 
> I'm sligthly confused about what you're looking for, but the above URL
> *could* be something.
> 
> Jome
> 
> 
> 
> -- 
> 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: Large uploads

2002-09-18 Thread Rickard Dahlstrand

Hi again,

Is there anyone in this group that has successfully uploaded a file large
than 10 MB?

Regards, Rickard.


"Rickard Dahlstrand" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I have been trying to upload files using PHP 4.1.2. Everything works OK
> until the filesize gets above 10MB. I have set all the paramaters upload
> filesize and max postsize in PHP and Apache ini-files but it still doesn't
> work. The server seems to just drop the connection since IE just tells me
> that the server didn't respond.
>
> Please help.
>
> Rickard.
>
>



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




[PHP] header() and POST

2002-09-18 Thread dsfljsdfklj kljvdskljfsdkl

I have the following problem:

a php page receives POST data from a form, it needs to
elaborate the data and send it to another page again
in POST automatically, without the user noticing.

Is it possible to use the header() function to send a
POST request? If yes how? And how do I send the post
data?

Thanx
Rik

__
Mio Yahoo!: personalizza Yahoo! come piace a te 
http://it.yahoo.com/mail_it/foot/?http://it.my.yahoo.com/

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




  1   2   >