php-windows Digest 23 Jan 2001 21:00:32 -0000 Issue 411 Topics (messages 5149 through 5176): Re: createing a php script with reloadable modules. 5149 by: phobo 5152 by: kill-9 5164 by: Larry Forrister 5167 by: John McCreesh 5168 by: Gonzalo Vera Re: Automating web data input and extraction 5150 by: Michael Rudel Re: No More Crashes! 5151 by: Arve Bersvendsen 5156 by: Gonzalo Vera PHP error accessing ORA 8i 5153 by: Leon Santos Filho True Type Fonts 5154 by: Mariusz Buk Re: Random Code 5155 by: Asendorf, John 5165 by: Larry Forrister 5166 by: Asendorf, John 5170 by: Svensson, B.A.T. 5171 by: Svensson, B.A.T. 5173 by: Svensson, B.A.T. 5174 by: phobo 5175 by: Sigurd Magnusson 5176 by: Asendorf, John Re: PHP4 / WinNT 4 / Oracle 7.3 via ODBC 5157 by: Carlos Correa Goncalves 5162 by: Svensson, B.A.T. Page names as variables? 5158 by: Ed Meyer 5161 by: Robert Collins 5163 by: Boget, Chris 5172 by: Ed Meyer WinNT 4.0 wrkst / Oracle 8.1.6 - succeed 5159 by: Andris Jancevskis 5160 by: Andris Jancevskis PDF Problem 5169 by: Conover, Ryan 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] ----------------------------------------------------------------------
I can't see why PHP would crash? When it runs a PHP file, it would open the entire file and cache the whole thing surely ? In the .05ms that it takes to overwrite a file, it would be apache not PHP i would say, that would cause problems ... ? Siggy ----- Original Message ----- From: "kill-9" <[EMAIL PROTECTED]> To: "phobo" <[EMAIL PROTECTED]>; "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Sent: Tuesday, January 23, 2001 8:11 PM Subject: Re: [PHP-WIN] createing a php script with reloadable modules. > Ok feelings are also welcome :) > > yes the script will be running 24 hours a day 7 days a week. I need the > script to pick up the changes I make. I assumed that php would cashe the > script it was curtly running and there for not pick up any changes I made > while I was running it. which is what I need it to do. > > kill-9 > ----- Original Message ----- > From: "phobo" <[EMAIL PROTECTED]> > To: "kill-9" <[EMAIL PROTECTED]>; "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> > Sent: Monday, January 22, 2001 6:24 PM > Subject: Re: [PHP-WIN] createing a php script with reloadable modules. > > > > My feeling ... > > > > Your script wont be running for 24hours, so you can just edit the PHP file > > directly, can't you? Make a copy of your main PHP file, make the changes > you > > need, and copy/overwrite the existing one. I assume the PHP engine doesn't > > read the file a line at a time but instead caches the whole script, so you > > wont have any problems of the php script failing because it was changes > > 'half way through' > > > > Siggy > > > > ----- Original Message ----- > > From: "kill-9" <[EMAIL PROTECTED]> > > To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > Sent: Monday, January 22, 2001 9:26 PM > > Subject: [PHP-WIN] createing a php script with reloadable modules. > > > > > > Ok guys I need your help I'm banging my head against the wall on this one. > > > > I need to do something like modules in a script. The main script runs 24/7 > I > > want to be able to change the modules run time. have some kind of flag > set > > to have it update/reload the module. I cant do something like an include > > with the modules because they wont be refreshed that and you cant > > re-included a function that has already been include once and include_once > > wont work either because that wont refresh the module. > > > > here are my thoughts. > > > > if I use system or pass thru to set off the modules. but the question is > I > > need to pass the module a file pointer. and so far I have been unable to > > pass a file pointer to another script. > > > > another option would be to use fopen to buffer the module and using exec > to > > execute this new module. I could reload the module by re reading the > file. > > would this work? > > > > all comments ,opinions , ideas , and wild guesses are welcome. I'm stuck > > and need some new ideas on how to do this. > > > > > > thanks > > > > kill-9 > > www.kill-9.dk > > > > > > > > > > > >
yes but. when does it cashe the file. at the beginning right when the script first starts running. isn't there a way to make it hmm refresh the cashed file reload its self to pick up the changes? what if I add a new module while it is running. how do I get it to pick up this new module. what if I make a change in the module how do I get it to pick up the change in the module with out shutting down the core script. shutting down the core script is the last thing I want to do it has to remain running. currently I am looking at running each module as a separate script the core script kicks off each of the modules one at a time. but this just seams to be the wrong way to go about it. but at least that way any changes in the modules would be picked up next time they where run by the core script. btw thanks for all your feelings. having someone to hash this out with is helping. kill-9 ----- Original Message ----- From: "phobo" <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Sent: Tuesday, January 23, 2001 10:01 AM Subject: Re: [PHP-WIN] createing a php script with reloadable modules. > I can't see why PHP would crash? When it runs a PHP file, it would open the > entire file and cache the whole thing surely ? In the .05ms that it takes to > overwrite a file, it would be apache not PHP i would say, that would cause > problems ... ? > > Siggy > > ----- Original Message ----- > From: "kill-9" <[EMAIL PROTECTED]> > To: "phobo" <[EMAIL PROTECTED]>; "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> > Sent: Tuesday, January 23, 2001 8:11 PM > Subject: Re: [PHP-WIN] createing a php script with reloadable modules. > > > > Ok feelings are also welcome :) > > > > yes the script will be running 24 hours a day 7 days a week. I need the > > script to pick up the changes I make. I assumed that php would cashe the > > script it was curtly running and there for not pick up any changes I made > > while I was running it. which is what I need it to do. > > > > kill-9 > > ----- Original Message ----- > > From: "phobo" <[EMAIL PROTECTED]> > > To: "kill-9" <[EMAIL PROTECTED]>; "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> > > Sent: Monday, January 22, 2001 6:24 PM > > Subject: Re: [PHP-WIN] createing a php script with reloadable modules. > > > > > > > My feeling ... > > > > > > Your script wont be running for 24hours, so you can just edit the PHP > file > > > directly, can't you? Make a copy of your main PHP file, make the changes > > you > > > need, and copy/overwrite the existing one. I assume the PHP engine > doesn't > > > read the file a line at a time but instead caches the whole script, so > you > > > wont have any problems of the php script failing because it was changes > > > 'half way through' > > > > > > Siggy > > > > > > ----- Original Message ----- > > > From: "kill-9" <[EMAIL PROTECTED]> > > > To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > > Sent: Monday, January 22, 2001 9:26 PM > > > Subject: [PHP-WIN] createing a php script with reloadable modules. > > > > > > > > > Ok guys I need your help I'm banging my head against the wall on this > one. > > > > > > I need to do something like modules in a script. The main script runs > 24/7 > > I > > > want to be able to change the modules run time. have some kind of flag > > set > > > to have it update/reload the module. I cant do something like an > include > > > with the modules because they wont be refreshed that and you cant > > > re-included a function that has already been include once and > include_once > > > wont work either because that wont refresh the module. > > > > > > here are my thoughts. > > > > > > if I use system or pass thru to set off the modules. but the question > is > > I > > > need to pass the module a file pointer. and so far I have been unable > to > > > pass a file pointer to another script. > > > > > > another option would be to use fopen to buffer the module and using exec > > to > > > execute this new module. I could reload the module by re reading the > > file. > > > would this work? > > > > > > all comments ,opinions , ideas , and wild guesses are welcome. I'm > stuck > > > and need some new ideas on how to do this. > > > > > > > > > thanks > > > > > > kill-9 > > > www.kill-9.dk > > > > > > > > > > > > > > > > > > > > > > -- > 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] > >
Is this running under a web server? How is it running 24/7? ~~LF kill-9 wrote: > yes but. when does it cashe the file. at the beginning right when the > script first starts running. isn't there a way to make it hmm refresh the > cashed file reload its self to pick up the changes? what if I add a new > module while it is running. how do I get it to pick up this new module. > what if I make a change in the module how do I get it to pick up the change > in the module with out shutting down the core script. shutting down the > core script is the last thing I want to do it has to remain running. > > currently I am looking at running each module as a separate script the core > script kicks off each of the modules one at a time. but this just seams to > be the wrong way to go about it. but at least that way any changes in the > modules would be picked up next time they where run by the core script. > > btw thanks for all your feelings. having someone to hash this out with is > helping. > > kill-9 > > ----- Original Message ----- > From: "phobo" <[EMAIL PROTECTED]> > To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > Sent: Tuesday, January 23, 2001 10:01 AM > Subject: Re: [PHP-WIN] createing a php script with reloadable modules. > > > I can't see why PHP would crash? When it runs a PHP file, it would open > the > > entire file and cache the whole thing surely ? In the .05ms that it takes > to > > overwrite a file, it would be apache not PHP i would say, that would cause > > problems ... ? > > > > Siggy > > > > ----- Original Message ----- > > From: "kill-9" <[EMAIL PROTECTED]> > > To: "phobo" <[EMAIL PROTECTED]>; "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> > > Sent: Tuesday, January 23, 2001 8:11 PM > > Subject: Re: [PHP-WIN] createing a php script with reloadable modules. > > > > > > > Ok feelings are also welcome :) > > > > > > yes the script will be running 24 hours a day 7 days a week. I need the > > > script to pick up the changes I make. I assumed that php would cashe the > > > script it was curtly running and there for not pick up any changes I > made > > > while I was running it. which is what I need it to do. > > > > > > kill-9 > > > ----- Original Message ----- > > > From: "phobo" <[EMAIL PROTECTED]> > > > To: "kill-9" <[EMAIL PROTECTED]>; "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> > > > Sent: Monday, January 22, 2001 6:24 PM > > > Subject: Re: [PHP-WIN] createing a php script with reloadable modules. > > > > > > > > > > My feeling ... > > > > > > > > Your script wont be running for 24hours, so you can just edit the PHP > > file > > > > directly, can't you? Make a copy of your main PHP file, make the > changes > > > you > > > > need, and copy/overwrite the existing one. I assume the PHP engine > > doesn't > > > > read the file a line at a time but instead caches the whole script, so > > you > > > > wont have any problems of the php script failing because it was > changes > > > > 'half way through' > > > > > > > > Siggy > > > > > > > > ----- Original Message ----- > > > > From: "kill-9" <[EMAIL PROTECTED]> > > > > To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > > > Sent: Monday, January 22, 2001 9:26 PM > > > > Subject: [PHP-WIN] createing a php script with reloadable modules. > > > > > > > > > > > > Ok guys I need your help I'm banging my head against the wall on this > > one. > > > > > > > > I need to do something like modules in a script. The main script runs > > 24/7 > > > I > > > > want to be able to change the modules run time. have some kind of > flag > > > set > > > > to have it update/reload the module. I cant do something like an > > include > > > > with the modules because they wont be refreshed that and you cant > > > > re-included a function that has already been include once and > > include_once > > > > wont work either because that wont refresh the module. > > > > > > > > here are my thoughts. > > > > > > > > if I use system or pass thru to set off the modules. but the > question > > is > > > I > > > > need to pass the module a file pointer. and so far I have been unable > > to > > > > pass a file pointer to another script. > > > > > > > > another option would be to use fopen to buffer the module and using > exec > > > to > > > > execute this new module. I could reload the module by re reading the > > > file. > > > > would this work? > > > > > > > > all comments ,opinions , ideas , and wild guesses are welcome. I'm > > stuck > > > > and need some new ideas on how to do this. > > > > > > > > > > > > thanks > > > > > > > > kill-9 > > > > www.kill-9.dk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > 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]
In article <003e01c0852c$b4236e50$064af2d4@kill9>, kill-9 <kill-9@kill- 9.dk> writes >btw thanks for all your feelings. having someone to hash this out with is >helping. If someone has a cached copy of your page in their browser / their proxy server cache / their ISP's proxy server cache / etc, I don't know of any *guaranteed* way of flushing it out from the server (with some browsers, you can't even guarantee that using the 'reload' button will flush everything out...). Having said that, I develop on a single machine running Apache, PHP, and browser. Any time I change any bit of source code, all I need to do is press the 'reload' button on the browser and I always pick up the latest version of all the modules. Anything more than that ... you're in the hands of the gods. Good luck - John
I wonder at what kind of script you have, that needs to be run absolutely nonstop 24/7, but I'll share some "wild guesses": 1. It is not run by a web server, otherwise it would timeout the server (which doesn't mean that it doesn't have relation with your web pages). Your 24/7 script is being command-line launched with no direct relation with the web server. Is that so? 2. Either you're using the set_time_limit to an unbelievably high value or your script is being executed on a loop, once and again, but running fresh new once in a while. Otherwise, how do you manage PHP not timing out on your 24/7 script? 3. Is your script so critical that it absolutely can't be stopped for a fraction of a second, just te be launched again, and so, refreshing your modules. Maybe having at least some idea of what you're trying to accomplish would lead to better suggestions (instead of just feelings or wild guesses ;) ). Gonzalo. > In article <003e01c0852c$b4236e50$064af2d4@kill9>, kill-9 <kill-9@kill- 9.dk>> writes >>btw thanks for all your feelings. having someone to hash this out with is >>helping. > If someone has a cached copy of your page in their browser / their proxy > server cache / their ISP's proxy server cache / etc, I don't know of any > *guaranteed* way of flushing it out from the server (with some browsers, > you can't even guarantee that using the 'reload' button will flush > everything out...). > Having said that, I develop on a single machine running Apache, PHP, and > browser. Any time I change any bit of source code, all I need to do is > press the 'reload' button on the browser and I always pick up the latest > version of all the modules. > Anything more than that ... you're in the hands of the gods. > Good luck - John
Hi Emmanuel, I think a possible way is to create a JavaScript that opens the site. You can now enter the values in the Form-fields (JavaScript). Then you Post it. Now you have your result page. Do with it what you want (e.g. parse it ...). Hope this helps. Greetinx, Mike (Germany) -----Ursprüngliche Nachricht----- Von: Emore, Emmanuel [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 23. Januar 2001 05:54 An: [EMAIL PROTECTED] Betreff: [PHP-WIN] Automating web data input and extraction I am looking for a way to automatically enter data into a web form and extract the result of the search to a mysql database. The information I am trying to retrieve resides on a separate server/site that I have no control over. The only access is through the web pages/forms. I am running PHP 4.0.4/Apache/MySQL on WinNT. Thanks -- 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]
On 22.01.01 at 11:47 Gonzalo Vera wrote: > 1. With PHP running as an apache module, launching applications from > context menus freezes explorer, messing up the display by having to > kill the application and having Win run it again (thus, losing all > tray icons). > > 2. With PHP as module, several second delay (freezing windows) when > launching applications using Windows' hot-keys. (Related to n. 1 ?) > > 3. Again, when running as module, there's a conflict with some > applications (my best example is Eudora lite 3.0.6): it freezes upon > launching, unfreezes when I stop apache, and works ok from then on > when I re-start apache. I can confirm all of these, although with an entirely different set of applications; Servant Salamander, EditPlus, Mozilla 0.7. Context menus simply won't work. Gonzalo; will you file a bug report on www.php.net?
Yes, I'll file a bug report. Thanx! Gonzalo. > On 22.01.01 at 11:47 Gonzalo Vera wrote: >> 1. With PHP running as an apache module, launching applications from >> context menus freezes explorer, messing up the display by having to >> kill the application and having Win run it again (thus, losing all >> tray icons). >> >> 2. With PHP as module, several second delay (freezing windows) when >> launching applications using Windows' hot-keys. (Related to n. 1 ?) >> >> 3. Again, when running as module, there's a conflict with some >> applications (my best example is Eudora lite 3.0.6): it freezes upon >> launching, unfreezes when I stop apache, and works ok from then on >> when I re-start apache. > I can confirm all of these, although with an entirely different set of > applications; Servant Salamander, EditPlus, Mozilla 0.7. Context menus > simply won't work. > Gonzalo; will you file a bug report on www.php.net?
Hello! I'm a beginner in PHP and I try to access an Oracle 8i database through OCI and ORACLE extensions, but it always generate an Access Violation Error in module ORANLS8.DLL. PHP is running in following configuration : PIII - 800Mhz w/ 64 mb ram Win98 SE w/ PWS client Ora8i PHP code using Oracle extension(I get from PHP tutorial): <html> <head> <title>Accessing Oracle Example</title> </head> <body> <?php PutEnv("ORACLE_HOME=ORA81"); $connection = Ora_Logon ("scott", "tiger"); if ($connection == false){ echo Ora_ErrorCode($connection).": ".Ora_Error($connection)."<BR>"; exit; } Ora_Logoff ($connection); ?> </body> </html> OCI causes the same problem. The error message details (in portuguese, sorry): PHP causou uma falha de página inválida no módulo ORANLS8.DLL em 016f:60801ecf. Registros: EAX=00000000 CS=016f EIP=60801ecf EFLGS=00010246 EBX=007acd0c SS=0177 ESP=0063baf0 EBP=0063bcfc ECX=00000000 DS=0177 ESI=007ad69c FS=486f EDX=00670214 ES=0177 EDI=007ad670 GS=0000 Bytes em CS:EIP: 66 8b 48 10 8b 04 8a 8b 4d 24 89 86 b0 00 00 00 Esvaziamento da pilha: 007ad69c 007ad670 007ad670 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Thank's. Leon .
I'm using PHP4 on WinNT with latest Apache... in documentation is written I should use freetype library to be able to use ttf functions... i can't get this library, becouse www.freetype.org has some troubles with it's web page. Could somebody help me with this? Thx Mariusz
My guess is that you would need to create the random number and then check that number against a database of saved "random" numbers, to insure uniqueness. If someone would like to critique it, please do I wrote this just for you because I was curious... <?php //holder for the final random thingy $final_rand = ""; //gotta seed the random number generator, although I have no idea what this does srand ((double) microtime() * 10000000); //a little alpha-num array $alpha = array ("A" , "B" , "C" , "D" , "E" , "F" , "G" , "H" , "I" , "J" , "K" , "L" , "M" , "N" , "O" , "P" , "Q" , "R" , "S" , "T" , "U" , "V" , "X" , "Y" , "Z" , "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "0" ); //get 8 keys for the array $rand_keys = array_rand ($alpha, 8); //cycle through the random keys and build the thingy for ( $i = 0 ; $i <= 7 ; $i++ ) { $final_rand .= $alpha[$rand_keys[$i]]; //throw a dash in there if ( $i == 3 ) { $final_rand .= "-"; } } echo $final_rand; //now you need to check the final value against a database or a comma delimited text file or something where you can check to see if the item has ever been used before and if not, added to the end of the database ?> --------------------- 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: Sigurd Magnusson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 23, 2001 3:59 AM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Random Code > > > 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 >
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
Oh, I didn't think of transaction time... this is a very good question. And a very good project for someone else to look in to.... --------------------- 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: Larry Forrister [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 23, 2001 1:26 PM > To: [EMAIL PROTECTED] > 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] >
Indeed a very interesting question you put forward (and probably OOT too :-) In programming there does not exist "The Best Way". "Best" always depends on what you consider to be important and less important - that's why programmers most often writes same piece of code in different ways, and that's why one should be considerate about to think an extra time before one classifies some other programmers code as "crap shit". :) (For ex there might be a reasons like "The Best Way" why M$ made there OS code as they did - though it hard for use normal mortal none-devine programmers to perceive it... :) There exists a class of 1-1 functions that behaves "randomly", you can uses one of these. They are well know from analytic math. In principle they work like this: in the beginning (x close to zero) the curve f(x) behave relatively nice like any other curve, but as one progress further away from zero (towards +oo) f(x) starts to get a shape that reminds of a truly random distributed curve, but f(x) is of course still functional dependent - that is, "FOR-EVERY(a) : IF f(a)=Y1 AND f(a)=Y2 THEN Y1=Y2", read: for each time you execute the function with an input, it will yield the same output as the previous calculation with the very same input. In other words, the function result is determent in advance (that is not randomly generated) - but still: it is bloody hard to predict its output in without actually having done the calculation in advance. ;) The "only" thing you then have to do is two things: 1) create a mapping function for the output, for ex: 1 == 'AAAA-0000', 2 == 'AAAA-0001', etc, etc, or what ever way you like it to be. 2) keep track of "used" numbers. One simple, but naive, approach to 2) would be to simply starting at a specific predetermined number (x-value), and then just increment x with a fixed factor, for ex 0,1 (= 0.1, in U.S. notation), or Pi, or whatever-you-feel-for, whenever you need to produce a new number However, this does not guarantee uniqueness, which means that you need to check the current output value against all previous output values. This is made simple by a brute force algorithm which, obviously, scans the previous number whether an output of this value has been or not has been produced before. This is the "best" way if you want to write a simple algorithm, but it is not the best way considering CPU load on the system. For this, there exist hashing techniques to keep track of large number of values, this might be fast finders of used numbers. This could be considered "best" from an CPU-minimization approach, but the programming gets a little bit more tricky. But happily enough, as this forum implicitly is about databases, one can "cheat" and store the numbers in the database(!), index the table that stores the values, and then get rid of the problem to have to write the hashing algorithms - since it already done in the DBMS. >-----Original Message----- >From: Sigurd Magnusson [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, January 23, 2001 9:59 AM >To: [EMAIL PROTECTED] >Subject: [PHP-WIN] Random Code > > >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 >
If one need to create multiple numbers per second (that is cal;culation time is critical), then I would suggest, in accordance to my previous letter, that one should pick a functions that is guaranteed to be constantly growing, that is that the property "x1>x2 -> f(x1)>f(x2)" always will hold true for the function f. If this is the case, then the f will be able to produce input values for a mapping function that can be guaranteed to produce unique numbers. >-----Original Message----- >From: Larry Forrister [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, January 23, 2001 7:26 PM >To: [EMAIL PROTECTED] >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] >
Just realized a serious problem with this approach: it will, due to its nature, run very quickly towards +oo ... hence it is not proper to implement as a computer program. >-----Original Message----- >From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, January 23, 2001 9:10 PM >To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: RE: [PHP-WIN] Random Code > > >If one need to create multiple numbers per second (that is >cal;culation time >is critical), then I would suggest, in accordance to my >previous letter, >that one should pick a functions that is guaranteed to be constantly >growing, that is that the property "x1>x2 -> f(x1)>f(x2)" >always will hold >true for the function f. If this is the case, then the f will >be able to >produce input values for a mapping function that can be guaranteed to >produce unique numbers. > > >>-----Original Message----- >>From: Larry Forrister [mailto:[EMAIL PROTECTED]] >>Sent: Tuesday, January 23, 2001 7:26 PM >>To: [EMAIL PROTECTED] >>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] >
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] > >
I used to generate apparent 'random' by having a function like x = (x + static-largishprimenumber) mod maxrange (eg x = (129123 + 12391) mod 1,000,000,000 That always seemed to work for me, and it would take 1000,000 tries to reuse the values, wouldnt it?? I'd prefer to not go AAAA0000 AAAA0001; the other way to go around this, is to IN FACT increment one step at a tme, but the "numbersystem" is not 0-9,A-Z, but J0Z31AQC5NUWSL7DBKRFOEXVTI294MGYPO68H. Of course, only one digit will change a time... Siggy ----- Original Message ----- From: "Svensson, B.A.T. " <[EMAIL PROTECTED]> To: "Sigurd Magnusson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 24, 2001 8:55 AM Subject: RE: [PHP-WIN] Random Code > Indeed a very interesting question you put forward (and probably OOT too :-) > > In programming there does not exist "The Best Way". "Best" always depends on > what you consider to be important and less important - that's why > programmers most often writes same piece of code in different ways, and > that's why one should be considerate about to think an extra time before one > classifies some other programmers code as "crap shit". :) > (For ex there might be a reasons like "The Best Way" why M$ made there OS > code as they did - though it hard for use normal mortal none-devine > programmers to perceive it... :) > > There exists a class of 1-1 functions that behaves "randomly", you can uses > one of these. They are well know from analytic math. In principle they work > like this: in the beginning (x close to zero) the curve f(x) behave > relatively nice like any other curve, but as one progress further away from > zero (towards +oo) f(x) starts to get a shape that reminds of a truly random > distributed curve, but f(x) is of course still functional dependent - that > is, "FOR-EVERY(a) : IF f(a)=Y1 AND f(a)=Y2 THEN Y1=Y2", read: for each time > you execute the function with an input, it will yield the same output as the > previous calculation with the very same input. In other words, the function > result is determent in advance (that is not randomly generated) - but still: > it is bloody hard to predict its output in without actually having done the > calculation in advance. ;) > > The "only" thing you then have to do is two things: > > 1) create a mapping function for the output, for ex: 1 == 'AAAA-0000', 2 == > 'AAAA-0001', etc, etc, or what ever way you like it to be. > > 2) keep track of "used" numbers. > > > One simple, but naive, approach to 2) would be to simply starting at a > specific predetermined number (x-value), and then just increment x with a > fixed factor, for ex 0,1 (= 0.1, in U.S. notation), or Pi, or > whatever-you-feel-for, whenever you need to produce a new number However, > this does not guarantee uniqueness, which means that you need to check the > current output value against all previous output values. This is made simple > by a brute force algorithm which, obviously, scans the previous number > whether an output of this value has been or not has been produced before. > > This is the "best" way if you want to write a simple algorithm, but it is > not the best way considering CPU load on the system. For this, there exist > hashing techniques to keep track of large number of values, this might be > fast finders of used numbers. This could be considered "best" from an > CPU-minimization approach, but the programming gets a little bit more > tricky. > > But happily enough, as this forum implicitly is about databases, one can > "cheat" and store the numbers in the database(!), index the table that > stores the values, and then get rid of the problem to have to write the > hashing algorithms - since it already done in the DBMS. > > > >-----Original Message----- > >From: Sigurd Magnusson [mailto:[EMAIL PROTECTED]] > >Sent: Tuesday, January 23, 2001 9:59 AM > >To: [EMAIL PROTECTED] > >Subject: [PHP-WIN] Random Code > > > > > >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 > > >
"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] >
Hi all, 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: ---------- <?php putenv("ORACLE_SID=badm"); putenv("ORACLE_HOME=D:\ORANT"); $tns = "(DESCRIPTION = (ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = bhz_oracle_1)(PORT = 1521))) (CONNECT_DATA = (SID = badm) ) )"; $connect=OCIPLogon("user","password",$tns) or die("It's not possible to connect"); $sql = "select * from CentrosCusto"; $result = OCIParse($connect,$sql); OCIExecute($result) or die("It's not possible to query"); echo("<TABLE>"); while(OCIFetch($result)) { $CC = OCIResult($result,1); $CCNome = OCIResult($result,2); echo('<TR><TD>' . $CC . '</TD><TD>' . $CCNome . '</TD></TR>'); } echo("</TABLE>"); ?> ------------- Then let's start the real job... I am in the game! Bye > ----- Mensagem original ----- > De: Carlos Correa Goncalves > Enviada em: Sexta-feira, 19 de Janeiro de 2001 13:53 > Para: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' > Assunto: PHP4 / WinNT 4 / Oracle 7.3 via ODBC > > Hi, > > I´m using PHP 4.0.4pl1 with extension php_oracle.dll, Oracle client 7.3 > with the following products installed: > ------------------------- > Call Interface 7.3.4.0.0 > Objects for OLE 2.2.1.0.0 > 32 bit ODBC 2.5.3.1.0B > Support files 7.3.4.0.0 > SQL*Net Client 2.3.4.0.0 > ... and others > ------------------------------ > > I´m trying to connect to an Oracle 7.3 database with ODBC functions or > direct connection. Those are the code: > > --------------- > putenv("ORACLE_SID=badm"); > putenv("ORACLE_HOME=C:\ORANT"); > putenv("TNS_ADMIN=C:\ORANT\NETWORK\ADMIN"); > > $connect = ora_logon("usercons@badm","sylkds"); > ---------------- > putenv("ORACLE_SID=badm"); > putenv("ORACLE_HOME=C:\ORANT"); > putenv("TNS_ADMIN=C:\ORANT\NETWORK\ADMIN"); > > $connect = odbc_connect("badm" ,"consulta","consulta"); > --------------- > > Both are returning the following message from PHP: > Warning: Oracle: Connection Failed: ORA-12154: TNS:could not resolve > service name in oracle.php on line xxx > Any suggestion? > > > >
First an ignorant remark/question (which really have nothing to do with your current problem): The subject line says "... Oracle 7.3 ...", and you are trying to communicate with this server via a DLL for Oracle version 8.x(?). Is this DLL backwards compatible with Oracle version 7.x? About your problem: 1) Does it really refers to slashes ('/') in the file name? Should it not be back slashes ('\')? 2) If the path is syntactical correct, does the DLL file exist in that directory? 3) If the DLL exists, does it have proper access rights? Is the file corrupted somehow? Etc, etc... >-----Original Message----- >From: Carlos Correa Goncalves [mailto:[EMAIL PROTECTED]] >Sent: Monday, January 22, 2001 1:00 PM >To: '[EMAIL PROTECTED]' >Subject: RES: [PHP-WIN] PHP4 / WinNT 4 / Oracle 7.3 via ODBC > > >Hi Jean-Christophe, > >Thanks for your help! I´ve tried your suggestion. When I add >"extention=php_oci8.dll" to the php.ini and restart the www >service, I get >the message: >------ >PHP Warning: Unable to load dynamic library 'd:/php4/php_oci8.dll' - The >specified module could not be found. in Unknown on line 0 >---- > >The library is in the correct folder. May it be a problem with version of >php_oci8.dll? But it´s been unzipped from the same file as the php.exe >which is running. > >Bye > >> ----- Mensagem original ----- >> De: Jean-Christophe Le Brun >> [SMTP:[EMAIL PROTECTED]] >> Enviada em: Segunda-feira, 22 de Janeiro de 2001 05:40 >> Para: Carlos Correa Goncalves; >[EMAIL PROTECTED] >> Assunto: Re: [PHP-WIN] PHP4 / WinNT 4 / Oracle >7.3 via ODBC >> >> Hi Carlos, >> >> I had the same problem with a configuration near yours. >> PHP4.04 >> WinNT4 >> IIS4 >> Oracle client 8.0 >> >> I've used OCI fonctions, because they work with Oracle >client 8.0 (my data >> base is in Oracle 7.3.4.00 but it works well) >> >> Here is my PHP code : >> >> // You can find the connection string in the file >tnsnames.ora, this is >> the >> only solution i've find to connect to my distant database >> $Connection="(DESCRIPTION = (ADDRESS = (PROTOCOL = ...)(HOST >= ...)(PORT = >> ...))(CONNECT_DATA = (SID = ...)))"; >> // under Windows NT this file is under [Oracle >> Client]\Net80\Admin\Tnsnames.ora >> >> // This is a permanent connection >> $Oracle=OCIPLogon(user, passowrd, $Connection); >> >> // sample of query >> $Requete=OCIParse($Oracle, "select ALTI from POSTE order by >COMMUNE"); >> >> // the ALTI field is store in the $Alti variable >> OCIDefineByName($Requete,"ALTI",&$Alti); >> >> // execute the query >> OCIExecute($Requete); >> >> // read all the rows >> while (OCIFetch($Requete)) >> { >> echo $Alti >> } >> >> Don't forget the line >> extention=php_oci8.dll in your PHP.ini if you work under >Windows NT, with >> LINUX you must make your PHP with the OCI8 librairie i think... >> >> Maybe you can try to yse $Connection with >> Oracle = Oracle_Logon($User, $Password, $Connection); >> >> I've tried to use odbc_connect (ODBC was ok), but it doesn't >work, i don't >> know why... >> >> Good luck >> >> Jean-Christophe Le Brun >> Météo-France >> CMIRNE/DET >> 03-88-40-42-46 >> [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] >
Is there an easy way to grab the page name or the referring page from another page? I have a logon script which checks if they are logged in and dumps them to a logon page if they aren't and I'd like to have a way for them to get back to where they came from (ie. they walked away from their desk and the session times out). I've been working on a way where each page knows its name and sets that as a variable but that seems rather clunky. Thanks! Ed Meyer Smarts Broadcast Systems
Try the $HTTP_REFERER -----Original Message----- From: Ed Meyer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 23, 2001 10:14 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Page names as variables? Is there an easy way to grab the page name or the referring page from another page? I have a logon script which checks if they are logged in and dumps them to a logon page if they aren't and I'd like to have a way for them to get back to where they came from (ie. they walked away from their desk and the session times out). I've been working on a way where each page knows its name and sets that as a variable but that seems rather clunky. Thanks! Ed Meyer Smarts Broadcast Systems -- 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]
> Is there an easy way to grab the page name or the referring page from > another page? I have a logon script which checks if they are > logged in and dumps them to a logon page if they aren't and I'd like to > have a way for them to get back to where they came from (ie. they walked > away from their desk and the session times out). > Try the $HTTP_REFERER Actually, for something like this, you are going to want to use: $REQUEST_URI as the former does not include any GET variables whereas the latter will. I do something very similar to what you are looking to do above and I found that $HTTP_REFERER just wasn't doing it for me... Chris
RE: [PHP-WIN] Page names as variables?That's perfect... Now I can get everyone off my back :-) Thanks! Ed Meyer Smarts Broadcast Systems Actually, for something like this, you are going to want to use: $REQUEST_URI as the former does not include any GET variables whereas the latter will. I do something very similar to what you are looking to do above and I found that $HTTP_REFERER just wasn't doing it for me... Chris
Hi, It may interested someone: I have succesfully connected to Oracle: use ORACLE 6i runtime connect to Oracle 8.1.6 from winnt4.0 workstation SP6 Code I use: <? dl("d:\\www\\php\\extensions\\php_oci8.dll"); $tns_name="sun"; $usr="scott"; $pwd="tiger"; putenv("ORACLE_HOME=D:\ora_6run"); $lnk=OCIPLogon($usr,$pwd,$tns_name); ?> full server description: Oracle8i Enterprise Edition Release 8.1.6.0.0 - 64bit Production PL/SQL Release 8.1.6.0.0 - Production CORE 8.1.6.0.0 Production TNS for Solaris: Version 8.1.6.0.0 - Production NLSRTL Version 3.4.0.0.0 - Production -- Andris mailto:[EMAIL PROTECTED]
Sorry for second mail: I use PHP v.4.0.3 cgi version on iis4.0 Hi, It may interested someone: I have succesfully connected to Oracle: use ORACLE 6i runtime connect to Oracle 8.1.6 from winnt4.0 workstation SP6 Code I use: <? dl("d:\\www\\php\\extensions\\php_oci8.dll"); $tns_name="sun"; $usr="scott"; $pwd="tiger"; putenv("ORACLE_HOME=D:\ora_6run"); $lnk=OCIPLogon($usr,$pwd,$tns_name); ?> full server description: Oracle8i Enterprise Edition Release 8.1.6.0.0 - 64bit Production PL/SQL Release 8.1.6.0.0 - Production CORE 8.1.6.0.0 Production TNS for Solaris: Version 8.1.6.0.0 - Production NLSRTL Version 3.4.0.0.0 - Production -- Andris mailto:[EMAIL PROTECTED]
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