Hello!
I want to bind to port 80 but in order to do this I must run my php script as root. My script runs in cli. If i execute 'sudo php myscript.php' it connects to port 80. What should I do in order not to use sudo?? This script is called from another script by using proc_open. Is there any way to make it run?
Thanks in advance.
how can I 'socket_bind' to port 80?
Moderator: General Moderators
-
SidewinderX
- Forum Contributor
- Posts: 407
- Joined: Fri Jul 16, 2004 9:04 pm
- Location: NY
Re: how can I 'socket_bind' to port 80?
All ports below 1024 require root permissions. You can either:
1) Add yourself to the sudoers file
2) Install authbind
3) Use port address translation
1) Add yourself to the sudoers file
2) Install authbind
3) Use port address translation