PHP Mysql & Oracle
I am migrating a php / mysql website to php / oracle. our user authentication system uses the mysql encrypt function to store passwords, without specifying a salt.
Does anyone know how to encrypt the a php variable in the same way that mysql encrypt function does so that i can compare the password stored in the db & the user entered one. the php crypt function seems to take a salt as a argument but i dont know the salt that mysql uses.
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
MySQL/PHP Script To An ORACLE/PHP
I'm trying to convert some PHP scripts which are based to MySQL database to something similar which should work with ORACLE. The original scripts have a lot of library function like "mysql_num_fields, mysql_fetch_field, mysql_fetch_array, mysql_error, and so on..." and, to have a correct result with Oracle. I have to translate these code function to something which does the same thing with Oracle. I know (and I'm trying to use them) that are available the "ORA..." and "OCI..." functions but I did a search about a conversion table from/to "mysql_" with no success. Does anybody know where I could find one?
View Replies !
View Related
Converting From MySQL Commands To Oracle: HELP!
A colleague has written a prototype program in PHP, using a MySQL database. It's a relatively simple app, with a restricted set of mysql commands used (see below). The MySQL DB is being replaced with an Oracle DB (same schema). My plan 1) globally replace the few mysql commands with intermediate equivalents (such as myDB_connect for mysql_connect) 2) those central functions would then (for now) call the original mysql function to prove the code still works 3) replace the "innards" of the myDB_ commands with calls to the Oracle equivalent, including connecting to the new DB 4) make sure it all still works! an equivalency for these in Oracle? Or, where an equivalent is not available, a reasonable alternative command/procedure? Thanks. Commands used: mysql_connect("localhost", "username", "userpass") mysql_error(); mysql_select_db(); $arry = mysql_query($query) $var = mysql_fetch_row($arry) $numvars = mysql_num_rows( $ varsarry ) mysql_data_seek( $arry, $day ) $line = mysql_fetch_array($result, MYSQL_ASSOC) $currdata = mysql_fetch_assoc( $currentarray )
View Replies !
View Related
Convert A Mysql Database To Oracle?
Is there any easy and simple way to convert a mysql database to Oracle? How complicated could result to migrate from mysql php to work with oracle? I think that "mysqlqueries" will have to be changed for something else as so other code and programming `like the connections to the database, and maybe the way to list results, etc.
View Replies !
View Related
PDO And Oracle
Anyone have any recent experience in using the PDO functions with oracle? Early users have complained that it was buggy, but I was wondering if this is still an issue with oracle or not.
View Replies !
View Related
PHP & Oracle
I just got a VM box. 2.6.9-22.ELsmp, Oracle 10gr2_client This works: # sqlplus user/pw@machine connects right up. But this doesn't: putenv ("ORACLE_PATH=/opt/oracle/10gr2_client/bin"); putenv ("ORACLE_HOME=/opt/oracle/10gr2_client"); putenv ("PATH=$PATH;/opt/oracle/10gr2_client/bin"); $conn = ora_logon ("user@machine", "passwd"); $cur = ora_open($conn); Gives: PHP Fatal error: Call to undefined function: ora_logon() in /var/www/html/tst.php I've been searching the web - nothing, well nothing that fits my case. On the old machine oci8 was in /etc/php.ini. phpinfo says oci8 is supported. /etc/php.d doesn't have a oci8.ini and web searching doesn't return anything (that exists). So what am I missing? doing wrong?
View Replies !
View Related
Use Of Oracle With PHP
Just a query about the use of Oracle with PHP. I see PHP has a list of functions built in to deal with Oracle and I was wondering if anybody out there had used this combination of technologies and what their experience with them was? Obviously MySQL and PHP work together well, but as we all know if you get up to 300 concurrent users (which is a hell of a lot) you need something a little stronger. Options I see are Oracle and Sybase (MS is never an option for me, no matter what ).
View Replies !
View Related
Oracle With Php
this is not working Code: $test=཈-03-2007' insert into DBtest(startdate,customerid) values('TO_DATE('$test','DD-MM-YYYY'),123); i need to insert to this data to oracle database.
View Replies !
View Related
Oracle TAF And Php
Just wondering if anyone has got Transparent Application Failover to work with PHP. I've compiled the php using --with-oci8-instant-client and the TNS_NAMES environment variable is has been set to the path of my tnsnames.ora. I've also installed sqlplus. This works as I am able to connect using names given in the tnsnames.ora file. Using sqlplus I connect and do a SELECT host_name from v$instance; this returns node1 i then shutdown the database on node 1 from a remote host and execute the query the result is now node2 I'm also able to shutdown the dbmid query and the correct result is returned. This is all handled by OCI8 When i try to replicate this in php I get an end of communication channel which is correct really, but Oracle TAF should handle this for me. As it does in SQL plus is this correct ?
View Replies !
View Related
Oracle
I have SuSE 9.1, Apache2 and PHP installed. I want to use it against an existing Oracle database on the same server, but when SuSE installs PHP, it is only with mysql support. I am reading that I need to recomplile PHP with "--with-oci8" option. SuSE does not have the PHP source on their website, just the binaries. Does this mean that I have to wipe clean my PHP and Apache install, download the source, and recompile it? I am not an advanced Linux user so this sounds daunting to me. Is there another way around it? I was reading that I might just be able to put a line for Oracle similar to "extension=mysql.so" in my /etc/php.ini file. Of course I would need the Oracle .so from somewhere.
View Replies !
View Related
PHP & Oracle DB
I'm an italian programmer and i have a very big problem: i must connect to Oracle DB. The error log is: Warning: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME is set and points to the right directory in /var/www/phpnuke/html/modules/FAQ/index.php on line 266 Code:
View Replies !
View Related
Oracle 10g, And IIS 6
I am trying to create a tablespace within an Oracle database through a PHP application using IIS 6.0. In my php.ini I uncommented extension=php_oci8.dll and I set my extension_dir. I also copied this file to c:windows. I added the IIS_WPG user to the ora10gin, oradataDB, and the PHP application folder. I add the IUSR_compname to oradataDB, php application folder, ora10gin, tnsnames, and phpextensions. I created the following Environment Variables: ORACLE_HOME, ORACLE_SID, and TNS_ADMIN. When I look at phpinfo in a browser it says OCI8 Support is enabled. My problem occurs when I try to create a tablespace. I don't get an error, it just breaks on the following line: if (!$dbora->Execute("CREATE TABLESPACE ".$schema." DATAFILE '".$path."".$schema.".DBF' SIZE 2M AUTOEXTEND ON NEXT 2M MAXSIZE UNLIMITED LOGGING PERMANENT EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT MANUAL I have it returning "Create Tablespace" so I could determine where it was breaking.
View Replies !
View Related
PHP 5.2.4 With Oracle 10g.
I installed PHP 5.2.4, Apache 2.2 and Oracle XE 10g today. I've set it up, and PHP is working fine on my server. However i'm having a bit of trouble with Oracle. I've pointed php.ini to the correct ext directory, and i've 'uncommented' the line "extension = php_oci8.dll". Code:
View Replies !
View Related
Oracle
i want to implememt private area(authorized users)in the internet main page. Our Backend Database Server running Oracle 9i on AIX I am looking for a solution to pull up live data form Backend Database Server to the web server. What would be best approach for connecting to the Oracle Database? would php a good integration tools to retrieve data in flexible and secure way? I would appreciate any help in this case such as tips/links/docs success story... etc. what about MySQL do I need it to place in between php and oracle ?
View Replies !
View Related
PHP 5.1.1 And Oracle 10
I can't connect to it using PHP and get the following: Warning: ociplogon() [function.ociplogon]: _oci_open_server: Error while trying to retrieve text for error ORA-12170 Sqlplus and Tnsping work fine.
View Replies !
View Related
How To Connect To Oracle?
Ok so I config PHP with: ./configure --prefix=/usr/orion/php/php --with-mysql --with-apxs=/usr/orion/php/apache/bin/apxs --with-oci8=/d0/app/oracle/product/8.1.6 --with-oracle=/d0/app/oracle/product/8.1.6 However in my httpd.conf I do not have a place to change my SID (instance) or ORACLE HOME Anyone know why and maybe post the lines to add that to httpd.conf
View Replies !
View Related
Help!!! Oracle Database
i'm very new in using php with oracle database. Right now, I'm using the php with oracle database to do my assignment. After i install oracle into my local PC, may i know what type of changes in oracle database that i need to do in in order to make my php script runable with oracle database? Also, i always see that many people using username and password when logon to the database (eg $connection=OCILogon("username", "password"). may i know where i can refer to this identifier? thanks for your help.
View Replies !
View Related
Compiliing PHP For Oracle
I'm trying to get PHP 4.2.2 connected to Oracle 8.1.7 in Linux RedHat 9. I had the apache server alredy installed, so I installed Oracle supposing that the apache was ready to handle oracle. When I try the aplication it gives me an error saying that it don't have the osilogon() function. So I start to read in PHP.net. I learnt that the osilogon() is part of the Oracle Call Interface (OCI8) and that I need to recompile apache with the --with-oci8 option (I've checked with phpinfo() and it says that php is running without-oci8. I've tried this in the phpxxx directory as root: ./configure --with-oci8 make make install I had several warnings in the ./configure phase and then i get this errors in the make phase:
View Replies !
View Related
OCI8 On PHP With Oracle 9i
I have been developing some applications on suse 9 / apache 1.37 / php 4.3.4 / Oracle 9i / OCI8. We recently moved servers, apache works fine, php works fine, oracle works fine... however, trying to connect to oracle from php it dies with the following error : Warning: ocilogon(): _oci_open_session: OCIHandleAlloc OCI_HTYPE_SVCCTX: OCI_INVALID_HANDLE Using SQL plus I can connect just fine. The variables are all set in apache and the connection string... the permissions on the oracle folder are all correct.
View Replies !
View Related
Apache Php And Oracle
I am trying to get php to work with oracle and apache. when I execute a script with ph that connects to an oracle database it seems to work. php without "oracle stuff" in apache seems to work. However when I try the script that connects to the database via the web I get messages like: OCISessionBegin: ORA-03106: fatal two-task communication protocol error in any ideas ? (does php not see the ORACLE_HOME and ORACLE_BIN environment variables ?)
View Replies !
View Related
QB 2006 Oracle DB
Is anyone or has anyone been able to connect to the Oracle DB in Quickbooks 2006? Just looking for a little direction and or example here. My undertsanding is Intuit offers an SDK but that only allows read-only access to the database (? )
View Replies !
View Related
Installing Php With Oracle
I'm having a problem making php with oracle. I downloaded all the needed modules and unzipped them to the specified folder. I configure php with amongst others: --with-oci8=[dir] The header files (such as oci.h) are in the installation directory. I come with an error: OCI_NLS_CHARSET_ID undeclared used in oci8.c 2181. It tries to create oci8.lo.
View Replies !
View Related
Oracle->not Same Result From Php And From Sql*plus
Here is my query, ran from oracle sql*plus: SELECT mrbs_room.id, start_time, end_time, name, mrbs_entry.id, type FROM mrbs_entry, mrbs_room WHERE mrbs_entry.room_id = mrbs_room.id AND area_id = 101 AND start_time <= 1076068800 AND end_time > 1076065200 Here is the correct result : SQL> Connected. ID START_TIME END_TIME NAME ID T ---------- ---------- ---------- ---- -- - 82 1076065200 1076068800 test 41 I Ran from php, I got this : ID START_TIME END_TIME NAME T ---------- ---------- ---------- ---- -- - 41 1076065200 1076068800 test I the two ID fields are named with their table name, but php keep the second value and display it as the first one.
View Replies !
View Related
Oracle Installation
I have install the Oracle on remote machine and write a simple code to connect with remote machine...but i 'm not able to get wht setting we have to do in php to run for Oracle..i got some drafts from internet...i uncomment the extension in php.ini (php_oci8.dll) then copy this .dll to extension_dir path of php.ini...and then copy the oci.dll and php_oci8.dll to windows/system...when i run apache shows warning... "Unable to load dynamic library ‘D:PHPextensions/php_oci8.dll’ – The specified procedure could not be found."
View Replies !
View Related
Apache Oracle
I am running PHP with the apache server on Win98, I am working offline using localhost, so PHP is working, now I am trying to connect to my Personal Oracle 8 database on my computer. I am a bit confused in how to set up Net8 for localhost? I have set the php.ini file by uncommenting the extension=php_oci8.dll, and setting the path to this dll. Code I use in my Login.php file PutEnv("ORACLE_SID=ORCL"); PutEnv("ORACLE_HOME=C:ORAWIN98"); // to log into the database $conn = OCILogon("scott","tiger"); but just comes up with an error from the $conn line. I have looked through the PHP4 Manual but most oracle functions wont be of any good until I can log in.
View Replies !
View Related
PHP - ORACLE - VARRAY
I need to know how to get a collection (varray), basically it's an array of chars with size of 9999 positions, from oracle so I can use it as an array with php. There's very little documentation about it. The only thing I found was http://conf.php.net/pres/slides/oci/paper.txt , but only talks about putting an array on the database, not getting it. I tried this: $arr = OCINewCollection($db,'VARCHAR2_V','SCHEMA'); $stmt=ociparse($db,$query_sql); OCIDefineByName($stmt,'VFIELD',$arr); OCIExecute($stmt); But no luck. VARCHAR2_V is the varray type. The variable $query_sql is a simple SELECT of the VARRAY, and in SQL Navigator works just fine. print $arr->size()." "; Just says that the size is 0. Is there a way to get the array, with php commands or sql?
View Replies !
View Related
Oracle Mystery
I have a few apps written in PHP, running on Fedora Core. After porting these applications from PostgreSQL to Oracle a bug appeared: sometimes, not in a reproducable manner, the web page does not appear in the browser and after examining the html source in the browser I notice that the code is cut in half, somewhere after about the first 3-4 kbytes. It happens quite often, once in every two minutes. The problem was not there when I used PostgreSQL. PHP is compiled from source against the Oracle 10 client downloaded from technet. ps: I tried to migrate to the integrated zend instant client solution, but then the letters with accents ceased to appear. Instant client does not use nls_lang, which was set to american_america.ee8iso8859p2. I would really appreciate any ideas how to get my special letters appear again with instant client.
View Replies !
View Related
PHP And Oracle Support
I need to access an Oracle DB from some PHP pages, so I need to compile my PHP with Oracle support. So, the point is: Do I have to download the whole 1.7GB stuff? Is there anything containing only headers ald libs needed to compile? Any other solution? Or am I just on the wrong path?
View Replies !
View Related
Php Oracle Problem
I am trying to use oracle with php i have configured the php & oracle on my window-xp system . i have all the necussary changes that need be done. i have uncomment the code , in php.ini php_oci8.dll php_orale.dll i am able to see the oracle & oci8 section on php.ini file but sill when i ren test probram i am getting below error Fatal error: Call to undefined function: oci_connect() in c:Inetpub wwwrootori.php $db="hidden"; $c1 = oci_connect("scott", "tiger", $db); When i run this file i get one alert also for php.ext. That says --------------------------- php.exe - Application Error --------------------------- The instruction at "0x7c9144a7" referenced memory at "0x00000010". The memory could not be "read". Click on OK to terminate the program Click on CANCEL to debug the program --------------------------- OK Cancel ---------------------------
View Replies !
View Related
PHP And Oracle OCI Interface
I have a simple application which accepts some search criteria, and then displays all of the data results in table format. I would like to have a [PREV] and [NEXT] buttons, but I cannot see a way to jump to a particular record. So that I can limit the number of records displayed on the screen. I'd like a way to say: startpostion( pageNo * recordsSet ) while (read record() and rec++ < recordSet) print data; Can I do this anyway?
View Replies !
View Related
Oracle With PHP In Liux
i'm running php 5 on a redhat server (9.0) and connecting to an oracle 8 database (on a windows) using OCI 8. Randomly, before that am i install the oracle client in to the linux machine ????? or what should i doooo ?
View Replies !
View Related
Oracle Tutorial
Are there any tutorials on linking Oracle 10g and PHP? I currently have a PHP application that uses MySQL, but our database folks want to use Oracle. I've read http://php.net/oracle and the basics seem to be there. But are there any sample scripts or anything that might help me get started?
View Replies !
View Related
Oracle Extension
I'm trying to enable the Oracle Oci8 extension. I've got the ming extension loading so I know its not an extensions_dir problem. I'm using Oracle 10g so I have installed the OraClient on the web server to get the needed Oracle dlls. It is still giving me 'unable to load'. Do I need to copy the oracle dlls any other place or am I missing something?
View Replies !
View Related
Oracle On Apache
I'm using PHP to connect Oracle with OCI . But a serious problem ocurred. If the network error happened that I cannot connect to Oracle DB , and then I fixed the network problem, but I also cannot connect to Oracle DB until I restarted the Apache server.
View Replies !
View Related
Oracle And Encryption
I am running an oracle database with the application written in PHP. I would like to be able to have the option to encrypt data residing in certain columns in certain tables i.e. encrypt the SSNO column but not he Fname column. I would like to keep it in its encrypted form in the database but I would like to be able to show it to certain privileged people based on a password. Can public key encryption be incorporated here in the php application such that if I can encrypt the data based on a key that in it self can be encrypted in a way that you can revoke certain passwords if the employee leaves - much that same way you have revocation lists management in PGP.
View Replies !
View Related
5.03 IIS 6 Oracle 9i Connection
I set up PHP 4.xx using Apache 1.3 on Windows XP to begin a project. The project now needs to be moved to a real test box. Admittedly, I am not quite sure how I was able to access Oracle on my machine, but I know I have the Oracle client installed, have two odbc DSNs (CAI/PT Oracle 8) installed and uncommented php_oci8.dll and php_oracle.dll. Other than that, I kind of just played around until it worked. Code:
View Replies !
View Related
Oracle Connection
I am having a bad time with connection of php and oracle. I m using PEAR for the same. OCI8 extension have been enabled and it shows in phpinfo(); but when i use DB/MDB2 to connect it simply returns with wierd errors. While i was browsing, i found this script. Code:
View Replies !
View Related
Oracle Into An Array
I have 300 data's in my oralce database, which has 22 fields. 300*22 = 6600 datas all together. What I want do is I want to retreive those values from the database and stored in array, then sorted. For example, If I click on the first field then it will sort by that, then if I click on the second field then it will sort by that...etc. I basically i want to retreive all the data's from my database, whihc I know how to do that, I jsut want to know how to stored in array all the datas.
View Replies !
View Related
JSP Or For Connecting To Oracle
My client is very pro JSP; however, I would prefer to use PHP to connect to an Oracle DB, as I am more familiar with it. What advantages, if any, does JSP offer over PHP, specifically with regard to connecting to an Oracle DB?
View Replies !
View Related
ODBC, Oracle
does anyone know the reason of displaying this error message: 'Specified driver could not be loaded due to system error 126 (Oracle73)?' The Oracle client is installed on the same machine as the Apache with PHP and the ODBC sources are configured properly. The ODBC source works with MS Access and SQL Server but does not want to work with the PHP script. Any ideas?
View Replies !
View Related
|