Last modified: 2004-12-05 20:57:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T2757, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 757 - installation failed because temp directory for the XHTML template not detected
installation failed because temp directory for the XHTML template not detected
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
unspecified
Other Linux
: Low critical (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-21 21:00 UTC by Oliver Rode
Modified: 2004-12-05 20:57 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Oliver Rode 2004-10-21 21:00:53 UTC
The check at line 87 in wiki/PHPTAL-NP-0.7.0/libs/PHPTAL.php 
failed. (See copy below ...)

Further The error was not visible as error. Please make fatal 
errors to appear red; separated from normal output/warnings; and 
with Keyword Error: or Fatal: at the beginning of the message. 

Work-around: commenting it out.

--- snapshot ---
 if( !is_writable (PHPTAL_DEFAULT_CACHE_DIR) )
  die( htmlspecialchars(
      'Can\'t find a writable temp directory for the XHTML 
template. ' .
      'Check that the TMP environment variable points to a 
writable directory, ' .
      'or that the default temp dir (' . $default_temp . ') 
exists and is writable.' ) );
Comment 1 Brion Vibber 2004-10-21 21:17:20 UTC
Can you explain in a bit more detail what you mean?

a) "The error was not visible as error" means it wasn't bright red and didn't have the word "error" next to it, or that nothing displayed at all?

b) Does "The check failed" mean that it correctly determined the situation (no writable temp dir) or that the check returned an incorrect result (you 
have a writable temp dir, but it thinks you do not)?

c) "Work-around: commenting it out" produces what results? Does the wiki work? Where is the compiled template being stored?
Comment 2 JeLuF 2004-10-21 21:25:23 UTC
PHPTAL not working is not fatal. Just set $wgUsePHPTal = false; and wiki will
work fine.
Comment 3 Oliver Rode 2004-10-21 21:57:23 UTC
Answers:

a) I did't detect this message as seperate message. it was messed up with 
other messages that have been printed before it.

b) Yes, I checked that there is a writeable /tmp  
# ls -ld /tmp
drwxrwxrwt    2 root     root         4096 Oct 21 21:42 /tmp

Hmm, dunno why the t flag is set ?! Shouldn't be the problem
Ok. I removed the falg and tested again:

Output:

Script URI path: /wiki Warning: $wgProxyKey is insecure  Can't find a 
writable temp directory for the XHTML template. Check that the TMP 
environment variable points to a writable directory, or that the default 
temp dir (/tmp) exists and is writable. Please notice: As you can see 
below, I have some problems with 'safe_mode', turning it off in 
my /etc/php.ini seems not to work for some reason ?!

Comment: I added some output here to see what values have been applied:
TMP = /tmp
$default_temp = /tmp
PHPTAL_DEFAULT_CACHE_DIR = /tmp/

c) This is a hard one. 
   It created me my  LocalSettings.php
   I can't find any template. /tmp is empty.


---

   Wiki does not work: http// ... /wiki/index.php/Hauptseite
   returns:

[pear_error: message="failed to open stream: Operation not permitted" 
code=0 mode=return level=notice prefix="" info=""] 



--- More information about the check at install: ---

Checking environment...

Warning: set_time_limit(): Cannot set time limit in safe mode 
in /home/www/web2/html/ww/wiki/install-utils.inc on line 27

PHP 4.3.5: ok 
Warning: PHP's safe mode is active! You will likely have problems caused 
by this. You may need to make the 'images' subdirectory writable or 
specify a TMP environment variable pointing to a writable temporary 
directory owned by you, since safe mode breaks the system temporary 
directory. 
PHP server API is apache; ok, using pretty URLs (index.php/Page_Title) 
Have XML / Latin1-UTF-8 conversion support. 
PHP's memory_limit is 30M. If this is too low, installation may fail! 
Have zlib support; enabling output compression. 
Found GD graphics library built-in, image thumbnailing will be enabled if 
you enable uploads. 
Installation directory: /home/www/web2/html/ww/wiki 
Script URI path: /wiki 

--- Output from my install with work-around:
MySQL error 1045: Access denied for user: 'root@localhost' (Using 
password: NO)
Trying regular user... ok. 
Connected to database... 4.0.18-standard-log; enabling MySQL 4 
enhancementsWarning: $wgProxyKey is insecure 
Database usr_web2_1 exists 
There are already MediaWiki tables in this database. Checking if updates 
are needed... 
...ipblocks is up to date.
...already have interwiki table
...indexes seem up to 20031107 standards
...have linkscc table.
...linkscc is up to date, or does not exist. Good.
...have hitcounter table.
Converting links table to ID-ID...
Schema already converted
...have user_real_name field in user table.
...have special page querycache table.
...have objectcache table.
...have categorylinks table.
Creating redirects

Moving pages...

Converting text...
Initialising "MediaWiki" namespace...
Clearing message cache...Done.
Finished update checks. 
Creating LocalSettings.php...

Success! Move the LocalSettings.php file into the parent directory, then 
follow this link to your wiki.
Comment 4 Oliver Rode 2004-10-21 22:16:20 UTC
Thx JeLuF ! 

I deactivated it as you described it. I had to add the line

$wgUsePHPTal = false

at the end of my "LocalSettings.php" just bevor the last line "?>"

Now it works.
Comment 5 Brion Vibber 2004-10-21 22:52:58 UTC
(In reply to comment #3)
> a) I did't detect this message as seperate message. it was messed up with 
> other messages that have been printed before it.

So it did display.

> b) Yes, I checked that there is a writeable /tmp  

Being writable to the operating system doesn't help if PHP is running in "safe mode". Did you confirm that PHP can write to /tmp?

> # ls -ld /tmp
> drwxrwxrwt    2 root     root         4096 Oct 21 21:42 /tmp
> 
> Hmm, dunno why the t flag is set ?! Shouldn't be the problem
> Ok. I removed the falg and tested again:

The t ("sticky") bit is what prevents other users from deleting files you put in /tmp, and it's normal.

> As you can see 
> below, I have some problems with 'safe_mode', turning it off in 
> my /etc/php.ini seems not to work for some reason ?!

Does it continue to run in safe mode, or does it do something else? Are there error messages? Have you restarted apache since editing /etc/php.ini? 
Try fully shutting down Apache and restarting it. Have you confirmed that /etc/php.ini is the correct php.ini file, and that it's not being overridden by 
some other php.ini? Run the phpinfo() function and make sure it's listing the expected config file.

>    Wiki does not work: http// ... /wiki/index.php/Hauptseite
>    returns:
> 
> [pear_error: message="failed to open stream: Operation not permitted" 
> code=0 mode=return level=notice prefix="" info=""] 

Ok, that's expected if it fails to find a writable temp dir. It will try to fall back to the 'images' subdirectory if /tmp isn't available; try making this 
writable and if running in safe mode ensure that it is owned by the same user as index.php is.
Comment 6 Brion Vibber 2004-12-05 20:57:11 UTC
1.4 eliminates this mess, without need to write a compiled template file.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links