Results 1 to 8 of 8

Thread: How to setup PHP/Apache/MySQL for development?

  1. #1

    Default 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:

    Code:
    # 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:

    Code:
    # 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?

  2. #2
    Join Date
    Nov 2010
    Location
    Ελλάδα(Αθήνα)-Россия (г. Красноярск)
    Posts
    2,919

    Default Απ: How to setup PHP/Apache/MySQL for development?

    Πάντα Φιλικά, Στάμος.
    Desktop: openSUSE Leap 15||x86_64||Gnome 3.14 & KDE 5||AMD Ryzen 7 8 core||Nvidia GTX 1070 Ti Gaming Edition
    Γλώσσες Προγραμματισμού: C++, Qt developing.
    http://bit.ly/fT8Hfi

  3. #3

    Default Re: How to setup PHP/Apache/MySQL for development?

    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?

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

  4. #4

    Default Re: How to setup PHP/Apache/MySQL for development?

    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:

    Code:
    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.

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: How to setup PHP/Apache/MySQL for development?

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

    <?php
    phpinfo();
    ?>

  6. #6

    Default Re: How to setup PHP/Apache/MySQL for development?

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

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

  7. #7
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: How to setup PHP/Apache/MySQL for development?

    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?

  8. #8

    Default Re: How to setup PHP/Apache/MySQL for development?

    duh ... thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •