PHP on latest Arch Linux ARM linux

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

PHP on latest Arch Linux ARM linux

Postby otaku888 » Wed Mar 02, 2011 12:03 pm

I've installed the latest version of Arch Linux ARM linux, PlugApps-Linux-2011.02-rootfs.tar.gz and wonder of wonder I now have the latest versions of Sabnzbd and Cherokee running!

One thing I'm struggling with, which I understand was a issue on 1.1 as well is getting PHP to work. I've tried setting up php, php-cgi and php-fpm from the repository and none of them seem to work. I can get a fastcgi or php-fpm daemon running, but when loading a php page all I get is the source printed literally on the page.

I've also tried removing all the repo php packages and installing the one pepedog put up without pear: php-apache-optional-nopear-5.3.3-4-arm.pkg.tar.gz, and have had the same result.

Any ideas?
otaku888
 
Posts: 10
Joined: Tue Feb 15, 2011 7:44 am

Re: PHP on latest Arch Linux ARM linux

Postby pepedog » Wed Mar 02, 2011 1:56 pm

This isn't the fault of the php packages, all I can tell you is how apache "executes" the script instead of "printing"
$this->bbcode_second_pass_code('', 'LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
<IfModule dir_module>
<IfModule php5_module>
DirectoryIndex index.php index.html
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps
</IfModule>
</IfModule>')
Might be best to look at the cook book
http://www.cherokee-project.com/doc/cookbook_php.html
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: PHP on latest Arch Linux ARM linux

Postby otaku888 » Wed Mar 02, 2011 2:07 pm

I take it you mean it works fine for you with Apache?

I've set up cherokee and php quite a few times before, admittedly not with version 1.2.1 on Arch Linux ARM linux, but haven't had this issue, my settings also match the cookbook, and a working install on an ubuntu vps.

From my searching of the boards getting php to work always seemed to be a problem, but if that is fixed now, I'll give it a shot with apache instead.
otaku888
 
Posts: 10
Joined: Tue Feb 15, 2011 7:44 am

Re: PHP on latest Arch Linux ARM linux

Postby pepedog » Wed Mar 02, 2011 2:30 pm

Php looks all good now. Think I will pay some interest to Cherokee
On apache I even got phpbb running fine with mysql
(this is all on latest Arch Linux ARM)
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: PHP on latest Arch Linux ARM linux

Postby otaku888 » Wed Mar 02, 2011 2:35 pm

Oh fantastic, thanks for the confirmation. ;)

I'll install apache or nginx instead then, maybe it's an issue with the new version of cherokee. I know it has problems starting fast-cgi (I always had to do it manually).
otaku888
 
Posts: 10
Joined: Tue Feb 15, 2011 7:44 am

Re: PHP on latest Arch Linux ARM linux

Postby pepedog » Wed Mar 02, 2011 3:11 pm

I just uninstalled apache and php-apache then installed cherokee.
They both use /srv/http as the doc root, and php pages serve just fine, so here is the essence of my phi.ini
$this->bbcode_second_pass_code('', '[PHP]
engine = On
zend.ze1_compatibility_mode = Off
short_open_tag = On
asp_tags = Off
precision = 14
y2k_compliance = On
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func=
serialize_precision = 100
allow_call_time_pass_reference = Off
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/
disable_functions =
disable_classes =
expose_php = On
max_execution_time = 300 ; Maximum execution time of each script, in seconds
max_input_time = 60
memory_limit = 128M ; Maximum amount of memory a script may consume (32MB)
error_reporting = E_ALL
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = Off
track_errors = Off
error_log = syslog
variables_order = "GPCS"
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
include_path = ".:/usr/share/pear:/usr/share/pear/PEAR"
doc_root =
user_dir =
extension_dir = "/usr/lib/php/modules/"
enable_dl = Off
file_uploads = On
upload_max_filesize = 2M
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
[Date]
date.timezone = "Europe/London"
[filter]
[iconv]
[sqlite]
[Pcre]
[Syslog]
define_syslog_variables = Off
[mail function]
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port = 3306
mysql.default_socket = /var/run/mysqld/mysqld.sock
mysql.default_host = localhost
mysql.default_user = root
mysql.default_password = 123456
mysql.connect_timeout = 60
mysql.trace_mode = Off
[MySQLi]
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mSQL]
msql.allow_persistent = On
msql.max_persistent = -1
msql.max_links = -1
[OCI8]
[PostgresSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[Sybase]
sybase.allow_persistent = On
sybase.max_persistent = -1
sybase.max_links = -1
sybase.min_error_severity = 10
sybase.min_message_severity = 10
sybase.compatability_mode = Off
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[bcmath]
bcmath.scale = 0
[browscap]
[Informix]
ifx.default_host =
ifx.default_user =
ifx.default_password =
ifx.allow_persistent = On
ifx.max_persistent = -1
ifx.max_links = -1
ifx.textasvarchar = 0
ifx.byteasvarchar = 0
ifx.charasvarchar = 0
ifx.blobinfile = 0
ifx.nullformat = 0
[Session]
session.save_handler = files
session.save_path = "/tmp"
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off
mssql.secure_connection = Off
[Assertion]
[COM]
[mbstring]
[FrontBase]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
extension=bcmath.so
extension=bz2.so
extension=calendar.so
extension=curl.so
extension=exif.so
extension=ftp.so
extension=gd.so
extension=gettext.so
extension=gmp.so
extension=iconv.so
extension=imap.so
extension=json.so
extension=mcrypt.so
extension=mysql.so
extension=mysqli.so
extension=odbc.so
extension=openssl.so
extension=pdo_mysql.so
extension=pdo_sqlite.so
extension=posix.so
extension=pspell.so
extension=soap.so
extension=sockets.so
extension=sqlite.so
extension=tidy.so
extension=xmlrpc.so
extension=xsl.so
extension=zip.so
')
and my installed php packages
$this->bbcode_second_pass_code('', 'php 5.3.5-1
php-cgi 5.3.5-1
php-curl 5.3.5-1
php-embed 5.3.5-1
php-gd 5.3.5-1
php-gmp 5.3.5-1
php-intl 5.3.5-1
php-ldap 5.3.5-1
php-mcrypt 5.3.5-1
php-mssql 5.3.5-1
php-odbc 5.3.5-1
php-pgsql 5.3.5-1
php-pspell 5.3.5-1
php-snmp 5.3.5-1
php-sqlite 5.3.5-1
php-suhosin 0.9.32.1-1
php-tidy 5.3.5-1
php-xsl 5.3.5-1
')
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: PHP on latest Arch Linux ARM linux

Postby pepedog » Wed Mar 02, 2011 3:35 pm

BTW, I just tested cherokee with php on a phpbb install, and TorrentWatch-X as mentioned in another thread here
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: PHP on latest Arch Linux ARM linux

Postby otaku888 » Wed Mar 02, 2011 3:42 pm

And this is all with php-fastcgi or php-fpm?
otaku888
 
Posts: 10
Joined: Tue Feb 15, 2011 7:44 am

Re: PHP on latest Arch Linux ARM linux

Postby pepedog » Wed Mar 02, 2011 3:47 pm

I don't see I have either installed, so probably php-cgi is doing the work
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: PHP on latest Arch Linux ARM linux

Postby otaku888 » Wed Mar 02, 2011 4:37 pm

Is there anything else special you are doing? because I have just tried again, using all your packages and extensions.

The same thing happened. I get an access denied error, I chown /srv/http to http:http and then all my php prints out literally.

I did a ps aux | grep php-cgi and I can see cherokee is starting a php-cgi process on port 47990 successfully, which is new for me. So that's not the problem.

I'm stumped. :cry:
otaku888
 
Posts: 10
Joined: Tue Feb 15, 2011 7:44 am

Next

Return to User Questions

Who is online

Users browsing this forum: Google [Bot] and 11 guests