Welcome Guest, Not a member yet? Register   Sign In
My server requires unix socket - how to solve the problem?
#1

I have just finished the course about CodeIgniter, created my first simple application, and I run it on a local server successfully.
However, I cannot install it on my live server as it requires a path to the "unix socket".
I have not encountered any explanation in the official documentation how to create such file and where locate it.
Could you help me in an accessible way how to solve my issue?
Thanks a lot.

Alex
Reply
#2

For what? CodeIgniter does not require "unix socket".
Reply
#3

best approach is to just use cPanel zip directories upload and unzip using cPanel . what goes where and config depends on whether you will go for subdomains of your primary web space or just a solitary web for your web hosting . You will find more about that docs and forum or just ask. Then of course you need to "point" your domain name at your web hosting and also set the base URL with your domain name in


Code:
/srv/http/joesoapdev/app/Config/App.php
//the line below is an example of  using localhost ;change that to your domain
public string $baseURL = 'http://127.0.0.3/';
CMS CI4     I use Arch Linux by the way 

Reply
#4

(This post was last modified: 10-29-2023, 05:09 PM by AlexSchneider.)

(10-29-2023, 03:11 AM)kenjis Wrote: For what? CodeIgniter does not require "unix socket".



Thanks for your answer. It let me to find another solution. Now, it works and it does NOT need UNIX SOCKET.
Reply
#5

To create a Unix socket, you can use the following command:

mknod unix_socket -s 777
This will create a Unix socket named unix_socket with permissions of 777.

You can then specify the path to the Unix socket in your CodeIgniter database configuration file. For example, if you created the Unix socket in the /tmp directory, you would add the following line to your database configuration file:

$db['default']['socket'] = `/tmp/unix_socket`;
Once you have updated your database configuration file, you should be able to install your CodeIgniter application on your live server.

Here are some additional tips for creating and using Unix sockets:

Unix sockets are typically created in the /tmp directory, but you can create them anywhere on your system.
Unix sockets should be owned by the user that your web server is running under.
Unix sockets should have permissions of 777.
You can use the lsof command to list all of the open files on your system, including Unix sockets.
I hope this helps!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB