pmf 1.5.3 and embedding php in templates
Moderator: Thorsten
pmf 1.5.3 and embedding php in templates
I turned on php parsing in the admin tool but my php code is not being parsed. I tried something as simple as <?php echo "Hello World"; ?> and that did not even work.
I am trying to incorporate components of the site's navigation into the template and would prefer to include an external file.
Is there a step I missed?
I am trying to incorporate components of the site's navigation into the template and would prefer to include an external file.
Is there a step I missed?
Hi,
where did you insterted the PHP code?
bye
Thorsten
where did you insterted the PHP code?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
same issue
Hi,
I have the same problem. I enable 'php parsing' in the config file but it seems that PHP is not parsed in the template files. Any ideas on how to solve this would be great.
Is there another setting I need to alter?
Thanks!
Luke
I have the same problem. I enable 'php parsing' in the config file but it seems that PHP is not parsed in the template files. Any ideas on how to solve this would be great.
Is there another setting I need to alter?
Thanks!
Luke
Hi,
did you enabled it in the admin configuration?
bye
Thorsten
did you enabled it in the admin configuration?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
this feature works for me. How does your edited template look like?
bye
Thorsten
this feature works for me. How does your edited template look like?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Solved the Parsing issue (I think):
lines 101 and 102 in parser.php:
will not match <?PHP since it is in caps. Many programers are in the habit of caping PHP. I would suggest adding some regex in this to match caps. Or, make it clear that PHP code must start with '<?php' in order to parsed.
Great application!
Luke
lines 101 and 102 in parser.php:
Code: Select all
$phpstart = '<?php';
$phpstop = '?>';
Great application!
Luke
Hi,
I never used <?PHP so I didn't checked for the uppercase version.
bye
Thorsten
I never used <?PHP so I didn't checked for the uppercase version.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Same problem
Hi there
I am having the exact same issue. I am using version 1.5.6. I have checked the "activate" button next to the PHP parser. I included two very basic PHP calls and neither shows up. I tried it with both <?PHP, and also <?php
Any ideas?
Inside the Faq/template/index.tpl file:
<body dir="{dir}">
<?PHP echo "Hello World 1"; ?>
<?php echo "Hello World 2"; ?>
...
Neither shows up.
Any ideas?
Thanks in advance
Jason
I am having the exact same issue. I am using version 1.5.6. I have checked the "activate" button next to the PHP parser. I included two very basic PHP calls and neither shows up. I tried it with both <?PHP, and also <?php
Any ideas?
Inside the Faq/template/index.tpl file:
<body dir="{dir}">
<?PHP echo "Hello World 1"; ?>
<?php echo "Hello World 2"; ?>
...
Neither shows up.
Any ideas?
Thanks in advance
Jason
PHP not parsed at all
@jwdenzel
Looks like the PHP module did not load correctly at webserver startup?
Are you able to use PHP at all ?
When I view the source of my rendered page, it shows that the PHP was not parsed at all. Thoughts?
Looks like the PHP module did not load correctly at webserver startup?
Are you able to use PHP at all ?
Hi,
maybe your provider has disabled the function eval()?
bye
Thorsten
maybe your provider has disabled the function eval()?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi there
Thanks for the replies. Unfortunately, I don't think either of those are the answer.
1) I own my own server and have full control over it
2) I am able to do all other PHP functions on the same website. (I have phpBB running for example)
Check out the site if you like.
http://illian.no-ip.com/Faq
Thanks again
Jason
Thanks for the replies. Unfortunately, I don't think either of those are the answer.
1) I own my own server and have full control over it
2) I am able to do all other PHP functions on the same website. (I have phpBB running for example)
Check out the site if you like.
http://illian.no-ip.com/Faq
Thanks again
Jason
Are U using the HTML source view?
Hi Jason,jwdenzel wrote:I am having the exact same issue. I am using version 1.5.6. I have checked the "activate" button next to the PHP parser. I included two very basic PHP calls and neither shows up. I tried it with both <?PHP, and also <?php
Any ideas?
Inside the Faq/template/index.tpl file:
<body dir="{dir}">
<?PHP echo "Hello World 1"; ?>
<?php echo "Hello World 2"; ?>
I'd like to have just the confirmation that you are inserting:
Code: Select all
<?PHP echo "Hello World 1"; ?>
<?php echo "Hello World 2"; ?>
Otherwise your PHP entries will be inserted as:
Code: Select all
<?PHP echo "Hello World 1"; ?>
<?php echo "Hello World 2"; ?>
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Amazon.co.uk Wishlist
Hi,
and what also does not work is putting PHP code in the first line of the template file. Please add the line after the DOCTYPE decleration.
bye
Thorsten
and what also does not work is putting PHP code in the first line of the template file. Please add the line after the DOCTYPE decleration.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist