emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* First line of exported HTML causes error as .php
@ 2009-05-26 19:20 Dan Davison
  2009-05-26 20:46 ` Jonathan Arkell
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Davison @ 2009-05-26 19:20 UTC (permalink / raw)
  To: emacs org-mode mailing list

I think there's been a change in HTML export which has broken the way in
which I was using org to produce PHP files. The HTML exporter now
produces the following as the first line (I believe this is new).

<?xml version="1.0" encoding="iso-8859-1"?>

However, when the file is produced with a .php suffix

(setq org-export-html-extension "php")

and placed on a PHP-enabled web server, I get this error:

Parse error: syntax error, unexpected T_STRING in
/net/markov/export/postdocs/davison/pub_html/software/shellfish/shellfish.php
on line 1

It seems to work OK if I delete the first line. I know next to nothing
about these things and I'd appreciate it if someone could tell me
whether this should be viewed as a bug in org, or whether I am just
doing things the wrong way. (Is this how others produce PHP files in
org?)

Thanks,

Dan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: First line of exported HTML causes error as .php
  2009-05-26 19:20 First line of exported HTML causes error as .php Dan Davison
@ 2009-05-26 20:46 ` Jonathan Arkell
  2009-05-27  9:56   ` Sebastian Rose
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Arkell @ 2009-05-26 20:46 UTC (permalink / raw)
  To: Dan Davison, emacs org-mode mailing list

[-- Attachment #1: Type: text/plain, Size: 2124 bytes --]

IT is how PHP is configured on your server.  The easiest thing is to set the option short_open_tag to false (assuming you don't use the short <? ?> tag syntax, and use the proper <?php ?> syntax instead).  Check http://ca.php.net/manual/en/ini.core.php#ini.short-open-tag  for details.


-----Original Message-----
From: emacs-orgmode-bounces+jonathana=criticalmass.com@gnu.org [mailto:emacs-orgmode-bounces+jonathana=criticalmass.com@gnu.org] On Behalf Of Dan Davison
Sent: May 26, 2009 1:20 PM
To: emacs org-mode mailing list
Subject: [Orgmode] First line of exported HTML causes error as .php

I think there's been a change in HTML export which has broken the way in
which I was using org to produce PHP files. The HTML exporter now
produces the following as the first line (I believe this is new).

<?xml version="1.0" encoding="iso-8859-1"?>

However, when the file is produced with a .php suffix

(setq org-export-html-extension "php")

and placed on a PHP-enabled web server, I get this error:

Parse error: syntax error, unexpected T_STRING in
/net/markov/export/postdocs/davison/pub_html/software/shellfish/shellfish.php
on line 1

It seems to work OK if I delete the first line. I know next to nothing
about these things and I'd appreciate it if someone could tell me
whether this should be viewed as a bug in org, or whether I am just
doing things the wrong way. (Is this how others produce PHP files in
org?)

Thanks,

Dan


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

The information contained in this message is confidential. It is intended to be read only by the individual or entity named above or their designee. If the reader of this message is not the intended recipient, you are hereby notified that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message.

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: First line of exported HTML causes error as .php
  2009-05-26 20:46 ` Jonathan Arkell
@ 2009-05-27  9:56   ` Sebastian Rose
  2009-05-27 19:18     ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Rose @ 2009-05-27  9:56 UTC (permalink / raw)
  To: Jonathan Arkell; +Cc: Dan Davison, emacs org-mode mailing list


Carsten implemented the new publishing option

   `:xml-declaration'

for use in your `org-publish-project-alist'.


You could change that one too:


(setq org-publish-project-alist
  '(("org"
    :xml-declaration "<?php echo '<?xml version=\"1.0\" encoding=\"%s\" ?>'; ?>"
    ...


  Sebastian 






Jonathan Arkell <jonathana@criticalmass.com> writes:
> IT is how PHP is configured on your server.  The easiest thing is to set the
> option short_open_tag to false (assuming you don't use the short <? ?> tag
> syntax, and use the proper <?php ?> syntax instead).  Check
> http://ca.php.net/manual/en/ini.core.php#ini.short-open-tag for details.
>
>
> -----Original Message----- From:
> emacs-orgmode-bounces+jonathana=criticalmass.com@gnu.org
> [mailto:emacs-orgmode-bounces+jonathana=criticalmass.com@gnu.org] On Behalf Of
> Dan Davison Sent: May 26, 2009 1:20 PM To: emacs org-mode mailing list Subject:
> [Orgmode] First line of exported HTML causes error as .php
>
> I think there's been a change in HTML export which has broken the way in which I
> was using org to produce PHP files. The HTML exporter now produces the following
> as the first line (I believe this is new).
>
> <?xml version="1.0" encoding="iso-8859-1"?>
>
> However, when the file is produced with a .php suffix
>
> (setq org-export-html-extension "php")
>
> and placed on a PHP-enabled web server, I get this error:
>
> Parse error: syntax error, unexpected T_STRING in
> /net/markov/export/postdocs/davison/pub_html/software/shellfish/shellfish.php on
> line 1
>
> It seems to work OK if I delete the first line. I know next to nothing about
> these things and I'd appreciate it if someone could tell me whether this should
> be viewed as a bug in org, or whether I am just doing things the wrong way. (Is
> this how others produce PHP files in org?)
>
> Thanks,
>
> Dan
>
>
> _______________________________________________ Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.  Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> The information contained in this message is confidential. It is intended to be
> read only by the individual or entity named above or their designee. If the
> reader of this message is not the intended recipient, you are hereby notified
> that any distribution of this message, in any form, is strictly prohibited. If
> you have received this message in error, please immediately notify the sender
> and delete or destroy any copy of this message.
> _______________________________________________ Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.  Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http:  www.emma-stil.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: First line of exported HTML causes error as .php
  2009-05-27  9:56   ` Sebastian Rose
@ 2009-05-27 19:18     ` Carsten Dominik
  0 siblings, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2009-05-27 19:18 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: Dan Davison, emacs org-mode mailing list


On May 27, 2009, at 11:56 AM, Sebastian Rose wrote:

>
> Carsten implemented the new publishing option
>
>  `:xml-declaration'
>
> for use in your `org-publish-project-alist'.
>
>
> You could change that one too:
>
>
> (setq org-publish-project-alist
> '(("org"
>   :xml-declaration "<?php echo '<?xml version=\"1.0\" encoding=\"%s 
> \" ?>'; ?>"
>   ...

I have now also pushed an update that wil handle the php case
correctly automatically.  The customization Sebastian describes
above remains available.

- Carsten

>
>
> Sebastian
>
>
>
>
>
>
> Jonathan Arkell <jonathana@criticalmass.com> writes:
>> IT is how PHP is configured on your server.  The easiest thing is  
>> to set the
>> option short_open_tag to false (assuming you don't use the short  
>> <? ?> tag
>> syntax, and use the proper <?php ?> syntax instead).  Check
>> http://ca.php.net/manual/en/ini.core.php#ini.short-open-tag for  
>> details.
>>
>>
>> -----Original Message----- From:
>> emacs-orgmode-bounces+jonathana=criticalmass.com@gnu.org
>> [mailto:emacs-orgmode-bounces+jonathana=criticalmass.com@gnu.org]  
>> On Behalf Of
>> Dan Davison Sent: May 26, 2009 1:20 PM To: emacs org-mode mailing  
>> list Subject:
>> [Orgmode] First line of exported HTML causes error as .php
>>
>> I think there's been a change in HTML export which has broken the  
>> way in which I
>> was using org to produce PHP files. The HTML exporter now produces  
>> the following
>> as the first line (I believe this is new).
>>
>> <?xml version="1.0" encoding="iso-8859-1"?>
>>
>> However, when the file is produced with a .php suffix
>>
>> (setq org-export-html-extension "php")
>>
>> and placed on a PHP-enabled web server, I get this error:
>>
>> Parse error: syntax error, unexpected T_STRING in
>> /net/markov/export/postdocs/davison/pub_html/software/shellfish/ 
>> shellfish.php on
>> line 1
>>
>> It seems to work OK if I delete the first line. I know next to  
>> nothing about
>> these things and I'd appreciate it if someone could tell me whether  
>> this should
>> be viewed as a bug in org, or whether I am just doing things the  
>> wrong way. (Is
>> this how others produce PHP files in org?)
>>
>> Thanks,
>>
>> Dan
>>
>>
>> _______________________________________________ Emacs-orgmode  
>> mailing list
>> Remember: use `Reply All' to send replies to the list.  Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> The information contained in this message is confidential. It is  
>> intended to be
>> read only by the individual or entity named above or their  
>> designee. If the
>> reader of this message is not the intended recipient, you are  
>> hereby notified
>> that any distribution of this message, in any form, is strictly  
>> prohibited. If
>> you have received this message in error, please immediately notify  
>> the sender
>> and delete or destroy any copy of this message.
>> _______________________________________________ Emacs-orgmode  
>> mailing list
>> Remember: use `Reply All' to send replies to the list.  Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> -- 
> Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449  
> Hannover
> Tel.:  +49 (0)511 - 36 58 472
> Fax:   +49 (0)1805 - 233633 - 11044
> mobil: +49 (0)173 - 83 93 417
> Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
> Http:  www.emma-stil.de
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-27 19:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-26 19:20 First line of exported HTML causes error as .php Dan Davison
2009-05-26 20:46 ` Jonathan Arkell
2009-05-27  9:56   ` Sebastian Rose
2009-05-27 19:18     ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).