Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Posts
    178
    Plugin Contributions
    0

    Default Running PHP in EZ-Pages

    Can you run php code within an ez-page?
    I added some code but it keeps getting commented out.
    Code:
    <?php
    turns into
    Code:
    <!--?php
    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Running PHP in EZ-Pages

    In general, you cannot run php in an EZpage, because the CONTENT of EZPages is stored in the database, not in the file system. As the sequence of output assembly is important in PHP, it would have "run its course" before the database content is parsed into the output.

    It's kinda a "cart before the horse" situation.

    There IS an over-ride - and it has been discussed before on the forum, so try look for it.

    Additionally, you could try either switching OFF your CK Editor while you work on source-type coding, or you could "toggle" to source mode, and SAVE without toggling back to wysiwyg.

    But you will probably still need the over-ride technique first...
    20 years a Zencart User

  3. #3
    Join Date
    Sep 2007
    Posts
    178
    Plugin Contributions
    0

    Default Re: Running PHP in EZ-Pages

    Thank you for the quick reply.
    I have had luck using php code in a "Define Page", ie; page_2.php. What is the process for adding additional Define Pages? page_5.php, etc...

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Running PHP in EZ-Pages

    Define pages are FILE BASED (not stored in the database like EZpages are).
    20 years a Zencart User

  5. #5
    Join Date
    Sep 2007
    Posts
    178
    Plugin Contributions
    0

    Default Re: Running PHP in EZ-Pages

    I can find page_2.php defined in three locations:

    /includes/templates/default_template/templages
    /includes/languages/english/html_includes/
    /includeslanguages/english/MY_TEMPLATE/

    I have copied and renamed to page_5.php, but it is not picking it up. I think I must be missing a page somewhere.

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Running PHP in EZ-Pages

    There is a technique to creating and/or re-naming the define pages. I do not use these extra pages any more, so I've forgotten the procedure, but there are lots of posts about how you do this, and I think there is also a Tutorial/FAQ topic on it.
    20 years a Zencart User

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Running PHP in EZ-Pages

    Remember also to follow the principles of the OVER-RIDE system

    You will always need a DEFAULT define page in the ROOT html_includes folder

    \includes\languages\english\html_includes\

    (In here you will see all the CORE define_page_xxxx.php files)

    Then, you need an OVER-RIDE for each and every one, in the OVER-RIDE folder:

    \includes\languages\english\html_includes\YOUR_TEMPLATE_FOLDER\
    20 years a Zencart User

 

 

Similar Threads

  1. running index.php
    By fusionsp in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 9 Jun 2010, 09:15 PM
  2. Running PHP as CGI?
    By pixelpadre in forum Installing on a Linux/Unix Server
    Replies: 12
    Last Post: 30 Dec 2008, 01:12 PM
  3. Running PHP as CGI
    By hduk in forum General Questions
    Replies: 14
    Last Post: 8 Mar 2008, 09:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg