# With a PHP stack all content is stripped during publishing!

**URL:** <https://forums.realmacsoftware.com/t/with-a-php-stack-all-content-is-stripped-during-publishing/22592>\
**Category:** RapidWeaver Classic\
**Created:** [October 1, 2018, 11:49am UTC](https://forums.realmacsoftware.com/t/with-a-php-stack-all-content-is-stripped-during-publishing/22592 "2018-10-01T11:49:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![johntango](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@johntango](https://forums.realmacsoftware.com/u/johntango)\
**Post date:** [October 1, 2018, 11:49am UTC](https://forums.realmacsoftware.com/t/with-a-php-stack-all-content-is-stripped-during-publishing/22592/1 "2018-10-01T11:49:52Z")

</div>

Adding a PHP stack to an HTML page is viewable in preview. However when I publish the now changed to PHP page (as expected) all the content is tripped out during publishing leaving only the header. I am baffled.

---

<div class="post-metadata">

**Author:** ![Rovertek](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/rovertek/32/223_2.png) [@Rovertek](https://forums.realmacsoftware.com/u/Rovertek)\
**Post date:** [October 1, 2018, 1:38pm UTC](https://forums.realmacsoftware.com/t/with-a-php-stack-all-content-is-stripped-during-publishing/22592/2 "2018-10-01T13:38:26Z")

</div>

Surely, you are aware that a page containing PHP stack or script needs to have `.php` extension instead of `.html`?

That’s why it is a good practice to change a default extension to `.php` for ALL pages.

---

<div class="post-metadata">

**Author:** ![johntango](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@johntango](https://forums.realmacsoftware.com/u/johntango)\
**Post date:** [October 1, 2018, 2:31pm UTC](https://forums.realmacsoftware.com/t/with-a-php-stack-all-content-is-stripped-during-publishing/22592/3 "2018-10-01T14:31:37Z")

</div>

Thank you Rob, yes I am aware. RW changes the page extension from html to php when a php stack is introduced. I have also tried a test starting with a default php page and again the same problem. The stack is Grid Iron 3 connected to a google spreadsheet. The server is PHP enabled so I am foxed as to what is happening. I guess it must be a server error [404 - File or directory not found].

---

<div class="post-metadata">

**Author:** ![joeworkman](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/joeworkman/32/23780_2.png) [@joeworkman](https://forums.realmacsoftware.com/u/joeworkman)\
**Post date:** [October 1, 2018, 2:37pm UTC](https://forums.realmacsoftware.com/t/with-a-php-stack-all-content-is-stripped-during-publishing/22592/4 "2018-10-01T14:37:11Z")

</div>

Its most likely a PHP error causing no content to be served down to the browser.

---

<div class="post-metadata">

**Author:** ![johntango](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@johntango](https://forums.realmacsoftware.com/u/johntango)\
**Post date:** [October 2, 2018, 5:58pm UTC](https://forums.realmacsoftware.com/t/with-a-php-stack-all-content-is-stripped-during-publishing/22592/5 "2018-10-02T17:58:59Z")

</div>

Thank you. I think so too but don’t know how to fix it. The php page is on the server with its page source but not serving to my browser. Where is the glitch please?

---

<div class="post-metadata">

**Author:** ![joeworkman](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/joeworkman/32/23780_2.png) [@joeworkman](https://forums.realmacsoftware.com/u/joeworkman)\
**Post date:** [October 2, 2018, 6:05pm UTC](https://forums.realmacsoftware.com/t/with-a-php-stack-all-content-is-stripped-during-publishing/22592/6 "2018-10-02T18:05:57Z")

</div>

Impossible to know with the data given. What stack did you add to the page? Are there any errors that are obvious in the server error logs?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/system/32/25301_2.png) [@system](https://forums.realmacsoftware.com/u/system)\
**Post date:** [November 2, 2018, 4:06am UTC](https://forums.realmacsoftware.com/t/with-a-php-stack-all-content-is-stripped-during-publishing/22592/7 "2018-11-02T04:06:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
