Page MenuHomePhabricator

Installation of 1.7alpha (trunk r13688) fails with "Call to undefined function posix_isatty()"
Closed, ResolvedPublic

Description

Author: jimmy.collins

Description:
Now the installation of 1.7alpha (trunk r13688) fails with following error. The
configuration file has not been created.

Error/Log:

  • PHP 5.1.2 installed
  • PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
  • Have XML / Latin1-UTF-8 conversion support.
  • PHP's memory_limit is 8M. If this is too low, installation may fail!

Attempting to raise limit to 20M... ok.

  • No zlib support.
  • Neither Turck MMCache nor eAccelerator are installed, can't use object

caching functions

  • Found GNU diff3: /usr/bin/diff3.
  • Found GD graphics library built-in, image thumbnailing will be enabled if

you enable uploads.

  • Installation directory: /srv/www/htdocs/wiki/trunk
  • Script URI path: /wiki/trunk
  • Environment checked. You can install MediaWiki.

    Generating configuration file...
  • Database type: mysql
  • Attempting to connect to database server as root...success.
  • Connected to 5.0.18
  • Created database mw_trunk
  • Creating tables... using MySQL 4 table defs... done.
  • Initializing data...
  • Granting user permissions to wikiuser on mw_trunk...success.

    Fatal error: Call to undefined function posix_isatty() in

/srv/www/htdocs/wiki/trunk/includes/Database.php on line 469


Version: 1.6.x
Severity: normal
OS: Linux
Platform: PC

Details

Reference
bz5618

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:12 PM
bzimport set Reference to bz5618.
bzimport added a subscriber: Unknown Object (MLST).

jimmy.collins wrote:

Ups - the error is not reproducible for me. I think you can just close this bug.

blackcoat wrote:

I'd like to open this back up, since I just ran into the same problem with
MediaWiki 1.6.8. The culprit is --disable-posix ...

When attempting to upgrade an old, old wiki from 1.4.5 to 1.6.8, I ran across
the following problem:


$ php upgrade1_5.php
piratedgames 2006-09-06 05:22:29: Checking cur table for unique title index and
applying if necessary
piratedgames: cur table has the old non-unique index and may have duplicate entries.
Checking for duplicate cur table entries... (this may take a while on a large wiki)
Found 0 titles with duplicate entries.
Done.
piratedgames 2006-09-06 05:22:30: ...converting from cur/old to
page/revision/text DB structure.
piratedgames 2006-09-06 05:22:30: Creating page and revision tables...
PHP Fatal error: Call to undefined function: posix_isatty() in
/www/piratedgames.net/htdocs/wiki/includes/Database.php on line 469
Fatal error: Call to undefined function: posix_isatty() in

/www/piratedgames.net/htdocs/wiki/includes/Database.php on line 469

The documentation on posix-isatty() http://php.net/posix_isatty barely
exists. However, the main POSIX page in the manual
http://php.net/manual/en/ref.posix.php clearly states that "POSIX functions
are enabled by default. You can disable POSIX-like functions with --disable-posix".

So, Database.php expects certain POSIX functions to exist, and they don't on my
build. As far as I can tell, the MediaWiki documentation does not mention that
MediaWiki requires PHP to be compiled with the POSIX functions, or that using
--disable-posix will create problems.

For those of us with hardened systems who want to run 1.6.x or 1.7.x, this
clearly presents a problem.

For the interested, here's my full config line:


System Linux rackspace 2.6.16-hardened-r10 #1 Wed Jul 19 21:04:57 CDT 2006 x86_64
Build Date Aug 14 2006 08:54:26
Configure Command './configure' '--prefix=/usr/lib64/php4'
'--host=x86_64-pc-linux-gnu' '--mandir=/usr/lib64/php4/man'
'--infodir=/usr/lib64/php4/info' '--sysconfdir=/etc'
'--cache-file=./config.cache' '--with-libdir=lib64' '--disable-cli'
'--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php4'
'--with-config-file-scan-dir=/etc/php/apache2-php4/ext-active' '--without-pear'
'--disable-bcmath' '--with-bz2' '--disable-calendar' '--disable-ctype'
'--with-curl' '--disable-dbase' '--with-dom' '--disable-exif' '--without-fbsql'
'--without-fdftk' '--disable-filepro' '--disable-ftp' '--with-gettext'
'--without-gmp' '--without-hwapi' '--without-iconv' '--without-informix'
'--disable-ipv6' '--without-kerberos' '--enable-mbstring' '--without-mcal'
'--with-mcrypt' '--without-mcve' '--disable-memory-limit' '--without-mhash'
'--without-ming' '--without-mnogosearch' '--without-msql' '--without-mssql'
'--without-ncurses' '--without-oci8' '--without-oci8-instant-client'
'--without-oracle' '--with-openssl' '--with-openssl-dir=/usr'
'--disable-overload' '--without-ovrimos' '--disable-pcntl' '--without-pfpro'
'--without-pgsql' '--disable-posix' '--without-pspell' '--without-recode'
'--disable-shmop' '--without-snmp' '--disable-sockets' '--without-sybase'
'--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem'
'--disable-sysvshm' '--disable-tokenizer' '--disable-wddx' '--without-xmlrpc'
'--with-zlib' '--disable-debug' '--without-cdb' '--without-db4'
'--without-flatfile' '--without-gdbm' '--without-inifile' '--disable-dbx'
'--without-freetype-dir' '--without-t1lib' '--disable-gd-jis-conv'
'--disable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr'
'--without-xpm-dir' '--with-gd' '--with-imap' '--with-imap-ssl'
'--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock'
'--with-readline' '--without-libedit' '--disable-xslt' '--without-xslt-sablot'
'--without-dom-xslt' '--without-dom-exslt' '--without-mm' '--with-pic'

MediaWiki assumes you haven't gone out of your way to break PHP.

Marking this FIXED. Install/update has checked function_exists( 'posix_isatty' ) for awhile now.