[PHP-DB] Re: PHP and Oracle
> 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 >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. First : you need to install the "oracle client" onto the machine where your webserver is. Ask your dba for that. (I hope you're not a newbie with oracle). With the oracle 8 client, it is possible to connect both oracle 7 and oracle 8. Second : you need to compile php with oci extension, or in windows, uncomment php_oci8.dll. Three : try this tutorial : simple connection to Oracle with PHP : http://www.thickbook.com/extra/php_oracle.phtml You would also want to use a wrapper to access your database. Useful even if you don't plan to switch between databases. My favorite is adodb :http://php.weblogs.com/ADODB_Manual Well, after that, we're ready for more questions ! Hope it will help you Regards, Philippe -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: PHP and Oracle
Hi Georgina, If projectID or moduleID is a number and not a varchar, you would remove the ' enclosing the values. WHERE projectID=$projectID vs WHERE projectID='$projectID' Regards, Philippe "Georgina Elaine Bailey" <[EMAIL PROTECTED]> a écrit dans le message news: 000801c18272$8189aa10$[EMAIL PROTECTED] Can anybody help me! I've been getting a error message like this for the last few days. Warning: OCIStmtExecute: ORA-01722: invalid number on line 49 Array Every time I try to enter a project using a HTML form Line 49 in apparently the line that says: $result = OCIExecute(ins_statement); Below is the code I am trying to use: //insert relevant values into the project table $insert = "insert into PROJECT values ('$projectID', '$moduleID', $keyID, '$title', '$originator', '$softwareHardware', '$specialSkills', '$status', '$externalAgreement', '$background', '$tasks', '$steps', '$references')"; //formulate the query $query = "select projectID, moduleID, title, originator, softwareHardware, specialSkills, status, externalAgreement, background, tasks, steps, references from PROJECT WHERE projectID='$projectID'"; //parse the two statements $ins_statement = OCIParse ($connection, $insert); $qry_statement = OCIParse ($connection, $query); //execute the first insert statement and print error message if there is an error $result = OCIExecute($ins_statement); if (!$result) { echo OCIError($ins_statement).""; exit; } //execute the query statement OCIExecute($qry_statement); //retrieve the results of the query statement and present them in the following way while (ocifetch($qry_statement)) { etc.etc. -- PHP Database 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-DB] Re: php and oracle
It seems you don't have flex neither bison installed on your system. Flex is a lexical analyser generator, and Bison is a parser generator. There are respectively open-source successors to Unix lex and yacc. You will find plenty of information or tutorials on the Internet if you want to. Here is one of my favorites links: http://epaperpress.com/lexandyacc/index.html Regarding your current problem, you can either: - install the rpm's that are needed, probably flex-???.rpm and bison-???.rpm from your Linux CD(s) - get flex and bison at ftp://ftp.gnu.org/non-gnu/flex/flex-2.5.4a.tar.gz and ftp://ftp.gnu.org/gnu/bison/bison-1.29.tar.gz, and build/install the two packages (extract, do "./configure", then do "make install", as usual). Jean Tabel [EMAIL PROTECTED] "Marco Orsuni" <[EMAIL PROTECTED]> wrote in message 001a01c15c5a$aed2b0e0$770250a0@ised0">news:001a01c15c5a$aed2b0e0$770250a0@ised0... > Hallo, > I have problems installing php in Linux Mandrake 7.2. > > Php work, but I can't see the oracle funcions. I guessed I had to recompile > the source. > > I have downloaded the latest version of php from php.net. > > I unzipped the file in /tmp but when I write "./configure" the program go in > abend with this message: > > creating cache ./config.cache > checking for a BSD compatible install... /usr/bin/install -c > checking whether build environment is sane... yes > checking whether make sets ${MAKE}... yes > checking for working aclocal... missing > checking for working autoconf... missing > checking for working automake... missing > checking for working autoheader... missing > checking for working makeinfo... missing > Updated php_version.h > checking whether to enable maintainer-specific portions of Makefiles... no > checking host system type... i586-pc-linux-gnu > checking for gawk... gawk > checking for bison... no > checking for byacc... no > configure: warning: You will need bison if you want to regenerate the PHP > parsers. > checking for gcc... gcc > checking whether the C compiler (gcc ) works... yes > checking whether the C compiler (gcc ) is a cross-compiler... no > checking whether we are using GNU C... yes > checking whether gcc accepts -g... yes > checking how to run the C preprocessor... gcc -E > checking for AIX... no > checking for gcc option to accept ANSI C... none needed > checking for ranlib... ranlib > checking whether gcc and cc understand -c and -o together... yes > checking whether ln -s works... yes > checking for flex... lex > checking for yywrap in -ll... no > checking lex output file root... ./configure: lex: command not found > configure: error: cannot find output from lex; giving up > > what is lex??? and where I did wrong? > > thank you very much. Bye > > Marco R. > > > -- PHP Database 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]