That for for an IT specialist to look at.

2013/1/5, bpabbott <bpabb...@mac.com>:
> I'm attempting my first MediaWiki (1.17) install on MacOS X using Macports
> for PHP, MySQL and Apache.
>
>   https://trac.macports.org/wiki/howto/MAMP
>
> My intent is to use a wiki documenting personal projects, and placed it in
> ~/Sites/mediawiki.  My LocalSettings.php file contains the definition
> below.
>
>   $wgScriptPath       = "/~bpabbott/mediawiki";
>
> The absolute path is /Users/bpabbott/Sites/mediawiki
>
> Everything appeared to be ok, until I tried to enable LaTeX to be used to
> render equations.  I made the changes below to my LocalSettings.php.
>
> $wgEnableUploads = true;
>
> ## Upload paths.  May want other Directories for additional wikis
> $wgUploadPath      = "$wgScriptPath/images";
> $wgUploadDirectory = "$wgScriptPath/images";
>
> ## If you have the appropriate support software installed
> ## you can enable inline LaTeX equations:
> $wgUseTeX           = true;
>
> ## Setup the Math directories
> $wgMathPath         = "{$wgUploadPath}/math";
> $wgMathDirectory    = "{$wgUploadDirectory}/math";
> $wgTmpDirectory     = "{$wgUploadDirectory}/tmp";
>
> To help with debugging, I also did the unwise thing below.
>
> mkdir ~/Sites/mediawiki/images/math
> mkdir ~/Sites/mediawiki/images/tmp
> $ chmod 777 ~/Sites/mediawiki/images/math
> $ chmod 777 ~/Sites/mediawiki/images/tmp
>
> Even with no security, when I attempt to include an equation on a page, I
> encounter the error below (while in preview)
>
> WARNING: wfMkdirParents: failed to mkdir "/~bpabbott/mediawiki/images/tmp"
> modes 511 in /Users/bpabbott/Sites/mediawiki/includes/GlobalFunctions.php
> on
> line 2324.
>
> The wfMakeParents function in my GlobalFunctions.php, is below.
>
> 2292 /**
> 2293  * Make directory, and make all parent directories if they don't exist
> 2294  *
> 2295  * @param $dir String: full path to directory to create
> 2296  * @param $mode Integer: chmod value to use, default is
> $wgDirectoryMode
> 2297  * @param $caller String: optional caller param for debugging.
> 2298  * @return bool
> 2299  */
> 2300 function wfMkdirParents( $dir, $mode = null, $caller = null ) {
> 2301   global $wgDirectoryMode;
> 2302
> 2303   if ( !is_null( $caller ) ) {
> 2304     wfDebug( "$caller: called wfMkdirParents($dir)" );
> 2305   }
> 2306
> 2307   if( strval( $dir ) ===  || file_exists( $dir ) ) {
> 2308     return true;
> 2309   }
> 2310
> 2311   $dir = str_replace( array( '\\', '/' ), DIRECTORY_SEPARATOR, $dir );
> 2312
> 2313   if ( is_null( $mode ) ) {
> 2314     $mode = $wgDirectoryMode;
> 2315   }
> 2316
> 2317   // Turn off the normal warning, we're doing our own below
> 2318   wfSuppressWarnings();
> 2319   $ok = mkdir( $dir, $mode, true ); // PHP5 <3
> 2320   wfRestoreWarnings();
> 2321
> 2322   if( !$ok ) {
> 2323     // PHP doesn't report the path in its warning message, so add our
> own to aid in diagnosis.
> 2324     trigger_error( __FUNCTION__ . ": failed to mkdir \"$dir\" mode
> $mode", E_USER_WARNING );
> 2325   }
> 2326   return $ok;
> 2327 }
>
> It appears that PHP is not able to make sense of "/~bpabbott" ... which
> Mediawiki interprets as "/Users/bpabbott/Sites" (?) ... I tried using an
> absolute path for $wgScriptPath, but that breaks the wiki.
>
> Any ideas?
>
>
>
> --
> View this message in context:
> http://wikimedia.7.n6.nabble.com/math-results-in-wfMkdirParents-failed-to-mkdir-tp4992898.html
> Sent from the English Wikipedia mailing list archive at Nabble.com.
>
> _______________________________________________
> WikiEN-l mailing list
> WikiEN-l@lists.wikimedia.org
> To unsubscribe from this mailing list, visit:
> https://lists.wikimedia.org/mailman/listinfo/wikien-l
>


-- 


Prof.Luca Motoc site:http://sites.google.com/site/lucamotoc/ (private)
Europeana bruxelles (EEB4) 4 EEB4 WEB. <http://www.eeb4.eu/>
P5ENa  Tom Wadsworth P5RO(SW) .Vlaicu Adriana
CONFIDENTIAL AND PRIVILEGED COMMUNICATION:  This communication and any
attachment to this communication is confidential, is intended solely for
the use of the individual or entity to which this communication is
addressed and is privileged and exempt from disclosure under applicable
law.  If you are not the intended recipient, you are strictly prohibited
from all dissemination, distribution, copying or use of this communication
or such attachment.  If you have received this communication or any
attachment to this communication in error, please immediately notify the
sender by email   and delete and destroy the communication or attachment
you have received and all copies thereof.  Receipt by an individual or
entity, through misdirection, error or mistake, or by wrongful
dissemination, work product or other legal or private privilege, and does
not invalidate the sender’s requirement and expectation of confidentiality
and privacy.

_______________________________________________
WikiEN-l mailing list
WikiEN-l@lists.wikimedia.org
To unsubscribe from this mailing list, visit:
https://lists.wikimedia.org/mailman/listinfo/wikien-l

Reply via email to