
Hi,
I tried to create a module. I use Susan’s tutorial as reference: http://www.sottwell.com/create-module.html
I just create : echo "Aloha"; for the module code. Using ’Test’ as module name.
Then I can see the submenu ’Test’ under Module. As I click at it, it just empty.
I got this error at apache log file :
PHP Parser error: syntax error, unexpected T_NS_SEPARATOR, expecting T_STRING in /home/myname/www/manager/processors/execute_module.processor.php(114) : eval()’d code on line 1, referer: http://www.mydomain.com/manager/index.php?a=1&f=menu
I saw in Mysql, it addslash to echo => echo \"Aloha\";
What is the problem ? Any information will be welcome
Thanks in advanced.
- jack -
echo \"Aloha \";
echo \\\\"Aloha \\\\";
mysql> update modx_site_modules set modulecode='echo "Just testing , my new module"; ' where id=22;
Sounds like you have "magic_quotes_gpc" turned on in your php.ini

Quote from: sottwell at May 07, 2010, 08:42 AM
Sounds like you have "magic_quotes_gpc" turned on in your php.ini
Hi Goldsky,
I thinks Sottwell is right. I think it’s something like this : http://modxcms.com/forums/index.php/topic,49030.0.html
Hi Susan,
Yes, you’re right. It was ON, I turned it to OFF, restart Apache, but still didn’t work.
One question : Setting it to OFF will not descrease the security ?
Solution: I just update the field via mysql shell prompt, REMOVE the backslash, and it works.
But I must do this, every time I create a new module ...
I’m using LAMP server kernel 2.6.x, apache 2.2.x, Mysql 6.x, PHP 5.3.x
Modx 1.0.3
Many thanks Susan, you’re so great.
- jack -
... After I restart mycomputer, go to manager area, clear cache, restart Apache again, create a new php.ini file under www/ & www/manager -> setting: register_globals OFF, magic_quotes_gpc OFF (the same as main server php.ini file).