DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 21st August 2019
jonsec jonsec is offline
Fdisk Soldier
 
Join Date: Jul 2019
Posts: 71
Post [OpenBSD][PHP] Could not resolve host

hi. today i encountered a problem and solved now.

i search in google but not found any solution for this problem.

so after most research in google finally find this post.

i cant find any page in OpenBSD resources.(or my mistake )

what is problem.

my problem is start from curl function in php. curl return curl Could not resolve host. ooops, OpenBSD Config is Ok, so problem is exists.

so after most research, i understand is relation between curl and gethostbyname php function. so when run gethostbyname in php , output is not currect.

finally, i solved this problem by copy /etc/resolv.conf and /etc/services to /var/www/etc/.

good luck.
Reply With Quote
  #2   (View Single Post)  
Old 21st August 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

When you operate an application inside a chrooted structure, you must always determine what files from outside the structure must be replicated. Since the use-cases are unending, it is left to the admin to make these determinations. You've discovered two configuration files were needed for your own use-case.

I've run chrooted environments which for various purposes needed:
  • A variety of files from /etc, such as the two you noted above.
  • various dynamic libraries needed by chrooted binaries, and a copy of the ldconfig(8) "hints" file /var/run/ld.so.hints.
  • Device special files.
Reply With Quote
  #3   (View Single Post)  
Old 21st August 2019
jonsec jonsec is offline
Fdisk Soldier
 
Join Date: Jul 2019
Posts: 71
Default

Quote:
Originally Posted by jggimi View Post
When you operate an application inside a chrooted structure, you must always determine what files from outside the structure must be replicated. Since the use-cases are unending, it is left to the admin to make these determinations. You've discovered two configuration files were needed for your own use-case.

I've run chrooted environments which for various purposes needed:
  • A variety of files from /etc, such as the two you noted above.
  • various dynamic libraries needed by chrooted binaries, and a copy of the ldconfig(8) "hints" file /var/run/ld.so.hints.
  • Device special files.
hmm yes.

but what are Device special files?
Reply With Quote
  #4   (View Single Post)  
Old 21st August 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Device special files are found in /dev. The only standard file in that directory is the shell script MAKEDEV(8).
Reply With Quote
Reply

Tags
curl, gethostbyname, php

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can't resolve packages philo_neo71 OpenBSD Packages and Ports 2 21st August 2019 02:56 PM
packet loss 2% when pinging to OpenBSD 5.5 host mbw OpenBSD General 7 27th September 2015 04:11 AM
Can't install ...... : can't resolve ...... Monti OpenBSD Packages and Ports 11 19th April 2015 01:24 AM
OpenBSD as host for VirtualBox gpatrick OpenBSD General 15 9th May 2012 02:22 AM
my pf won't allow my server to resolve revzalot OpenBSD Security 21 12th September 2009 10:39 AM


All times are GMT. The time now is 02:12 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick