How to setup PHP/Apache/MySQL for development?

Hello,

I new to Linux, so please try and go easy on the tech-talk. On Windows and Mac it’s as simple as downloading some WAMP and XAMP stack and clicking “install”.

On OpenSUSE I’m trying to do it myself. I went into YaST and installed the “Web and LAMP Server” pattern.

Then I edited the default-server.conf file to point towards my website by changing the DocumentRoot and <Directory “blah blah”> lines.

Then I tried to start apache, but got the following error:


***# apache2ctl restart***
httpd2: Syntax error on line 188 of /etc/apache2/httpd.conf: Could not open configuration file /etc/apache2/sysconfig.d/include.conf: No such file or directory

So I just went into httpd.conf and commented out that line.

Now it appears apache starts correctly with the following:

***# apache2ctl restart***
httpd2: apr_sockaddr_info_get() failed for linux-ehgd.site
httpd2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd not running, trying to start

If I navigate to 127.0.0.1, I get a “CONNECTION REFUSED” page. So it seems apache is working anyway. Just not quite as expected.

Sorry I’m a novice both with Linux and with setting up Apache/PHP, etc.

Any help appreciated.

Edit: and while I’m at it, can anyone recommend a good OpenSUSE GUI program for MySQL?

Read this http://www.susegeek.com/internet-browser/install-configure-lamp-apachemysqlphp-in-opensuse-110/

Thanks, but I don’t think that’s much help. The problem isn’t with installing the programs, it’s with permissions somewhere or something.

I tried anyway. I thought I’d just follow it step by step. I started by uninstalling everything, but unfortunately, I can’t get past step #1:

wtf is going on here?


linux-ehgd:~ # yast2 -install apache2
yast2: invalid option -- 'n'
Exit.

Thanks again for your suggestion, but it really doesn’t seem to be the solution to my problem.

I figured out that on the page, the “-” is supposed to be a “–”, so I got apache and PHP installed.

However, I still get this problem when I do an apache restart:


**rcapache2 restart**

httpd2-prefork: apr_sockaddr_info_get() failed for linux-ehgd.site
httpd2-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
Shutting down httpd2 (waiting for all children to terminate)                                                                                                                        done
Starting httpd2 (prefork) httpd2-prefork: apr_sockaddr_info_get() failed for linux-ehgd.site
httpd2-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

And if I put a simple php echo statement for testing into /srv/www/htdocs, it is not processed as PHP.

Any help appreciated.

What does your file look like? Did you remember the <?php ?> tag? Try this one:

<?php
phpinfo();
?>

The PHP is definitely okay. It’s just not being processed.

I’m more concerned about the weird output when I restart Apache.

I also forgot to ask if it’s in a file named something.php

Is the php5 module enabled in /etc/sysconfig/apache2, variable APACHE_MODULES?

duh … thanks. :shame: