Project:Support desk/Sections/PHP

__NEWSECTIONLINK__

= PHP Error Support =

Move wiki to new server with current MW, Fatal PHP error

 * MediaWiki version: 1.13.3
 * PHP version: 5.1.6-20
 * MySQL version: 5.0.45-7
 * URL: Classified (very literally, not a joke! ;-) )
 * OS: RHEL5

I need to move a wiki (1.10.0) from one machine to another, and at the same time upgrade MW to 1.13.3 After untarring MediaWiki, copying the contants of /images and restoring the database, attempting to access the wiki results in an error:

[Tue Jan 20 19:48:14 2009] [error] [client 192.168.1.2] PHP Fatal error: require_once [function.require]: Failed opening required '/var/www/html2/wiki/ LocalSettings.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html2/wiki/ includes/WebStart.php on line 97

Fatal error: Class 'ArrayIterator' not found in /usr/local/www/apache22/data/wiki/includes/StringUtils.php on line 179
I got this error on my FreeBSD 7.1 system, directly after moving the LocalSettings.php file. The solution provided in this section did not solve the problem in my case.
 * MediaWiki version: 1.14.0
 * PHP version: 5.2.8
 * MySQL version: 5.0.67
 * URL: internal link

I edited the StringUtils.php page from line 179 to skip using the ArrayIterator. I edited the 'else' part to test.

Note that my wiki shows at this point. Before I only got a browser http 500 error message with the fatal error in the (apache22) web server error log.

I noticed also the class for the ArrayIterator is not present in the file like the class for ExplodeIterator.

Now I can see the main page, but it only shows the main heading and it looks I can edit but not save the edited pages (or the fonts are white?) In the error log I notice more errors.

Hope part of this info helps finding out the actual problem here.

—82.148.222.98 15:25, 17 March 2009 (UTC)
 * See above. i Alex  21:59, 20 March 2009 (UTC)


 * MediaWiki version: 1.14
 * PHP version: 5
 * MySQL version:
 * URL: http://dfwebdev:9042/index.php?title=Main_Page

I am getting HTTP 500 internal server error


 * You need to install /usr/ports/devel/php5-spl . This one is a new requirement, I guess newly separated from php5 or newly required by MediaWiki.  FreeBSD's ports install many standard parts of PHP as separate ports.  Some people think this is a bad idea.  You'll need:

-- 12.192.92.51 20:25, 18 May 2009 (UTC)
 * php5
 * php5-mysql
 * php5-pcre
 * php5-session
 * php5-simplexml
 * php5-spl
 * php5-xml
 * php5-zlib

Can't create Directory (mkdir - php-func) under XAMPP Windows XP

 * MediaWiki version: 1.14.0
 * PHP version: 5.1.6
 * MySQL version: 5.0.24a-community-nt
 * URL:

Hi, i get this error, if i try to upload an image into my wiki: Warning: mkdir [function.mkdir]: No such file or directory in D:\Programme\xampp\htdocs\mediawiki\includes\GlobalFunctions.php on line 1943 ... Interner Fehler (Internal Error)

Das Verzeichnis „public/7/7a“ konnte nicht angelegt werden.

—217.94.53.101 13:04, 5 May 2009 (UTC)


 * Try the fix listed on bug 18656. —Emufarmers(T 18:51, 5 May 2009 (UTC)


 * MediaWiki version:
 * PHP version:
 * MySQL version:
 * URL:

Hello Mediawiki Team, Great software, however I get these errors when i try to install it on my website:



Warning: exec has been disabled for security reasons in /home/studitco/public_html/wiki/config/index.php on line 2005

Warning: array_map [function.array-map]: Argument #2 should be an array in /home/studitco/public_html/wiki/config/index.php on line 2010

Warning: Invalid argument supplied for foreach in /home/studitco/public_html/wiki/config/index.php on line 2013

It tells me also that the database name is invalid.

Help is appreciated. Thanks

—78.86.229.50 18:11, 8 May 2009 (UTC)

PHP Warning

 * MediaWiki version: 1.14
 * PHP version: 5.2
 * MySQL version: 5.02 readline 5.2
 * URL: intern highschool project on server that is only available via SSH, sry cannnot give you log in data :/

Warning: dba_open(/var/lib/mediawiki/images/tmp/mw-cache-wikidb.db,cl) [function.dba-open]: No such handler: db3 in /usr/share/mediawiki/includes/BagOStuff.php on line 715

—84.46.46.128 01:32, 9 May 2009 (UTC)

MediaWiki 1.14.0 Installation: checking environment warnings

 * MediaWiki version: 1.14.0
 * PHP version: 5.16
 * MySQL version: unknown, but more than likely up to date
 * URL: learnjazzpiano.com/wiki

This warning comes up in the first part of installation where it's checking environment:

Warning: is_dir [function.is-dir]: open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path(s): (/var/www/vhosts/learnjazzpiano.com/httpdocs:/var/www/vhosts/learnjazzpiano.com/private) in /var/www/vhosts/learnjazzpiano.com/httpdocs/wiki/config/index.php on line 441
 * 1) Warning: Your session.save_path value (/var/lib/php/session) appears to be invalid or is not writable. PHP needs to be able to save data to this location for correct session operation.

I was wondering if I can hard code some other location for the session files at line 441 in the index.php file, and if so, will someone give me an example of how to do it? I'm not a PHP programmer (yet, at least).

Thanks,

Scot

—76.104.204.246 20:06, 22 May 2009 (UTC)