| | |
How to add php5 to apache?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jul 2006
Posts: 138
Reputation:
Solved Threads: 0
Hello,
I can run php scripts on my computer from the command prompt but I can't open it through my web browser. My assumption is that this happens because apache is not configured to use php.
Does anyone know what lines(s) I should add to apache's httpd.conf file? I found some examples online, but they all differ from one another(different versions, different tweaks, etc). I tried some of them, but none of them worked. What is the 'right' way to add php to apache? I am pasting the the fist paragraph generated by phpinfo(). Please let me know if any more information is required. Thanks.
PS. I am running ubuntu linux
phpinfo()
PHP Version => 5.2.1
System => Linux ryy 2.6.20-16-generic #2 SMP Tue Feb 12 05:41:34 UTC 2008 i686
Build Date => Nov 28 2007 23:13:02
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php5/cli/php.ini
Scan this dir for additional .ini files => /etc/php5/cli/conf.d
additional .ini files parsed => /etc/php5/cli/conf.d/mysql.ini,
/etc/php5/cli/conf.d/mysqli.ini,
/etc/php5/cli/conf.d/pdo.ini,
/etc/php5/cli/conf.d/pdo_mysql.ini
I can run php scripts on my computer from the command prompt but I can't open it through my web browser. My assumption is that this happens because apache is not configured to use php.
Does anyone know what lines(s) I should add to apache's httpd.conf file? I found some examples online, but they all differ from one another(different versions, different tweaks, etc). I tried some of them, but none of them worked. What is the 'right' way to add php to apache? I am pasting the the fist paragraph generated by phpinfo(). Please let me know if any more information is required. Thanks.
PS. I am running ubuntu linux
phpinfo()
PHP Version => 5.2.1
System => Linux ryy 2.6.20-16-generic #2 SMP Tue Feb 12 05:41:34 UTC 2008 i686
Build Date => Nov 28 2007 23:13:02
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php5/cli/php.ini
Scan this dir for additional .ini files => /etc/php5/cli/conf.d
additional .ini files parsed => /etc/php5/cli/conf.d/mysql.ini,
/etc/php5/cli/conf.d/mysqli.ini,
/etc/php5/cli/conf.d/pdo.ini,
/etc/php5/cli/conf.d/pdo_mysql.ini
Last edited by ryy705; Mar 19th, 2008 at 12:45 pm.
•
•
Join Date: Dec 2007
Posts: 9
Reputation:
Solved Threads: 1
The right way is obviously that decribed in the official PHP Manual:
http://www.php.net/manual/en/install.unix.php
There are 2 most important points:
1. Apache should load the PHP module.
2. .php extension should be associated with MIME-type application/x-httpd-php
Good luck!
http://www.php.net/manual/en/install.unix.php
There are 2 most important points:
1. Apache should load the PHP module.
2. .php extension should be associated with MIME-type application/x-httpd-php
Good luck!
Smarter Toys make Smarter Kids!
![]() |
Similar Threads
- php5 and phpmyadmin?? (PHP)
- Apache (Linux Servers and Apache)
- Apache2.2 and php5.1.4 installation... pls help (PHP)
- Bricolage - PHP5 & Mod Perl (PHP)
- Apache2 displaying PHP5 source code (PHP)
- Problem which installing PHP5 and Apache (PHP)
Other Threads in the PHP Forum
- Previous Thread: Need Urgent help in PHP scripting
- Next Thread: editing appointment info in data table.
Views: 2115 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email error errors file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php phpincludeissue problem query radio random recursion recursive regex remote script search select server sessions shot sms soap source space speed sql structure syntax system table test tutorial update updates upload url validation validator variable video web xml youtube





