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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

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


Go to End


6 Posts   2399 Views

Avatar
raamklaza

Community Member, 182 Posts

23 July 2009 at 1:48am

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

Forum Moderator, 5523 Posts

23 July 2009 at 2:56pm

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

Community Member, 182 Posts

24 July 2009 at 4:15am

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

Forum Moderator, 5523 Posts

24 July 2009 at 8:58am

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

Avatar
raamklaza

Community Member, 182 Posts

24 July 2009 at 7:51pm

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

Community Member, 182 Posts

27 July 2009 at 9:44pm

Maybe some problems with other modules?

Are there known issues? Or is it impossible?