SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Setting up Apache with PHP with MySql

    Well... I have taken on the task of setting up a linux box running a web server for an internal web page at a company. I'm interning and they thought the best way for to learn is to sit me in front of a box and say"Ok... do it. If you mess it up, reinstall the OS." My reply, "Yeah!" Anyways... on to the question. I've installed everything. Including Red Hat, Apache, PHP, and MySql. Red Hat and Apache are working. For some reason, when I view a .php file, it gives me the code in the browser window instead of running the script. I went throught the tutorials and set up my config files and everything. Is there any ideas out there what I am doing wrong. Thank you for your time.
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  2. #2
    SitePoint Zealot cokeman's Avatar
    Join Date
    Dec 2000
    Location
    So. California
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are the mime types set up properly in httpd.conf?

    <IfModule mod_php3.c>
    AddType application/x-httpd-php3 .php3
    AddType application/x-httpd-php3-source .phps
    </IfModule>

    <IfModule mod_php4.c>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    </IfModule>

  3. #3
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sorta...

    Acctualy, I got rid of the ifModule blocks and set it so that it would load and add the modules no matter what. I have not had an error when starting the server so I assumed that all is well there.
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  4. #4
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hrm...

    I was looking around for the files it needs to run. I found out that mod_php.so is not present in my modules directory. I think this may be the culprate. Does anyone know why it might not be there. I just compiled the source and let install the way it wanted to. And might there be any easy remidies out there?
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  5. #5
    SitePoint Member
    Join Date
    Jun 2001
    Location
    UK
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it might be called libphp4.so

  6. #6
    SitePoint Member
    Join Date
    Jun 2001
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There may be a whole lot quicker, easier ways of getting the task accomplished, but for what it's worth, the following is what I had to do to get Linux 6.2 up and running with Apache, PHP, and mysql (in addition to online instructions Kevin Yanks' tutorial). Some of this may be pertinent to above posts.

    1. Remove current Apache installation from system including dependent modules.
    2. From www.apache.org, download and compile apache-1.3.19. Configure with --enable-module=so and install.
    3. Install MySQL according to tutorial instructions exactly.
    4. Install PHP4 per tutorial instructions, except as follows:

    Edit apache apxs as follows:
    • my $CFG_CFLAGS_SHLIP = q(-fpic -DSHARED_MODULE);
      my $CFG_LD_SHLIB = q(gcc);
      my $CFG_LDFLAGS_SHLIB = q(-shared);


    Configure PHP with --with-apxs = /apachepath/bin/apxs and --with-mysql=/mysqlpath (even for PHP4).

    Install PHP, but before restarting the Apache server...
    In httpd.conf and LoadModule php4_module /apachepath/libexec/libphp4.so

    Edit /etc/ld.so.conf to add /mysqlpath/lib/mysql and then do ldconfig

  7. #7
    SitePoint Addict
    Join Date
    Nov 2000
    Location
    London, UK
    Posts
    223
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Link

    Check out:

    http://www.devshed.com/Server_Side/P...inglySeamless/

    Its very slightly outdated, but it provides you with the guide to everything you need, and the main thing is: it works...

    For a slightly newer guide (but to doing it on Mac OS X: its really not all that different, just make sure you dont go and use the Darwin architecture like it says to, because thats for OSX)

    http://www.devshed.com/Server_Side/A...BuildingOnOSX/

    Those should probly do the trick...

    You probably already know most of the stuff in them, however, read through to see if there's anything u missed...

    ... what's the world coming to?


Bookmarks

Posting Permissions

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