LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 12-17-2012, 01:45 PM   #1
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Suse, Mint
Posts: 128

Rep: Reputation: Disabled
path question for mysql


In order to install php on my 12.2 I have come across a problem.
I
The manual says put the path to mysql how do I find the path to mysql.

My mysql works OK so how do I find out the path?

In the configure file it asks to put the path to mysqli but it rejects this as file not found, is there a mysqli command, or is it a typo by the publisher?

Last edited by bscho; 12-17-2012 at 01:51 PM.
 
Old 12-17-2012, 04:05 PM   #2
John VV
Guru
 
Registered: Aug 2005
Posts: 13,082

Rep: Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747
so you are not using the already installed by default PHP and MySQL that is in OpenSUSE 12.2


open up yast2 and look for it ( it is is the kde menu on the bottom left -- it looks like the windows "start" )
The " add and remove software"

or type into terminal using zypper and search for "mysql" and ""php"
and install it in the terminal
Code:
su -
----- your root password when asked for -----
zypper se php 
------ then from the list -----
zypper in php php-devel

or

do you need some other and OLD version of php and mysql
 
Old 12-18-2012, 12:07 PM   #3
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Suse, Mint
Posts: 128

Original Poster
Rep: Reputation: Disabled
installed php

Yes, I am not using the installed php I see the php listed but have been unable
to use it.

How can I use it? I found mysql was installed but using php doesn't want to work.
I use <? php phpinfo() ?> to test on firefox but no joy.
 
Old 12-18-2012, 03:38 PM   #4
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,973

Rep: Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785
Quote:
The manual says put the path to mysql
Which manual? Where are you supposed to put the path to mysql? config file??
If the phpinfo isn't working, that's separate from mysql. For php, take a look at the link below for Opensuse, 4.4. Confirming php works. You might read through the tutorial and you might post a link or indicate which manual you are referring to:

http://en.opensuse.org/SDB:Linux_Apache_MySQL_PHP
 
Old 12-18-2012, 04:49 PM   #5
John VV
Guru
 
Registered: Aug 2005
Posts: 13,082

Rep: Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747
for
Code:
<? php phpinfo() ?>
to work it MUST be in a php script
say ?? -- "info.php"
and that php script needs be in the Apache "DocumentRoot"
with a working apache install

now i have ALWAYS recomended that for the first 12 or so LAMP ( linux, Apache , MySQL , PHP ) install one should
" do it manually "

That way one Learns HOW to install it

-- it is very easy to royally mess up an install and creat a VERY insecure web page
very very easy to do
it is much harder to lock it down , and the only good way is to really learn how it is installed

but
suse offers a very easy way ( one in that you do not have to learn anything )

Yast2

use the gui

or

read and STUDY ( yes as in studying for a final exam ) the documentation

Apache:
http://httpd.apache.org/docs/2.4/

MySQL:
http://www.mysql.com/
http://dev.mysql.com/usingmysql/get_started.html

PHP:
http://php.net/
http://www.php.net/downloads.php
PHP-Docs
http://php.net/download-docs.php

Last edited by John VV; 12-18-2012 at 04:51 PM.
 
1 members found this post helpful.
Old 12-19-2012, 12:57 PM   #6
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Suse, Mint
Posts: 128

Original Poster
Rep: Reputation: Disabled
Can't find apache

I think you are right that it is the httpd.conf file needs amending for documentroot
I would assume that would have been set for 12.2. It means I have gap in my knowledge because I cannot find apache. apache website refers to apache in usr/local which does not
have the httpd /usr/local is empty.

It brings me back to my original question; how do I find apache on my system?
 
Old 12-19-2012, 02:04 PM   #7
John VV
Guru
 
Registered: Aug 2005
Posts: 13,082

Rep: Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747
the apache and php and mysql from the suse repos will have the correct paths set

and it should be
/etc/apache2 ( suse uses some very "odd" locations for things )
-- see the suse Yast2 link posted above
http://en.opensuse.org/SDB:Linux_Apa...P#Installation

suse dose NOT use /usr/local
you "can" install things there but you will need to add that location to the system $PATH

"/usr/local" is a kind of default location used - it is a through back to the 1980's and unix

sort of like default user name and password being
user=user
password=password


now unless you manually install things all of the files for apache , php, and mysql will be scattered all over the system

for a full MANUAL install of everything
FIRST use the gui ( yast2 ) to REMOVE apache, php, and mysql
but take care NOT to uninstall 1/2 of the operating system -- might happen do to NEEDED programs

but YOU will then have to manually add the needed php modules to apache's httpd.conf
and manually edit the "httpd.conf"( it is where YOU installed it /var/www is a good location ) file ( should do so anyway even if you are using the suse repo version "/etc/apache2/httpd.conf" )


so
step 1
read , then reread , then re-reread the Apache install documents
( take notes -- yes on paper -- wright the notes down )
then do the same for mysql
and for php

step 2
( again on paper )
wright down your steps to install
( yes you ARE studying for a PASS/FAIL collage final exam )

wright an outline for your install
then install everything


setting up a server is really not an easy task
the major distros and the software reops make it " easy" too install
but NOT easy to set up and configure



if you did use yast to install everything there is a installed file list AND location in the GUI
open yast and the "install and remove software"
type in apache to the search box
then click on the apache2 that has a black check mark in front of it
then in the lower window click on the "file list" tab
all the locations of the program are listed
 
Old 12-20-2012, 11:57 AM   #8
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Suse, Mint
Posts: 128

Original Poster
Rep: Reputation: Disabled
missing documentroot

Thanks for your brilliant help;

I want to use the existing apache, php since mysql is working OK.

I cannot find in /etc/apache/httpd.conf the directive documentroot. I have looked in other apache files and cannot find it. Do you think it is in another file? Is this the
problem?

Now an update. I have now found DocumentRoot


In /etc/apache2/default-server.conf I have found DocumentRoot set to /srv/www/htdocs

So it must mean that the lack of DocumentRoot is not the problem.

Any other ideas that I can check? Thanks for your patience.

Last edited by bscho; 12-20-2012 at 12:37 PM.
 
Old 12-20-2012, 12:50 PM   #9
John VV
Guru
 
Registered: Aug 2005
Posts: 13,082

Rep: Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747
the "documentroot" is what YOU set it to
and that setting is IN the config file located in "/etc/apache2" folder ( for the suse repo Apache )


SUSE dose things VERY VERY differently than most
SUSE relies on a ton of scripts and deamons and udev

so the httpd.conf in suse is NOT the same as the default version in ALL of the Apache documents
( That is life with SUSE/Novell - they really change things around )

there is a link in the httpd.conf that points to a "default-server.conf"
fallow the link ( think of it as bread-crumbs and fallow the trail )

in that file is the "docroot"
Code:
# Configure the DocumentRoot
#
<Directory "/srv/www/htdocs">
	# Possible values for the Options directive are "None", "All",
	# or any combination of:
	#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
	#
	# Note that "MultiViews" must be named *explicitly* --- "Options All"
	# doesn't give it to you.
	#
	# The Options directive is both complicated and important.  Please see
	# http://httpd.apache.org/docs-2.2/mod/core.html#options
	# for more information.
	Options None
	# AllowOverride controls what directives may be placed in .htaccess files.
	# It can be "All", "None", or any combination of the keywords:
	#   Options FileInfo AuthConfig Limit
	AllowOverride None
	# Controls who can get stuff from this server.
	Order allow,deny
	Allow from all
</Directory>
so it is set as "/srv/www/htdocs"


this is one of the reasons i posted about studying
the program install and set up and configure documents as one would study for a "pass/ fail" final exam

An Apache install is rather very complex
not overly complicated BUT just VERY complex

also

almost all of the server configuring can be done in the YAS2 GUI
on SUSE there is almost no need to manually edit text files by hand ( some times you do)
but 90% is done in the YAST2 gui
 
Old 12-22-2012, 08:10 AM   #10
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Suse, Mint
Posts: 128

Original Poster
Rep: Reputation: Disabled
where does the code you gave go?

in that file is the "docroot"
Code:
# Configure the DocumentRoot
#
<Directory "/srv/www/htdocs">
	# Possible values for the Options directive are "None", "All",
	# or any combination of:
	#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
	#
	# Note that "MultiViews" must be named *explicitly* --- "Options All"
	# doesn't give it to you.
	#
	# The Options directive is both complicated and important.  Please see
	# http://httpd.apache.org/docs-2.2/mod/core.html#options
	# for more information.
	Options None
	# AllowOverride controls what directives may be placed in .htaccess files.
	# It can be "All", "None", or any combination of the keywords:
	#   Options FileInfo AuthConfig Limit
	AllowOverride None
	# Controls who can get stuff from this server.
	Order allow,deny
	Allow from all
</Directory>
so it is set as "/srv/www/htdocs"



Sorry, I do not understand. I thought in documentroot you put the index.html
where does the above code go is this docroot and is it a .txt file?

Is it possible a newer version is available than 12.2 and this will have the problem fixed?

Last edited by bscho; 12-22-2012 at 08:16 AM.
 
Old 12-22-2012, 01:17 PM   #11
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,973

Rep: Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785
What he is saying is that the example entry posted in post #9 goes in the httpd.conf file which should be in the /etc/apache2 directory. What the Document Root does is point to the directory where you will put the files on your server such as 'index.html'. You need to put an entry similar to the above in the httpd.conf file. I'm surprised it isn't already there but apparently you did not install in the standard manner?
 
Old 12-22-2012, 01:29 PM   #12
John VV
Guru
 
Registered: Aug 2005
Posts: 13,082

Rep: Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747
no he installed apache using yast/zypper

BUT suse dose things very " odd"


also from the yast gui "Software management" -Add and remove software
there are a tone of apache mods
like mod-php5

suse / novell dose things rather differently
but if one knows the documentation well it can be worked out
 
Old 12-23-2012, 01:11 PM   #13
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Suse, Mint
Posts: 128

Original Poster
Rep: Reputation: Disabled
still no joy

I first downloaded from linuxformat disk. I have just reinstalled apache and php using yast.

Still no joy the phpinfo does not appear when I use localhost and the index.html has the <? php phpinfo() ?> is in with the html.

I am thinking I will have to reinstall them from
the .gz files.

Last edited by bscho; 12-23-2012 at 01:12 PM.
 
Old 12-23-2012, 01:25 PM   #14
John VV
Guru
 
Registered: Aug 2005
Posts: 13,082

Rep: Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747Reputation: 1747
Is the apache server running ???
the default should drop you on the " Congratulation " page if you go to
http://localhost
click on the link above
That is your machine you are sitting in front of

did you turn on the apache service ? - from yast " System Services ( runlevel)"
Apache dose need to be running

also "index.html " is / was the " Congratulation " page

please rename the text file with "<? php phpinfo() ?>" to
phpiofo.php

a script with OVER 50% php code in it uses *.php
a script with less that 50% and MORE that 50% html uses *.html
also mod_php needs to be installed

This is one of the reasons that i recommend that for the first 12 or so installs one builds things manually and configure it manually

so that one LEARNS the program(s) inside and out

and as seeing as suse/novell do NOT fallow normal set ups
the only real good documentation on suse is using the novell documentation
the apache docs are of limited use ( other than the basics )

http://doc.opensuse.org/

the apache chapter
http://doc.opensuse.org/documentatio...a.apache2.html
 
  


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
[SOLVED] Installing mysql in different path ramecare Linux - Server 3 02-15-2012 10:42 AM
Ubuntu 10.10 x86_64 MySQL path tbaror Linux - Newbie 1 02-23-2011 01:34 PM
mysql installation path eldojoseph Linux - Software 1 08-06-2008 09:03 AM
Mysql:how can I add the lib path in Kylix walkinmud Programming 4 09-24-2004 09:48 AM
path and mysql questions Red Squirrel Linux - Newbie 13 03-07-2004 03:16 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration