ci_connect(): OCIEnvNlsCreate() failed - php

I am using Laravel 5 with yajra/laravel-oci8 . Problem is that I am getting this error:
ErrorException in Oci8.php line 81:
oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries
I edited System Environment variables, activated OCI8 in php.ini and tried everything that I could find on Google but none of that worked...
EDIT: Added PHP Enviroments:
Does someone knows where's the problem?

Related

Symfony 5 : In ExceptionConverter.php line 117 : An exception occurred in the driver: could not find driver

Problem : When i create a new db with cli symfony console doctrine:database:create, i am getting these errors :
extension=mysqli
extension=pdo_mysql
: are free from any ;
i tried every version of php and xampp and still the same problem : i currantly on version 8.1.6 for both php and Xampp i do only have one php.ini in the Xampp/php file and i did try'd to revoume every comment related
the symfony serve is running fine i tried coding in it doing roots every thing is fine in it except database creating
.Xampp is runnig both MySQL and Appache fine as well
i'm using windows 10 .
symfony console doctrine:database:create
In ExceptionConverter.php line 117:
An exception occurred in the driver: could not find driver
In Exception.php line 28:
could not find driver
In Driver.php line 28:
could not find driver
the .env file
DATABASE_URL="mysql://root#127.0.0.1:3306/EspritClub" // i don't have mdp for the phpmyadmin
#DATABASE_URL="postgresql://app:!ChangeMe!#127.0.0.1:5432/app?serverVersion=14&charset=utf8"
Hope i give all the information , i really need to solve this it has been a week now and still nothing changed .
Finally resolve it , So the problem was in the php.ini file i was changing in the one that was in Xampp/php cause i did not have php.ini in the main php file so i just copy paste the php.ini the the main file and it worked .

How to conncect Oracle with PHP under Winginx?

I want to use PHP to connect to Oracle, but get an error:
Fatal error: Call to undefined function oci_connect()...
I searched in Google, and get that the OCI is not enabled in PHP, but after install Ora10InstantClient & enable extension=php_oci8_12c.dll , I still get the error.
I checked phpinfo(), found the "configure command" -> with-oci8-12c= ... was WRONG. How do I fix this path? If this is not this problem, how can I resolve the problem?

Moving a site (drupal8) to MAMP, autoload.php error

Somebody send me a site to work on so I setup my MAMP webserver, extracted the drupal8 files into the htdocs folder, I setup the database in phpMyAdmin and run the MAMP servers.
When I try to reach localhost I get a HTTP ERROR 500, of-course I check the logs for errors and find this:
[02-Aug-2017 16:14:24 UTC] PHP Warning: require(C:\MAMP\htdocs/../vendor/autoload.php):
failed to open stream: No such file or directory in C:\MAMP\htdocs\autoload.php on line 17
[02-Aug-2017 16:14:24 UTC] PHP Fatal error: require(): Failed opening required 'C:\MAMP\htdocs/../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\MAMP\htdocs\autoload.php on line 17
I thought this had something to do with composer so I reinstalled it and ran cmd
composer install
In installed some files + generated some autoload files which is what i thought was going to solve my problem, but i still get the same error and i feel like im missing something really obvious. Ive been stuck for so long on a small problem.
Hope someone has an answer for me!
SOLVED
It was a pathing error in the autoload.php file
return require DIR . '../vendor/autoload.php';
changed to:
return require DIR . '/vendor/autoload.php';

Installing Laravel resulted in unable to find the socket transport ssl

Hi I am trying to install laravel on my server.This is what I did.First I installed composer and tryed running this command in cmd:
composer create-project laravel/laravel RestPHP
After running it I got this this message:
I tryed googeling about this error but could not find anything concrete regarding this error I am very new to php.
After this I tryed a more manual approach.I downloaded laravel and put it in my htdocs folder , then I tryed openning it like this:
http://localhost:8585/laravel/public/
But I got this message:
Warning: require(E:\Projects
IDE\PHPStorm\xampp\htdocs\laravel\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in E:\Projects
IDE\PHPStorm\xampp\htdocs\laravel\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'E:\Projects
IDE\PHPStorm\xampp\htdocs\laravel\bootstrap/../vendor/autoload.php'
(include_path='.;E:\Projects IDE\PHPStorm\xampp\php\PEAR') in
E:\Projects IDE\PHPStorm\xampp\htdocs\laravel\bootstrap\autoload.php
on line 17
I have my htdocs route at:
E:\Projects IDE\PHPStorm\xampp\htdocs
Both cases seem to be some for of php configuration problem , since I have 0 knowledge of that I could not find a solution.
Could someone please provided me with a step by step solution?
UPDATE
I managed to enable socket transparency ssl and after trying to run the command I get this:
I have also installed git but I still get the same error.What can I do?
Try enabling php_sockets and open_ssl in your php ini

apns not connecting in php

i am new to push notifications and tried following to fix this but it still gives same error.
added C:\PHP\ext to the Windows path
added libeay32.dll and ssleay32.dll to C:\WINDOWS\system32\inetsrv
rebooted the server
first error:-
Fatal error: Uncaught exception 'ApnsPHP_Exception' with message 'Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195': Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (0)' in C:\wamp\www\ApnsPHP-master\ApnsPHP\Abstract.php on line 396
second error:-
ApnsPHP_Exception: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195': Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (0) in C:\wamp\www\ApnsPHP-master\ApnsPHP\Abstract.php on line 396
i am using a .pem file which was used before somewhere else
and also i am trying to run my file on localhost, does it matter ?
if someone knows something that what should i do to fix this error, then please help me !
and thanx in advance
You should look if SSL is enabled in your configuration.
To display your configuration simply copy/paste the following in some php file and browse to it with a browser:
<?php
phpInfo();
?>

Categories