LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Suse 10: Installing Apache, PHP, and MySQL (https://www.linuxquestions.org/questions/linux-software-2/suse-10-installing-apache-php-and-mysql-434252/)

Ultrus 04-11-2006 06:04 PM

Suse 10: Installing Apache, PHP, and MySQL
 
Hello experts,

I've been trying to install Apache, PHP, and MySQL with little but some success by referring to this tutorial:
http://www.novell.com/coolsolutions/feature/595.html

As it is optimized for Suse 9.1 and perhaps older versions of Apache, PHP, and MySQL, I have run into some road blocks in Suse 10. Apache seems to be running fine now. I can load .html files in my browser by navigating to something like: http://127.0.0.1/~ultrus/hello.html

After installing php and recommended additions from Yast, .php files are treated as files to download instead of php files. I get the download prompt in the browser when navigating to them. After downloading and installing phpMyAdmin as described in the tutorial link above, I get a forbidden error when navigating to http://127.0.0.1/phpMyAdmin/ . I was also unable to find the config.inc.php file that was described as being in the phpMyAdmin folder. I haven't tried installing mySQL yet.

Could I trouble someone for good advice on how to go about installing these items in Suse 10? I'm quite the newbie when it comes to linux in general, and much appreciate redundant details.

Thank you much :)

paulsm4 04-11-2006 09:52 PM

It should be really, really easy:

1. Go into YaST2 | Add/Remove Software
2, [Search] in turn for each of Apache2, PHP and MySQL
You'll have a few choices - feel free to post any questions about specific options to LQ (I'd start a separate thread)
3. Click [Accept]. YaST2 will automatically notify you if there's any inconsistencies or dependencies. There usually aren't. They're usually easy to deal with if/when you encounter any.

You're done installing.

Now to enable:
4. Go back into Yast2. Select System | System (Runlevel) Services and make sure Apache2 and mySQL are enabled.

You're completely done.

As far as PHP, my experience is "it just works".

Depending on your experience/comfort level, you might want to de-install Apache and PHP, then re-install them ... together! For whatever it's worth, the options I chose for my SuSE 10 were:

- Apache2
- apache2-prefork
- apache2-mod_php4 (PHP4 Module for Apache2)
- php4 (PHP core files)
- php4-mysql
- mysql
- mysql-client
- mysql-shared

'Hope that helps .. PSM

Ultrus 04-12-2006 10:28 AM

Whoa! You are right. It was REALLY easy, just as you said. I now have Apache working with php nicely. I haven't tested mySQL yet, but will post a seperate thread if I run into troubles.Thanks much for your help!!

hendrikus 05-16-2008 02:19 PM

Quote:

Originally Posted by paulsm4 (Post 2195801)
It should be really, really easy:

1. Go into YaST2 | Add/Remove Software
2, [Search] in turn for each of Apache2, PHP and MySQL
You'll have a few choices - feel free to post any questions about specific options to LQ (I'd start a separate thread)
3. Click [Accept]. YaST2 will automatically notify you if there's any inconsistencies or dependencies. There usually aren't. They're usually easy to deal with if/when you encounter any.

You're done installing.

Now to enable:
4. Go back into Yast2. Select System | System (Runlevel) Services and make sure Apache2 and mySQL are enabled.

You're completely done.

As far as PHP, my experience is "it just works".

Depending on your experience/comfort level, you might want to de-install Apache and PHP, then re-install them ... together! For whatever it's worth, the options I chose for my SuSE 10 were:

- Apache2
- apache2-prefork
- apache2-mod_php4 (PHP4 Module for Apache2)
- php4 (PHP core files)
- php4-mysql
- mysql
- mysql-client
- mysql-shared

'Hope that helps .. PSM

Now, more then a year later:

I'm using SuSE 10.2.
I have removed Apache from my server PC.
After that, I installed Apache, PHP5 and Mysql as written above with YAST.
Restart the system.
Insert a index.html page in the /srv/www/htdocs directory.
I have also a PHP page placed in that directory, hello.html.
Results:
Entering my server I will see the indexpage. It looks very well.

Calling the server hellopage let me see the text "Hello in PHP" but not the php part.
What is going wrong ? No php.

PHP page:

<html>
<head>
<title>Hello in PHP</title>
</head>
<body>
<h1>Hello in PHP</h1>
<?
print "Hello, world!";
phpInfo();
?>
</body>
</html>

Greatfull thanks for any help.

yancek 05-16-2008 04:38 PM

Change your entry:

<?
print "Hello, world!";
phpInfo();
?>

To this:
<?php
print "hello, world!";
phpinfo();
?>

Sometimes doesn't work if you begin with <? instead of <?php. Also, you had an uppercase 'I' instead of lower-case 'i', not sure if that would be a problem but might.

If that doesn't work, try it with just: <?php
phpinfo();
?>

to see if you get the information.

hendrikus 05-17-2008 03:53 AM

Quote:

Originally Posted by yancek (Post 3155702)
Change your entry:

<?
print "Hello, world!";
phpInfo();
?>

To this:
<?php
print "hello, world!";
phpinfo();
?>

Sometimes doesn't work if you begin with <? instead of <?php. Also, you had an uppercase 'I' instead of lower-case 'i', not sure if that would be a problem but might.

If that doesn't work, try it with just: <?php
phpinfo();
?>

to see if you get the information.

Hello Yancek
I have tried both changes. Still the same results.
Removing the "print" statement has the same result.
Only the html textpart.

Gr
H

troyme 05-27-2008 03:24 AM

can you paste the output of the result ?

try change the name of hello.html to hello.php


All times are GMT -5. The time now is 12:27 AM.