Jump to content

Recommended Posts

i'm a web designer who happens to know some code. html? check. css? double check? js? sure... but a developer i never claimed to be. now i'm stuck with a site built in php & mysql and i need to be able to keep it maintained & updated, so i'm trying to get my machine set up with php & mysql, but i'm stuck in php installation/activation. here's where i'm at:

 

i've been following these instructions: http://www.devarticles.com/c/a/Apache/Using-Apache-and-PHP-on-Mac-OS-X/

 

apache is enabled and i went into terminal as instructed and edited my httpd.conf file to read as follows:

 

LoadModule php4_module        libexec/httpd/libphp4.so

AddModule mod_php4.c

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

 

i made a php file named info.php with the following script and placed it in /library/webserver/documents/:

 

<?php phpinfo(); ?>

 

but all browsers interpret the file as text, not a web page, so i see the code typed out plain as day, nor does my machine /anywhere/ read the current php site i am supposed to be managing. it will read the html, but not the php.

 

what am i doing wrong?

 

i have also tried putting these files in the user site folders (http://localhost/~myname/info.php)

 

it is worth mentioning that we are running admitmac network at the office here. i dont expect this to be of any interruption, as apache will run html pages locally just fine from my root library webserver folder.

 

 

okay, so apparently just restarting apache (like all the tutorial websites say to do) isn't enough. i just rebooted my machine and it works.

 

man, newbie mistake.

 

my mom: "it doesn't work!"

me: "is it plugged in?"

mom: "oh, there it goes!"

 

yeah... i can't make fun of her anymore  :-\

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.