2levelsabove Posted March 4, 2008 Share Posted March 4, 2008 even echo(exec("whoami")); does not seem to work. How do I turn it on ? PHP.ini shows it as being enabled. Please suggest Link to comment https://forums.phpfreaks.com/topic/94280-any-reason-why-exec-in-php-is-not-working/ Share on other sites More sharing options...
discomatt Posted March 4, 2008 Share Posted March 4, 2008 This might be over-ridden elsewhere by the host. First step should be to check with them. Link to comment https://forums.phpfreaks.com/topic/94280-any-reason-why-exec-in-php-is-not-working/#findComment-482907 Share on other sites More sharing options...
2levelsabove Posted March 4, 2008 Author Share Posted March 4, 2008 I have access to server as root. and it is a dedicated server. Any place I could possible check ? Thanks Link to comment https://forums.phpfreaks.com/topic/94280-any-reason-why-exec-in-php-is-not-working/#findComment-482911 Share on other sites More sharing options...
discomatt Posted March 4, 2008 Share Posted March 4, 2008 Odd, did you check with phpinfo() ? Seems redundant, but I've seen installs that reference to some oddly-located php.ini file. Also try system(); This one actually returns FALSE on failure. Link to comment https://forums.phpfreaks.com/topic/94280-any-reason-why-exec-in-php-is-not-working/#findComment-482917 Share on other sites More sharing options...
2levelsabove Posted March 4, 2008 Author Share Posted March 4, 2008 Tried that and get a error 500 Also php.ini seems fine via phpinfo() Link to comment https://forums.phpfreaks.com/topic/94280-any-reason-why-exec-in-php-is-not-working/#findComment-482924 Share on other sites More sharing options...
2levelsabove Posted March 4, 2008 Author Share Posted March 4, 2008 I finally found the answer. I had not specified the path to the command inside the exec statement. Thanks anyways guys Link to comment https://forums.phpfreaks.com/topic/94280-any-reason-why-exec-in-php-is-not-working/#findComment-483134 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.