Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Forum, can't post, see profile or change stuff in cms.


Reply

6 Posts   1338 Views

Avatar
raamklaza

23 July 2009 at 1:48am Community Member, 182 Posts

I have a weird thing in my Forum.

I can't go to My profile, can't change Category in Admin section and no one can post any topics.

This is the error message with ?isDev=1:

[Warning] escapeshellarg() has been disabled for security reasons
GET /ForumMemberProfile/edit?isDev=1

Line 284 in /home/w0576642/domains/roufaida.nl/public_html/sapphire/integration/Geoip.php

275 * $codeOnly parameter.
276 *
277 * @param string $address The IP address to get the country of
278 * @param boolean $codeOnly Returns just the country code
279 */
280 static function ip2country($address, $codeOnly = false) {
281 // Return if in CLI, or you'll get this error: "sh: geoiplookup: command not found"
282 if(Director::is_cli()) return false;
283
284 $cmd = 'geoiplookup ' . escapeshellarg($address);
285 exec($cmd, $result, $code);
286 // Note: At time of writing, $result is always zero for this program
287
288 if($code == 127) return false;
289 if($result == false) return false;
290

I made a test user.

www.roufaida.nl/forum

username: test
pass: test

Avatar
Willr

23 July 2009 at 2:56pm Forum Moderator, 5511 Posts

Seems like escapeshellarg() has been disabled. The script should check if you have this function before it tries to use it. Maybe try open that file and add if(!method_exists('escapeshellarg')) return false; above the code.

if(!method_exists('escapeshellarg')) return false;

$cmd = 'geoiplookup ' . escapeshellarg($address);
exec($cmd, $result, $code)

Avatar
raamklaza

24 July 2009 at 4:15am Community Member, 182 Posts

Hi willr,

i added the check but it didn't change a lot.

When i want to start a topic, i have to login again. When i fill in my right credentials then the login form is show and show again.
http://roufaida.nl/junior-songfestival-2008/starttopic

Are there known issues of problems with other modules?

I do get this message now:

[Warning] Wrong parameter count for method_exists()
GET /ForumMemberProfile/edit

Line 284 in /home/w0576642/domains/roufaida.nl/public_html/sapphire/integration/Geoip.php

Source

275     * $codeOnly parameter.
276     *
277     * @param string $address The IP address to get the country of
278     * @param boolean $codeOnly Returns just the country code
279     */
280    static function ip2country($address, $codeOnly = false) {
281       // Return if in CLI, or you'll get this error: "sh: geoiplookup: command not found"
282       if(Director::is_cli()) return false;
283
284 if(!method_exists('escapeshellarg')) return false;
285       
286       $cmd = 'geoiplookup ' . escapeshellarg($address);
287       exec($cmd, $result, $code);
288       // Note: At time of writing, $result is always zero for this program
289
290       if($code == 127) return false;

Avatar
Willr

24 July 2009 at 8:58am Forum Moderator, 5511 Posts

Sorry I should have said function_exists() update your code with that and see what happens.

Avatar
raamklaza

24 July 2009 at 7:51pm Community Member, 182 Posts

I changed it to function and now i don't get a error message but still:

When i want to start a topic, i have to login again. When i fill in my right credentials then the login form is show and show again.
http://roufaida.nl/junior-songfestival-2008/starttopic

Are there known issues of problems with other modules?

I am not getting any error messages with ?isDev=1 or in my email.

Avatar
raamklaza

27 July 2009 at 9:44pm Community Member, 182 Posts

Maybe some problems with other modules?

Are there known issues? Or is it impossible?