php-windows Digest 21 Jul 2001 09:57:04 -0000 Issue 662

Topics (messages 8421 through 8429):

Re: [PHP-DB] 'ORA-12203: TNS:unable to connect to destination' error
        8421 by: Rouvas Stathis

problems with fwrite
        8422 by: Hugo Alexandre A. S. Dias

oracle
        8423 by: Marisol Díaz E.
        8426 by: Marisol Díaz E.

Re: Password Protection
        8424 by: Erin's Fan Club

application page
        8425 by: Francois Allard

Error checking on fopen, file
        8427 by: Paul Smith

Re: the PHP can't work on IIS5..
        8428 by: Dennis

!!!File porblems!!!
        8429 by: php news

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]


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


Barry Prentiss wrote:
> 
> Hi All,
>  I finally got past the php_oci8.dll problem by moving it to the same
> directory as php.exe and changing the php.ini extensions_dir back to './'.
> 
>  Now I am getting the following error:
> 
>    Warning: _oci_open_server: ORA-12203: TNS:unable to connect to
> destination in c:\program files\apache
> group\apache\htdocs\dna\dna_oci_sys_list.php on line 20
> 
> which occurs at the $conn line below:
> 
>  error_reporting (E_ALL);
>  putenv('ORACLE_HOME=C:\orant');
>  putenv('TNS_ADMIN=C:\orant\NET80\ADMIN');
>  putenv('ORACLE_SID=SLAC');
>  putenv('TWO_TASK=SLAC_TCP');
> 
>  $conn = ociLogon("user","password");

Try, OciLogon("user","pass",'SLAC'). What do you get?

-Stathis.

> 
> This implies that I am reaching the Net8 oci client libraries (right?).
> 
> My environment: PHP 4.0.5, Apache 1.3.19, W2K, Net8 8.0.6.0.0, remote Oracle
> 8.1.6 on Solaris.
> 
> I can connect through SQL*Plus, tests OK through Net8 assistant,
> tnsnames.ora is in proper place (as defined in TNS_ADMIN above).
> 
> What am I doing wrong?
>  Thx in advance,
>  Barry Prentiss




Hi

I have a problem.
I need to generate XML with PHP and for that i use the PHP as scripting
called in the command prompt and in the future in the scheduled tasks.
When i run my scripts in the web they work just fine, but when i run it in
the command prompt the characters with accents don't appear, well, they
appear but replaced by strange chars.

Does it is a problem with Environment vars or i have to configure something?

Thank you.

Hugo Alexandre A. S. Dias
Web-programmer
[EMAIL PROTECTED]
ICQ # 7995052
MSN Messenger: [EMAIL PROTECTED]





Hi,

I'm working with php4 and oracle in windows2000, 

I have problems with this variables.


$lugar="D:\Oracle";
$bdd="orant";

PutEnv("ORACLE_SID=$bdd");
PutEnv("ORACLE_HOME=$lugar");



It don't work, I don't know what is the value of $lugar.
 
Thanks.
 
 
 
Marisol





I provided the 2 forms, but it don't work.




----- Original Message -----
From: "Randall Barber" <[EMAIL PROTECTED]>
To: "Marisol Díaz E." <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 4:57 PM
Subject: Re: [PHP-WIN] oracle


> Escape the \ with \\ like so,
>
> $lugar="D:\\Oracle";
> $bdd="orant";
>
> or, you can use / instead.
>
> Ciao
> RDB
>
> ----- Original Message -----
> From: "Marisol Díaz E." <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 20, 2001 1:57 PM
> Subject: [PHP-WIN] oracle
>
>
> Hi,
>
> I'm working with php4 and oracle in windows2000,
>
> I have problems with this variables.
>
>
> $lugar="D:\Oracle";
> $bdd="orant";
>
> PutEnv("ORACLE_SID=$bdd");
> PutEnv("ORACLE_HOME=$lugar");
>
>
>
> It don't work, I don't know what is the value of $lugar.
>
> Thanks.
>
>
>
> Marisol
>
>
>





According to the PHP manual, using ':' and end if etc is
a correct way but I mistakenly used both the ':' syntax and
curly brackets!  Okay, so I got caught up in some M$
programming and had a mad moment. So it should have
read;
<?
$result = mysql_query("SELECT password, author FROM newsauthors WHERE
author='$name' AND password='$code'");
// If no rows are returned the user is not valid
// However if two rows are return there is also a problem!
if(mysql_num_rows($result) != 0)
    {
    while($result)  // Loop through $result array
       {
       $stored_password=$result[0];
       $stored_author=$result[1];
       // Check author and pasword match
       if(($stored_password == $code) && ($stored_author == $name))
           {
           Print "Correct password"; // if correct
           }
       else
           {
           Print "Authetication failed";  // if failed
           }
      }
}
// If no rows found in DB to match author and password
else
    {
    Print "Authentication failed";
    }
?>

Sorry if I confused anyone!

Regards EF

----- Original Message -----
From: "Robert J Sherman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 11:16 PM
Subject: Re: [PHP-WIN] Re: Password Protection


> It would also be considered more correct to use curly "{ }" to open and
> close conditionals.. rather than ":" and end if/end else, etc..
>
>
>
> "Erin'S Fan Club" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > It is more correct to use 'else' as a default error catch. It is
> > far better to turn it aroud like;
> >
> > <?
> > $result = mysql_query("SELECT password, author FROM newsauthors WHERE
> > author='$name' AND password='$code'");
> > // If no rows are returned the user is not valid
> > // However if two rows are return there is also a problem!
> > if(mysql_num_rows($result) != 0):
> >    {
> >    while($result):  // Loop through $result array
> >       {
> >       $stored_password=$result[0];
> >       $stored_author=$result[1];
> >       // Check author and pasword match
> >       if(($stored_password == $code) && ($stored_author == $name)):
> >           {
> >           Print "Correct password"; // if correct
> >           }
> >       else:
> >           {
> >           Print "Authetication failed";  // if failed
> >           }
> >       end if;
> >       }
> >    end  while;
> >    }
> > // If no rows found in DB to match author and password
> > else:
> >    {
> >     Print "Authentication failed";
> >    }
> > end if;
> >
> > Have fun & hope this helps
> >
> > Regards EF
> >
> > >===== Original Message From "elias" <[EMAIL PROTECTED]> =====
> > >try like that:
> > ><?
> > >$result = mysql_query("SELECT password FROM newsauthors WHERE
> author='$name'
> > >AND password='$code'");
> > >if (mysql_num_rows($result) == 0)
> > >{
> > >// sorry wrong password
> > >} else { // correct pwd }
> > >
> > >
> > >"Nintendoodle" <[EMAIL PROTECTED]> wrote in message
> > >002701c10ff5$bb273e80$[EMAIL PROTECTED]">news:002701c10ff5$bb273e80$[EMAIL PROTECTED]...
> > >I am trying to get a content management system up and running on my
site.
> I
> > >want to have the thing password protected, and this was how I was going
> > >about it, passing on name and password variables in the urls of the
> > >management system. However, this doesnt work, it just says your
password
> in
> > >correct, even when it is not.
> > >
> > >Any help ?
> > >
> > ><?php
> > >$code = mysql_query("SELECT password FROM newsauthors WHERE $name =
> > >author");
> > >?>
> > ><?php
> > >if ($code = $password) {
> > >?>
> > >//Content manager stuff goes here
> > ><?
> > >} else {
> > >echo( "You have entered an incorrect password, or you do not have
access
> to
> > >this part of the Staff area. Please press back on your browser and
> re-enter
> > >details." );
> > >}
> > >?>
> > >
> > >Thanks in advance
> > >
> > >
> > >
> > >
> > >--
> > >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]
>





Good morning

i'm actually working on converting some cold fusion page into php.  I have a
questions, in cold fusion there is a page call application.cfm that is call
at the beginning of every cold fuaion page.  Is there any similar page in
php ???

Thanks everybody

Francois Allard
Visicom Media Inc
Programmeur





Hi. I've written a site that works with files a lot. I want to provide
some sort of error catching so I'm thinking of putting each fopen and
file in an if statement like this:

if (fopen("file","r")) {
        // do code with file
}

Should I do this for *all* calls to fopen and file? Or just some, like
ones that write or append. What's the best programming practice.

-- 
Paul Smith
[EMAIL PROTECTED]
http://www.dostuff.net




Delol,

the right code of php is "<? phpinfo();?>,but "<?phpinfo()?>".namely,you
write error.

in a commence,you can only write <? echo "hi";?>
to test the php.

Dennis



"Delol" <[EMAIL PROTECTED]> wrote in message
9hl9ss$fqn$[EMAIL PROTECTED]">news:9hl9ss$fqn$[EMAIL PROTECTED]...
> Hi ALL:
> when i test whether the PHP work or not with the test.php with code
> <?phpinfo()?> , it will show the error message box. i.e
> "unable to load dynamic library "PATH/FILE NAME" . the module can not be
> found."
> I'm sure that the path of all .dll files are right.
>
> PATH = C:\PHP\extionsions\
> FILE NAME = php_ifx.dll
>             php_mssql65.dll
>             php_oci8.dll
>             php_oracle.dll
>             php_sybase_ct.dll
>
> The test.php is certainly in the wwwroot folder.
> I'm using Windows2000 Advanced Server with SP2.
> THX for solve my problem.
> Please.
>
>






My code:
$Newsfile = fopen("News.txt","r");
while (!feof($Newsfile)) {
$zeile = fgets($Newsfile,1000);
echo $zeile+'<br>';
}
fclose($Newsfile);

In the file is:
Testfile!!!!!

But I get a output:
0

Why??
Can someone help me???
Please mail me at [EMAIL PROTECTED]!!!

GreeZ,
JSTHEMASTER!






Reply via email to