version=pmwiki-2.2.5 ordered=1 urlencoded=1 agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/2009090216 Ubuntu/8.10 (intrepid) Firefox/3.0.14 author=Peter Bowers charset=ISO-8859-1 csum= host=92.60.30.104 name=PmWiki.Troubleshooting rev=91 targets=PmWiki.MailingLists,PmWiki.Upgrades,PmWiki.Installation,PmWiki.InitialSetupTasks,PmWiki.FilePermissions,PmWiki.WikiGroup,PmWiki.LocalCustomizations,PmWiki.UploadsAdmin,PmWiki.Tables text=(:Summary:Advice for troubleshooting an installation:)%0a(:Audience: administrators :)%0a%0aPmwiki is pretty robust and can automatically adapt to a very wide variety of environments. %0aHowever, sometimes things don't go as we expect, so we're cataloging common errors and their fixes here.%0a%0a!! Troubleshooting Frequently Asked Questions%0a%0a->%25note%25 Note: This page on pmwiki.org is probably not the best place to post questions. Consider [[PmWiki:HowToGetAssistance | seeking assistance]] from the pmwiki-users [[mailing list(s)]], or post your question on the [[PmWiki:Questions]] page.%0a%0a>>faq%3c%3c [[#faq]]%0aQ: Why am I seeing strange errors after [[(PmWiki.)upgrad(es)]]ing?%0aA: Make sure all of the files were updated, in particular ''pmwiki.php''.%0a%0aA: This question sometimes arises when an administrator hasn't%0afollowed the advice, which used to be less prominent, on the%0a[[(PmWiki.)installation(#notes)]] and%0a[[(PmWiki.)initial setup tasks(#dontmodify)]] pages and has renamed%0a''pmwiki.php'' instead of creating an ''index.php'' wrapper script.%0aIf you have renamed ''pmwiki.php'' to ''index.php'', then the upgrade procedure%0awon't have updated your ''index.php'' file. Delete the old version and%0acreate a wrapper script so it won't happen again.%0a%0aA: Sometimes an FTP or other copy program will fail to transfer all of the%0afiles properly. One way to check for this is by comparing file sizes.%0a%0aA: Be sure all of the files in the ''wikilib.d/'' directory%0awere also upgraded. Sometimes it's a good idea to simply delete the ''wikilib.d/''%0adirectory before upgrading. (Local copies of pages are stored in ''wiki.d/'' and not ''wikilib.d/''.)%0a%0a%0aQ: I'm suddenly getting messages like "@@Warning: fopen(wiki.d/.flock): failed to open stream: Permission denied...@@" and @@Cannot acquire lockfile@@"... what's wrong?%0a%0aA: Something (or someone) has changed the [[PmWiki/FilePermissions | permissions]] on the ''wiki.d/.flock'' file or the ''wiki.d/'' directory such that the webserver is no longer able to write the lockfile. The normal solution is to simply delete the ''.flock'' file from the ''wiki.d/'' directory -- PmWiki will then create a new one. Also be sure to check the permissions on the ''wiki.d/'' directory itself. (One can easily check and modify permissions of the ''wiki.d/'' directory in %25newwin%25[[http://filezilla-project.org/ | FileZilla]] (open-source FTP app) by right-clicking on the file > File attributes)%0a%0aQ: My links in the sidebar seem to be pointing to non-existent pages, even though I know I created the pages. Where are the pages?%0a%0aA: Links in the sidebar normally need to be qualified by a [[WikiGroup]] in order to work properly (use [=[[Group.Page]] instead of [[Page]]=]).\\%0aAlso: Make sure you type Side'''B'''ar with a capital B.%0a%0a%0aQ: Why am I seeing "@@Warning: Cannot modify header information - headers already sent ...@@" messages at the top of my page.%0a%0aA: If this is the first or only error message you're seeing, it's usually an indication that there are blank lines or spaces before the [@%3c?php@] or after the [@?>@] in a [[local customization(s)]] file. Double-check the file and make sure there aren't any blank lines or spaces before the initial [@%3c?php@]. It's often easiest and safest to eliminate any closing [@?>@] altogether. On Windows, it may be necessary to use a hex editor to convert LFCR line endings to LF line endings in the local\config.php file.%0a%0aA: If the warning is appearing after some other warning or error message, then resolve the other error and this warning may go away.%0a%0a[[#session_write_close_error]]%0aQ: How do I make a PHP Warning about @@function.session-write-close@@ go away?%0a%0aA: If you are seeing an error similar to this%0a%0a->[@%0aWarning: session_write_close() [function.session-write-close]:%0aopen(/some/filesystem/path/to/a/directory/sess_[...]) failed: No such file%0aor directory (2) in /your/filesystem/path/to/pmwiki.php on line NNN%0a@]%0a%0aPmWiki sometimes does session-tracking using PHP's%0a[[http://php.net/session | session-handling functions ]].%0aFor session-tracking to work, some information needs to be written%0ain a directory on the server. That directory needs to exist and%0abe writable by the webserver software. For this example, the%0awebserver software is configured to write sessions in this%0adirectory%0a%0a->[@/some/filesystem/path/to/a/directory/@]%0a%0abut the directory doesn't exist. The solution is to do at least one%0aof these:%0a* Create the directory and make sure it's writable by the webserver software%0a* Provide a session_save_path value that points to a directory that is writable by the server, e.g.%0a%0a->[@session_save_path('/home/someuser/tmp/sessions');@]%0a%0a%0a[[#multiplepwprompts]]%0aQ: Why is PmWiki prompting me multiple times for a password I've already entered?%0a%0aA: Usually this is an indication that the browser isn't accepting cookies, or that PHP's session handling functions on the server aren't properly configured. If the browser is accepting cookies, then try setting $EnableDiag=1; in ''local/config.php'', run PmWiki using [@?action=phpinfo@], and verify that sessions are enabled and that the session.save_path has a reasonable value. Note that several versions of PHP under Windows require that a session_save_path be explicitly set (this can be done in the ''local/config.php'' file). You might also try setting session.auto_start to 1 in your php.ini.%0a%0aQ: I edited ''config.php'', but when I look at my wiki pages, all I see is "@@Parse error: parse error, unexpected T_VARIABLE in ''somefile'' on line ''number''.@@"%0a%0aA: You've made a mistake in writing the PHP that goes into the ''config.php'' file. The most common mistake that causes the T_VARIABLE error is forgetting the semi-colon (;) at the end of a line that you added. The line number and file named are where you should look for the mistake.%0a%0a%0aQ: Searches and pagelists stopped working after I upgraded -- no errors are reported, but links to other pages do not appear (or do not appear as they should) -- what gives?%0a%0aA: Be sure all of the files in the ''wikilib.d/'' directory%0awere also upgraded. In particular, it sounds as if the Site.PageListTemplates page is either missing (if no links are displayed) or is an old version (if the links do not appear as they should). Allso make sure that read-permissions (attr) are set for the pages Site.PageListTemplates and Site.Search.%0a%0a[[#mod_security]]%0aQ: Some of my posts are coming back with "403 Forbidden" errors, "Not Acceptable", or "Internal Server Error". This happens with some posts but not others.%0a%0aA: Your webserver probably has [[http://modsecurity.org | mod_security]] enabled. The mod_security "feature" scans all incoming posts for forbidden words or phrases that might indicate someone is trying to hack the system, and if any of them are present then Apache returns the 403 Forbidden error. Common phrases that tend to trigger mod_security include "curl ", "wget", "file(", and "system(", although there are many others.%0a%0aSince mod_security intercepts the requests and sends the "forbidden"%0amessage before PmWiki ever gets a chance to run, it's not a bug in PmWiki, and%0athere's little that PmWiki can do about it. Instead, one has to alter the%0awebserver configuration to disable mod_security or reconfigure it to allow%0awhatever word it is forbidding. Some sites may be able to disable mod_security%0aby placing [@SecFilterEngine off@] in a ''.htaccess'' file.%0a%0aQ: I get the following message when attempting to upload an image, what do I do?%0a[-@@'''Warning''': move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 1929 is not allowed to access /home/onscolre/public_html/pmwikiuploads/Photos owned by uid 33 in '''/home/onscolre/public_html/pmwiki/scripts/upload.php''' on line '''198'''@@-]%0a%0a@@'''PmWiki can't process your request'''@@%0a%0a[-@@?cannot move uploaded file to /home/onscolre/public_html/pmwikiuploads/Photos/FoundationPupilsIn1958.jpeg@@-]%0a%0a[-@@We are sorry for any inconvenience.@@-]%0a%0aA: Your server is configured with PHP [[http://php.net/manual/en/features.safe-mode.php|Safe Mode]] enabled. Configure your wiki to use a [[PmWiki/UploadsAdmin#sitewideprefix|site-wide uploads prefix]], then create the ''uploads/'' directory manually and set 777 permissions on it (rather than letting PmWiki create the directory).%0a%0a[[#TableRowIndexMax]] [[#divisionbyzero]]%0aQ: I'm starting to see "Division by zero error in pmwiki.php..." on my site. What's wrong?%0a%0aA: It's a bug in PmWiki that occurs only with the [[tables]] markup and only for versions of PHP >= 4.4.6 or >= 5.2.0. Often it seems to occur "out of nowhere" because the server administrator has upgraded PHP. Try [[upgrad(es)]]ing to a later version of PmWiki to remove the error, or try setting the following in ''local/config.php'':%0a%0a $TableRowIndexMax = 1;%0a%0aQ: I have to log in twice [-(two times) (2 times)-]. -or- My password is not being required even though it should. -or- I changed the password but the old password is still active. -or- My config.php password is not over-riding my farmconfig.php password.%0aA: It could happen if (farm)config.php, or an included recipe, directly calls the functions CondAuth(), or RetrieveAuthPage(), PageTextVar(), PageVar() and possibly others, before defining all passwords and before including AuthUser (if required). %0a%0aThe [[PmWiki/LocalCustomizations#configphp-order|order of config.php]] is very significant. time=1254377872