13. PHP 7.4.2, Bootstrap 4.3.1 : Laravel 6.12 CRUD tutorial

2020.02.17 Tested on newest Windows 10 64 bit, XAMPP – works !

http://localhost:8083/laravel6/public/shows/create
http://localhost:8083/laravel6/public/shows/ – here are del and edit buttons
http://localhost:8083/laravel6/public/shows/1/edit

https://appdividend.com/2019/09/12/laravel-6-crud-example-laravel-6-tutorial-for-beginners/ 2019.12.10 by Krunal

https://github.com/KrunalLathiya/Laravel6CRUDExample

http://dev1:8083/fwphp/glomodul/blog/?i/read_post/id/43#crequest is URL to show this article in my Blog (Msg module).

 

1. MySQL DB   2. M   3. C requeest   4. Bootstrap 4

5. CreRequest   6. validateSaveResponse

7. RvDisplayresponse   8. CUD   9. D

Install Laravel 6.12

1. MySQL DB   2. M   3. C requeest   4. Bootstrap 4

5. CreRequest   6. validateSaveResponse

7. RvDisplayresponse   8. CUD   9. D

Install Laravel 6.12

For some reason WordPress editor changes pasted text to uppercase !! eg :
composer create-project –prefer-dist laravel/laravel laravel6

~ 130 MB – one of reasons why I do not like such developing SW (included is Oracle Forms). If error – how debug 130 MB ?
B12phpfw has 20-30 kB code to debug (few hundert lines) using own debugging and Xdebug which both work excellent.
If there were somebody who guaranties support (for many years) then huge developing SW would be better. Stories about security… are not true – we only need good help about implement security and some features (which is difficult to find).

cd J:\xampp\htdocs\laravel6\
install the frontend dependencies :

npm install

Step 1. Configure MySQL DB

Values inside .env file are loaded inside the files from the config directory.

J:\xampp\htdocs\laravel6\.env file

Where J:\xampp\htdocs\laravel6\ is root of our laravel project.

If you make changes to .env file then don’t forget to restart server ( if you are using laravel dev server). If you are using virtual host and changes don’t seem to take effect then run :

cd J:\xampp\htdocs\laravel6\

php artisan config:clear

(This command will clear the configuration cache) in your terminal.

Laravel always ships with the migration files, so you can generate DB tables so :

php artisan migrate

migrations table created successfully. Laravel comes with three migrations which are used for authentication. Their file names are prepended with a timestamp :

Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table (0.48 seconds)
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table (0.44 seconds)
Migrating: 2019_08_19_000000_create_failed_jobs_table
Migrated: 2019_08_19_000000_create_failed_jobs_table (0.27 seconds)

select * from information_schema.tables where table_schema = ‘z_laravel6’ and table_name = ‘migrations’ and table_type = ‘BASE TABLE’

Step 2. M – create model and migration files

Database migration is used to save details about DB table, so you don’t have to manually generate all of the tables by going to the database interface or phpmyadmin or …
We can develop migrations using artisan with ‘make: migration’ command.
Type the following command to create a model and migration files.

cd J:\xampp\htdocs\laravel6\

php artisan make:model Show -m

It will create migration files inside database/migrations directory J:\xampp\htdocs\laravel6\database\migrations\ :

  1. J:\xampp\htdocs\laravel6\database\migrations\Show.php file – model name has to be singular
  2. [timestamp]_create_shows_table.php migration file – migration name should be plural to automatically find table name.

//J:\xampp\htdocs\laravel6\database\migrations\2020_02_17_074520_create_shows_table.php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateShowsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     *
     * Create table in DB using the following command.
     *    php artisan migrate
     * execute up() function ee run all migrations and create defined tbls (incremental changes).
     *
     * To reverse the migrations :
     *    php artisan migrate:rollback which will execute the down() function.
     *
     */
    public function up()
    {
        Schema::create('shows', function (Blueprint $table) {
           $table->bigIncrements('id');        //**php artisan make:model Show -m created**
              $table->string('show_name');   //**I added**
              $table->string('genre');
              $table->float('imdb_rating');
              $table->string('lead_actor');
           $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shows');
    }
}

If you want to create the migration but have a different table name in mind, then you can explicitly define a table name with ‘create‘ flag.

  1. up() function is used for creating/updating tables, columns, and indexes Inside up() function, We have the Schema: create(‘table_name,’ callback) method which will be used for creating the new table.
    1. Inside a callback, we have $table->bigIncrements(‘id’) which will create auto_increment integer column with the primary key and argument ‘id’ is the name of a column.
    2. Second is $table->timestamps() which will create the two timestamp columns created_at and updated_at.
  2. down() function is used for reversing an operation done by up() method
       $table->bigIncrements('id');        //**php artisan make:model Show -m created**       
          $table->string('show_name');   //**I added 4 columns**        
          $table->string('genre');      
          $table->float('imdb_rating');          
          $table->string('lead_actor');            
       $table->timestamps();  //**php artisan make:model Show -m created**          

Create table in DB using the following command :

php artisan migrate

which will execute up() function ee run all migrations and create defined tbls (incremental changes).

To reverse the migrations :

php artisan migrate:rollback

which will execute down() function.

Now, add the fillable property inside file :

J:\xampp\htdocs\laravel6\app\Show.php

// J:\xampp\htdocs\laravel6\app\Show.php
namespace App;
use Illuminate\Database\Eloquent\Model;

/*
* We can specify all the properties to modify the behavior of the model.
* We can write a $table property which is used to determine a name of the table that this model will interact with in the future operations.
* By default, It will define a table name as the plural of the model name, e.g., shows table for Show model and users table for User model.
* When you don't need to use timestamps on your table, then you will also have to specify the $timestamps property and set it to false value in your Model because Laravel expects your table to have the created_at and updated_at timestamp columns.
*/
class Show extends Model
{
   protected $fillable = [
      'show_name', 'genre', 'imdb_rating', 'lead_actor'
   ];
}

Step 3. C – Create routes and controller

First, create the ShowController using the following command.

php artisan make:controller ShowController –resource

Note that we have also added the — resource flag which will define six methods inside the ShowController namely:

  1. Index (used for displaying a list of Shows)
  2. Create (will show the view with a form for creating a Show)
  3. Store (used for creating a Show inside the database. Note: create method submits to store method)
  4. Show (will display a specified Show)
  5. Edit (will show the form for editing a Show. Form will be filled with the existing Show data)
  6. Update (Used for updating a Show inside the database. Note: edit submits to update method)
  7. Destroy (used for deleting a specified Show)

J:\xampp\htdocs\laravel6\routes\web.php

add Route::resource… line of code :

// ShowController.php
Route::get('/', function () {
    return view('welcome');
});

Route::resource('shows', 'ShowController');

We can pass dynamic parameters with {} brackets, and you might have noticed that show, update, and destroy has the same url but different methods, so its legit.

Just like resource flag, laravel has a method called resource() that will generate all the above routes. You can also use that method instead of specifying them individually like above.

Actually, by adding Route::resource… line, we have registered multiple routes for our application. We can check it so :

php artisan route:list

Domain Method URI Name Action Middleware
GET/HEAD / Closure web
GET/HEAD api/user Closure api,auth:api
GET/HEAD shows shows.index App\Http\Controllers\ShowController@index web
POST shows shows.store App\Http\Controllers\ShowController@store web
GET/HEAD shows/create shows.create App\Http\Controllers\ShowController@create web
GET/HEAD shows/{show} shows.show App\Http\Controllers\ShowController@show web
PUT/PATCH shows/{show} shows.update App\Http\Controllers\ShowController@update web
DELETE shows/{show} shows.destroy App\Http\Controllers\ShowController@destroy web
GET/HEAD shows/{show}/edit shows.edit App\Http\Controllers\ShowController@edit web

Step 4. Configure Bootstrap 4

Right now (2019.12.10), there are some issues, or somehow I do not see any code inside the public >> css >> app.css file. I have already compiled the CSS and JS file by the

npm run dev

command, but still, the app.css file is empty.

One possible solution is to copy code of previous version’s Laravel’s app.css file and paste it here :

J:\xampp\htdocs\laravel6\public\css\ap.css

Link of the previous css file is :
https://raw.githubusercontent.com/KrunalLathiya/Laravel58CRUD/master/public/css/app.css

Second possible solution is this. This new scaffolding is only available in Laravel 6 and not in the earlier versions like Laravel 5.8 or 5.7.

While Laravel 6 does not dictate which JavaScript or CSS pre-processors you use, it does provide the essential starting point using Bootstrap and Vue that will be helpful for many projects.

By default, the Laravel uses the NPM to install both of these frontend packages.

Bootstrap and Vue scaffolding provided by Laravel is located in the laravel/ui Composer package, which you can install using Composer so :

composer require laravel/ui –dev

Once laravel/ui package has been installed, and you may install the frontend scaffolding using the ui Artisan command:

// Generate basic scaffolding…
php artisan ui vue
php artisan ui react

// Generate login / registration scaffolding…
php artisan ui vue –auth
php artisan ui react –auth

Step 5. Create request (form to insert show tbl row)

Create the views.

http://localhost:8083/laravel6/public/shows/create

Inside the J:\xampp\htdocs\laravel6\resources\views folder where is only welcome.blade.php , create view files :

  1. C create.blade.php
  2. U edit.blade.php
  3. R index.blade.php Inside the views folder, we also need to create the layout file. So create a file inside the views folder called

    layout.blade.php :

    our main template file, and all the other view files will extend this layout.blade.php file.

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Laravel 6 CRUD Example</title>
    <link href="{{ asset('css/app.css') }}" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div class="container">
    @yield('content')
    </div>
    <script src="{{ asset('js/app.js') }}" type="text/js"></script>
    </body>
    </html>

    Here, we have already included the Bootstrap 4 by adding the app.css.

create.blade.php :

@extends('layout')

@section('content')
<style>
  .uper {
    margin-top: 40px;
  }
</style>
<div class="card uper">
  <div class="card-header">
    Add Shows
  </div>
  <div class="card-body">
    @if ($errors->any())
      <div class="alert alert-danger">
        <ul>
            @foreach ($errors->all() as $error)
              <li>{{ $error }}</li>
            @endforeach
        </ul>
      </div><br />
    @endif
      <form method="post" action="{{ route('shows.store') }}">
          <div class="form-group">
              @csrf
              <label for="name">Show Name:</label>
              <input type="text" class="form-control" name="show_name"/>
          </div>
          <div class="form-group">
              <label for="price">Show Genre :</label>
              <input type="text" class="form-control" name="genre"/>
          </div>
          <div class="form-group">
              <label for="price">Show IMDB Rating :</label>
              <input type="text" class="form-control" name="imdb_rating"/>
          </div>
          <div class="form-group">
              <label for="quantity">Show Lead Actor :</label>
              <input type="text" class="form-control" name="lead_actor"/>
          </div>
          <button type="submit" class="btn btn-primary">Create Show</button>
      </form>
  </div>
</div>
@endsection

Open ShowController.php file, and on the create() function, we need to return the view, and that is a create.blade.php file.

// ShowController.php

public function create()
{
   return view('create'); // create.blade.php file
}

Go to a http://localhost:8000/books/create or http://laravel6.test/shows/create

http://localhost:8083/laravel6/public/shows/create

You will see form “Create show”.
Add Shows Show Name: Show Genre : Show IMDB Rating : Show Lead Actor : Create show button

Step 6. Add Laravel Validation rules and save data

First step inside the ShowController.php is that import namespace of Show model inside the ShowController.php file.


// ShowController.php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Show; // import namespace of Show model 

Write following code inside ShowController.php file’s store() function.

public function store(Request $request)
{
        $validatedData = $request->validate([
            // check for all four fields of the form
            // If incoming data fail any of the rules, then it will directly go to the form with the error messages
            // $request object parameter will be used to access form data
            'show_name' => 'required|max:255',
            'genre' => 'required|max:255',
            'imdb_rating' => 'required|numeric',
            'lead_actor' => 'required|max:255',
        ]);

        $show = Show::create($validatedData);

        return redirect('/shows')->with('success', 'Show is successfully saved');
 }

The first thing you want to do is validate a form of data.
We can use a $request->validate() function for validation, which will receive the array of validation rules.
Validation rules is an associative array.
Key will be the field_name and value with being the validation rules.

The second parameter is the optional array for custom validation messages.
Rules are separated with pipe sign “|.” We are using the most basic validation rules https://laravel.com/docs/5.8/validation#available-validation-rules .

First is “required,” which means the field_name should not be empty. (“nullable” rule is vice versa), “string” means it should be the string value, “min” is the limit of minimum characters for a string in an input field and “max” is the maximum characters. “unique:table, column” with see if the same value does not exists in the database (comes handy for storing emails or any other unique data).

If the validation fails, then it will redirect us back. After the validation, we are creating a new book and save that book in the database.
We need to loop through that error messages inside the create.blade.php file which we have already done it.

If you leave all the form fields empty, then you will find an error message at page top.

Now, if you fill the form fields correctly, then it will create a new row in the database.

Step 7. V – display response

Display the data.

http://localhost:8083/laravel6/public/shows/

Write the ShowController’s index function to return an index view with data fetched from a database. Write the following code inside the index() function.

// ShowController.php

public function index()
{
     $shows = Show::all();

     return view('index', compact('shows'));
}

Create a file inside the views folder :

index.blade.php

@extends('layout')

@section('content')
<style>
  .uper {
    margin-top: 40px;
  }
</style>
<div class="uper">
  @if(session()->get('success'))
    <div class="alert alert-success">
      {{ session()->get('success') }}  
    </div><br />
  @endif
  <table class="table table-striped">
    <thead>
        <tr>
          <td>ID</td>
          <td>Show Name</td>
          <td>Show Genre</td>
          <td>Show IMDB Rating</td>
          <td>Lead Actor</td>
          <td colspan="2">Action</td>
        </tr>
    </thead>
    <tbody>
        @foreach($shows as $show)
        <tr>
            <td>{{$show->id}}</td>
            <td>{{$show->show_name}}</td>
            <td>{{$show->genre}}</td>
            <td>{{number_format($show->imdb_rating,2)}}</td>
            <td>{{$show->lead_actor}}</td>
            <td><a href="{{ route('shows.edit', $show->id)}}" class="btn btn-primary">Edit</a></td>
            <td>
                <form action="{{ route('shows.destroy', $show->id)}}" method="post">
                  @csrf
                  @method('DELETE')
                  <button class="btn btn-danger" type="submit">Delete</button>
                </form>
            </td>
        </tr>
        @endforeach
    </tbody>
  </table>
<div>
@endsection

We have used the PHP number_format() function to print the IMDB Rating float value.

Here, we have looped through the show’s array and display the data in the table format.

Also, we have added two buttons for edit and delete operation.

Step 8. CUD

Create Edit and Update Operation.
Add following code inside ShowController.php edit function :

// ShowController.php

public function edit($id)
{
     $show = Show::findOrFail($id);

     return view('edit', compact('show'));
}

Create new file inside the views folder

edit.blade.php

@extends('layout')

@section('content')
<style>
  .uper {
    margin-top: 40px;
  }
</style>
<div class="card uper">
  <div class="card-header">
    Update Shows
  </div>
  <div class="card-body">
    @if ($errors->any())
      <div class="alert alert-danger">
        <ul>
            @foreach ($errors->all() as $error)
              <li>{{ $error }}</li>
            @endforeach
        </ul>
      </div><br />
    @endif
    <form method="post" action="{{ route('shows.update', $show->id) }}">
          <div class="form-group">
              @csrf
              @method('PATCH')
              <label for="name">Show Name:</label>
              <input type="text" class="form-control" name="show_name" value="{{ $show->show_name }}"/>
          </div>
          <div class="form-group">
              <label for="price">Show Genre :</label>
              <input type="text" class="form-control" name="genre" value="{{ $show->genre }}"/>
          </div>
          <div class="form-group">
              <label for="price">Show IMDB Rating :</label>
              <input type="text" class="form-control" name="imdb_rating" value="{{ number_format($show->imdb_rating, 2) }}"/>
          </div>
          <div class="form-group">
              <label for="quantity">Show Lead Actor :</label>
              <input type="text" class="form-control" name="lead_actor" value="{{ $show->lead_actor }}"/>
          </div>
          <button type="submit" class="btn btn-primary">Update Show</button>
      </form>
  </div>
</div>
@endsection

In this file, you can show the values of the particular row using its unique id inside the form fields.

So, when you hit this URL: http://localhost:8000/shows/1/edit or http://laravel6.test/shows/1/edit, you will see row edit form.

Create Edit and Update Operation

Add following code inside ShowController update() function.

// ShowController.php

public function update(Request $request, $id)
{
        $validatedData = $request->validate([
            'show_name' => 'required|max:255',
            'genre' => 'required|max:255',
            'imdb_rating' => 'required|numeric',
            'lead_actor' => 'required|max:255',
        ]);
        Show::whereId($id)->update($validatedData);

        return redirect('/shows')->with('success', 'Show is successfully updated');
}

So now, you can edit and update all the data into the database successfully.

Step 9. D – create delete row functionality

Write following code inside ShowController destroy function to to remove show row :

// ShowController.php
public function destroy($id)
{
        $show = Show::findOrFail($id);
        $show->delete();

        return redirect('/shows')->with('success', 'Show is successfully deleted');
}

We have completed a Laravel 6 CRUD operations tutorial with the example from scratch.

If you are interested in FrontEnd framework like Vue.js with Laravel or Angular with Laravel (Code is on Github as for this tutorial) :

  1. Vue Laravel CRUD example https://appdividend.com/2018/11/17/vue-laravel-crud-example-tutorial-from-scratch/
  2. Angular Laravel Tutorial Example https://appdividend.com/2017/09/22/laravel-5-5-angular-4-tutorial-example-scratch/

https://appdividend.com/2019/09/13/how-to-import-and-export-data-in-csv-excel-in-laravel-6/
https://appdividend.com/2019/09/13/laravel-6-generate-pdf-from-view-example-tutorial-from-scratch/
https://appdividend.com/2019/09/04/how-to-upgrade-laravel-valet-and-update-to-laravel-6/
https://appdividend.com/2019/04/08/laravel-collections-search-method-tutorial-with-example/
https://appdividend.com/2019/04/03/laravel-collections-filter-method-tutorial-with-example/
https://appdividend.com/2018/08/15/laravel-file-upload-example/
https://appdividend.com/2018/02/09/laravel-multiple-files-upload-tutorial-example/
https://appdividend.com/2018/02/08/laravel-ajax-validation-tutorial-scratch/
https://appdividend.com/2018/02/07/laravel-ajax-tutorial-example/


Laravel 6 continues the improvements made in Laravel 5.8 by introducing the following features.

  1. Semantic versioning – serverless deployment platform for Laravel, powered by AWS
  2. Compatibility with Laravel Vapor
  3. Improved authorization responses
  4. Job middleware
  5. Lazy collections
  6. Sub-query improvements
  7. The extraction of frontend scaffolding to the laravel/ui Composer package

https://appdividend.com/2018/10/31/how-to-use-php-in-visual-studio-code/ – For PHP Developers.

See https://github.com/slavkoss/fwphp/ (J:\awww\www\readme.md).

B12phpfw does not use jQuery and AJAX, see examples in https://github.com/slavkoss/fwphp/tree/master/fwphp/glomodul/z_examples/AJAX

1a. Install ZWAMP, Apache, PHP, MySQL, WordPress on Win 10 all 64bit, all portable (extract, setup files)

HOME

22.oct.2016
from  J:\zwamp64\z_apache_php_instalac_doc\z_doc\01_zwamp_instalac_moj.txt

Z-WAMP Server Pack (tools for Apache, PHP web pages developing on all Windows versions 32/64 bit) is a lightweight zero-install Web server package (user GUI).

1. Z-WAMP

is hosted by SourceForge: http://zwamp.sourceforge.net/
download: http://sourceforge.net/projects/zwamp/files/
latest is jan.2013  11_zwamp-x64-2.2.1-full.zip
to DIRECTORY J:\zwamp64\z_apache_php_instalac_doc\win64_x64bit
where is also coresponding MS VC++ which must be installed first (only this one installation) see below vc_redist.x64.
———————————————————-
Latest ZWAMP for Win XP which I have as web site on USB stick – they work on all Windows 32/64 bit versions :
25 MB     11_for_winXP_32bit_zwamp-i386-1.1.2.zip

Last version I extracted php for 32 bit windows xp is 5.4.*  :
11_for_wiXP_32bit_vcredist_x86_VS2008.exe
12_for_winXP_32bit_php-5.4.45-Win32-VC9-x86.zip
Last apache for 32 bit windows xp is 2.4.? or 2.2.? (see apachelounge site)

ZWAMP is Bing Cosca’s project (also author of F3 – Fat free php framework).
Latest ZWAMP 2013 year  for win 10 64 bit contains web development tools:

  1. I use only : Apache, MySQL, PHP, Adminer, – I added phpmyadmin and I extracted their latest versions to Z:\.sys (Z: is for me “J:\zwamp64\vdrive”)
  2. I do not use : MiniPerl 5.14.2, MongoDB 2.2.3,   (PHP 1.3.4 driver),  APC 3.1.13, XCache 3.0.0, XDebug 2.2.1, AdminMongoDB, MemCached, SQLite, eAccelerator, and Alternative PHP Cache (APC)
ZWAMP Version 2.2.1, 2013 year (LATEST RELEASE)
23.oct.2016 I EXTRACTED NEWEST 64 BIT VERSIONS OF  (ALL NO INSTALL, PORTABLE)
Apache 2.4.3 apachelounge
12_apache_httpd-2.4.20-win64-VC14.zip
PHP 5.4.12 12_php-7.0.12-Win32-VC14-x64.zip
MSVC14 (Visual C++ 2015)
MySQL 5.6.10 mysql-5.7.16-winx64.zip,  mysql-5.7.9-winx64.zip
see below EXTRACT PORTABLE: MYSQL
tool
Adminer 3.5.1
Adminer 4.2.5
http://dev1:8083/adminer/adminer.php
see below EXTRACT PORTABLE: MYSQL
ZWAMP does not contain phpMyAdmin phpMyAdmin 4.6.4
see below EXTRACT PORTABLE: MYSQL
ZWAMP does not contain WordPress 1_wordpress-4.6.1.zip   8.5 MB
see below EXTRACT PORTABLE: WORDPRESS

My DIRECTORY J:\zwamp64\z_apache_php_instalac_doc\win64_x64bit
contains :

***** 1. vc_redist (install this first, other SW is portable ): *****
———————————————————-
23.oct.2016 15 MB 10_2015_vc_redist.x64.exe
for .php 7.0.12 64 bit (compiled with Visual Studio 2015)
http://www.microsoft.com/en-us/download/details.aspx?id=48145

—               ***** 2. Apache : *****
—————————————————-
3.jul.2016. 14 MB 12_apache_httpd-2.4.20-win64-VC14.zip
do not forget comment/uncomment:
#LoadModule php5_module /.sys/php/php5apache2_4.dll
LoadModule php7_module /.sys/php/php7apache2_4.dll
in J:\zwamp64\vdrive\.sys\Apache2\conf\httpd.conf
and :

# ZWAMP does:   (subst Z: "J:\zwamp\vdrive")
Listen 8083
# dir J:\zwamp64\vdrive\.sys\php is :
PHPIniDir /.sys/php
# dir J:\zwamp64\vdrive\.sys\php is
<IfModule alias_module>
  # dir. J:\zwamp64\vdrive\.sys\adminer is :
  # http://localhost:8083/adminer/
 Alias /adminer /.sys/adminer
  <Directory /.sys/adminer>
    Options All
    AllowOverride AuthConfig
    Require all granted
  </Directory>

  # http://localhost:8083/phpmyadmin/  
  # WE NEED WAMP WAY for WAMP main menu group 3. Aliases & virt.hosts :
  # J:\zwamp64\vdrive\alias\phpmyadmin.conf for me is all commented
  Alias /phpmyadmin /.sys/phpmyadmin
  <Directory /.sys/phpmyadmin>
    Options All
    AllowOverride AuthConfig
    Require all granted
  </Directory>
</IfModule>

—               ***** 3.1 PHP : *****
————————————————-
http://windows.php.net/download
build date Oct 13 2016 24 MB 12_php-7.0.12-Win32-VC14-x64.zip
oct.2016 23 MB 12_php-5.6.27-Win32-VC11-x64.zip
oct.2015 21 MB 12_php-5.5.38-Win32-VC11-x64.zip
works, oci8 for php7 is supported !!
see trick with php_oci8_11g.dll below

—               ***** 3.2 memcache CURL : *****
—————————————————–
CURL is compiled with php7.0.12,
I do not use memcache (any cache) for now (not needed ?)

—               ***** 4. DB  *****
———————————————————-

—               ***** 4.1 DB sqlite : *****
13.08.2015.  164 kB tema.sqlite
—               ***** 4.2 sqlite develop. tools : *****
24.06.2015.  25 MB 14_sqlitestudio-3.0.6.zip
29.03.2015.  98 kB 14_SQLiteStudio_User Manual.htm

—————————————————-
—         ***** 4.2 DB Oracle 11gXE 64 bit : *****
—————————————————-
332 MB 1_OracleXE112_Win64.zip
see below OracleXE112 INSTALL
see below CONNECT PHP TO OracleXE112
—               ***** Oracle develop. tools : *****
—               Orcle sqldeveloper
—               Orcle sqldeveloper data modeler
—               IDE Netbeans I do not use

—     —————————————————–
—     ***** 4.3 DB mysql (SEE BELOW MYSQL EXTRACT GUIDE) : *****
—     —————————————————–
23.oct.2016.  349 MB 14_mysql-5.7.16-winx64.zip

——————————————————–      —          *****  mysql develop. tools *****
——————————————————-
23.oct.2016.  6 MB  16_phpMyAdmin-4.6.4-all-languages.7z
compatible with PHP 5.5 to 7.0 and MySQL 5.5 and newer.
SHA256: 89ce2055402ea3052d380aebddf3c9c5bfc4ed686f49b98ee2e0f6ec6a3ded6c
old: 16_phpMyAdmin-4.5.0.2-all-languages.7z

23.oct.2016. 283 kB 16_adminer-4.2.5-en.php I renamed to :
J:\zwamp64\vdrive\.sys\adminer\adminer.php
01.06.2016   413 kB adminer-4.2.4.php,  570 kB 16_adminer-master.zip

23.10.2015. 33 MB
15_mysql-workbench-community-6.3.5-winx64-noinstall.zip

2. EXTRACT PORTABLE: MYSQL, PHPMYADMIN, ADMINER

22.oct.2016
http://dev.mysql.com/downloads/mysql/
(phpinfo() shows: mysqli mysqlnd 5.0.12-dev –  20150407 ?)
MD5: 1b23c0ddaa1ad59465fd1702b864e4a3
—–BEGIN PGP SIGNATURE—–  I do not use this
Version: GnuPG v1

iD8DBQBX7U37jHGNO1By4fURAkIGAJ9vU5VfOLHqDnZvvrtq/B/n6jE3MQCgh4C1
9sR5bRIkjwpwJ5Adjekc7uA=
=9Kxd
—–END PGP SIGNATURE—–

348 MB  14_mysql-5.7.16-winx64.zip
36 MB   14_mysql_refman-5.7.16-en.a4.pdf
http://dev.mysql.com/doc/refman/5.7/en/  http://dev.mysql.com/doc/

A bit more difficult for beginner user is to integrate newest
Apache. php, mysql, phpmyadmin, adminer in ZWAMP
(all portable = extract  & setup & run).

Testing MySQL is best in console (command prompt) window – best mysql msgs.
I did not use MSI mysql installer (is it better ?)
======================================================

If using no install mysql zip, you need to:

1. ***EXTRACT MYSQL***
unzip  J:\zwamp64\z_apache_php_instalac_doc\win64_x64bit\14_mysql-5.7.16-winx64.zip
to ZWAMP dir:  J:\zwamp64\vdrive\.sys\mysql (rename old to mysql_5_7_9)

2. Create ***OPTIONS*** file my.ini – see my.ini below
or copy my.ini from mysql_5_7_9 dir to mysql dir
Optional I id not:   extract the debug-test archive if you plan to execute the MySQL benchmark and test suite

???I DID NOT: Choose a MySQL ***SERVER TYPE***, it could be :
it is server-id    = 1 ???
– mysqld Optimized binary with named-pipe support
– or mysqld-debug – like mysqld, but compiled with
full debugging and automatic memory allocation checking

3. ***INITIALIZE MYSQL***
3.1 Freecommander in admin mode and click CLI icon
or (I did):
make icon C:\Windows\SysWOW64\cmd.exe -> right click -> run as admin
J:
cd J:\zwamp64\vdrive\.sys\mysql

3.2   .\bin\mysqld –initialize-insecure –user=mysql

MySQL ee mysqld creates dir :
J:\zwamp\vdrive\.sys\mysql\data – we can move it if needed

data dir we can delete to try –initialize-insecure again if
installation was unsuccesfull as my was first time I used
–initialize mysqld parameter
I did not know how resolve errors – same as MANY PEOPLE ON WEB FORUMS :
‘Access denied for user ‘root’@’localhost’
or
‘Your password has expired

4. ***START*** MySQL server :
4.1 First this to be able to do 4.2 !! :
Establish ZWAMP try icon & start Apache and mysql
(or 2click on: J:\zwamp64\zwamp.exe)
Rightclick on ZWAMP try icon
– standard ZWAMP, WAMP or XAMPP functions.

ZWAMP Services menu item should show apache and mysql started.

4.2 Execute mysql.exe to ***OPEN MYSQL CONNection***
to open mysql prompt:
J:
cd J:\zwamp\vdrive\.sys\mysql

.\bin\mysql -u root -p 
Enter password: *****
press ENTER key if you not yet have root psw *****
then ***GIVE PASSWORD TO ROOT USER***
ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘root’;
         exit
So we avoided error:
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

Then again :
.\bin\mysql -u root -p

or .\bin\mysql -u root -h 127.0.0.1 –skip-password

If we try 4.2 without ZWAMP started (5.1) :
Enter password: ****
ERROR 2003 (HY000): Cant connect to MySQL server on ‘localhost’ (10061)

Why we need password :
– secure default user accounts
– Portable phpMyAdmin says “Login without psw is forbidden by configuration”

5. MYSQL TOOLS

http://dev1:8083/phpmyadmin – login into mysql with portable phpMyAdmin works after :
rename J:\zwamp64\vdrive\.sys\phpMyAdmin to phpMyAdmin_4_5_0_2
16_phpMyAdmin-4.6.4-all-languages.7z  6 MB ***phpMyAdmin EXTRACT*** to :
J:\zwamp64\vdrive\.sys\phpMyAdmin
copy J:\zwamp64\vdrive\.sys\phpMyAdmin_4_5_0_2\config.inc.php
to J:\zwamp64\vdrive\.sys\phpMyAdmin\config.inc.php
see below config.inc.php

http://dev1:8083/adminer/adminer.php — login into mysql with portable adminer works
— login into oracle 11gXE with portable adminer works
16_adminer-4.2.5-en.php 283 kB copyed to adminer dir
same as phpMyAdmin and renamed to adminer.php, no setup file changes required

http://dev1:8083/adminer/ed/editor.php — is only for mysql DB

http://dev1:8083/adminer/ed/oraed.php — is only for Oracle DB

ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ end mysql 64 bit installation

http://dev1:8083/phpmyadmin displays:

Database server
Server: localhost via TCP/IP
Server type: MySQL
Server version: 5.7.16 – MySQL Community Server (GPL)
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)

Web server
Apache/2.4.20 (Win64)
Database client version: libmysql – mysqlnd 5.0.12-dev – 20150407 – $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $
PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation
PHP version: 7.0.12

phpMyAdmin
Version information: 4.6.4 (up to date)
Documentation
Official Homepage
Contribute
Get support
List of changes
License

Starting MySQL from the Windows Command Line
=======================================
mysqld — corresponds to Oracle DB server daemon(TSR) service name (XE)

Stop MySQL server by executing this command:
mysqladmin -u root -p shutdown

Start mysqld with the –standalone and –debug options. In debug case, mysqld writes a log file C:\mysqld.trace that should contain the reason WHY MYSQLD DOESNT START. See Section 24.5.3, “The DBUG Package”.
Use mysqld –verbose –help to display all the options that mysqld supports.

2.3.5.6 Customizing the PATH for MySQL Tools
============================================
To make it easier to invoke MySQL programs, you can add the path name of the MySQL bin directory to your Windows system PATH environment variable.
You should not add the MySQL bin directory to your Windows PATH if you are running multiple MySQL servers on the same machine.

https://www.adminer.org/#download
Adminer – Database management in a single PHP file
Adminer Editor – Data manipulation for end-users

https://www.adminer.org/
Supports: MySQL, PostgreSQL, SQLite, MS SQL, Oracle, SimpleDB, Elasticsearch
Requirements: PHP 5+
Apache License 2.0 or GPL 2

To see what databases (users in Oracle DB terminology) exist :
————————————————-
(in oracle DB user coresponds to mysql DB)
goto J:\zwamp64\vdrive\.sys\mysql\bin

mysqld –help
mysqld  Ver 5.7.16 for Win64 on x86_64 (MySQL Community Server (GPL))
Copyright (c) 2000, 2016, Oracle and/or its affiliates.
Starts the MySQL database server.

Usage: mysqld [OPTIONS]

For more help options (several pages), use
mysqld –verbose –help

mysqlshow -u root -p
+——————–+
|     Databases      |
+——————–+
| information_schema |
| blogwp             |
| mysql              |
| performance_schema |
| sys                |
+——————–+
Two DB ar minimum.

mysqlshow -u root mysql
Database: mysql
+—————————+
|          Tables           |
+—————————+
| columns_priv              |
| db                        |

+—————————+

To select information from a table in the mysql database :
mysql -e “SELECT User, Host, plugin FROM mysql.user” -u root mysql
+———–+———–+———————–+
| User      | Host      | plugin                |
+———–+———–+———————–+
| root      | localhost | mysql_native_password |
| mysql.sys | localhost | mysql_native_password |
+———–+———–+———————–+

mysqladmin -u root version status proc
mysqladmin  Ver 8.42 Distrib 5.7.16, for Win64 on x86_64
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Server version          5.7.16
Protocol version        10
Connection              localhost via TCP/IP
TCP port                3306
Uptime:                 41 min 55 sec

Threads: 1  Questions: 21  Slow queries: 0  Opens: 115  Flush tables: 1  Open tables: 0  Queries per second avg: 0.008
Uptime: 2515  Threads: 1  Questions: 22  Slow queries: 0  Opens: 115  Flush tables: 1  Open tables: 0  Queries per second avg: 0.008
+—-+——+—————–+—-+———+——+———-+——————+
| Id | User | Host            | db | Command | Time | State    | Info             |
+—-+——+—————–+—-+———+——+———-+——————+
| 11 | root | localhost:50191 |    | Query   | 0    | starting | show processlist |
+—-+——+—————–+—-+———+——+———-+——————+

To display all the options that mysqld supports:
.\bin\mysqld –verbose –help

J:\zwamp\vdrive\.sys\mysql>.\bin\mysql -u root -p
Enter password:
mysql> SELECT User, Host, Password FROM mysql.user;
ERROR 1054 (42S22): Unknown column ‘Password’ in ‘field list’
mysql> SELECT User, Host FROM mysql.user;
+———–+———–+
| User      | Host      |
+———–+———–+
| mysql.sys | localhost |
| root      | localhost |
+———–+———–+
2 rows in set (0.00 sec)

# ————————————-
# my.ini     mysql 5.7.16 config file
# ————————————-
# J:\zwamp64\vdrive\.sys\mysql\my.ini
[client]
password    = root
port          = 3306
socket        = /.tmp/mysql.sock

[mysqld]
basedir = J:/zwamp64/vdrive/.sys/mysql
datadir = J:/zwamp64/vdrive/.sys/mysql/data
# default IPv6 change to ipv4
bind-address = 0.0.0.0
skip-external-locking
key_buffer_size = 16K
max_allowed_packet = 1M
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 128K
sync_binlog = 0
explicit_defaults_for_timestamp = TRUE
server-id    = 1

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
safe-updates

[myisamchk]
key_buffer_size = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout

# ————————————-
# config.inc.php   phpMyAdmin 4.6.4 config file
# ————————————-
// J:\zwamp64\vdrive\.sys\phpMyAdmin\config.inc.php
$cfg[‘blowfish_secret’] = ”; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
$i = 0;
$i++;
/* Authentication type */
//$cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’;
//  if you prefer to not be prompted every time you log in:
$cfg[‘Servers’][$i][‘user’]          = ‘root’;
$cfg[‘Servers’][$i][‘password’]      = ‘root’; // use here your password
//$cfg[‘Servers’][$i][‘auth_type’]     = ‘config’;
/* Server parameters */
$cfg[‘Servers’][$i][‘host’] = ‘localhost’;
$cfg[‘Servers’][$i][‘connect_type’] = ‘tcp’;
$cfg[‘Servers’][$i][‘compress’] = false;
$cfg[‘Servers’][$i][‘AllowNoPassword’] = false;

$cfg[‘UploadDir’] = ”;
$cfg[‘SaveDir’] = ”;

3.  EXTRACT PORTABLE: WORDPRESS

http://sspc1:8083/papl1/blogwp/wp-admin/  = Control panel (Ndzorna ploča)
http://sspc1:8083/papl1/blogwp/  = articles, posts, članci, objave

http://sspc1:8083/papl1/blogwp/primjer-stranice/ = page

http://sspc1:8083/papl1/blogwp/2016/10/22/dan-svijete/

http://sspc1:8083/papl1/blogwp/wp-admin/about.php

https://wordpress.org/download/
http://codex.wordpress.org/Installing_WordPress

1. extract 1_wordpress-4.6.1.zip, 8.5 MB
to
J:\zwamp64\vdrive\web\papl1\blogwp

2. 5-Minute Installation
————————

11111 start apache & mysql

start ZWAMP
rightclick ZWAMP icon and check services apache and mysql are running

22222 create mysql DB and user for WordPress blog

z:
dir .sys
cd .sys\mysql\bin
mysqlshow -u root -p
mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.16 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

1.        mysql> DROP DATABASE blogwp; (possible repeat this)
1.        mysql> CREATE DATABASE blogwp;
2.cre usr mysql> GRANT ALL PRIVILEGES ON blogwp.* TO “blogwp”@”localhost”
-> IDENTIFIED BY “blogwp”;
3. mysql>        FLUSH PRIVILEGES;
4. mysql>        EXIT

or in GraphicUI which creates statements below :

http://dev1:8083/phpmyadmin/
create db blogwp collation utf8_… ,:
New link on left top

CREATE USER ‘blogwp’@’%’ IDENTIFIED WITH mysql_native_password BY ‘***’;
GRANT ALL PRIVILEGES ON *.* TO ‘blogwp’@’%’ REQUIRE NONE WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
GRANT ALL PRIVILEGES ON `blogwp`.* TO ‘blogwp’@’%’;
REVOKE ALL PRIVILEGES ON `blogwp`.* FROM ‘blogwp’@’%’;
GRANT ALL PRIVILEGES ON `blogwp`.* TO ‘blogwp’@’%’ WITH GRANT OPTION;

33333 install WordPress blog tables to MySQL DB

http://sspc1:8083/papl1/blogwp/
or http://sspc1:8083/papl1/blogwp/wp-admin/install.php
Needed info about DB:
DB name               blogwp
DB user name          blogwp
DB psw                blogwp
Host of DB            localhost  or PC name eg SSPC1 or domain name eg http://www.mysite.hr
tables Prefiks        blogwp
(if we want more WordPress installations in one DB)

Above info is used to create wp-config.php file. Also you can edit
wp-config-sample.php. See https://codex.wordpress.org/Editing_wp-config.php

psw=…  email=…

Akismet blog spam protection needs :
email,  usr/psw, API key
https://akismet.com/account/

http://sspc1:8083/papl1/blogwp/  = articles, posts, članci, objave
http://sspc1:8083/papl1/blogwp/wp-admin/  = control panel

44444  WordPress Importer

will import the following content from a WordPress export file:
posts, pages, comments, categories, and other content.
<!–J:\zwamp64\vdrive\web\papl1\blogwp\1_phporacle.wordpress.2016-10-22.xml
This is a WordPress eXtended RSS file (WXR) generated by WordPress as an export of your site.
–>
<!– You may use this file to TRANSFER CONTENT FROM ONE SITE TO ANOTHER. –>
<!– This file is not complete backup of your site. –>

<!– TO IMPORT THIS INFORMATION INTO A WORDPRESS SITE : –>
<!– 1. Log in to that site as an administrator. –>
<!– 2. Go to TOOLS: IMPORT IN THE WORDPRESS ADMIN PANEL. –>
<!– 3. Install the “WordPress” importer from the list. –>
<!– 4. Activate & Run Importer. –>
<!– 5. Upload this file using the form provided on that page. –>
<!– 6. You will first be asked to MAP THE AUTHORS IN THIS EXPORT FILE TO USERS –>
<!–    on the site. For each author, you may choose to map to an –>
<!–    existing user on the site or to create a new user. –>
<!– 7. WORDPRESS WILL THEN IMPORT each of the posts, pages, comments, categories, etc. contained in this file into your site. –>
<!– generator=”WordPress/4.6.1″ created=”2016-10-22 12:46″ –>

If you would prefer to do things manually then follow these instructions:
Upload the wordpress-importer folder to the /wp-content/plugins/ directory
Activate the plugin through the ‘Plugins’ menu in WordPress
Go to the Tools -> Import screen, click on WordPress

Remember to update the passwords and roles of imported users.

Many web hosts now offer tools (e.g. Fantastico) to automatically install WordPress for you.
WordPress  has Automatic upgrading.

Things to Know/todo Before You Begin Installing WordPress
————————————————
– Access to web server (via FTP or shell)
– text editor
– FTP Client
– Web browser (K-meleon, Firefox, Google Chrome)

Minimum requirements to run WordPress:
– PHP version 5.6 or greater
– MySQL version 5.6 or greater OR . – MariaDB version 10.0 or greater -http://dev1:8083/phpmyadmin/
WordPress also works with PHP 5.2.4+ and MySQL 5.0+, but these versions have reached official End Of Life and as such may expose your site to security vulnerabilities.

******************************************************
OracleXE112 INSTALL
******************************************************
see my other article or just install it as any Windows program.

4. CONNECT PHP 7.0.12  TO Oracle 11g r2 XE

Oracle instantclient is not needed if all is on home development PC :
OCI8 Extension – WORKS FOR PHP 7.0.12 64 BIT build date Oct 13 2016

Use php 7.0.12 OCI8 extension to access Oracle Database 11g XE from PHP

I did for php 7.0.12, 64 bit:
———————-
download: https://pecl.php.net/package/oci8
https://pecl.php.net/package/oci8/2.1.2/windows
7.0 Thread Safe (TS) x64
TRICK: from J:\zwamp64\vdrive\.sys\php\ext\1_php_oci8-2.1.2-7.0-ts-vc14-x64.zip   20.sep.2016 734 kB
extract php_oci8_11g.dll in J:\zwamp64\vdrive\.sys\php\ext

I also installed  php 5.6.27, 64 bit:
—————————–
I renamed php dir to php_7_0_12
I renamed php_5_6_27 dir to php
download: https://pecl.php.net/package/oci8/2.0.12/windows
5.6 Thread Safe (TS) x64
from J:\zwamp64\vdrive\.sys\php\ext\1_php_oci8-2.0.12-5.6-ts-vc11-x64.zip     20.sep.2016 581 kB
extract php_oci8_11g.dll in J:\zwamp64\vdrive\.sys\php\ext

OCI8 php extension needs to be linked with Oracle 12, 11, or 10.2
client libraries.  These libraries are found in your database installation,
or (I did not this) :   in the free Oracle Instant Client from
http://www.oracle.com/technetwork/database/features/instant-client/
Install the ‘Basic’ or ‘Basic Lite’ Instant Client package.  If
building from source, then also install the SDK package.
aug.2015.  55 MB 18_instantclient-basic-windows.x64-11.2.0.4.0.zip
nov.2014.  73 MB instantclient-basic-windows.x64-12.1.0.2.0.zip

Oracle standard cross-version connectivity applies.  For example,
PHP OCI8 linked with Instant Client 11.2 can connect to Oracle
Database 9.2 onward.  See Oracle note “Oracle Client / Server
Interoperability Support” (ID 207303.1) for details.

see README of pecl oci8 dll-s zip above
see Documentation is at http://php.net/oci8

2. Install all 64bit: Oracle DB 11g XE on Windows 10 + Forms 12c + APEX 5.0.3

HOME – old downloads are here, but better https://github.com/slavkoss/fwphp/

07. August 2018

I could not find good tutorial for Forms 12 64 bit on Windows 10 64 bit, Oracle DB 11g XE.

So https://github.com/slavkoss/fwphp/tree/master/glomodul/help_sw/oracle is (I think best) tutorial for  installation (last version) Forms 11 64 bit on Windows 10 64 bit, Oracle DB 11g XE, webstart works.

20. March 2016

I successfully installed Forms 12c which seems to be much better than Forms 11g.
I installed Oracle DB 11XE 64 bit – but this article is still usefull because 64 bit 11XE is simpler installation then 32 bit.
My Newest APEX 5.0.3  installation (slowww) also works on Win10 64 bit.

Help pdf: forms12c_upgrade_forms6i_FSMFA.pdf is interresant, other help pdf-s look good. But they still are :
– language references = lists of all existing features
(sometimes also non existing – Lary Ellison’s speciality) – encyclopedias
– there are no good user manuals (tutorials) = simple recipes collections
like this I try to show here.
May be Oracle wants us to pay his expensive courses ?

All 3 ways of running “Installed successfully…” form described in
https://danielsitblog.wordpress.com/tag/oracle-forms-12c/
work for me. This is best (?) :  New standalone way for end-users to run Oracle Forms applications.

Forms 12c developer runs and connects to DB 11g XE (icon in start folder).

My .fmb & .fmx are in J:\sw\possys12 which I added to my FORMS_PATH in file
C:\oracle\midw\home_midw\user_projects\domains\base_domain\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_12.2.1\config\default.env
so :
FORMS_PATH=J:\sw\possys12;C:\oracle\midw\home_midw\forms;C:\oracle\midw\home_midw\user_projects\domains\base_domain\config\fmwconfig\components\FORMS\instances\forms1

After that I could run my tipdok.fmx so :
— URL in firefox shows my tipdok.fmx screen :
http://sspc1:9001/forms/frmservlet?config=webstart&form=tipdok&userid=usr/psw@XE

https://blogs.oracle.com/proactivesupportDevTools/entry/forms_reports_12c_lifetime_support
Release Forms and Reports 12.2.x
GA Date                 Oct 2015
Premier Support Ends    Oct 2020
Extended Support Ends   Oct 2023
Sustaining Support Ends Indefinite

https://blogs.oracle.com/proactivesupportDevTools/entry/browser_less_access_to_forms
Oracle Forms 12c version can now be used without a browser while still keeping the native appearance of the application.
Either JDK or Java Plugin (JRE) has to be installed on the client PC.
An example of how to use this type of configuration can be found in the Forms web configuration file (formsweb.cfg), present in Forms 12c environment.

Download Oracle Forms12c and help :

http://www.oracle.com/technetwork/developer-tools/forms/downloads/index.html
http://docs.oracle.com/middleware/1221/formsandreports/index.html

help: https://oracle-base.com/
https://oracle-base.com/articles/12c/articles-12c
and see end this text: [L1], [L2]…

[L1] 02_fusion_admin_ASADM.pdf Administering Oracle Fusion Middleware
[L2] forms12c_deployment_FSDEP.pdf Forms Services Deployment Guide 12c (12.2.1)

 

My two attempts to install Oracle Forms 11 were unsuccessful (to big, to complicated – nobody starts new projects with Forms 11 – pity – it is great SW developed in wrong direction), but installing Oracle Forms 6i on win 8.1 64 bit and 11g (not XE) was successful (with patch 18 and that two almost 15 years old dll-s instead newer !!)

 

Forms 12c post installation

NEXT STEPS & ACTIONS WORK FOR ME :

  1. Also can be step 2. POSTINST 1  :
    Fusion Middleware Control: Weblogic Server Adminis.Console 12c
    action1111111   start Weblogic (Administration) Server:
    C:\oracle\midw\home_midw\user_projects\domains\base_domain\bin\startWebLogic.cmd
    To stop admin server, close the command shell in which it is running.action2222222  start  Weblogic Server Adminis.Console 12c :
    http://host:port/console
    http://sspc1:7001/console   user=weblogic   psw=mypsw*2
  2. Also can be step 1. POSTINST 2  Starting and Stopping Node Manageraction333333   start NodeManager utility which is used to start F or R servers :
    C:\oracle\midw\home_midw\user_projects\domains\base_domain\bin\startNodeManager.cmd
    To stop Node Manager, close the command shell in which it is running.
  3. POSTINST 3   Starting and Stopping Managed Servers (F, R…)action444444 Starting/Stopping Managed F/R Servers WLS_FORMS / WLS_REPORTS :
    http://sspc1:7001/console :
    1. Frame “Domain Configurations” -> Servers -> Control Tab
    2. chk box Managed Server eg WLS_FORMS or WLS_REPORTS
    (I have only this two plus AdminServer)
    3. button Start or Resume or ShutDown or…
  4. POSTINST 4  Running Oracle Forms
    DO NOT USE old way Embedded Java applet.action555555 run “Installed successfully…” form Standalone way from CLI (or from .bat)
    cd J:\0downl\1_instalirano\1_oracle\z_doc_oracle
    Enter the following to run your application:
    java -jar frmsal.jar -url “http://sspc1:9001/forms/frmservlet?config=standaloneapp” -t 30000action666666 run “Installed successfully…” form Java Webstart way from ibrowser
    http://sspc1:9001/forms/frmservlet?config=webutil_webstart

 

Forms 12c installation

Refer to documentation

  1.  Deinstall older java SW. Install 64bit JDK (v8U51+)
    01_jdk-8u74-windows-x64.exe 191803 kB
    I installed all as administrator
    java -version shows :
    java version “1.8.0_74”
    Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
  2. Install  W e b L o g i c  Server 12c (Infrastructure)
    fmw_12.2.1.0.0_infrastructure.jar 1498316 kB
    You do not have to create a WebLogic Server domain Forms and Reports installer can do it. In admin CLI :
    winkey+X -> Comm.prompt admin
    or winkey, cmd , right click -> run as admin
    “C:\Program Files\Java\jdk1.8.0_74\bin\java” -d64 -jar fmw_12.2.1.0.0_infrastructure.jar
    c:\oracle\midw\home_midw
    (default is C:\Oracle\Middleware\Oracle_Home)
    If you are installing Oracle Forms and Reports on MS Windows, you must make sure that the Node Manager utility that was installed with Oracle WebLogic Server is stopped before you begin Forms installation:
    2.1 Verify the Oracle WebLogic Server Node Manager utility is stopped. If it is running, kill the process.
    2.2 Determine if nodemanager.properties file is present in WebLogic_Home\common\nodemanager directory.
    C:\oracle\midw\home_midw\user_projects\domains\base_domain\nodemanager\
    a. If the nodemanager.properties file is not present, continue installing Oracle Forms and Reports.
    b. If the nodemanager.properties file does exist, open it and verify that the ListenPort parameter is included and that it is set. If the ListenPort parameter is not included or set, edit the nodemanager.properties file so that it is similar to the following, where NODE_MANAGER_LISTEN_PORT represents the port the Node Manager listens on, such as 5556:
    ListenPort=NODE_MANAGER_LISTEN_PORT
  3. Install Forms and Reports 12c (DEPLOYMENT install.type and select Oracle Home created in step 2. above that contains Infrastructure install).
    3.1 Run as admin: setup_fmw_12.2.1.0.0_fr_win64.exe  942641 kB
    3.2 you can skip Auto Update option then click to continue.
    3.3 specify installation directory (see 3.4) :
    when you are going to install forms/reports for DEPLOYMENT install. dir. is Oracle Home that contains infrastructure install:
    c:\oracle\midw\home_midw
    not eg c:\oracle\midw\home_f12c (see error 3.3 below)
    which is ok for Forms Builder STANDALONE install.
    3.4 Installation type screen: option to install Oracle Forms Builder Standalone and Oracle Forms & Reports deployment.
    Choose Oracle Forms & Reports DEPLOYMENT
    The standalone installation :
    1. does not allow forms to be run, just built and compiled. To run them, they must be deployed to a full installation of Oracle Forms and Reports Services.
    2 There is no standalone equivalent of Oracle Reports. (see https://oracle-base.com/articles/12c/standalone-forms-builder-12c-installation-on-windows-1221)
    3.5 Check system requirements screen, if OK, click next
    3.6 Installation summary screen, click next
    3.7 Installation successful screen with check box to Run Oracle Forms Configuration wizard after installation.
    Do not (?) check box and click Finish to exit the installation.In the Forms configuration wizard, you will be prompted to specify Oracle Forms Instance directory location, so just create a new directory and specify that directory for Forms instance and when the Configuration wizard will complete you can find tnsnames.Ora and other properties files in this directory.
  4. Create repository using RCU GUI:
    forms12c need to install Oracle Repository with at least following components:
    Oracle Platform Security Services containing :
    Audit Services
    Audit Services Append
    Audit Services Viewer
    C:\oracle\midw\home_midw\oracle_common\bin\rcu.bat
    host name: localhost (127.0.0.1  ?)
    service name : XE
    recommended is AL32UTF8 char.set — click “Ignore” button
    11g XE db is not certified for use in fusion midw production environm.    — click “Ignore” button
    11.2.0.4+ Ora.DB required, but XE DB is not 11.2.0.4 :
    select banner from v$version where banner like ‘Oracle Database%’;
    outputs: Oracle Database 11g Express Edition Release 11.2.0.2.0 – 64bit ProductionDEV schema prefix
    advaced replication not enabled  — click “Ignore” buttonIn SQL+ I see 9 new DEV_… users created 19.3.2016.
  5. Create WebLogic Server domain using Config Wizard GUI
    eg base_domain :
    Start GUI Configuration of Forms & Reports with :
    C:\oracle\midw\home_midw\oracle_common\common\bin\config.cmd
       chk box create new domain, located in:
    C:\oracle\midw\home_midw\user_projects\domains\base_domainapplication location:
    C:\oracle\midw\home_midw\user_projects\applications\base_domainadmin user name = weblogic
    psw = your choice (8 char, min. one num or…)autoconfig – RCU data (not manual)vendor OracleDBMS/service  XE (ora7 ?)
    schema owner  DEV_STB
    host name localhost (dbhost.example.com)  port 1521created domain : base_domain
    C:\oracle\midw\home_midw\user_projects\domains\base_domainWebLogic Admin server URL:
    http://sspc1:7001/console
  6. Start all servers (how: see postinst above) :
    Node Manager=util which starts not Admin servers, Domain servers are: Admin Server, forms server and reports server and other servers if you have them (I do not)

 

 

 

May 2014

1. http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/
2. https://community.oracle.com/thread/2344127?tstart=0
3. http://dbswh.webhop.net/apex/f?p=BLOG:HOME:0

1a. http://www.oracle.com/technetwork/developer-tools/apex/application-express/upgrade-apex-for-xe-154969.html  — upgrade was unsuccessfull

Here:
– drop all APEX_ and FLOWS_ schemas,
– and fresh install APEX 4.2.5 which was unsuccessfull
(same as upgrade APEX 4.0 -> 4.2.5)

Thank’s to link 1.(snapdba, especcialy Nancy Schorr) I solved partially this, except  can not load images becouse of invalid VIEW XDB.PATH_VIEW
– and this is my question to more experienced people:

conn xdb/xdb@XE
start C:\oraclexe\app\oracle\product\11.2.0\server\bin\sredi (standard code to show invalid DB objects) outputs:
— 3 invalids can not be compiled:
ALTER TRIGGER XDB.XDB_PV_TRIG COMPILE;
ALTER PACKAGE BODY XDB.DBMS_XSLPROCESSOR COMPILE;
ALTER VIEW XDB.PATH_VIEW COMPILE;

Goal details
==========

At this job end I have:
1. working link http://127.0.0.1:8080/apex/apex_admin
(no error: “Unable to run page sentry in application 4500”)
2. select * from all_users order by username;
ee:
start C:\oraclexe\app\oracle\product\11.2.0\server\bin\users.sql

USERNAME      USER_ID  CREATED
---------------------  ----------
ANONYMOUS        35    27-AUG-11
APEX_040200      59    24-MAY-14
APEX_PUBLIC_USER 58    24-MAY-14
CTXSYS           32    27-AUG-11
FLOWS_FILES      57    24-MAY-14
HR               43    27-AUG-11
...

What / how  do to reach goal
========================
A standard Oracle 11.2.0.3 32 bit database installation comes bundled with
APEX (Application Express) 3.2.1 by default (DB 11XE R2 32 bit – with 4.0).

  1. upgrade DB 11XE R2 to latest version of APEX (currently 4.2.5 – 24.5.2014)
  2. configure EPG (Embedded PL/SQL Gateway):
    – which uses Oracle XML DB HTTP components within DB itself
    – so no need to run a separate HTTP server.
  1. Download apex_4.2.5.zip from :
    http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html
  2. Drag apex folder from apex_4.2.5.zip, to drop to C:
  3. C:\apex> sqlplus /nolog
    SQL> CONNECT SYS/YOURSYSPSW@XE as SYSDBA
  4. drop user APEX_040000 cascade;
    drop user APEX_040200 cascade;  — upgrade created this – was unsuccessfull
    drop user APEX_PUBLIC_USER cascade;
    drop user FLOWS_FILES cascade;
  5. @apexins APEX APEX TEMP /i/
    Usage: @apexins <apex_tbs> <apex_files_tbs> <temp_tbs> <images>
    apex_tbs – name of the tablespace for the APEX user.
    apex_files_tbs – name of the tablespace for APEX files user.
    temp_tbs – name of the temporary tablespace.
    images – virtual directory for APEX images. Define the virtual
    image directory as /i/ for future updates.
  6. Log back into SQL*Plus (as above)
    C:\apex> sqlplus /nolog
    CONNECT SYS/YOURSYSPSW@XE as SYSDBA
    change ADMIN account password:
    @apxchpwd
    NOTE: password must min length=6, and contain at least :
    one uppercase letter, one lowercase, one number
    one punctuation character: ( !”#$%&()“*+,-/:;?_ )
  7. ALTER USER anonymous ACCOUNT UNLOCK;
    alter user ANONYMOUS identified by NULL;
    Changed ANONYMOUS password to NULL.
    ALTER USER xdb ACCOUNT UNLOCK;
    ALTER USER apex_public_user ACCOUNT UNLOCK;
    ALTER USER flows_files ACCOUNT UNLOCK;
  8. select username, account_status from dba_users where username = ‘XDB’;
    Database     User Status
    —————   ——-
    XDB             EXPIRED
    if EXPIRED & LOCKED then
    first : alter user xdb account unlock;     then:
    alter user XDB identified by XDB;
  9. Script to enable anonymous access to XML DB repository.
    Some people said that it didnt help (helped me). Run it if:
    start C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\epgstat.sql
    outputs: Allow repository anonymous access?   FALSE
            shows also:    nls-language             american_america.al32utf8
    SET SERVEROUTPUT ON
    DECLARE
    l_configxml XMLTYPE;
    l_value VARCHAR2 (5) := ‘true’; — (true/false)
    BEGIN
    l_configxml := DBMS_XDB.cfg_get ();IF l_configxml.
    EXISTSNODE (
    ‘/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access’) =
    0
    THEN
    — Add missing element.
    SELECT INSERTCHILDXML (
    l_configxml,
    ‘/xdbconfig/sysconfig/protocolconfig/httpconfig’,
    ‘allow-repository-anonymous-access’,
    XMLType (
    ‘<allow-repository-anonymous-access xmlns=”http://xmlns.oracle.com/xdb/xdbconfig.xsd”>’
    || l_value
    || ‘</allow-repository-anonymous-access>’),
    ‘xmlns=”http://xmlns.oracle.com/xdb/xdbconfig.xsd”‘)
    INTO l_configxml
    FROM DUAL;DBMS_OUTPUT.put_line (‘Element inserted.’);
    ELSE
    — Update existing element.
    SELECT UPDATEXML (
    DBMS_XDB.cfg_get (),
    ‘/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access/text()’,
    l_value,
    ‘xmlns=”http://xmlns.oracle.com/xdb/xdbconfig.xsd”‘)
    INTO l_configxml
    FROM DUAL;DBMS_OUTPUT.put_line (‘Element updated.’);
    END IF;DBMS_XDB.cfg_update (l_configxml);
    DBMS_XDB.cfg_refresh;
    END;
    /outputs: Element inserted.
    start C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\epgstat.sql
    — Now is: Allow repository anonymous access? TRUE !!!
  10. and load images:
    SQL> @apxldimg.sql APEX_HOME
    -> SAME ERR UPGRADE AS AFTER DROP APEX_ & FLOW_ USERS:
    ======================================================
    PL/SQL: ORA-04045: errors during recompilation/revalidation of XDB.PATH_VIEW
  11. Configure database parameters for APEX
    Check that the JOB_QUEUE_PROCESSES parameter is set to at least 20:
    SHOW PARAMETER job_queue_processes
    ALTER system SET job_queue_processes=20 scope=both;For a small group of concurrent users, Oracle recommends a value
    of 5 for SHARED_SERVERS:
    SHOW PARAMETER shared_servers
    ALTER system SET shared_servers=5 scope=both;
  12. Enable network services (ACL) and XML DB HTTP server
    Re enable the Oracle XML DB HTTP Server port (8080):
    EXEC dbms_xdb.sethttpport(8080);Enable remote HTTP connections (optional):
    EXEC dbms_xdb.setListenerLocalAccess(l_access => FALSE);
    If l_access is set to TRUE, setListenerLocalAccess allows access to
    XML DB HTTP server on the localhost only.
    If l_access is set to FALSE, setListenerLocalAccess allows access to
    XML DB HTTP server on both the localhost and non-localhost interfaces
    i.e. remote connections.By default, the ability to interact with network services is disabled
    in Oracle Database 11g.
    Therefore, you must use DBMS_NETWORK_ACL_ADMIN package to grant
    connect privileges to any host for the APEX_040200 database user:DECLARE
    ACL_PATH VARCHAR2(4000);
    BEGIN
    — Look for the ACL currently assigned to ‘*’ and give APEX_040200
    — the “connect” privilege if APEX_040200
    — does not have the privilege yet.
    SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
    WHERE HOST = ‘*’ AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
    IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(
    ACL_PATH, ‘APEX_040200’, ‘connect’
    ) IS NULL THEN
    DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(
    ACL_PATH, ‘APEX_040200’, TRUE, ‘connect’
    );
    END IF;
    EXCEPTION
    — When no ACL has been assigned to ‘*’.
    WHEN NO_DATA_FOUND THEN
    DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(‘power_users.xml’,
    ‘ACL that lets power users to connect to everywhere’,
    ‘APEX_040200’, TRUE, ‘connect’);
    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(‘power_users.xml’,’*’);
    END;
    /
    COMMIT;ERROR at line 1: ~~~~~~~~~~~~ !”#$%&()“*+,-/:;?_ ~~~~~~~~~~~~
    ORA-04045: errors during recompilation/revalidation of XDB.PATH_VIEW
    ORA-00600: internal error code, arguments: [qctchr : bfl], [4000], [1024], [1],
    [170], [2], [175], [], [], [], [], []
    ORA-06508: PL/SQL: could not find program unit being called:
    “SYS.DBMS_NETWORK_ACL_ADMIN”
    ORA-06512: at line 19   ORA-01403: no data found

 

OTHER USEFULL (?) COMMANDS

COL comp_name FOR A30
SELECT comp_name, version, status FROM dba_registry WHERE comp_id=’APEX’;

COMP_NAME                         VERSION      STATUS
Oracle Application Express     4.2.5.00.08    VALID

– It’s hard to find error messages with Apex. To get error messages:
execute dbms_epg.set_global_attribute(‘log-level’, 7);
Then look for logs in your Oracle trace directory that start with _s .
Or grep for epg or apex in that directory and you’ll see some errors.

– Switching to brand new port. I made up 8083 as I wasn’t sure
some settings somewhere were still stuck for 8080.
Setting it back and forth to 0 and back to 8083 seems to help.
EXEC dbms_xdb.sethttpport(8083);
EXEC dbms_xdb.sethttpport(0);
EXEC dbms_xdb.sethttpport(8083);

– 8083 never showed up in netstat but it doesn’t seem to make a difference

Test scripts: ed C:\oraclexe\app\oracle\product\11.2.0\server\bin\t.sql
start C:\oraclexe\app\oracle\product\11.2.0\server\bin\t.sql
ed C:\apex\tmp.txt – output of t.sql

1. Install Apache, PHP, Oracle DB 11g XE & 11g, Oracle Forms 6i and 12c & Reports on Win 10 (all 64bit)

HOME   Downloads are now:  https://github.com/slavkoss/fwphp

26.oct.2019 I use 64 bit XAMPP: PHP 7.3.7 AND APACHE 2.4.38. on Windows 10 64 bit. PDO: mysql, oci, sqlite ARE WORKING.Oracle db 11gXE (no more E. Rangel pdooci – pdo sintax on oci8 program layer).

I tried 4-5 WAMP server SW WAMP and ZWAMP are ok but XAMPP unzip is  simplest – almost 1 click . WAMP has problem with composer installations from Windows command line. Next shows more details (I do not use ZWAMP recently) :

  1. Unzip zwamp-x64-2.2.1-full.zip to J:\zwamp64
  2. Rename old J:\zwamp64\vdrive\.sys\Apache2 dir to Apache2_2_4_16
  3. Download Apache : http://www.apachelounge.com
    Create dir J:\zwamp64\vdrive\.sys\Apache2.
    Unzip httpd-2.4.20-win64-VC14.zip – it’s Apache24 folder content to :
    ServerRoot J:/zwamp64/vdrive/.sys/Apache2 (or c:/Apache24 = ServerRoot) in httpd.conf
    Default folder for your your webpages is DocumentRoot
    DocumentRoot J:/zwamp64/vdrive/.sys/Apache2/htdocs
    Directories
    ScriptAlias – also when you use extra folder config file(s) change to your location there
  4. No changes in J:\zwamp64\vdrive\.sys\Apache2_2_4_16\conf\extra
  5. changes in J:\zwamp64\vdrive\.sys\Apache2\conf :
    copy here own httpd.conf ver 2.4.16 to conf dir (rename original before copying)
    copy here own vhosts.conf ver 2.4.16 to conf dir
  6. J:\zwamp64\vdrive\.sys\Apache2\conf\httpd.conf :
    LoadModule php7_module /.sys/php/php7apache2_4.dll
    AddType application/x-httpd-php .php# without this OCI8 and PDO MySQL and PDO sqlite are not visible in inet browser
    are visible in php CLI
    PHPIniDir /.sys/php
  7. Download PHP:  http://windows.php.net/download/
    php-7.0.8-Win32-VC14-x64.zip
     same unzip as apache zip above.
  8. Downloadnewest oci8-2.1.1 Extension for php 7.0.8 64 bit on Windows 10 64 bit – april 2016 (older does not work) :
    OCI8 is also for E.Rangels PDOOCI.
    https://pecl.php.net/package/oci8/2.1.1/windows  – Windows dll-s
    https://pecl.php.net/package/oci8   – for Linux
    released by [email protected]
    https://blogs.oracle.com/opal/entry/php_7_oci8_2_1
    php_oci8-2.1.1-7.0-ts-vc14-x64_Jones_pecl.php.net.zip
    Unzip it’s dll-s to: 
    J:\zwamp64\vdrive\.sys\php\ext
    Christopher Jones’s oci8-2.1.1 for php 7 :
    dir J:\zwamp64\vdrive\.sys\php\ext\php_oci*.*
    18.04.2016.  05:20   155.136 php_oci8.dll
    18.04.2016.  05:20   790.528 php_oci8.pdb – WHAT IS THIS ?
    18.04.2016.  05:20   157.184 php_oci8_11g.dll
    18.04.2016.  05:20   790.528 php_oci8_11g.pdb
    18.04.2016.  05:20   158.208 php_oci8_12c.dll
    18.04.2016.  05:20   790.528 php_oci8_12c.pdb
    7 File(s)      2.997.248 bytes
  9. J:\zwamp64\vdrive\.sys\php\php.ini
  10. 2click J:\zwamp64\zwamp.exe -> right click house icon -> restart
    -> started Apache and MySQL. If not both started very useful is :
    J:\zwamp64\vdrive\.sys\Apache2\bin>httpd.exe
    – this report errors, same as :
    php -v
    PHP 7.0.8 (cli) (built: Jun 21 2016 15:15:15) ( ZTS )
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    or
    php -r “var_dump(function_exists(‘oci_connect’));”
    or
    C:\WINDOWS\system32>php -r “if (! $dbc = oci_pconnect(‘hr’, ‘hr’, ‘ora7’, ‘UTF8’)) echo ‘***** 1. UNSUCCESSFULL db connect *****’; else {echo \”\n\”; echo ‘~~~~~~~~~~~  PARSE-BIND-EXECUTE-FETCH ~~~~~~~~~~’; echo \”\n\”; echo ‘SUCCESSFULL db connect’; echo \”\n\”;  $dml=’SELECT first_name, phone_number FROM (SELECT first_name, phone_number FROM employees ORDER BY first_name) where rownum < 3′; echo $dml; echo \”\n\”; $parse_stid = oci_parse($dbc, $dml);  if (!$parse_stid) {   $m = oci_error($conn);    echo ‘skripta: ‘ . __FILE__ ;   echo’ says neuspio oci_parse : ‘ ;   echo $m[‘message’]; }   $exec_ret =  oci_execute($parse_stid);       echo ‘oci_execute returned: ‘;     print_r($exec_ret);        echo \”\n\”; echo ‘oci_fetch_array returned: ‘;  $row = oci_fetch_array($parse_stid, OCI_ASSOC + OCI_RETURN_NULLS); print_r($row); }”WHICH DISPLAYS:~~~~~~~~~~~  PARSE-BIND-EXECUTE-FETCH ~~~~~~~~~~
    SUCCESSFULL db connect
    SELECT first_name, phone_number FROM (SELECT first_name, phone_number FROM employees ORDER BY first_name) where rownum < 3
    oci_execute returned: 1
    oci_fetch_array returned: Array
    (
    [FIRST_NAME] => Adam
    [PHONE_NUMBER] => 650.123.2234
    )
  11. Not needed if we use ZWAMP :
    Install Apache as a service:
    httpd.exe -k install   httpd.exe -k restart, or stop
    ApacheMonitor: (not needed if we use ZWAMP):
    Double click ApacheMonitor.exe, or put it in your Startup folder.

 

 

28.11.2015 INSTALLATION APACHE 2.4.16 (Win64)  & PHP 7.0.0 RC5 MSVC14 (Visual C++ 2015) x64 ON J:\zwamp\vdrive\.sys\Apache2 (& …\php) OR ON C DISK

Install as a service (not needed if using XAMPP or ZWAMP or WAMP):
httpd.exe -k install
httpd.exe -k  restart

httpd.exe -k stop  
ApacheMonitor: Double click ApacheMonitor.exe, or put it in your Startup folder.

Use PGP Signature and/or the SHA Checksums to verify the integrity.
C:\gnuwin32\bin\sha1sum.exe -help
sha1sum.exe -b J:\0downl\1_instalirano\Apache_httpd-2.4.16-win64-VC14.zip :
d917094cf13ecea83938aa58058ea7c5c6ef2756
Checksums created with GPGHash by SmartJuwel
Creation date: 22.07.2015 with GnuPG Version: 1.4.18
SHA1-Checksum for: httpd-2.4.16-win64-VC14.zip:
D917094CF13ECEA83938AA58058EA7C5C6EF2756
or SHA224-Checksum or SHA256-Checksum or SHA384-Checksum

php http://windows.php.net/qa/ For Apache on Windows: Thread Safe

I did not used Instant Client :
Oracle Database drivers for popular languages and environments including Node.js, Python and PHP can use Instant Client to connect to local or remote DBs.
https://community.oracle.com/thread/1051752 :
1. Download 64 or 32-bit Oracle Instant Client – there is no MSVC14 build 6.8.2015
2. put it somewhere useful (I put it under my php directory)
3. Add it to your system’s PATH. (A quick & dirty fix on Windows is to copy
all of the *.dll files   from the 11g InstantClient package* into same dir
as your webserver’s executable (e.g. httpd.exe).)
http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html
4. Edit your php.ini and uncomment extension=php_oci8_11g.dll

I did not 1. to 4. above !

Stories on WEB that excellent (but never finished and abandoned) old 32 bit F6i, R6i SW and new Windows do not work together are not true. See also – they managed same as I (good site, could give more details):
Installing Oracle Developer (forms & reports 6i) on Windows 7 64bit
and
Oracle Developer 6i & Oracle database 11g R2 (11.2.0.1.0)
Great question to Oracle who says “we do not leave our customers who still use F6i & R6i” – but F6i & R6i can not even be downloaded from Oracle:
Why 32 bit F6i & R6i can not be patched to be certificated on 64 bit 11g and 64 bit Windows ? Oracle Power Objects (SW simmilar to F6i & R6i ) is also abandoned SW.
Today is modern to make new SW, worse than old (nobody begins new project with F11 & R11 – they are rather applications than development SW) and forget poor bastards who bought abandoned SW. So they cut their expenses (and our lifes). Simmilar stories are Microsoft ASP-VS2008-Silverlight, Google AngularJS 1.x – 2.x, over 100 development SW around…
Incompetent managers and trade departments cut our lifes, but they should know that life is not child joke.

APACHE – USE THREAD SAFE (TS) VERSIONS OF PHP BINARIES FOR WINDOWS
MULTITHREAD CAPABLE BINARIES BUILDS – INTERACTION WITH A MULTITHREADED SAPI AND PHP LOADED AS A MODULE INTO A WEB SERVER.

Use Apache builds provided by Apache Lounge – PHP official site use their binaries to build Apache SAPIs.

VC9 builds require you to have the Visual C++ Redistributable for Visual Studio 2008 SP1 x86 or x64 installed.
VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012  x86 or x64 installed. and so on

PECL FOR WINDOWS:PECL extensions for Windows is being worked on. Windows DLL can be downloaded right from thePECL website.
PECL extension release and snapshot build directories are browsable directly.

Not needed for 64 bit Apache, PHP, 11XE all three on home PC..
Download from http://www.oracle.com/technetwork/topics/winx64soft-089540.html
instantclient-basic-windows.x64-12.1.0.1.0.zip (64,939,911 bytes) (cksum – 3658834848)
extract to:  C:\Windows\SysWOW64\instantclient_12_1
and set it on Win PATH variable + H:\Apache24\bin,
(NO:    THERE ARE MORE PHP INSTALLATIONS  (only 1 Apache):    + H:\php)

C:\Apache24\bin>echo %SystemRoot%
outputs: C:\Windows

C:\Apache24\bin>path

extension=php_oci8_11g.dll (remove the “;” from the start of the line)

Restart Apache (XAMPP or WAMP server)

Open  file to see database name as
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora
// D:\app\Farhan\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora

LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)

ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.168.1.2)
)
)

Service name is “orcl.168.1.2”,  my is: XE :

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sspc)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  ) 
ora7 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sspc)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  ) 
EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

See  https://github.com/slavkoss/fwphp/blob/master/fwphp/glomodul/z_examples/index.php
for  httpd.conf, vhosts.conf, C:\Windows\System32\drivers\etc\hosts, php.ini