[PHP-DB] Help Please!! Oracle/PHP connection

2003-06-10 Thread Y Al Hinai
Hey guys,
 
I would really appriciate it if someone can direct me with this problem.
 
On my laptop I have:  Windows XP Professional, Oracle 9i Database, Oracle Client 
Software, PHP4.3.1, and Apache server.
 
PHP and Apache work fine.  Oracle i9 by itslef works fine too.  However when i tried 
to connect from PHP to Oracle using the following code:
 
---Code Start-
?php
$user =netuser;
$upasswd =netuser;
$dsn =CSSD;
$conn = odbc_connect($dsn,$user,$upasswd);
echo  conn:  $conn;
if  ($conn  =  0)  {
echo  Error  in  connectionBR;
exit;
  }
else  {
echo  PConnection  successful\n;
  }
odbc_Close($conn);
?
Code End--
 
I get the following error:
 
xxError Start 
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no 
default driver specified, SQL state IM002 in SQLConnect in C:\Documents and 
Settings\Administrator\My Documents\php\project\php14.tmp on line 5
conn: Error in connection
xxError End 
 
I have already set up the ODBC by going to Administrative Tools - Data Sources (ODBC) 
- User DSN - and added an Oracle in OraHome92 driver for my database.
 
Please help me out guys.  This is for my Master's Thesis project.
 
Appriciated,
 
Yousef
 
 


-
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).

[PHP-DB] Differences between php3 and php4

2003-02-22 Thread Y Al Hinai

Hi everyone..

I am new to php.  I have PHP4.2.3 installed with Apache on my computer.  I was 
practicing on the language from a book called PHP essentials by Julie C Meloni.  I 
am facing many problems as many functions from php3 are not working anymore in PHP4!  
For example, header(), include(mydata.txt); and mail().  Also, to recieve variables 
from an HTML form, i had to add HTTP_POST_VARS()!! how would I know that i have to 
add that?!.  I have many similar problems due to the differences between the two 
version.  I have 2 questions:

1. Is there any source (book or URL or whatever)  that shows what have been changed 
between php3 and php4 and what are the new functions or values are? Something like a 
table or differences in functions.

2. How do u get the mail() and include() to work?  
Also, who do u get header() to header() function to work in PHP4??  This is the code i 
am using for the header() followed by the error message:
===CODE
if (!isset($PHP_AUTH_USER)) {
  // If empty, send header causing dialog box to appear
  header('WWW-Authenticate: Basic realm=My_Private_Stuff');
  header('HTTP/1.0 401 Unauthorized');  
  echo 'Authorization Required.';
  exit;
 }
 // If not empty, display values for variables
else {
   echo 
  PYou have entered this username: $PHP_AUTH_USERbr
  You have entered this password: $PHP_AUTH_PWbr
  The authorization type is: $PHP_AUTH_TYPE/p; }
===ERROR
Warning: Cannot add header information - headers already sent by (output started at 
C:\Program Files\Apache Group\Apache2\htdocs\auth.php:9) in C:\Program Files\Apache 
Group\Apache2\htdocs\auth.php on line 17

Warning: Cannot add header information - headers already sent by (output started at 
C:\Program Files\Apache Group\Apache2\htdocs\auth.php:9) in C:\Program Files\Apache 
Group\Apache2\htdocs\auth.php on line 18
Authorization Required.

Please help me here ...



-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

[PHP-DB] PHP and Oracle

2003-02-17 Thread Y Al Hinai

helloo Everyone...

A new guest to the list needs your hlep!!.  I am about to start working on a project 
in which im going to use Oralce with PHP4.  I am new to PHP.  I am looking for a good 
book about working with PHP4 and Oracle to help me pick up the basics as well as get 
the depth that i am looking for.  To give you a better idea regaring depth, I'll be 
working on a Web-enabled college registration system.  Students log into a web page to 
view, choose, and register courses.  They should be able to view their time tables, 
grades, personal information ...etc.  I need help as soon as possible.  Please help.

Thanks

 



-
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day