*Hello everyone, I got AF_NET error using php socket.
I try to found on multiple post, but all enable this extension=sockets or extension=php_sockets.dll in their php.ini and work.
I enable both and separately on my php.ini of my XAMPP in Windows, I resolve the Undefined socket_create but now I get this error and nothing works. Try to restart Xampp also.
If someone know and can help me please I would be very happy 😪 !
AF_NET undefined
Here is my code below to create a php socket :
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?
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
I am trying to make a website to manage some files and links through amazon web service. I am new to this service and are having some problems at the moment. I am trying to setup my environment, but after reassuring all extension are enabled on my web server (curl, and all the others from http://aws.amazon.com/articles/4261?_encoding=UTF8&jiveRedirect=1#configurecredentials) I still get an error in my apache error log:
PHP Fatal error: Uncaught exception 'cURL_Exception' with message 'cURL resource: Resource id #10; cURL error: SSL certificate problem, verify that the CA cert is OK. Details:\nerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (cURL error code 60). See http://curl.haxx.se/libcurl/c/libcurl-errors.html for an explanation of error codes.' in C:\\www\\thorastrup\\client_app\\sdk-1.5.14\\lib\\requestcore\\requestcore.class.php:829\nStack trace:\n#0 C:\\www\\thorastrup\\client_app\\sdk-1.5.14\\services\\s3.class.php(910): RequestCore->send_request()\n#1 C:\\www\\thorastrup\\client_app\\sdk-1.5.14\\services\\s3.class.php(1147): AmazonS3->authenticate('php-sdk-getting...', Array)\n#2 C:\\www\\thorastrup\\client_app\\sdk-1.5.14\\_samples\\cli-s3_get_urls_for_uploads.php(60): AmazonS3->create_bucket('php-sdk-getting...', 's3-us-west-1.am...')\n#3 {main}\n thrown in C:\\www\\thorastrup\\client_app\\sdk-1.5.14\\lib\\requestcore\\requestcore.class.php on line 829
I simply don't understand this error and would be glad if anyone could tell me with was wrong? (I am running apache on Windows 7 with php-5)
See http://engin.bzzzt.biz/2012/02/02/windows-php-curl-ssl-certificate-problem/
As for the CA-bundle file, you can follow those instructions or just download it from http://curl.haxx.se/ca/cacert.pem
I'm setting up an email 'proxy-like' where notification emails are sent to the user that he has subscribed to, but he can reply to the email notification#site.com which should contain his reply. On the server-side I want to be able to read his email and add his reply to the database - the email is stored in the notification user inbox which is great, now to be able to read it with PHP.
So, I've been looking around for solutions for this, many solutions were IMAP so I thought I'd give a try but I cannot seem to figure my connection my server to open the inbox. I've adjusted to different ports, but none of them are able to connect.
imap_open("{localhost/imap:143}", "notification", "password");
I get errors like this:
Warning: imap_open(): Couldn't open stream {localhost/imap:143} in /var/www/site.com/www/mail.php on line 8
bool(false)
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=1) in Unknown on line 0
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=1) in Unknown on line 0
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=1) in Unknown on line 0
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=2) in Unknown on line 0
I don't understand, obviously this is my first time trying this but what is it that I'm clearly doing wrong with the connection?
EDIT: I started courier-imap now I get this:
Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=1) in Unknown on line 0
Notice: Unknown: [ALERT] Fatal error: No such file or directory: No such file or directory in Unknown on line 0
You are asking for basic debugging here, so I try, maybe this machtes
Have you tried to specify a mailbox? And btw you should actually use the right syntax, it is host:port/protocol whereas imap is the default protocol and you can leave it out:
imap_open("{localhost:143}INBOX", "notification", "password");
^^^^^^^^^^^^^ ^^^^^
Please compare with the many examples and notes on imap_openDocs.
Also as this is debugging, try:
var_dump(imap_errors(), imap_alerts());
Happy debugging.
I had exactly the same problem on my Ubuntu 11.04 system, and I've solved by creating the "Maildir" folders in my home directory (as described here) with the following commands:
cd ~
maildirmake Maildir
maildirmake Maildir/.Drafts
maildirmake Maildir/.Sent
maildirmake Maildir/.Trash
maildirmake Maildir/.Templates
chmod -R 700 Maildir
First of all, you should check for errors in the log file "/var/log/syslog" (for example by executing the command sudo tail /var/log/syslog).
In my log I had noticed the following error: imapd: chdir Maildir: No such file or directory.
So I've checked the configuration file "/etc/courier/imapd" and I saw that the MAILDIRPATH option was set to "Maildir":
#
# MAILDIRPATH - directory name of the maildir directory.
#
MAILDIRPATH=Maildir
Then I've created the "Maildir" folders as described above, and the "imap_open()" function finally worked.