[RESOLVED] How do I get php to run?

Ask questions about Arch Linux ARM. Please search before making a new topic.

[RESOLVED] How do I get php to run?

Postby Raymondday » Mon Nov 21, 2011 9:09 am

trying to set up phpbb message board on this.

$this->bbcode_second_pass_code('', '[root@alarm http]# wget http://www.phpbb.com/files/release/phpBB-3.0.9.tar.bz2
--2011-11-21 02:39:12-- http://www.phpbb.com/files/release/phpBB-3.0.9.tar.bz2
Resolving www.phpbb.com (www.phpbb.com)... 140.211.15.9
Connecting to www.phpbb.com (www.phpbb.com)|140.211.15.9|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1588315 (1.5M) [application/x-bzip2]
Saving to: `phpBB-3.0.9.tar.bz2'

100%[======================================>] 1,588,315 1.01M/s in 1.5s

2011-11-21 02:39:14 (1.01 MB/s) - `phpBB-3.0.9.tar.bz2' saved [1588315/1588315]

[root@alarm http]# tar jxf phpBB-3.0.9.tar.bz2
[root@alarm http]# rm phpBB-3.0.9.tar.bz2')

But when I go to http://IP/phpBB3/install/ it just brings up the file names. I guess I have to have Apache run php.

Went to edit /etc/httpd/conf/httpd.conf file and add a "LoadModule php5_module modules/mod_php5.so" to that file. Then do this to start it:

$this->bbcode_second_pass_code('', '[root@alarm http]# /etc/rc.d/httpd restart
:: Restarting Apache Web Server [BUSY] httpd: Syntax error on line 121 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_php5.so into server: /etc/httpd/modules/mod_php5.so: cannot open shared object file: No such file or directory
[FAIL]')

I guess the line 121 is not right but any one know if this is the right way to do it and if so what would that line look like in httpd.conf file?

-Raymond Day
Raymondday
 
Posts: 77
Joined: Sat Nov 19, 2011 1:46 pm

Re: How do I get php to run?

Postby pepedog » Mon Nov 21, 2011 10:28 am

Did you install php?
pacman -S php
and other php modules you need?
pacman -Ss php

These 2 lines in httpd.conf are needed
LoadModule php5_module modules/libphp5.so
Include /etc/httpd/conf/extra/php5_module.conf

And in php.ini uncomment what you need?
extension=bcmath.so
extension=bz2.so
extension=calendar.so
extension=curl.so
extension=dba.so
extension=enchant.so
extension=exif.so
extension=ftp.so
extension=gd.so
----------
more

Then restart httpd and check logs to see all is right.
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: How do I get php to run?

Postby Raymondday » Mon Nov 21, 2011 2:21 pm

Thank you I got it working.

The hardiest part was in the /etc/php/php.ini file finding the:

;extension=mysql.so

Then removing the ; and save it and /etc/rc.d/httpd restart

-Raymond Day
Raymondday
 
Posts: 77
Joined: Sat Nov 19, 2011 1:46 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 28 guests