php-windows Digest 24 Jan 2001 09:03:50 -0000 Issue 412

Topics (messages 5177 through 5186):

Re: Random Code
        5177 by: phobo

Re: PDF Problem
        5178 by: Nold, Mark

Possible to make an array from a post form?
        5179 by: phobo
        5180 by: phobo
        5186 by: Michael Rudel

Problems! 4.01pl2 to 4.04pl1 upgrade
        5181 by: Warwick Chapman (Budgee)
        5183 by: Michael Cartmel
        5185 by: Mangiola Nunzio         Datavia

Re: PHP4 / WinNT 4 / Oracle 7.3 via ODBC
        5182 by: Jean-Christophe Le Brun

Exec not working still
        5184 by: Michael Cartmel

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


Nah the values are being stored in a transaction log type thing ...

Siggy

----- Original Message -----
From: "Asendorf, John" <[EMAIL PROTECTED]>
To: "phobo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 24, 2001 10:00 AM
Subject: RE: [PHP-WIN] Random Code


> "These values ARE being stored
> in a database; however, once this database gets to a million or so rows,
it
> would take a very long time to check it doesn't overlap, wont it?"
>
> Well, you **could** make a database of ALL possibilities and delete each
> possibility as it is used  :)  Then the program would run faster and
faster
> and you could tell people you've been tweaking the code while it's
actually
> running faster all on its own  :)
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
>
> The benefit to the government of replacing all $1 Federal Reserve notes
with
> $1 coins would be $522.2 million per year, according to estimates of the
> General Accouting Office released on April 7, 2000.
>
>
> > -----Original Message-----
> > From: phobo [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 23, 2001 3:48 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] Random Code
> >
> >
> > Oops, 36^8 :)
> >
> > This value would only have to generated perhaps a few times
> > an hour, but
> > should't take more than a second to compute. These values ARE
> > being stored
> > in a database; however, once this database gets to a million
> > or so rows, it
> > would take a very long time to check it doesn't overlap, wont it?
> >
> > I also thought about getting the current date/time stamp and
> > representing it
> > as this value. This code is an online-order reference number,
> > so it could be
> > something like seconds since midnight:
> >
> > 36^4 = 1,679,616
> > Seconds in a day (60.60.24) = 86400
> >
> > A really effective way would be to get a subsecond count for
> > the day; so
> > that 0000 is midnight, and ZZZZ is the end of the that day.
> > This means there
> > are about 19 increments a second, which rules out any possibility of
> > duplicates, because:
> >
> > 1. two other characters could be the id of the user (a
> > numeric value). 36.36
> > is 33696, which is much higher than the intended number of
> > users on the
> > system (we invisage no more than a few hundred - by the time
> > the userbase
> > gets to 33000, I'll be a millionairre and this can be someone
> > else's job
> > hehe)
> >
> > 2. the two remaining characters could be a day/year thing.
> > perhaps the days
> > since the start of the year 2000. 33696/365 is 92; this
> > system will not be
> > used for 92 years!
> >
> > Does that sound like quite a good algorythm, or do you have a
> > much easier,
> > simpler way?
> >
> > Siggy
> >
> >
> >
> > ----- Original Message -----
> > From: "Larry Forrister" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, January 24, 2001 7:26 AM
> > Subject: Re: [PHP-WIN] Random Code
> >
> >
> > > Do you mean  W3E4-22ER  would be valid?  If so there would be 36^8
> > > (2,821,109,907,456) possible values.
> > >
> > > A truly random generator algorithm cannot guarantee uniqueness.  I'm
> > > guessing what you want is to generate each possible value once in a
> > > pseudo-random order.  Would just apparent randomness suffice?
> > >
> > > With what frequency do the values need to be generated?
> > Once every few
> > > seconds/minutes or multiple times per second?
> > > ~~LF
> > >
> > >
> > > Sigurd Magnusson wrote:
> > >
> > > > Whats the best way to make a completely random, unique code in the
> > > > format "ABCD-1234" where each of the 8 characters can be
> > alphanumerc;
> > > > 0-9,A-Z... I thought about generating a 36^4 number,
> > converting to to
> > > > base '36', and repeating the process. What's a good way
> > to ensure the
> > > > code is not repeated, though?
> > > >
> > > > Siggy
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





----------------------------------------------------------------------------
----------------- 
Disclaimer: The information contained in this email is intended only for the
use of the person(s) to whom it is addressed and may be confidential or
contain legally privileged information. If you are not the intended
recipient you are hereby notified that any perusal, use, distribution,
copying or disclosure is strictly prohibited. If you have received this
email in error please immediately advise us by return email at
[EMAIL PROTECTED] and delete the email document without making a
copy. 
----------------------------------------------------------------------------
-----------------

Ryan,

You have a few problems.

1. A valid pdflib.upr
2. The correct AFM settings
3. A valid AFM version of Arial

If you are using the php4win distribution you should find the the pdflib.upr
in the php/pdf-related/ directory. I think the loaction is hardcoded at
compile time (though i think it looks through the path as well... try
checking the pdflib manual)

You will need to find a converter for your .ttf to an .afm (there are
several) check freshmeat.net.

Im actually at a clients at the moment, but i plan on writing a short
tutorial on the whole process in the next week if you can hold on. Mail me
at [EMAIL PROTECTED] with a reminder if you're interested.



mn



Mark Nold
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Senior Consultant
 
Change is inevitable, except from vending machines. 



-----Original Message-----
From: Conover, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 24, 2001 3:40 AM
To: [EMAIL PROTECTED]
Subject: PDF Problem


I keep getting the following error on a line of the funciton below
 function marketingoutput($top, $pdf){
               $z=0;
               $currentline=$top-$this->standardboxheight;
               while ($z<$this->zarrayofboxes){
                       $tempbox2=$this->arrayofboxes[$z];
                       $tempbox=unserialize($tempbox2);
                       pdf_set_font($pdf, "Arial", 10, "host");
/////////////////////THIS IS WHERE I KEEP GETTIN THE ERROR AT 
                       pdf_set_value($pdf, "textrendering", 1);

                       pdf_show_boxed($pdf, $tempbox->title.":", 36,
$currentline, 100, $this->standardboxheight, "justify");

                       pdf_set_font($pdf, "Arial", 8, "host");
                       pdf_set_value($pdf, "textrendering", 1);

                       pdf_show_boxed($pdf, $tempbox->info, 136,
$currentline, 404, $this->standardboxheight, "justify");

                       $z++;
                       $currentline=$currentline-$this->standardboxheight;
                }
               }
Fatal error: Internal pdflib error: Resource configuration file 'pdflib.upr'
not found in c:\Inetpub\wwwroot/test/marketing/Printing.php on line 88

Anyone have any ideas what to fix on this.  This function is just to print
out a portion of a report.


Ryan




Is there a way to make an array from a post form, like this?

<INPUT TYPE=TEXT NAME="GuysName[1]" VALUE="moocow">
<INPUT TYPE=TEXT NAME="GuysName[2]" VALUE="john">
<INPUT TYPE=TEXT NAME="GuysName[3]" VALUE="matt">
<INPUT TYPE=TEXT NAME="GuysName[NotANum]" VALUE="steven">
<INPUT TYPE=TEXT NAME="GuysName[NotANumEither]" VALUE="ernie">

Siggy




Don't worry, I thought I had tried this, but had made a mistake, and have
this working :)
Yay :)

Is there anything I shuold know about uising arrays in HTTP_POST_VARS?

Siggy

----- Original Message -----
From: "phobo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 24, 2001 2:34 PM
Subject: [PHP-WIN] Possible to make an array from a post form?


Is there a way to make an array from a post form, like this?

<INPUT TYPE=TEXT NAME="GuysName[1]" VALUE="moocow">
<INPUT TYPE=TEXT NAME="GuysName[2]" VALUE="john">
<INPUT TYPE=TEXT NAME="GuysName[3]" VALUE="matt">
<INPUT TYPE=TEXT NAME="GuysName[NotANum]" VALUE="steven">
<INPUT TYPE=TEXT NAME="GuysName[NotANumEither]" VALUE="ernie">

Siggy






Hi Siggy,

sure: After Posting it, you should have an array
named $GuysName you can traverse now.

ÑJØ¥,
  Mike
(Germany)

-----Ursprüngliche Nachricht-----
Von: phobo [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 24. Januar 2001 02:35
An: [EMAIL PROTECTED]
Betreff: [PHP-WIN] Possible to make an array from a post form?


Is there a way to make an array from a post form, like this?

<INPUT TYPE=TEXT NAME="GuysName[1]" VALUE="moocow">
<INPUT TYPE=TEXT NAME="GuysName[2]" VALUE="john">
<INPUT TYPE=TEXT NAME="GuysName[3]" VALUE="matt">
<INPUT TYPE=TEXT NAME="GuysName[NotANum]" VALUE="steven">
<INPUT TYPE=TEXT NAME="GuysName[NotANumEither]" VALUE="ernie">

Siggy




Hi

Sessions don't seem to be working with 4.04pl1? Any ideas. I had 
to turn off display errors to get rid of Undefined variable problems 
and errors about session data not being able to be tread from the 
files, which are not being created? Please help any ideas?

track_vars is on and register_globals is on.

Thanks

Warwick Chapman (Glenwood 1999)
http://www.boatrace.co.za
Assistant IT Manager
Glenwood High School, Durban, South Africa
031 2055241
083 7797094
http://www.glenwoodhighschool.co.za




I had a similar problem... seems to be picky about the session.save_path in
php.ini. Changed it from c:\temp to c:/temp and it fixed it. Not sure what
the issue is there...

        Cheers,     -mic

----- Original Message -----
From: "Warwick Chapman (Budgee)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 24, 2001 6:04 PM
Subject: [PHP-WIN] Problems! 4.01pl2 to 4.04pl1 upgrade


> Hi
>
> Sessions don't seem to be working with 4.04pl1? Any ideas. I had
> to turn off display errors to get rid of Undefined variable problems
> and errors about session data not being able to be tread from the
> files, which are not being created? Please help any ideas?
>
> track_vars is on and register_globals is on.
>
> Thanks
>
> Warwick Chapman (Glenwood 1999)
> http://www.boatrace.co.za
> Assistant IT Manager
> Glenwood High School, Durban, South Africa
> 031 2055241
> 083 7797094
> http://www.glenwoodhighschool.co.za
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





> If you are having a problem for an undefined variable on
> line such as:  $submit
> 
> Then all you do is put in: if (isset($submit))
> 
> That should sort it out. For your other other I have no clue.
> 
> ----------
> From:         Warwick Chapman
> (Budgee)[SMTP:[EMAIL PROTECTED]]
> Sent:         Wednesday, January 24, 2001 9:04 AM
> To:   [EMAIL PROTECTED]
> Subject:      [PHP-WIN] Problems! 4.01pl2 to 4.04pl1 upgrade
> 
> Hi
> 
> Sessions don't seem to be working with 4.04pl1? Any ideas. I had 
> to turn off display errors to get rid of Undefined variable problems 
> and errors about session data not being able to be tread from the 
> files, which are not being created? Please help any ideas?
> 
> track_vars is on and register_globals is on.
> 
> Thanks
> 
> Warwick Chapman (Glenwood 1999)
> http://www.boatrace.co.za
> Assistant IT Manager
> Glenwood High School, Durban, South Africa
> 031 2055241
> 083 7797094
> http://www.glenwoodhighschool.co.za
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 




Hi Carlos !


>Thanks a lot for the help!!  I´ve reinstalled Oracle Cliente (version
8.1.5.0.0) and PHP 4.0.4pl1 and tried Jean-Christophe suggestion, with
success:

Good !

If you find a way to bypass the $Connection from tnsnames.ora, send a mail,
i would prefer to
use the alias done with Orcale Client but it doesn't work, maybe cause of
the ORACLE_HOME that i've
not defined. But i've no time for php tests, i must work on VB for a month
at least 8-(

Jean-Christophe Le Brun
Météo-France
CMIRNE/DET
03-88-40-42-46
[EMAIL PROTECTED]





Has anyone got exec/passthru/system to work under Win2k?

smime.p7s



Reply via email to