How to load folder with images php with oracle

Hi i want to upload from my php form folder with images what should i fix in my php code for 1 image?
<?php
define("ORA_CON_UN", "obrazy");
define("ORA_CON_PW", "miksas1");
define("ORA_CON_DB", "//localhost/orcl");
if (!isset($_FILES['lob_upload'])) {
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"
enctype="multipart/form-data">
Image filename: <input type="file" name="lob_upload">
<input type="submit" value="Upload">
</form>
<?php
else {
$conn = oci_connect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB);
// Insert the BLOB from PHP's tempory upload area
$lob = oci_new_descriptor($conn, OCI_D_LOB);
$stmt = oci_parse($conn, 'INSERT INTO FOTKI (FOTKAID, FOTKA) '
.'VALUES(:MYBLOBID, EMPTY_BLOB()) RETURNING FOTKA INTO :FOTKA');
oci_bind_by_name($stmt, ':MYBLOBID', $myblobid);
oci_bind_by_name($stmt, ':FOTKA', $lob, -1, OCI_B_BLOB);
oci_execute($stmt, OCI_DEFAULT);
// The function $lob->savefile(...) reads from the uploaded file.
// If the data was already in a PHP variable $myv, the
// $lob->save($myv) function could be used instead.
if ($lob->savefile($_FILES['lob_upload']['tmp_name'])) {
oci_commit($conn);
echo '<p>Obrazek załadowano</p>';
else {
echo "Couldn't upload Blob\n";
$lob->free();
oci_free_statement($stmt);
oci_close($conn); // log off
?>

The first thing I'd suggest you fix is the forum to which you posted the question.
The name of this forum is "Oracle Database General Questions." That is questions about the database ... not questions about PHP.
Look further and you will find the correct forum.

Similar Messages

  • How to create folder with sub folder ?

    How to create folder with sub folder ?

    Hi,
    Questions. 17 / 17 unresolved -> very bad reputation
    but ok - let's help anyway ...
    1. create everything in Screen Painter
    2. set FromPane and ToPane property correct.
    example:
    Items in MainFolder: FromPane & ToPane: 1 to 3
    Items in SubFolderA (From 2 To 2) - SubFolderB (From 3 To 3)
    shouldn't be that difficult
    in your Code set oForm.PaneLevel when the user clicks on the Folder
    lg David

  • How i can deal with oracle file by using php api

    how I can deal with oracle file by using php api ?

    What has this to do with Reflections and Reference Objects?

  • TS3212 Having problems downloading. OS is LINEX and I'm not sure how to load itunes with it.

    Having problems downloading. OS is LINEX and I'm not sure how to load itunes with it.

    Agreed. No native linux support. The only ways you could run iTunes with a primary linux system would be to a) dual boot, b) virtualize Windows with VirtualBox, VMware, etc., or c) attempt to run iTunes in Wine (which doesn't usually work very well). Dual boot would give you the benefit of complete support and usage of hardware and software, but virtualizing is a bit more convenient, since you would not have to reboot your linux host.

  • How to Load Catalog with given catalog id

    How to load Catalog with given catalog id in ATG
    can any one help on this?
    Thanks in advance.

    Hi ,
    You can use ItemLookUpDroplet :
    $class=atg.repository.servlet.ItemLookupDroplet
    $scope=global
    itemDescriptor=catalog
    repository=/atg/commerce/catalog/ProductCatalog
    In Jsp :
    dsp:droplet name="ItemLookUpDroplet">
    <dsp:param name="id" value="catalog10002"/>
    <dsp:oparam name="output">
    </dsp:oparam>
    </dsp:droplet>
    ~ Praveer

  • How to Implement SSL with Oracle Applications R12 without using Load Balanc

    How to Implement SSL with Oracle Applications R12.1.3 without using Load Balancer

    Please refer to (Enabling SSL in Release 12 [ID 376700.1]).
    Thanks,
    Hussein

  • How to load a boot image to cisco aironet 1140 series after missing boot image

    Hi all,
    I need a solution for this. When i switch my cisco aironet 1140 , it s blinking with red light .and gives a message "no boot image to load".
    When i tried next time, by pressing escape it shows this message that i have mentioned below.
    ap:
    ap:
    using  eeprom values
    WRDTR,CLKTR: 0x83000800 0x40000000
    RQDC ,RFDC : 0x80000035 0x00000208
    using ÿÿÿÿ ddr static values from serial eeprom
    ddr init done
    Running Normal Memtest...
    Passed.
    IOS Bootloader - Starting system.
    FLASH CHIP:  Numonyx P33
    Checking for Over Erased blocks
    Xmodem file system is available.
    DDR values used from system serial eeprom.
    WRDTR,CLKTR: 0x83000800, 0x40000000
    RQDC, RFDC : 0x80000035, 0x00000208
    PCIE0: link is up.
    PCIE0: VC0 is active
    PCIE1: link is NOT up.
    PCIE1 port 1 not initialized
    PCIEx: initialization done
    flashfs[0]: 1 files, 1 directories
    flashfs[0]: 0 orphaned files, 0 orphaned directories
    flashfs[0]: Total bytes: 32385024
    flashfs[0]: Bytes used: 1536
    flashfs[0]: Bytes available: 32383488
    flashfs[0]: flashfs fsck took 16 seconds.
    Reading cookie from system serial eeprom...Done
    Base Ethernet MAC address: 28:94:0f:d6:c8:62
    Ethernet speed is 100 Mb - FULL duplex
    The system is unable to boot automatically because there
    are no bootable files.
    C1140 Boot Loader (C1140-BOOT-M) Version 12.4(23c)JA3, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Compiled Tue 18-Oct-11 14:51 by prod_rel_team
    ap:
    So , now my question is how to load the boot image ? From where will we get this ? OR
    I m also having another Cisco aironet 1140 , Can i get bootimage from that . Kindly let me know the solution from genius ?

    Take a look at this link as it should have the info you need
    https://supportforums.cisco.com/docs/DOC-14636
    Sent from Cisco Technical Support iPhone App

  • How to connect java with oracle

    can any body show me the code of how to connect java with oracle database.
    thank you

    To configure Oracle JDBC:
    1. Add Oracle JDBC JAR file classes12.zip or ojdbc14.zip to classpath.
    2. Load and register the JDBC driver.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    3. Obtain a connection:
    String url="jdbc:oracle:thin:@<host>:1521:<database>
    Connection con = DriverManager.getConnection(url,
    "myLogin", "myPassword");
    4. Create a SQL statement.
    Statement stmt = con.createStatement();
    5. Obtain a result set.
    ResultSet rs = stmt.executeQuery(
    "SELECT ...");

  • How can i  read a image from a oracle DB?

    How can i read a image from a oracle DB?
    Because in the DB a have a field that is a picture that i would like to show in a jpanel.....but this field is in oracle DB only has strange caracters ..... so Do i have to read this field like a input stream?....
    Could some body help me please?
    Thanks...
    Mary

    Well I suppose the picture is stored in a blob. If that is so this is some code I have used to load a picture to a panel. Hope you find it usefull.
    PreparedStatement retreive = db.createPreparedStatement("select bl from test where ln = ?");
    Blob bl;
    try{
    retreive.setBigDecimal(1, new BigDecimal(jTFln.getText()));
    ResultSet rs = retreive.executeQuery();
    if (!rs.next())
    System.out.println("Empty Result Set");
    bl = rs.getBlob("bl");
    if (bl == null) {
    System.out.println("Null Blob");
    return;
    InputStream is = bl.getBinaryStream();
    int imageLength = (int) bl.length();
    System.out.println(imageLength);
    System.out.println(bl.length());
    byte[] imageData = new byte [imageLength];
    is.read(imageData, 0, imageLength);
    image1 = new ImageIcon(imageData);
    photo = new JPanel() {
    public void paint(Graphics g){
    g.setColor(Color.lightGray);
    g.drawImage(image1.getImage(), 0, 0, this);
    } catch (BadLocationException ble){
    ble.printStackTrace();
    } catch (SQLException sqle){
    sqle.printStackTrace();
    } catch (IOException ioe){
    ioe.printStackTrace();
    }

  • How to share folder with only one person one same Mac

    Could someone please remind me how I share a folder with one person I share my Mac with but not the others (we all have different profiles on the same machine...)
    Thanks,
    Michael

    EddyS45 wrote:
    My wife &amp; I use the same iMac with different user accounts.  How do we share one iTunes account on that computer.  I tried moving the iTunes folder in music on my user account to shared user
    Then hold Option and launch iTunes.
    Select Choose library... and select the iTunes folder in /Users/Shared/ folder.

  • Imac froze and on re load folder with question mark appeared.  Now will not start up to home screen.

    The other night my Imac froze during updates.  I found it in the morning with the screen and mouse frozen and only the loading icon spinning.  I re stared the computer from the power button.
    Upon re loading the apple logo did not appear and was replaced by a folder with a question mark in the middle.  I looked this up online and found the best option was to use disk utility to check and repair the hard drive.  This showed an error with HFS.  Used disk utility to fix the hard drive so thast no error appear.  I re stared the computer but all it loaded was the folder with the question mark again, so I decided to erase the hard drive of any information (I back up quite regulary, but left it as last resort due to inconvenience), when installing again it seems to go so far before telling me it cannot install and I need to re start.  I have erased the dsk again and completed disk clean too before trying again and getting the same results.
    I am currenlty stuck at this point and need help, which would be appreciated.
    My Imac is an early 2008 Aluminimum model and installtion disk is 10.3

    The folder with ? mark mean one of 2 things.
    1) The OS is so corrupted that the hardware can't find it as a valid way to boot the system.
    2) Your hard drive has failed.
    You can try booting from the Recovery HD partition, Commadn + r keys at startup if you are running Lion Mt Lion or Mavericks.
    Or boot the system from the original System reinstall DVD that came with your Mac or an upgrade OS X install DVd you may have purchased.
    With either use Disk Utility to see if the hard drive is seen and if it can be erased or repartitioned and then restore from a Time Macine baclup or reinstall OS X.

  • How to load data with carriage return through DRM action script ?

    Hello,
    We are using DRM to manage Essbase metadata. These metadata contain a field for member formula.
    Currently it's a string data type property in DRM so we can't use carriage return and our formula are really hard to read.
    But DRM support other data type property : memo or formatted memo where we can use carriage return.
    Then in the export file, we have change the record delimiter to an other character than CRLF
    Our issue : we are regularly using action script to load new metadata => How to load data properties with carriage return using action script ? There is no option to change the record delimiter.
    Thanks!

    Hello Sandeep
    here what I want to do through action script : loading a formula that use more on than one line:
    Here, I write my formula using 4 lines but action script cannot load since one line = 1 record.
    ChangeProp|Version_name|Hier_name|Node_name|Formula|@round(
    qty*price
    *m05*fy13

  • How to copy folder with files and subfolders within it  to another folder

    how to copy a folder with files and subfolders within it to another folder

    http://javaalmanac.com/egs/java.io/CopyDir.html?l=new

  • How to load date with time zone using sql loader???

    Hi All,
    How to load following value in the table using SQL loader.
    [11/Jan/2006:15:20:14 -0800]
    What should be the datatype of the column in the table. I have tried with "timestamp with local time zone", but unable to load the record using sql loader. What should be the format string in the loader control file to load this type of record.
    Any help in this regard is highly appreciated.
    Sameer

    Try something like this in your control file:
    mycol char "TO_TIMESTAMP_TZ(mycol, 'DD/MON/YYYY:HH24:MI:SS TZH:TZM')"
    [pre]
    Message was edited by:
            Jens Petersen                                                                                                                                                                                                                                                                                                                                                                       

  • How does load-balancing with WebCache work - is there still a bottleneck?

    Hello,
    We're migrating an old Forms 6i app to 10.1.2.0.2 (apps servers = Redhat Linux), and are starting to consider using WebCache to loadbalance between two application servers.
    My question is this - say we have apps servers A and B, both running Forms and Reports Services. We use Webcache on server A (don't have the luxury of a third apps server...) to load balance between A and B. So all initial requests come into A, which in some cases may then be diverted to start a new Forms session on B.
    For those users whose middle-tier sessions are now running on B - will all network traffic for their Forms session continue to be routed through Webcache on A, then to B, over the course of the session? Or does Webcache somehow shunt the whole connection to be straight between the client PC and server B, for the duration of that Forms session?
    If the former, does that mean that the server hosting Webcache can still be a significant bottleneck for network traffic? Have people found load-balancing with Webcache to be useful..?
    Thanks in advance,
    James

    Hi gudnyc,
    Thanks for posting on Adobe forums.
    For HDPI you do not have to do any It will adjust automatically.
    http://helpx.adobe.com/photoshop-elements/using/whats-new.html
    Regards,
    Sandeep

Maybe you are looking for

  • Web gallery album is still there after deleting it in Aperture 2.1

    I deleted a web gallery album in Aperture because I had Stacks turned on and not all images loaded, but the album is still on the web gallery site and I can't figure out how to delete it from there. Any help? Thanks, Mike T.

  • Capacity Leveling in CM25 by Sequence Number in Planned Order

    Hello Gurus, I am having an issue with dispatching planned orders using tabular form.  We have to use the tabular form in order to be able to have our program select all planned orders. I have been testing and testing this trying to get it to work. 

  • Received or not..

    Is there any way you can tell if an email has been opened? I sent something very important to a friend and have no idea if she read it or not. Thanks for the help.

  • U have encountered the unexpected error

    Hi,     I have installed the JDeveloper properly and i have specified the Data base connections and run time connections also properly      Now i have created the simple page and i am getting the error like below    U have encountered the unexpected

  • Disc information for Windows Media Player

    I have a client who wishes the DVD title and track information to be displayed in Windows Media Player (which he uses to view DVDs on his computer). As far as I am able to determine WMP downloads this information from the Microsoft Windows Media data