PHP Classes

File: fwphp/glomodul/blog/msgmkd/altervista001.txt

Recommend this page to a friend!
  Classes of Slavko Srakocic   B12 PHP FW   fwphp/glomodul/blog/msgmkd/altervista001.txt   Download  
File: fwphp/glomodul/blog/msgmkd/altervista001.txt
Role: Documentation
Content type: text/plain
Description: Documentation
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change: Update of fwphp/glomodul/blog/msgmkd/altervista001.txt
Date: 1 year ago
Size: 12,499 bytes


Class file image Download
Revised November 2019. 1\. Install Apache, PHP, Oracle DB 11g XE & 11g, Oracle Forms 6i and 12c & Reports on Win 10 (all 64bit) ======================================================================================================== ### **[HOME]( "Main menu") Downloads are now: [](** 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 about ZWAMP (I do not use ZWAMP recently) : 1. Unzip **** to J:\\zwamp64 2. Rename old J:\\zwamp64\\vdrive\\.sys\\Apache2 dir to Apache2\_2\_4\_16 3. Download Apache : []( Create dir J:\\zwamp64\\vdrive\\.sys\\Apache2. Unzip ****? 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: [](**** 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. []( ? Windows dll-s ? for Linux r**eleased by** [\_7\_oci8\_2\_1]( **php\_oci8-2.1.1-7.0-ts-vc14-x64\_Jones\ 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\ : d917094cf13ecea83938aa58058ea7c5c6ef2756 Checksums created with GPGHash by SmartJuwel Creation date: 22.07.2015 with GnuPG Version: 1.4.18 SHA1-Checksum for: D917094CF13ECEA83938AA58058EA7C5C6EF2756 or SHA224-Checksum or SHA256-Checksum or SHA384-Checksum php[]( 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. : 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).) 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 (]( 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 the[PECL 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 []( (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 [\_examples/index.php]( for httpd.conf, vhosts.conf, C:\\Windows\\System32\\drivers\\etc\\hosts, php.ini kod[ edit]($web_docroot_url/inc/utl/edservertxt.php)[ phpinfo]($web_docroot_url/phpinfo_inc.php) EOKOD; /\* call it so: kod\_edit\_run( $idx // script\_dir\_path , $idxscript // script\_name , MDURL); // web\_docroot\_url = (Apache) web server URL \*/ }