How to stop Joomla 2.5 from disabling PHPHow to edit user activation mail body in Joomla 2.5?Sublime Text 3: Joomla coding standard (PHP Code Sniffer) is not executedRun custom php script in Joomla siteHow to implement this php code?Transform PHP SQL to Joomla SQL queryUpgraded from 2.5 to 3.5 : Joomla.JMultiSelect, Class is not definedAdding a stand alone php (with sql queries built using mysql phpgenerator) to existing Joomla applicationResults of gdb on core dump from Joomla Installation - meaning?How to manage sessions between Joomla and external PHP applications?Joomla registration emails and PHP mail() taking hours to deliver

Why am I getting a strange double quote (“) in Open Office instead of the ordinary one (")?

What is the color of artificial intelligence?

Increase speed altering column on large table to NON NULL

Do people with slow metabolism tend to gain weight (fat) if they stop exercising?

Non-aqueous eyes?

Do you have to have figures when playing D&D?

Who voices the small round football sized demon In Good Omens

Fermat's statement about the ancients: How serious was he?

Does putting salt first make it easier for attacker to bruteforce the hash?

Can I utilise a baking stone to make crepes?

Proving that a Russian cryptographic standard is too structured

Does the new finding on "reversing a quantum jump mid-flight" rule out any interpretations of QM?

Section numbering in binary

How to avoid typing 'git' at the begining of every Git command

Why was this person allowed to become Grand Maester?

How do i export activities related to an account with a specific recordtype?

Electricity free spaceship

Teaching a class likely meant to inflate the GPA of student athletes

What STL algorithm can determine if exactly one item in a container satisfies a predicate?

Who won a Game of Bar Dice?

A word that means "blending into a community too much"

Is using 'echo' to display attacker-controlled data on the terminal dangerous?

Sql Server delete syntax

Why Does Mama Coco Look Old After Going to the Other World?



How to stop Joomla 2.5 from disabling PHP


How to edit user activation mail body in Joomla 2.5?Sublime Text 3: Joomla coding standard (PHP Code Sniffer) is not executedRun custom php script in Joomla siteHow to implement this php code?Transform PHP SQL to Joomla SQL queryUpgraded from 2.5 to 3.5 : Joomla.JMultiSelect, Class is not definedAdding a stand alone php (with sql queries built using mysql phpgenerator) to existing Joomla applicationResults of gdb on core dump from Joomla Installation - meaning?How to manage sessions between Joomla and external PHP applications?Joomla registration emails and PHP mail() taking hours to deliver













2















I need to stop Joomla from converting PHP code to a comment (or otherwise disabling it).



I copied a working page with a basic [directory listing] function, and the duplicate wouldn't work.



I am nearly positive Joomla is "intelligently" modifying the PHP to disable it--how can I stop this?



X/Y Problem:
A working extension to list directory contents would sidestep this issue, because that's really what I need--though I'd prefer to also learn what I'm doing wrong.



TL;DR



I periodically provide updates for a site (Joomla 2.5) I neither own nor host. I've recommended we update or rebuild it, so far a non-option.



I don't really know much PHP. However the below code polls a given directory and links the files. The customer has backend access and can quickly distribute information via this page, uploading PDF files as required and removing the obsolete ones. Simple for the customer and works great.



Yesterday she requested a new page for a different category of information.



I created a separate directory for the new page (Turnover) and updated the copied code to reflect this. The original page (Output) worked fine, but the duplicate page was blank except for title. I took a step back but not even the unmodified copy would work on the new page--though it still worked on the old.



Before realizing the PHP was not even being executed, I verified that



  1. The articles are identical except by title and index number

  2. Permissions on the new directory match the original AFAICT

  3. It's not file, filename, or size (new file immediately worked in the old directory)

  4. Also created a second duplicate page to rule out human error

Since one page works and another doesn't, it's clearly not an incompatibility between Joomla and PHP versions, and most likely not a server misconfiguration.



The page source on the broken page show the PHP as a comment; the working page served working links:



file1
file2
file3


After extended troubleshooting, I altered only the title of the original page--and it subsequently failed. I now have two pages that won't work, meaning the customer will need to upload files and then wait until I can log in and manually create individual links. Then she'll wait again when I remove old ones.



I don't have shell access, nor to backups, if they even exist. I learned last night that Joomla lacks a revision history. I normally use Wordpress, and this hasn't convinced me to switch. :,/



I suspect the issue is with Joomla and not the code itself. Code examples I've seen begin with <?php (and not <!--?php), but my assumption that this is the sole issue could be wrong. When I manually remove those three characters, the code is simply converted to text as part of the page.



The code below is exactly how I first saw it in the HTML editor (without the HTML editor I don't even see the PHP at all). Joomla adds the paragraph tags automatically and converts <b> tags to <strong>.
(I checked page source of both pages before and after I broke the original page).





<p><strong>Output</strong></p>
<!--?php
//path to directory to scan
$directory = "images/download/output/";
$files = glob($directory . "*.pdf");
array_multisort(array_map( 'filemtime', $files ),SORT_NUMERIC,SORT_DESC,$files);

//print each file name
foreach($files as $f)
$path_parts = pathinfo($f);
echo '&lt;p&gt;&lt;a href="'.$f.'"&gt;'.$path_parts['filename'].'&lt;/a&gt;&lt;/p&gt;';

?-->
<p> </p>


(thanks to the mod who migrated for me--I should've checked to see if there was a Joomla stack)



With a busy weekend already underway, fixing this is pretty important--thanks for any help/advice offered. I figured this should take fifteen or twenty minutes--but I've burned hours on it.










share|improve this question















migrated from serverfault.com May 25 at 22:03


This question came from our site for system and network administrators.













  • 1





    I can't accept my own answer yet, but I plan to (can't for two days). I didn't realize there's an editor choice in the Joomla UI.

    – zedmelon
    May 25 at 22:19






  • 1





    Good comprehensive posts @zedmelon I love to see question which show exhaustive investigation and toil (I wish all posted questions were this way). Please continue to post your Joomla questions in this community. Please take the tour.

    – mickmackusa
    May 25 at 22:56












  • Yes, great to see such an exhaustive and well documented question.

    – Neil Robertson
    May 27 at 0:16











  • Thank you gentlemen. It's nice when my tendency to talk (way) too much actually proves useful :,)

    – zedmelon
    May 27 at 18:21











  • On a more serious note, I do try to (a) fix stuff on my own (b) research before requesting help, and (c) remember that others are helping me out of benevolence, and making it easier for them not only (1) gets it done sooner, but (2) is respectful, which is non-negotiable.

    – zedmelon
    May 27 at 18:38
















2















I need to stop Joomla from converting PHP code to a comment (or otherwise disabling it).



I copied a working page with a basic [directory listing] function, and the duplicate wouldn't work.



I am nearly positive Joomla is "intelligently" modifying the PHP to disable it--how can I stop this?



X/Y Problem:
A working extension to list directory contents would sidestep this issue, because that's really what I need--though I'd prefer to also learn what I'm doing wrong.



TL;DR



I periodically provide updates for a site (Joomla 2.5) I neither own nor host. I've recommended we update or rebuild it, so far a non-option.



I don't really know much PHP. However the below code polls a given directory and links the files. The customer has backend access and can quickly distribute information via this page, uploading PDF files as required and removing the obsolete ones. Simple for the customer and works great.



Yesterday she requested a new page for a different category of information.



I created a separate directory for the new page (Turnover) and updated the copied code to reflect this. The original page (Output) worked fine, but the duplicate page was blank except for title. I took a step back but not even the unmodified copy would work on the new page--though it still worked on the old.



Before realizing the PHP was not even being executed, I verified that



  1. The articles are identical except by title and index number

  2. Permissions on the new directory match the original AFAICT

  3. It's not file, filename, or size (new file immediately worked in the old directory)

  4. Also created a second duplicate page to rule out human error

Since one page works and another doesn't, it's clearly not an incompatibility between Joomla and PHP versions, and most likely not a server misconfiguration.



The page source on the broken page show the PHP as a comment; the working page served working links:



file1
file2
file3


After extended troubleshooting, I altered only the title of the original page--and it subsequently failed. I now have two pages that won't work, meaning the customer will need to upload files and then wait until I can log in and manually create individual links. Then she'll wait again when I remove old ones.



I don't have shell access, nor to backups, if they even exist. I learned last night that Joomla lacks a revision history. I normally use Wordpress, and this hasn't convinced me to switch. :,/



I suspect the issue is with Joomla and not the code itself. Code examples I've seen begin with <?php (and not <!--?php), but my assumption that this is the sole issue could be wrong. When I manually remove those three characters, the code is simply converted to text as part of the page.



The code below is exactly how I first saw it in the HTML editor (without the HTML editor I don't even see the PHP at all). Joomla adds the paragraph tags automatically and converts <b> tags to <strong>.
(I checked page source of both pages before and after I broke the original page).





<p><strong>Output</strong></p>
<!--?php
//path to directory to scan
$directory = "images/download/output/";
$files = glob($directory . "*.pdf");
array_multisort(array_map( 'filemtime', $files ),SORT_NUMERIC,SORT_DESC,$files);

//print each file name
foreach($files as $f)
$path_parts = pathinfo($f);
echo '&lt;p&gt;&lt;a href="'.$f.'"&gt;'.$path_parts['filename'].'&lt;/a&gt;&lt;/p&gt;';

?-->
<p> </p>


(thanks to the mod who migrated for me--I should've checked to see if there was a Joomla stack)



With a busy weekend already underway, fixing this is pretty important--thanks for any help/advice offered. I figured this should take fifteen or twenty minutes--but I've burned hours on it.










share|improve this question















migrated from serverfault.com May 25 at 22:03


This question came from our site for system and network administrators.













  • 1





    I can't accept my own answer yet, but I plan to (can't for two days). I didn't realize there's an editor choice in the Joomla UI.

    – zedmelon
    May 25 at 22:19






  • 1





    Good comprehensive posts @zedmelon I love to see question which show exhaustive investigation and toil (I wish all posted questions were this way). Please continue to post your Joomla questions in this community. Please take the tour.

    – mickmackusa
    May 25 at 22:56












  • Yes, great to see such an exhaustive and well documented question.

    – Neil Robertson
    May 27 at 0:16











  • Thank you gentlemen. It's nice when my tendency to talk (way) too much actually proves useful :,)

    – zedmelon
    May 27 at 18:21











  • On a more serious note, I do try to (a) fix stuff on my own (b) research before requesting help, and (c) remember that others are helping me out of benevolence, and making it easier for them not only (1) gets it done sooner, but (2) is respectful, which is non-negotiable.

    – zedmelon
    May 27 at 18:38














2












2








2








I need to stop Joomla from converting PHP code to a comment (or otherwise disabling it).



I copied a working page with a basic [directory listing] function, and the duplicate wouldn't work.



I am nearly positive Joomla is "intelligently" modifying the PHP to disable it--how can I stop this?



X/Y Problem:
A working extension to list directory contents would sidestep this issue, because that's really what I need--though I'd prefer to also learn what I'm doing wrong.



TL;DR



I periodically provide updates for a site (Joomla 2.5) I neither own nor host. I've recommended we update or rebuild it, so far a non-option.



I don't really know much PHP. However the below code polls a given directory and links the files. The customer has backend access and can quickly distribute information via this page, uploading PDF files as required and removing the obsolete ones. Simple for the customer and works great.



Yesterday she requested a new page for a different category of information.



I created a separate directory for the new page (Turnover) and updated the copied code to reflect this. The original page (Output) worked fine, but the duplicate page was blank except for title. I took a step back but not even the unmodified copy would work on the new page--though it still worked on the old.



Before realizing the PHP was not even being executed, I verified that



  1. The articles are identical except by title and index number

  2. Permissions on the new directory match the original AFAICT

  3. It's not file, filename, or size (new file immediately worked in the old directory)

  4. Also created a second duplicate page to rule out human error

Since one page works and another doesn't, it's clearly not an incompatibility between Joomla and PHP versions, and most likely not a server misconfiguration.



The page source on the broken page show the PHP as a comment; the working page served working links:



file1
file2
file3


After extended troubleshooting, I altered only the title of the original page--and it subsequently failed. I now have two pages that won't work, meaning the customer will need to upload files and then wait until I can log in and manually create individual links. Then she'll wait again when I remove old ones.



I don't have shell access, nor to backups, if they even exist. I learned last night that Joomla lacks a revision history. I normally use Wordpress, and this hasn't convinced me to switch. :,/



I suspect the issue is with Joomla and not the code itself. Code examples I've seen begin with <?php (and not <!--?php), but my assumption that this is the sole issue could be wrong. When I manually remove those three characters, the code is simply converted to text as part of the page.



The code below is exactly how I first saw it in the HTML editor (without the HTML editor I don't even see the PHP at all). Joomla adds the paragraph tags automatically and converts <b> tags to <strong>.
(I checked page source of both pages before and after I broke the original page).





<p><strong>Output</strong></p>
<!--?php
//path to directory to scan
$directory = "images/download/output/";
$files = glob($directory . "*.pdf");
array_multisort(array_map( 'filemtime', $files ),SORT_NUMERIC,SORT_DESC,$files);

//print each file name
foreach($files as $f)
$path_parts = pathinfo($f);
echo '&lt;p&gt;&lt;a href="'.$f.'"&gt;'.$path_parts['filename'].'&lt;/a&gt;&lt;/p&gt;';

?-->
<p> </p>


(thanks to the mod who migrated for me--I should've checked to see if there was a Joomla stack)



With a busy weekend already underway, fixing this is pretty important--thanks for any help/advice offered. I figured this should take fifteen or twenty minutes--but I've burned hours on it.










share|improve this question
















I need to stop Joomla from converting PHP code to a comment (or otherwise disabling it).



I copied a working page with a basic [directory listing] function, and the duplicate wouldn't work.



I am nearly positive Joomla is "intelligently" modifying the PHP to disable it--how can I stop this?



X/Y Problem:
A working extension to list directory contents would sidestep this issue, because that's really what I need--though I'd prefer to also learn what I'm doing wrong.



TL;DR



I periodically provide updates for a site (Joomla 2.5) I neither own nor host. I've recommended we update or rebuild it, so far a non-option.



I don't really know much PHP. However the below code polls a given directory and links the files. The customer has backend access and can quickly distribute information via this page, uploading PDF files as required and removing the obsolete ones. Simple for the customer and works great.



Yesterday she requested a new page for a different category of information.



I created a separate directory for the new page (Turnover) and updated the copied code to reflect this. The original page (Output) worked fine, but the duplicate page was blank except for title. I took a step back but not even the unmodified copy would work on the new page--though it still worked on the old.



Before realizing the PHP was not even being executed, I verified that



  1. The articles are identical except by title and index number

  2. Permissions on the new directory match the original AFAICT

  3. It's not file, filename, or size (new file immediately worked in the old directory)

  4. Also created a second duplicate page to rule out human error

Since one page works and another doesn't, it's clearly not an incompatibility between Joomla and PHP versions, and most likely not a server misconfiguration.



The page source on the broken page show the PHP as a comment; the working page served working links:



file1
file2
file3


After extended troubleshooting, I altered only the title of the original page--and it subsequently failed. I now have two pages that won't work, meaning the customer will need to upload files and then wait until I can log in and manually create individual links. Then she'll wait again when I remove old ones.



I don't have shell access, nor to backups, if they even exist. I learned last night that Joomla lacks a revision history. I normally use Wordpress, and this hasn't convinced me to switch. :,/



I suspect the issue is with Joomla and not the code itself. Code examples I've seen begin with <?php (and not <!--?php), but my assumption that this is the sole issue could be wrong. When I manually remove those three characters, the code is simply converted to text as part of the page.



The code below is exactly how I first saw it in the HTML editor (without the HTML editor I don't even see the PHP at all). Joomla adds the paragraph tags automatically and converts <b> tags to <strong>.
(I checked page source of both pages before and after I broke the original page).





<p><strong>Output</strong></p>
<!--?php
//path to directory to scan
$directory = "images/download/output/";
$files = glob($directory . "*.pdf");
array_multisort(array_map( 'filemtime', $files ),SORT_NUMERIC,SORT_DESC,$files);

//print each file name
foreach($files as $f)
$path_parts = pathinfo($f);
echo '&lt;p&gt;&lt;a href="'.$f.'"&gt;'.$path_parts['filename'].'&lt;/a&gt;&lt;/p&gt;';

?-->
<p> </p>


(thanks to the mod who migrated for me--I should've checked to see if there was a Joomla stack)



With a busy weekend already underway, fixing this is pretty important--thanks for any help/advice offered. I figured this should take fifteen or twenty minutes--but I've burned hours on it.







php joomla-2.5 editor






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 28 at 13:58







zedmelon

















asked May 25 at 21:04









zedmelonzedmelon

418




418




migrated from serverfault.com May 25 at 22:03


This question came from our site for system and network administrators.









migrated from serverfault.com May 25 at 22:03


This question came from our site for system and network administrators.









  • 1





    I can't accept my own answer yet, but I plan to (can't for two days). I didn't realize there's an editor choice in the Joomla UI.

    – zedmelon
    May 25 at 22:19






  • 1





    Good comprehensive posts @zedmelon I love to see question which show exhaustive investigation and toil (I wish all posted questions were this way). Please continue to post your Joomla questions in this community. Please take the tour.

    – mickmackusa
    May 25 at 22:56












  • Yes, great to see such an exhaustive and well documented question.

    – Neil Robertson
    May 27 at 0:16











  • Thank you gentlemen. It's nice when my tendency to talk (way) too much actually proves useful :,)

    – zedmelon
    May 27 at 18:21











  • On a more serious note, I do try to (a) fix stuff on my own (b) research before requesting help, and (c) remember that others are helping me out of benevolence, and making it easier for them not only (1) gets it done sooner, but (2) is respectful, which is non-negotiable.

    – zedmelon
    May 27 at 18:38













  • 1





    I can't accept my own answer yet, but I plan to (can't for two days). I didn't realize there's an editor choice in the Joomla UI.

    – zedmelon
    May 25 at 22:19






  • 1





    Good comprehensive posts @zedmelon I love to see question which show exhaustive investigation and toil (I wish all posted questions were this way). Please continue to post your Joomla questions in this community. Please take the tour.

    – mickmackusa
    May 25 at 22:56












  • Yes, great to see such an exhaustive and well documented question.

    – Neil Robertson
    May 27 at 0:16











  • Thank you gentlemen. It's nice when my tendency to talk (way) too much actually proves useful :,)

    – zedmelon
    May 27 at 18:21











  • On a more serious note, I do try to (a) fix stuff on my own (b) research before requesting help, and (c) remember that others are helping me out of benevolence, and making it easier for them not only (1) gets it done sooner, but (2) is respectful, which is non-negotiable.

    – zedmelon
    May 27 at 18:38








1




1





I can't accept my own answer yet, but I plan to (can't for two days). I didn't realize there's an editor choice in the Joomla UI.

– zedmelon
May 25 at 22:19





I can't accept my own answer yet, but I plan to (can't for two days). I didn't realize there's an editor choice in the Joomla UI.

– zedmelon
May 25 at 22:19




1




1





Good comprehensive posts @zedmelon I love to see question which show exhaustive investigation and toil (I wish all posted questions were this way). Please continue to post your Joomla questions in this community. Please take the tour.

– mickmackusa
May 25 at 22:56






Good comprehensive posts @zedmelon I love to see question which show exhaustive investigation and toil (I wish all posted questions were this way). Please continue to post your Joomla questions in this community. Please take the tour.

– mickmackusa
May 25 at 22:56














Yes, great to see such an exhaustive and well documented question.

– Neil Robertson
May 27 at 0:16





Yes, great to see such an exhaustive and well documented question.

– Neil Robertson
May 27 at 0:16













Thank you gentlemen. It's nice when my tendency to talk (way) too much actually proves useful :,)

– zedmelon
May 27 at 18:21





Thank you gentlemen. It's nice when my tendency to talk (way) too much actually proves useful :,)

– zedmelon
May 27 at 18:21













On a more serious note, I do try to (a) fix stuff on my own (b) research before requesting help, and (c) remember that others are helping me out of benevolence, and making it easier for them not only (1) gets it done sooner, but (2) is respectful, which is non-negotiable.

– zedmelon
May 27 at 18:38






On a more serious note, I do try to (a) fix stuff on my own (b) research before requesting help, and (c) remember that others are helping me out of benevolence, and making it easier for them not only (1) gets it done sooner, but (2) is respectful, which is non-negotiable.

– zedmelon
May 27 at 18:38











2 Answers
2






active

oldest

votes


















3














FIXED:
The culprit was a personal editor choice set in the user profile section.



Screenshot: User Profile Editor Settings



I changed this to Editor - None, resubmitted the disobedient code (without comment tags), and it worked like a charm!



Clearly the user who created the original article did not use the TinyMCE, but my account had that selected. I did not create the user account I'm using--though I suspect I wouldn't have noticed this anyway and would still likely have found myself in the same boat.



It's worth noting that TinyMCE was editing the code before I opened it, rather than as I was submitting/saving the post. The PHP was converted to a comment up front, and since I'm a PHP n00b it didn't stand out to me like it should've. I duplicated a comment I assumed was code, and I lacked the programming chops to recognize that.



I'm glad it was something simple, but holy smokes this had me barking up the wrong tree for awhile!




Note for posterity:



This has similar symptoms (but is not the same) as assigning text filters in the global config, which imposes filters upon user groups based on type/class: administrator, editor, publisher, et cetera (Neil's answer covers this and some alternate approaches).



The above screenshot is personal preference (in my own user profile) offered to a user with administrator/super user status. I expect all users get some choices, but they may not match these--and of course newer Joomla versions may differ.






share|improve this answer
































    1














    As you have found, Joomla filters content to control the HTML content authors submit for security and maybe other reasons.



    You can change Text Filter options for each user group in the Global Configuration but I think most editors filter out PHP code anyway.



    There are a few ways around this problem.



    Disable the Editor



    Temporarily changing your user settings to use no editor is a good approach as no additional third party extensions are needed, although (as you have found) content authors who come along later and edit the content may be in for a surprise.



    Joomla Extension to List Directory Contents



    You can install a third party extension to list the contents of a folder. I tend to use the free or the paid version of Easy Folder Listing and there are others.



    Joomla Extension to Retain PHP Code



    You can install a third party extension that allows PHP code to be retained without disabling your editor. I tend to use Regular Labs Sourcerer and there are others.






    share|improve this answer























    • Yes, I found a blog describing Global Config, but I was already set to "no filter." And I'd spent a triumphant nine seconds navigating to that page, certain I'd found the problem--bummer. However it did at least open a new line of thinking, validating my hunch that Joomla was editing on my behalf. Of course from Joomla's perspective I'd requested it. I'd been checking directory perms, file sizes, and other stuff which in the past have proven to produce similar symptoms.Though once I saw the source code I at least left the football field and found myself in the right ballpark.

      – zedmelon
      May 27 at 18:31











    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "555"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fjoomla.stackexchange.com%2fquestions%2f24723%2fhow-to-stop-joomla-2-5-from-disabling-php%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    FIXED:
    The culprit was a personal editor choice set in the user profile section.



    Screenshot: User Profile Editor Settings



    I changed this to Editor - None, resubmitted the disobedient code (without comment tags), and it worked like a charm!



    Clearly the user who created the original article did not use the TinyMCE, but my account had that selected. I did not create the user account I'm using--though I suspect I wouldn't have noticed this anyway and would still likely have found myself in the same boat.



    It's worth noting that TinyMCE was editing the code before I opened it, rather than as I was submitting/saving the post. The PHP was converted to a comment up front, and since I'm a PHP n00b it didn't stand out to me like it should've. I duplicated a comment I assumed was code, and I lacked the programming chops to recognize that.



    I'm glad it was something simple, but holy smokes this had me barking up the wrong tree for awhile!




    Note for posterity:



    This has similar symptoms (but is not the same) as assigning text filters in the global config, which imposes filters upon user groups based on type/class: administrator, editor, publisher, et cetera (Neil's answer covers this and some alternate approaches).



    The above screenshot is personal preference (in my own user profile) offered to a user with administrator/super user status. I expect all users get some choices, but they may not match these--and of course newer Joomla versions may differ.






    share|improve this answer





























      3














      FIXED:
      The culprit was a personal editor choice set in the user profile section.



      Screenshot: User Profile Editor Settings



      I changed this to Editor - None, resubmitted the disobedient code (without comment tags), and it worked like a charm!



      Clearly the user who created the original article did not use the TinyMCE, but my account had that selected. I did not create the user account I'm using--though I suspect I wouldn't have noticed this anyway and would still likely have found myself in the same boat.



      It's worth noting that TinyMCE was editing the code before I opened it, rather than as I was submitting/saving the post. The PHP was converted to a comment up front, and since I'm a PHP n00b it didn't stand out to me like it should've. I duplicated a comment I assumed was code, and I lacked the programming chops to recognize that.



      I'm glad it was something simple, but holy smokes this had me barking up the wrong tree for awhile!




      Note for posterity:



      This has similar symptoms (but is not the same) as assigning text filters in the global config, which imposes filters upon user groups based on type/class: administrator, editor, publisher, et cetera (Neil's answer covers this and some alternate approaches).



      The above screenshot is personal preference (in my own user profile) offered to a user with administrator/super user status. I expect all users get some choices, but they may not match these--and of course newer Joomla versions may differ.






      share|improve this answer



























        3












        3








        3







        FIXED:
        The culprit was a personal editor choice set in the user profile section.



        Screenshot: User Profile Editor Settings



        I changed this to Editor - None, resubmitted the disobedient code (without comment tags), and it worked like a charm!



        Clearly the user who created the original article did not use the TinyMCE, but my account had that selected. I did not create the user account I'm using--though I suspect I wouldn't have noticed this anyway and would still likely have found myself in the same boat.



        It's worth noting that TinyMCE was editing the code before I opened it, rather than as I was submitting/saving the post. The PHP was converted to a comment up front, and since I'm a PHP n00b it didn't stand out to me like it should've. I duplicated a comment I assumed was code, and I lacked the programming chops to recognize that.



        I'm glad it was something simple, but holy smokes this had me barking up the wrong tree for awhile!




        Note for posterity:



        This has similar symptoms (but is not the same) as assigning text filters in the global config, which imposes filters upon user groups based on type/class: administrator, editor, publisher, et cetera (Neil's answer covers this and some alternate approaches).



        The above screenshot is personal preference (in my own user profile) offered to a user with administrator/super user status. I expect all users get some choices, but they may not match these--and of course newer Joomla versions may differ.






        share|improve this answer















        FIXED:
        The culprit was a personal editor choice set in the user profile section.



        Screenshot: User Profile Editor Settings



        I changed this to Editor - None, resubmitted the disobedient code (without comment tags), and it worked like a charm!



        Clearly the user who created the original article did not use the TinyMCE, but my account had that selected. I did not create the user account I'm using--though I suspect I wouldn't have noticed this anyway and would still likely have found myself in the same boat.



        It's worth noting that TinyMCE was editing the code before I opened it, rather than as I was submitting/saving the post. The PHP was converted to a comment up front, and since I'm a PHP n00b it didn't stand out to me like it should've. I duplicated a comment I assumed was code, and I lacked the programming chops to recognize that.



        I'm glad it was something simple, but holy smokes this had me barking up the wrong tree for awhile!




        Note for posterity:



        This has similar symptoms (but is not the same) as assigning text filters in the global config, which imposes filters upon user groups based on type/class: administrator, editor, publisher, et cetera (Neil's answer covers this and some alternate approaches).



        The above screenshot is personal preference (in my own user profile) offered to a user with administrator/super user status. I expect all users get some choices, but they may not match these--and of course newer Joomla versions may differ.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited May 27 at 18:56

























        answered May 25 at 22:13









        zedmelonzedmelon

        418




        418





















            1














            As you have found, Joomla filters content to control the HTML content authors submit for security and maybe other reasons.



            You can change Text Filter options for each user group in the Global Configuration but I think most editors filter out PHP code anyway.



            There are a few ways around this problem.



            Disable the Editor



            Temporarily changing your user settings to use no editor is a good approach as no additional third party extensions are needed, although (as you have found) content authors who come along later and edit the content may be in for a surprise.



            Joomla Extension to List Directory Contents



            You can install a third party extension to list the contents of a folder. I tend to use the free or the paid version of Easy Folder Listing and there are others.



            Joomla Extension to Retain PHP Code



            You can install a third party extension that allows PHP code to be retained without disabling your editor. I tend to use Regular Labs Sourcerer and there are others.






            share|improve this answer























            • Yes, I found a blog describing Global Config, but I was already set to "no filter." And I'd spent a triumphant nine seconds navigating to that page, certain I'd found the problem--bummer. However it did at least open a new line of thinking, validating my hunch that Joomla was editing on my behalf. Of course from Joomla's perspective I'd requested it. I'd been checking directory perms, file sizes, and other stuff which in the past have proven to produce similar symptoms.Though once I saw the source code I at least left the football field and found myself in the right ballpark.

              – zedmelon
              May 27 at 18:31















            1














            As you have found, Joomla filters content to control the HTML content authors submit for security and maybe other reasons.



            You can change Text Filter options for each user group in the Global Configuration but I think most editors filter out PHP code anyway.



            There are a few ways around this problem.



            Disable the Editor



            Temporarily changing your user settings to use no editor is a good approach as no additional third party extensions are needed, although (as you have found) content authors who come along later and edit the content may be in for a surprise.



            Joomla Extension to List Directory Contents



            You can install a third party extension to list the contents of a folder. I tend to use the free or the paid version of Easy Folder Listing and there are others.



            Joomla Extension to Retain PHP Code



            You can install a third party extension that allows PHP code to be retained without disabling your editor. I tend to use Regular Labs Sourcerer and there are others.






            share|improve this answer























            • Yes, I found a blog describing Global Config, but I was already set to "no filter." And I'd spent a triumphant nine seconds navigating to that page, certain I'd found the problem--bummer. However it did at least open a new line of thinking, validating my hunch that Joomla was editing on my behalf. Of course from Joomla's perspective I'd requested it. I'd been checking directory perms, file sizes, and other stuff which in the past have proven to produce similar symptoms.Though once I saw the source code I at least left the football field and found myself in the right ballpark.

              – zedmelon
              May 27 at 18:31













            1












            1








            1







            As you have found, Joomla filters content to control the HTML content authors submit for security and maybe other reasons.



            You can change Text Filter options for each user group in the Global Configuration but I think most editors filter out PHP code anyway.



            There are a few ways around this problem.



            Disable the Editor



            Temporarily changing your user settings to use no editor is a good approach as no additional third party extensions are needed, although (as you have found) content authors who come along later and edit the content may be in for a surprise.



            Joomla Extension to List Directory Contents



            You can install a third party extension to list the contents of a folder. I tend to use the free or the paid version of Easy Folder Listing and there are others.



            Joomla Extension to Retain PHP Code



            You can install a third party extension that allows PHP code to be retained without disabling your editor. I tend to use Regular Labs Sourcerer and there are others.






            share|improve this answer













            As you have found, Joomla filters content to control the HTML content authors submit for security and maybe other reasons.



            You can change Text Filter options for each user group in the Global Configuration but I think most editors filter out PHP code anyway.



            There are a few ways around this problem.



            Disable the Editor



            Temporarily changing your user settings to use no editor is a good approach as no additional third party extensions are needed, although (as you have found) content authors who come along later and edit the content may be in for a surprise.



            Joomla Extension to List Directory Contents



            You can install a third party extension to list the contents of a folder. I tend to use the free or the paid version of Easy Folder Listing and there are others.



            Joomla Extension to Retain PHP Code



            You can install a third party extension that allows PHP code to be retained without disabling your editor. I tend to use Regular Labs Sourcerer and there are others.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered May 27 at 0:14









            Neil RobertsonNeil Robertson

            6,79921655




            6,79921655












            • Yes, I found a blog describing Global Config, but I was already set to "no filter." And I'd spent a triumphant nine seconds navigating to that page, certain I'd found the problem--bummer. However it did at least open a new line of thinking, validating my hunch that Joomla was editing on my behalf. Of course from Joomla's perspective I'd requested it. I'd been checking directory perms, file sizes, and other stuff which in the past have proven to produce similar symptoms.Though once I saw the source code I at least left the football field and found myself in the right ballpark.

              – zedmelon
              May 27 at 18:31

















            • Yes, I found a blog describing Global Config, but I was already set to "no filter." And I'd spent a triumphant nine seconds navigating to that page, certain I'd found the problem--bummer. However it did at least open a new line of thinking, validating my hunch that Joomla was editing on my behalf. Of course from Joomla's perspective I'd requested it. I'd been checking directory perms, file sizes, and other stuff which in the past have proven to produce similar symptoms.Though once I saw the source code I at least left the football field and found myself in the right ballpark.

              – zedmelon
              May 27 at 18:31
















            Yes, I found a blog describing Global Config, but I was already set to "no filter." And I'd spent a triumphant nine seconds navigating to that page, certain I'd found the problem--bummer. However it did at least open a new line of thinking, validating my hunch that Joomla was editing on my behalf. Of course from Joomla's perspective I'd requested it. I'd been checking directory perms, file sizes, and other stuff which in the past have proven to produce similar symptoms.Though once I saw the source code I at least left the football field and found myself in the right ballpark.

            – zedmelon
            May 27 at 18:31





            Yes, I found a blog describing Global Config, but I was already set to "no filter." And I'd spent a triumphant nine seconds navigating to that page, certain I'd found the problem--bummer. However it did at least open a new line of thinking, validating my hunch that Joomla was editing on my behalf. Of course from Joomla's perspective I'd requested it. I'd been checking directory perms, file sizes, and other stuff which in the past have proven to produce similar symptoms.Though once I saw the source code I at least left the football field and found myself in the right ballpark.

            – zedmelon
            May 27 at 18:31

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Joomla Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fjoomla.stackexchange.com%2fquestions%2f24723%2fhow-to-stop-joomla-2-5-from-disabling-php%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

            Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

            Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020