Find Installation Path - which <application>, can I use readlink -f in this case
Hello everyone.. I am sorry if i m repeating a thread, but honestly i tried searching the forum before coming up with this question. however i need your help..
Basically i need to link apache - mysql - php using the following : #> ./configure --prefix=/usr/local/php \ --with-mysql=/usr/local/bin/mysql \ --with-apxs2=/usr/local/apache2/bin/apxs But guess i need to know the installed locations for the same (correct me if i am wrong for i am a newbie)I tried looking for the same using the following command: [root@dhcppc2 /]# which php /usr/bin/php [root@dhcppc2 /]# which mysql /usr/bin/mysql [root@dhcppc2 /]# which apache /usr/bin/which: no apache in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin) I am able to view my test page.Which means apache is working. On issuing the command ./configure command it comes up with error [root@dhcppc2 php-5.3.2]# ./configure --prefix=/usr/bin/php \ --with-mysql=/usr/bin/mysql \ --with-apachectl=/usr/sbin/apachectl configure: warning: --with-mysql=/usr/bin/mysql: invalid host type configure: warning: --with-apachectl=/usr/sbin/apachectl: invalid host type configure: error: can only configure for one host and one target at a time I have tried one at a time but still the same. Please help me I am unable to run database queries using PHP, as simple as displaying the table contents. |
Quote:
Quote:
|
No joy :-(
thanks Sayan for that quick reply, but no joy in terms of configuring the same.
./configure --prefix=/usr/bin/php \ --with-mysql=/usr/bin/mysql \ --with-apachectl=/usr/sbin/apachectl configure: warning: --with-mysql=/usr/bin/mysql: invalid host type /usr/bin/php was the output for "whereis php" |
which path to choose
[root@dhcppc2 /]# whereis php
php: /usr/bin/php /etc/php.d /etc/php.ini /usr/lib/php /usr/share/man/man1/php.1.gz |
Quote:
I have not compiled apache yet, but you can try the /usr/lib/php path. As for the other issue of the installation location you can try: Code:
find / -name apache* -type f You should also read the README file. It will probably have more information wether using the libs or binaries in your configure command. One more important thing is, that when a compilation fails you should start with a fresh source. I.e. do not just start compiling again but delete the folder and untar the source file again. Chances are that you might also have to create a dedicated build directory. The README file will have information about this. |
Quote:
a) php code displays successful results on the browser. b) mysql runs fine from terminal. c) database connectivity through php doesnt work. I'm sorry if i sound stupid :-) .. but does that mean php and apache are configured correctly and mysql is not ? |
Quote:
I just downloaded php and it appears that you do NOT have to start from scratch or create a seperate build-directory. Have you tried to issue the configure command without expicitly naming the path, i.e. Code:
#> ./configure --prefix=/usr/local/php --with-mysql --with-apxs2 Code:
#> ./configure --prefix=/usr/local/php \ Code:
./configure --prefix=/usr/bin/php \ --with-mysql=/usr/bin/mysql \ --with-apachectl=/usr/sbin/apachectl |
Quote:
[root@dhcppc2 php-5.3.2]# ./configure --prefix=/usr/local/php --with-mysql --with-apxs2 loading cache ./config.cache checking for Cygwin environment... no checking for mingw32 environment... no checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for gcc... no checking for cc... no configure: error: no acceptable cc found in $PATH [root@dhcppc2 php-5.3.2]# |
[root@dhcppc2 php-5.3.2]# whereis mysql
mysql: /usr/bin/mysql /usr/lib/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz I tried # ./configure --prefix=/usr/bin/php -with-/usr/lib/mysql with all the mentioned paths.. But the ouput comes out to be following: configure: error: /usr/lib/mysql: invalid package name [root@dhcppc2 php-5.3.2]# ./configure --prefix=/usr/bin/php -with-mysql loading cache ./config.cache checking for Cygwin environment... no checking for mingw32 environment... no checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for gcc... no checking for cc... no configure: error: no acceptable cc found in $PATH [root@dhcppc2 php-5.3.2]# cat $PATH cat: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin: No such file or directory |
Quote:
this looks like you don't have a compiler installed. Have you successfully compiled any packages before? If yes, what is the output of Code:
whereis gcc |
Quote:
gcc: /usr/libexec/gcc [root@dhcppc16 ~]# whereis g++ g++: Well I stick to the cause while using linux.This is for the first time i am compiling something. Otherwise, I have used it for squid / load balancing etc. |
Quote:
Code:
type gcc |
Quote:
Code:
[root@dhcppc16 ~]# rpm -q gcc |
php.ini file is responsible for php's behavior in the system, you can look at there for any ideas.
|
Quote:
Quote:
Evo2. |
All times are GMT -5. The time now is 04:08 PM. |