Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

"HTML preview not available"

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


rickard.andersson at gmail

Nov 19, 2006, 4:24 PM

Post #1 of 3 (3643 views)
Permalink
"HTML preview not available"

It appears my PHPHighlighter won't work and I have no idea why. Here's
the DEBUG output from the log:

2006-11-20 00:01:12,473 Trac[browser] DEBUG: Rendering preview of node
post.php [at] 15 with mime-type text/x-php; charset=iso-8859-15
2006-11-20 00:01:12,474 Trac[api] DEBUG: Trying to render HTML preview
using PHPRenderer
2006-11-20 00:01:12,477 Trac[php] DEBUG: PHP command line: php -sn
2006-11-20 00:01:12,492 Trac[api] WARNING: HTML preview using
<trac.mimeview.php.PHPRenderer object at 0x846086c> failed (Running
(php -sn) failed: 127, php: not found
.)
Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/trac/mimeview/api.py",
line 456, in render
return Markup(self._annotate(result, annotations))
File "/usr/local/lib/python2.4/site-packages/trac/mimeview/api.py",
line 490, in _annotate
for num, line in enumerate(_html_splitlines(lines)):
File "/usr/local/lib/python2.4/site-packages/trac/mimeview/api.py",
line 620, in _html_splitlines
for line in lines:
File "/usr/local/lib/python2.4/site-packages/trac/mimeview/php.py",
line 89, in render
raise Exception, err
Exception: Running (php -sn) failed: 127, php: not found
.
2006-11-20 00:01:12,495 Trac[api] DEBUG: Trying to render HTML preview
using SilverCityRenderer
2006-11-20 00:01:12,511 Trac[api] DEBUG: Trying to render HTML preview
using PlainTextRenderer
2006-11-20 00:01:12,511 Trac[api] DEBUG: Using default plain text
mimeviewer


I can run PHP from the command line without any problems.

Cheers,
Rickard


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


robertjhunter at gmail

Nov 22, 2006, 3:36 AM

Post #2 of 3 (3546 views)
Permalink
Re: "HTML preview not available" [In reply to]

Rickard wrote:
> It appears my PHPHighlighter won't work and I have no idea why. Here's
> the DEBUG output from the log:
>
> 2006-11-20 00:01:12,477 Trac[php] DEBUG: PHP command line: php -sn
> 2006-11-20 00:01:12,492 Trac[api] WARNING: HTML preview using
> <trac.mimeview.php.PHPRenderer object at 0x846086c> failed (Running
> (php -sn) failed: 127, php: not found
>
> I can run PHP from the command line without any problems.

Where is your PHP binary? For Trac to find it by default, it needs to
be in the PATH that Trac can see. If you're running Trac through
Apache, that means the PATH environment variable as set when Apache is
launched, not your shell user's PATH.

If it is somewhere weird, you'll either need to add the location to
Apache's PATH or configure Trac to run it from a specific location
using the 'php_path' setting in 'trac.ini'. For details, see the FAQ
item about overriding PHP's location:
http://trac.edgewall.org/wiki/TracFaq#why-do-my-php-pages-show-up-blank-in-the-browser

--
Rob Hunter


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


rickard.andersson at gmail

Nov 22, 2006, 4:36 AM

Post #3 of 3 (3539 views)
Permalink
Re: "HTML preview not available" [In reply to]

Rob Hunter wrote:
> Where is your PHP binary? For Trac to find it by default, it needs to
> be in the PATH that Trac can see. If you're running Trac through
> Apache, that means the PATH environment variable as set when Apache is
> launched, not your shell user's PATH.
>
> If it is somewhere weird, you'll either need to add the location to
> Apache's PATH or configure Trac to run it from a specific location
> using the 'php_path' setting in 'trac.ini'. For details, see the FAQ
> item about overriding PHP's location:
> http://trac.edgewall.org/wiki/TracFaq#why-do-my-php-pages-show-up-blank-in-the-browser

Thanks a lot Rob. That did the trick!

Cheers,
Rickard


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.