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
 * Copy this file from previous installation if it's absent, otherwise adjust its perissions to make it readable (most likely, 644). Max Semenik 09:06, 6 November 2009 (UTC)

Internal Server Error only when submitting certain text.

 * MediaWiki version: 1.15.1
 * PHP version: PHP 5.2.11
 * MySQL version: 5.0.81
 * URL: http://orosso.net/wiki/index.php?title=Selecting_the_Site_Template&action=edit

When writing the following sentence and clicking "Save page" we receive an error "Internal Server Error" All other text that we have tried seems to work fine.

here is the sentence: In order to start selecting the site template, choose "Select Site Template" from the "Design Options" menu.

—76.8.73.99 19:45, 7 October 2009 (UTC)


 * Do you have mod_security running? If so, disable it or configure it not to interfere with MediaWiki. —Emufarmers(T 00:15, 8 October 2009 (UTC)

Configuring sendmail for mediawiki

 * MediaWiki version: 1.15.1
 * PHP version: 5.2.10 (apache2handler)
 * MySQL version: 5.1.37-community
 * URL:

I have set up a wiki for our organization and is up and running smoothly. I now have a challenge to configure emails for wiki. I have installed our wiki on RHEL 4. I have sendmail installed on the Red HAT machine and trying to configure wiki for sendmail. I saw in one of the articles which says "wiki by default uses sendmail to send emails". But in my case it is not doing so, having a hard luck in configuring it. In my case wiki is using PEAR mail to send emails. Can anyone please let me know how to configure sendmail for wiki.

—202.142.4.253 02:29, 15 October 2009 (UTC)

Simple error in .php file

 * MediaWiki version: 1.14.0
 * PHP version: 5.2.4-2ubuntu5.5 (apache2handler)
 * MySQL version: 5.0.51a-3ubuntu5.4
 * URL: none

I'm trying out TurnKey MediaWiki (turnkey-mediawiki-2009.04-hardy-x86.iso). I changed my account (admin) language settings to Swedish, and got a PHP error from the file /usr/local/share/mediawiki/extensions/FCKeditor/FCKeditor.il8n.sv.php. I opened the file and found the error; whoever wrote the file must have copy-pasted everything, so that there was twice as much text as it should have been. I removed excess text, and the PHP error disappeared.

—81.226.252.221 17:00, 18 October 2009 (UTC)

Resetting a User Login Password

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

DONT KNOW HOW TO FIND THE VERSION NUMBERS

TRING TO CAHNGE A USERS FORGOTTEN PASSWORD USING THE FOLLOWING COMMAND

E:\www\wiki\maintenance>php changePassword.php --user=butch --password=melbournecup

AND GET THIS MESSAGE

PHP Warning: date: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone _set function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ' Australia/Melbourne' for '11.0/DST' instead in E:\www\wiki\LocalSettings.php on line 151 PHP Parse error: parse error, expecting `T_STRING' in E:\www\wiki\includes\Name space.php on line 49

ANY IDEAS WHATS WRONG?

—Forsg 01:00, 23 October 2009 (UTC)

SourceForge - loss of session data

 * MediaWiki version: 1.15.1
 * PHP version: SourceForge version (unknown)
 * MySQL version: SourceForge version (unknown)
 * URL: http://show-down.sourceforge.net/wiki

I've followed the directions as found here: http://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Sourceforge.net but have been unable to have MediaWiki successfuly run on my SourceForge project web space. When I try to edit any settings I always get the error:

"Sorry! We could not process your edit due to a loss of session data. Please try again. If it still does not work, try logging out and logging back in."

In the above mentioned link for setting up MediaWiki on SourceForge I was unable to do the exact steps for creating a symbolic for the sessions or the images directory. I am using Putty on a Windows OS and it didn't have the 'symlink' command so I had to use instead "ln -s" which appeared to do the same thing. Other than that, I believe I followed the steps exactly. Well, I didn't create new database users, I just set the password for the ones which already existed.

I also did the optional configurations except for the SourceForge logo (which I will also do once the wiki is working.)

Any help is greatly appreciated!

—99.225.181.21 13:34, 6 November 2009 (UTC)