LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-23-2020, 11:38 PM   #1
Anderson_1991
LQ Newbie
 
Registered: Nov 2019
Posts: 13

Rep: Reputation: Disabled
Issue with setup


Hi,
I did the setup, per steps below

https://medium.com/@nahomt/using-sql...4-c85671249c45

but now sqlsrv.so and pdo_sqlsrv.so are not inside /usr/lib/php/20170718. Please help.
 
Old 03-24-2020, 02:13 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,685

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
I found this (on that page):
Quote:
Make sure that the two driver files (sqlsrv.so and pdo_sqlsrv.so) have been added to /usr/lib/php/20170718 (your path might be different, just check your php dynamic libraries path)
 
Old 03-25-2020, 02:10 AM   #3
Anderson_1991
LQ Newbie
 
Registered: Nov 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Sorry to that I cannot find out the file like

Quote:
find . -name sqlsrv.*
within the machine.
 
Old 03-25-2020, 02:16 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,685

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
probably: find /usr/lib -name ..... (or something similar)
 
Old 03-25-2020, 02:34 AM   #5
Anderson_1991
LQ Newbie
 
Registered: Nov 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Sorry to that I get no details like

Quote:
root@ubuntu:/usr/lib# find /usr/lib/ -name sqlsrv.*
root@ubuntu:/usr/lib#
 
Old 03-25-2020, 02:45 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,685

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
That is strange. Try this:
Code:
find /usr/lib/ /lib /opt -name '*sqlsrv*'

# or if works:
updatedb
locate sqlsrv
 
Old 03-25-2020, 02:59 AM   #7
Anderson_1991
LQ Newbie
 
Registered: Nov 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Sorry, can you help?

Quote:
root@ubuntu1604:/usr/lib# find /usr/lib /usr /opt -name '*sqlsrv*'
/usr/share/php/docs/sqlsrv
/usr/share/php/docs/pdo_sqlsrv
root@ubuntu1604:/usr/share/php/docs/pdo_sqlsrv# updatedb
root@ubuntu1604:/usr/share/php/docs/pdo_sqlsrv# locate sqlsrv
root@ubuntu1604:/usr/lib# cd /usr/share/php/docs/sqlsrv
root@ubuntu1604:/usr/share/php/docs/sqlsrv# ls -l
total 0
root@ubuntu1604:/usr/share/php/docs/sqlsrv# cd /usr/share/php/docs/pdo_sqlsrv
root@ubuntu1604:/usr/share/php/docs/pdo_sqlsrv# ls -l
total 0

Last edited by Anderson_1991; 03-25-2020 at 03:03 AM.
 
Old 03-25-2020, 03:14 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,685

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
so return back to the original post and link, I think the installation (step 2) was not successful.
 
Old 03-25-2020, 04:09 AM   #9
Anderson_1991
LQ Newbie
 
Registered: Nov 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
When running "pecl install sqlsrv", i got issue below
Quote:
#include <sql.h>
^~~~~~~
compilation terminated.
Makefile:194: recipe for target 'conn.lo' failed
make: *** [conn.lo] Error 1
ERROR: `make' failed

Last edited by Anderson_1991; 03-25-2020 at 04:20 AM.
 
Old 03-25-2020, 04:19 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,685

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
Yes, that is an error message, and that explains why didn't you find the files. But need to see more lines (above).
 
Old 03-25-2020, 04:44 AM   #11
Anderson_1991
LQ Newbie
 
Registered: Nov 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
FYI

Quote:
...
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootEYD5tf/sqlsrv-5.8.0/libtool --mode=compile g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootEYD5tf/sqlsrv-5.8.0/include -I/tmp/pear/temp/pear-build-rootEYD5tf/sqlsrv-5.8.0/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ *-DHAVE_CONFIG_H *-std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector * -c /tmp/pear/temp/sqlsrv/conn.cpp -o conn.lo
libtool: compile: *g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootEYD5tf/sqlsrv-5.8.0/include -I/tmp/pear/temp/pear-build-rootEYD5tf/sqlsrv-5.8.0/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/conn.cpp *-fPIC -DPIC -o .libs/conn.o
In file included from /tmp/pear/temp/sqlsrv/shared/typedefs_for_linux.h:23:0,
* * * * * * * * *from /tmp/pear/temp/sqlsrv/shared/xplat_winnls.h:24,
* * * * * * * * *from /tmp/pear/temp/sqlsrv/shared/FormattedPrint.h:24,
* * * * * * * * *from /tmp/pear/temp/sqlsrv/shared/core_sqlsrv.h:41,
* * * * * * * * *from /tmp/pear/temp/sqlsrv/php_sqlsrv_int.h:25,
* * * * * * * * *from /tmp/pear/temp/sqlsrv/conn.cpp:24:
/tmp/pear/temp/sqlsrv/shared/xplat.h:30:10: fatal error: sql.h: No such file or directory
*#include <sql.h>
* * * * * ^~~~~~~
compilation terminated.
Makefile:194: recipe for target 'conn.lo' failed
make: *** [conn.lo] Error 1
ERROR: `make' failed
 
Old 03-25-2020, 04:53 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,685

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
there was a step1: install unixodbc-dev, it looks like that did not happen (or was not successful).
 
1 members found this post helpful.
Old 03-26-2020, 10:30 AM   #13
Anderson_1991
LQ Newbie
 
Registered: Nov 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
I can see PHP 7.2 in my Ubuntu (version 16) but I cannot start php7.2-fpm. Why?

Quote:
root@ubuntu :/etc/php# ls -l
total 8
drwxr-xr-x 4 root root 4096 Mar 23 16:48 7.2
drwxr-xr-x 5 root root 4096 Oct 12 19:46 7.3
root@ubuntu :/etc/php# restart php7.2-fpm

Command 'restart' not found, did you mean:

command 'rstart' from deb x11-session-utils
command 'restartd' from deb restartd

Try: apt install <deb name>

Last edited by Anderson_1991; 03-26-2020 at 10:31 AM.
 
Old 03-26-2020, 10:36 AM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,685

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
probably: service restart <name>, but actually it is only a guess. You cannot start/restart an fpm I do not really understand that.
 
Old 03-27-2020, 04:00 AM   #15
Anderson_1991
LQ Newbie
 
Registered: Nov 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
The material below

https://medium.com/@nahomt/using-sql...4-c85671249c45

does request to restart php-fpm, after the setup.
 
  


Reply


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
Help on setup of fedora 20 as a router from nic setup to firewalld setup Brian1 Linux - Networking 4 07-02-2014 08:53 PM
setup for official Laptop. (Admin setup in server and user account setup in lap) vignesh4sh Linux - Server 3 11-26-2012 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:14 AM.

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
Open Source Consulting | Domain Registration