How to connect Laravel with oracle

Поделиться
HTML-код
  • Опубликовано: 27 сен 2024
  • How to connect laravel with oracle
    Before starting please
    If u are using wamp server
    Then go to your green icon of wamp
    Then php
    Then php extensions
    And tick php_oci8_11g(if u are using oracle 11 g)
    If u are using xamp server
    Then go to your php.ini file
    Check that your line extension=php_oci8_12c.dll ; is uncomment
    Here I am using xamp server..
    Steps
    Step1:-------------------------------------------------------------------------------------
    write following in terminal
    [if you are using Laravel 5.3,then following line ]
    composer require yajra/laravel-oci8:"5.3.*"
    [if you are using Laravel 5.2,then following line]
    composer require yajra/laravel-oci8:"5.2.*"
    [if you are using Laravel 5.1,then following line]
    composer require yajra/laravel-oci8:"5.1.*“
    [if you are using Laravel 5.7,then following line]
    composer require yajra/laravel-oci8:"5.7.*“
    (here I am using laravel 5.3)
    Step2:----------------------------------------------------------------------------------------------------------------
    add the following to the providers section of config/app.php.
    Yajra\Oci8\Oci8ServiceProvider::class
    Step3:---------------------------------------------------------------------
    Write in terminal =============
    php artisan vendor:publish --tag=oracle
    step4-------------------------------------------------------------------------------------------------
    then go to .env file and set up database like
    DB_CONNECTION=oracle
    DB_HOST=localhost
    DB_PORT=your_oracle_port_no
    DB_DATABASE=your_database
    DB_USERNAME=your_username
    DB_PASSWORD=your_password
    DB_PORT info is located in orant\NET80\ADMIN\ TNSNAMES.ORA
    Another related video link:
    Call to unfined function yajra\pdo\oci_connect() (oracle +Laravel...link below)
    • Call to undefined fun...
    #oracle #laravel #oci8 #pdo_oci #laravel5
    ================Related tags=======================================
    oracle laravel, laravel, oracle, oci8, yajrabox, yajrabox datatables, yajrabox laravel, yajra datatables laravel 5.5, yajra datatables laravel 5.6, datatable laravel 5.6, laravel yajra, oarcle, oci, oracle tutorial, xampp, oracle xampp, laravel 5 database configuration, laravel beginner tutorial, laravel database settings, laravel 5 db settings, laravel tutorial for beginners step by step, database configuration laravel 5, laravel tutorial, laravel database, database connection, call to undefined function, undefined, solution, oracle +laravel, unfined function, call to unfined function, yajra\\pdo\\oci_connect(),laravel,oracle,how to connect database with laravel project,how to connect oracle database using cli,how to laravel,how to connect sql using command line,connect database with laravel project

Комментарии • 61

  • @ProgrammingNusantara
    @ProgrammingNusantara 2 года назад

    Thank u a lot sir. But if we do now, its very little deferent. But its okay. Good job 👍

  • @tomhikari5765
    @tomhikari5765 5 лет назад

    thank you a lot!!! you can also use TCP viewer to view the port used by oracle.

  • @Tokando002
    @Tokando002 7 лет назад +1

    very good.. can you make complete app series using oracle DB

  • @axelyaelperaltaortiz4815
    @axelyaelperaltaortiz4815 5 лет назад

    tnks bro Great video tutorial , greetings from Mexico

  • @nhatdq3779
    @nhatdq3779 Год назад

    Illuminate\Contracts\Container\BindingResolutionException
    Target class [App/Http/Controllers/TestController] does not exist.
    how to fix?

  • @marciof
    @marciof 7 лет назад +1

    Thank you so Much!! It's work like charm

    • @bons281
      @bons281  7 лет назад +1

      great to hear that it works for you :D

  • @gutoazeredo8410
    @gutoazeredo8410 3 года назад +1

    Illuminate\Contracts\Container\BindingResolutionException
    Target class [App/Http/Controllers/TestController] does not exist.
    I am getting this error. Any help?

  • @yajra4u
    @yajra4u 7 лет назад

    Great video tutorial. Can I link this video on my laravel-oci8 package? Thanks!

  • @programmingtips6400
    @programmingtips6400 7 лет назад

    kindly upload a videos how to connect msql in laravel through angular js and perform crud on it

  • @ThanhHoang-vh1tc
    @ThanhHoang-vh1tc 5 лет назад

    thanks you very much, it save my life!

    • @bons281
      @bons281  5 лет назад

      Thành Hoàng
      Thanks for your feedback. :D

  • @localyaar.bf-tv3603
    @localyaar.bf-tv3603 6 лет назад

    it is nice...

  • @CuongPham-kk4fs
    @CuongPham-kk4fs 6 лет назад

    ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

  • @nayeemchowdhury2497
    @nayeemchowdhury2497 2 года назад

    oracle 19c how connect in laravel

  • @alanibanez313
    @alanibanez313 4 года назад

    great, thanks a lot!

  • @ammarsy7435
    @ammarsy7435 2 года назад

    Did he works in laravel 7 or 8 ??

  • @amosabugri7013
    @amosabugri7013 4 года назад

    this command doesnt work for me please help..
    composer require yajra/laravel-oci8:^8
    it throws this error
    PHP Warning: PHP Startup: Unable to load dynamic library 'oci8_12c' (tried: C:\xampp\php\ext\oci8_12c (The specified module could not be found.), C:\xampp\php\ext
    \php_oci8_12c.dll (%1 is not a valid Win32 application.)) in Unknown on line 0

    • @bons281
      @bons281  4 года назад

      hello try this one ,then let me know which error you are getting ruclips.net/video/cA0m5DRPqsI/видео.html

  • @hajarhamzah6555
    @hajarhamzah6555 6 лет назад

    Sorry, can you show me step 4 in database.php?How to modify?Cause not show in this video

    • @bons281
      @bons281  6 лет назад

      Hamzah , i add my database.php here

  • @danielstanecki9912
    @danielstanecki9912 5 лет назад

    when I am doing step 3 there is error appears:
    In ProviderRepository.php line 208
    Class 'Yajra\Oci8\Oci8ServiceProvider::class' not found
    Any ideas? I use laravel 5.8

    • @joseaguas1020
      @joseaguas1020 5 лет назад

      I have the same error, did you solve it?

  • @quyenvan3795
    @quyenvan3795 5 лет назад

    T
    hanh you for the video but i got a missstack "ORA-12170: TNS:Connect timeout occurred" and i couldn't fine the way suitable to fix it on my local. could you help me ?

    • @bons281
      @bons281  5 лет назад

      Hello +quyen van, Thank you for sharing your Problem. I Think the following link will help you to solve your problem
      stackoverflow.com/questions/23970158/ora-12170-tnsconnect-timeout-occurred
      Plz, let me know if you still have the problem using the above solution.

  • @tonyrangga5490
    @tonyrangga5490 5 лет назад

    thanks.. :)

  • @javierhevia267
    @javierhevia267 7 лет назад

    :/ ERROR :/
    FatalThrowableError in Oci8.php line 455:
    Call to undefined function Yajra\Pdo\oci_connect()

    • @bons281
      @bons281  7 лет назад

      hi +javier do you enabled extension=php_oci8.dll in php.ini ??? you may check out this link github.com/yajra/laravel-oci8/issues/1 ......which server r you using?? is it wamp or xamp or anything else??

  • @augustonoguera5225
    @augustonoguera5225 4 года назад

    que crack este man

  • @Tokando002
    @Tokando002 7 лет назад

    after remove ; from php ini on the oci line i got error

    • @bons281
      @bons281  7 лет назад

      hi +Ahmed. Can u tell me exactly what error are you getting?

  • @lalcubo
    @lalcubo 7 лет назад

    hello sorry for my english i have a problem, i need crear my authentication (auth) with oracle with the table dba_users that is for default the table where oracle save the user and password, and then get the rol from the user and create the menu based on the roles, but the most import for me is how use auth with oracle with the table dba_users and not with the table "users" that laravel have for default thanks

    • @bons281
      @bons281  7 лет назад

      watch this ruclips.net/video/e6t97M4DI2E/видео.html ...although its mysql but concept is pretty same

    • @lalcubo
      @lalcubo 7 лет назад

      ok thanks :D

    • @lalcubo
      @lalcubo 7 лет назад

      thanks but the example not is possible because oracle have your table dba_users and this table not have column ID or rememberToken or create_at or update_at, and the auth use table.id when start i need only that i can use the table dba_users only put my login and password and the auth only return true o false with this table, because the example you create other table similar to user but i not want create other table similar, else use the table already exists and keep the session, you know? and i sorry again for my english. thanks

    • @bons281
      @bons281  7 лет назад

      as far i know u need rememberToken or create_at or update_at fields ,otherwise auth will not work properly like login and password logout time (coz its check rememberToken during these times )..
      u can add these fields(ID or rememberToken or create_at or update_at) to dba_users table .and for ID (since there is no auto increment column in oracle) u can use $sequence during insert(registration)

  • @manojmalakar8419
    @manojmalakar8419 7 лет назад

    nysql is far better than oracles.. in my experience!!

  • @MerriedFellow
    @MerriedFellow 5 лет назад

    Thank you for this tutorial! But i have 2 questions.
    1. on 2:40, i need to modify line 'default' = ... from 'mysql' to 'oracle', right? but do i have to add an element 'oracle' => [ ... ] later in 'connections' array in this file? i have just sqllite, mysql, pgsql and sqlsrv in connections;
    2. on 4:15, is it right that i need to connect to oracle manually? i don't use TOAD, and earlier before using Laravel i connected to oracle via oci_connect and so on.
    Thank you in advance!

  • @eu.silviocesar
    @eu.silviocesar 6 лет назад

    Thanks! it totally works for me, I just had to adapt the connection in database.php because I use odbc here, so, was made like this:
    "'oracle' => [
    'driver' => 'oracle',
    'tns' => env('your_odbc', '(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oracle-scan)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = your_service_name)
    )
    )'),
    'host' => env('DB_HOST', '127.0.0.1'),
    'port' => env('DB_PORT', '1521'),
    'database' => env('DB_DATABASE', 'your_database'),
    'username' => env('DB_USERNAME', 'your_username'),
    'password' => env('DB_PASSWORD', 'your_password'),
    'charset' => env('DB_CHARSET', 'AL32UTF8'),
    'prefix' => env('DB_PREFIX', ''),
    'prefix_schema' => env('DB_SCHEMA_PREFIX', ''),
    ],
    ]"

  • @obuwkakomfort
    @obuwkakomfort 3 года назад

    Declaration of Yajra\Pdo\Oci8::query($statement, $fetchMode = null, $modeArg = null, $ctorArgs = null) must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs)

    • @obuwkakomfort
      @obuwkakomfort 3 года назад

      I have a solution for PHP 8 !!! composer require yajra/laravel-pdo-via-oci8:3.*

  • @liliataleb5657
    @liliataleb5657 7 лет назад

    FatalThrowableError in Oci8.php line 455:
    Call to undefined function Yajra\Pdo\oci_connect()

    • @bons281
      @bons281  7 лет назад

      First check that u have oci8 enabled...To check it go to your browser then localhost then go to php info...if u have found out that there is oci8 enabled then ok otherwise follow below
      if there is no oci8 then do the following
      1.download oracle instant client...then copy all the file from 'oracle instant client' folder and paste it to your pc/windows/system
      2. Make sure you have php_oci8.dll in your bin\php\php_version\ext directory. If not, download it.
      3. Enable extension=php_oci8.dll in your php\php.ini file (which i already showed in video 1.09 period) , and restart apache.

  • @Tokando002
    @Tokando002 7 лет назад

    the procedure entry point OCIstmtGetNextResult could not be located in the dynamic link library

    • @bons281
      @bons281  7 лет назад

      sorry i don't get ur prob

  • @PVINFOLTEC
    @PVINFOLTEC 5 лет назад

    Very thanks, you help me very!!!!

  • @cocl6331
    @cocl6331 4 года назад

    how to add oracle as second database. mysql is default. pls help me

    • @bons281
      @bons281  4 года назад

      as far I know if you set up .env , you don't .if it not work then go to your config/database.php ,'default' => env('DB_CONNECTION', 'yoursetting'),
      change it according to your oracle set up ,also 'connections' => [
      'yoursetting' => [
      'driver' => 'yoursetting',
      ruclips.net/video/Kgl3FzqP1Ps/видео.html

  • @mulkizaki5196
    @mulkizaki5196 5 лет назад

    if i using laravel 5.7 ??

    • @bons281
      @bons281  5 лет назад

      hmm but make sure following line[if you are using Laravel 5.7, then the following line]
      ------------------
      composer require yajra/laravel-oci8:"5.7.*“

  • @ricamourao
    @ricamourao 6 лет назад

    Which version of oracle server did you install?

    • @bons281
      @bons281  6 лет назад

      Hi +Moura, it's oracle 11g

    • @ricamourao
      @ricamourao 6 лет назад

      I tried to use the 11g express however it's not working.

  • @carlosenriquemazariegosram9648
    @carlosenriquemazariegosram9648 7 лет назад

    Class Yajra\Oci8\Oci8ServiceProvider not found... any solution?

    • @bons281
      @bons281  7 лет назад

      +enrique do u add Yajra\Oci8\Oci8ServiceProvider::class in config/app.php ??? which version of laravel r u using???

    • @carlosenriquemazariegosram9648
      @carlosenriquemazariegosram9648 7 лет назад

      Yes, i'm using Laravel 5.3

    • @bons281
      @bons281  7 лет назад

      +enrique try this
      composer dump-autoload
      or
      php artisan dump-autoload
      am not sure what is the actual solution ...but trying to find out a solution for you

    • @bons281
      @bons281  7 лет назад

      +enrique do u solve your prob?? another thing came into my mind do u put instantclient in your system???