Invalid SQL: SELECT * FROM `swcomments` AS comments LEFT JOIN `swcommentdata` AS commentdata ON (comments.commentid = commentdata.commentid) WHERE comments.commenttype = '4' AND comments.isapproved = '1' AND comments.typeid = '51'; (Table './kayako/swcommentdata' is marked as crashed and should be repaired) Installing Apache2 and PHP5 on OS X - Powered By Kayako eSupport
09 Feb 2010 
Support Center » Knowledgebase » Installing Apache2 and PHP5 on OS X
 Installing Apache2 and PHP5 on OS X
Solution 1. First download the latest version of Apache2 directly from their website, at the time of this article, the latest version of Apache was 2.2.6

2. Once you have it downloaded, extract the compressed file.

3. To install it type the following commands, make sure your user account has admin rights

> ./configure --enable-mods-shared=ALL
> make
> make install

The above will install apache2 in /usr/local/apache2/

4. Now download the latest version of PHP5 from php.net
5. Once you have it downloaded, extract the compressed file.
6. To install it, type the following commands, again make sure your user account has admin rights

> ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --prefix=/usr/local/php5
> make
> make install

7. This will install php5 in /usr/local/php5
8. Finally, edit your http.conf file, located at /usr/local/apache2/conf
9. Check the following things...

a) Make sure Apache is loading the PHP5 module.
There should be a line in the file that reads:

LoadModule php5_module modules/libphp5.so

If not, enter this line. You should put it with the other LoadModule lines, which are all grouped together.

b) Make sure Apache knows how to handle files with a .php extension.
There should be a line in the file that reads:

AddType application/x-httpd-php .php

If not, enter this line. You should put it with the other AddType lines, which are all grouped together.

c) Make sure Apache knows that index.php is a valid default page.
Look for a line like that begins with "DirectoryIndex". One possible variation is:

DirectoryIndex index.html index.html.var

This specifies that index.html and index.html.var are valid default pages. To make index.php a valid default page too, just add index.php to the line, making sure it's separated from any other entries in the line by a space. Here's what it looks like in my file:

DirectoryIndex index.html index.html.var index.php

d) Save the file.

10. Restart Apache.

This is easy if you installed the Apache Preferences Pane that came with Server Logistics' installer. Open System Preferences, click on Apache, then click the "Graceful" button. In moments, you will be told that Apache has gracefully restarted.

The command-line way is to enter this into the terminal:

sudo /usr/local/apache2/bin/apachectl restart

Yet another way to restart Apache is to restart your Mac. You may need to do this, as sometimes Apache refuses to restart.

11. Test PHP.

Create a text file with the following:

<?PHP

phpinfo();

?>





Article Details
Article ID: 51
Created On: 13 Oct 2007 02:11 PM

 This answer was helpful  This answer was not helpful

 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | Troubleshooter | News | Downloads
Language:

Help Desk Software By Kayako eSupport v3.04.10