[Solve] Contact layout
Moderator: Thorsten
[Solve] Contact layout
Hi,
I have installed phpMyFaq 1.6.10 on Apache 2.0/MySql5/Php5.
When i try to use HTML code in "Contact information" they where printed without parse.
Exemple : <B>Scola Concept</B>
I want to write in bold.
In version 1.6.6 it work well (on other server).
The PHP code in records when i put <?PHP print "test"?> in text mode is not saved in database. How can i save it ?
And it was not parse when i'll put in in MySql directly.
What i may wrong ?
The config check "tpl engine arse PHP" is true.
I want it to PHP Code to list a directory filename in a records.
Regards, Philippe.
I have installed phpMyFaq 1.6.10 on Apache 2.0/MySql5/Php5.
When i try to use HTML code in "Contact information" they where printed without parse.
Exemple : <B>Scola Concept</B>
I want to write in bold.
In version 1.6.6 it work well (on other server).
The PHP code in records when i put <?PHP print "test"?> in text mode is not saved in database. How can i save it ?
And it was not parse when i'll put in in MySql directly.
What i may wrong ?
The config check "tpl engine arse PHP" is true.
I want it to PHP Code to list a directory filename in a records.
Regards, Philippe.
Last edited by gph on Thu Mar 15, 2007 12:44 pm, edited 1 time in total.
Hi,
maybe the PHP function eval() is disabled on this server? We didn't changed something in this area between 1.6.6 and 1.6.10.
bye
Thorsten
maybe the PHP function eval() is disabled on this server? We didn't changed something in this area between 1.6.6 and 1.6.10.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
how does the entry look like in the database?
bye
Thorsten
how does the entry look like in the database?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
For the first point :
In phpMyFaq Setup :
I don't think i was the problem but it's for your information.
For the first point :
In phpMyFaq Setup :
Result :<B>Scola Concept</B><BR>
<BR>
ZI Toulon EST<BR>
130, rue Berthelot<BR>
BP401<BR>
83085 TOULON Cedex 9<BR>
In config.php :<B>Scola Concept</B><BR> <BR> ZI Toulon EST<BR> 130, rue Berthelot<BR> BP401<BR> 83085 TOULON Cedex 9<BR>
The version 1.6.6 run under PHP4 and my new server on PHP5.// Informations de contact
$PMF_CONF["msgContactOwnText"] = "<B>Scola Concept</B><BR>
<BR>
ZI Toulon EST<BR>
130, rue Berthelot<BR>
BP401<BR>
83085 TOULON Cedex 9<BR>";
I don't think i was the problem but it's for your information.
For the second point :
In edit records (HTML mode) :
Result :
In MySql :
When i edit the record in source mode :
In edit records (HTML mode) :
In MySql :Start
<?PHP print "test"?>
End
<p><strong>Start</strong></p><p>End</p><p><!--P print "test--><br /><!--P print "test--></p><p><!--P print "test--></p><!--P print "test-->
Result :
In Edit record (source mode<>) :Start
End
<p><strong>Start</strong></p><?PHP print "test"?><p>end</p>
In MySql :
Same result.<p><strong>Start</strong></p><?PHP print "test"?><p>end</p>
When i edit the record in source mode :
Thanks for your help.<p><strong>Start</strong></p><!--P print "test--><p>end</p>
Hi,
try <?php instead of <?PHP
bye
Thorsten
try <?php instead of <?PHP
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
well, we have to debug this... do you have a debugger installed?
bye
Thorsten
well, we have to debug this... do you have a debugger installed?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
No !
It's run on a dedicated server.
Software insatalled :
Linux kernel 2.6.19-1
Fedora Core 5 up to date with yum (similar to apt-get)
PHP Version 5.1.6
MySql Ver 14.12 Distrib 5.0.27
Apache 2.2.2
Other phpr software (phpList, phpMyVisite and phpMyAdmin) are working well.
What do you want i do for debugging ?
Thanks a lot for your help.
Philippe
No !
It's run on a dedicated server.
Software insatalled :
Linux kernel 2.6.19-1
Fedora Core 5 up to date with yum (similar to apt-get)
PHP Version 5.1.6
MySql Ver 14.12 Distrib 5.0.27
Apache 2.2.2
Other phpr software (phpList, phpMyVisite and phpMyAdmin) are working well.
What do you want i do for debugging ?
Thanks a lot for your help.
Philippe
Re: Contact layout
Hi Philippe,
If you want to relax this constraint on your Contact page, please locate, backup and open the [PATH_TO_PMF_INSTALL]/contact.php and moved the line below from:to:
Ciao,
Matteo
since PMF 1.6.7, also to reduce XSS injection, we've removed the possibility to parse plain HTML text in several config values when rendered.gph wrote:I have installed phpMyFaq 1.6.10 on Apache 2.0/MySql5/Php5.
When i try to use HTML code in "Contact information" they where printed without parse.
Exemple : <B>Scola Concept</B>
I want to write in bold.
In version 1.6.6 it work well (on other server).
If you want to relax this constraint on your Contact page, please locate, backup and open the [PATH_TO_PMF_INSTALL]/contact.php and moved the line below from:
Code: Select all
...
'msgContactOwnText' => htmlentities($PMF_CONF['msgContactOwnText']),
...
Code: Select all
...
'msgContactOwnText' => $PMF_CONF['msgContactOwnText'],
...
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Amazon.co.uk Wishlist
Hi Philippe,
You need:
Matteo
I guess you've tuned your php.ini to avoid error printing. Please try with:gph wrote:In edit records (HTML mode) :Start
<?PHP print "test"?>
End
Code: Select all
<?php print "Test"; ?>
- to use <?php PHP_Working_Code_Here ?>: as Thorsten already said, only lower case is parsed;
- to write valid PHP code so in your example missing a ";" is bad
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Amazon.co.uk Wishlist
Hi Matteo,
For the HTML code in contact :
it's OK
Thanks !
For php code :
Yes it's true.
In my forum reply i don't put the ; and my php config don't display errors.
But in my code when i try, i have the ; and it's the same result.
When i put php code in normal editing mode :
Blank line instead <?php ..> if i put php code in source mode <>
I'll got to change my php.ini to display error and i'll give you back the result.
I'll probalbly make a mistake but i don't see where ...
Bye bye
For the HTML code in contact :
it's OK

Thanks !
For php code :
Yes it's true.
In my forum reply i don't put the ; and my php config don't display errors.
But in my code when i try, i have the ; and it's the same result.
When i put php code in normal editing mode :
Code: Select all
Start
<?php print "test"; ?>
end
I'll got to change my php.ini to display error and i'll give you back the result.
I'll probalbly make a mistake but i don't see where ...
Bye bye
Ok, parse is working
For include php code we need to :
edit in source mode <>
use <?php

For include php code we need to :
edit in source mode <>
use <?php
Code: Select all
?> in lowercase
save the record
if there is an error in code the code is not display.
If you want to log the errors don't forget to change owner to apache.apache to the log file of php.
[color=red]In case of editing record, go to source mode and replace <!-- [Code] --> by <?php [Code] ?>[/color]
I think i made some confuse when i made all my previous tests, probably many errors.
When i restart for scratch and made my tests with method, it was good.
Thanks for your help and sorry for spending your time.
Philippe.
[/i]