LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 08-18-2018, 05:32 AM   #1
00x
LQ Newbie
 
Registered: Aug 2018
Distribution: OpenBSD
Posts: 8

Rep: Reputation: 0
pkg_add PHP not working on OpenBSD


I am trying to install PHP on OpenBSD, but it is not working. Here is what I am doing:

Code:
$ sudo pkg_add php
quirks-2.241 signed on 2016-07-29T15:39:09Z
Ambiguous: choose package for php
a       0: <None>
        1: php-5.5.37p0
        2: php-5.6.23p0
        3: php-7.0.8p0
Your choice: 3
php-7.0.8p0: ok
The following new rcscripts were installed: /etc/rc.d/php70_fpm
See rcctl(8) for details.
Look in /usr/local/share/doc/pkg-readmes for extra documentation.
$ php
ksh: php: not found
I have tried with option 1 and 2 as well, the same thing happens

Code:
$ sudo find / -name php
Password:
$
Code:
$ cd /etc/
$ ls | grep php
php-7.0
php-7.0.ini
php-7.0.sample
php-fpm.conf
$ cd php-7.0
$ ls -la
total 8
drwxr-xr-x   2 root  wheel   512 Aug 18 18:14 .
drwxr-xr-x  37 root  wheel  2048 Aug 18 18:14 ..
$
Where is it being installed? How do I run it?
 
Old 08-18-2018, 06:54 AM   #2
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,702
Blog Entries: 8

Rep: Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630
I cannot answer your question specifically, but:
Quote:
Look in /usr/local/share/doc/pkg-readmes for extra documentation.
This would be a good place to start.
This is also worth looking at:
Quote:
See rcctl(8) for details.
The readme files are not always useful, but some have good information. The man pages are one of OpenBSD's fundamental resources and usually the first place to look for information. Hopefully the answers you need are in those two places. If not, we must wait for someone knowledgeable about php.
 
Old 08-18-2018, 07:41 AM   #3
00x
LQ Newbie
 
Registered: Aug 2018
Distribution: OpenBSD
Posts: 8

Original Poster
Rep: Reputation: 0
I looked in /usr/local/share/doc/pkg-readmes/
and it did have some useful things but nothing relevant to making PHP work if it doesn't.

Ever other package I install works fine, but here I think the problem is something to do with the installation, since normally I see at least a few files being downloaded when I do pkg_add. But with `pkg_add php' it just shows that the package is extracting, not downloading, maybe that has something to do with the problem?

Code:
$ sudo pkg_add -iv php
Update candidates: quirks-2.241 -> quirks-2.241
quirks-2.241 signed on 2016-07-29T15:39:09Z
Ambiguous: choose package for php
a       0: <None>
        1: php-5.5.37p0
        2: php-5.6.23p0
        3: php-7.0.8p0
Your choice: 3
php-7.0.8p0 (extracting)|********                                                                          | 5%
I haven't seen packages install like this before.

I have also tried doing pkg_delete to all 3 php packages and then pkg_add again but I still can't find PHP anywhere.

Last edited by 00x; 08-18-2018 at 07:44 AM.
 
Old 08-18-2018, 07:59 AM   #4
00x
LQ Newbie
 
Registered: Aug 2018
Distribution: OpenBSD
Posts: 8

Original Poster
Rep: Reputation: 0
The problem has been solved.
I forgot to try pressing the Tab key after typing in php. I was guessing php7, php70 etc.

Code:
$ php<TAB>
php-7.0         php-config-7.0  php-fpm-7.0     phpize-7.0

$ php-7.0 -v
PHP 7.0.8 (cli) (built: Jul 26 2016 12:42:19) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
 
Old 08-18-2018, 07:57 PM   #5
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 158

Rep: Reputation: 53
The pkg_info(1) command has a very useful -L option, which lists what files were (or would be) installed. See the man page for details.
 
  


Reply

Tags
openbsd, php-7


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
1) Slow performance OpenBSD 5.0 on an old hardware 2) pkg_add cups - returns an error igadoter *BSD 3 01-29-2012 04:54 AM
openBSD 4.3, pkg_add cdrom/... .gz, fatal error, misc newbie doubts, Anonym.OS openBSDnewbie *BSD 8 07-31-2008 12:45 PM
[OpenBSD 3.9] pkg_add -u noir911 *BSD 1 06-16-2006 08:27 AM
Error on pkg_add on openbsd 3.8 klemen *BSD 0 10-06-2005 11:56 AM
OpenBSD 3.6 FTP pkg_add failed... gani *BSD 2 11-22-2004 08:06 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 02:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration