PHP warning (Wiki and Gallery. What happen ?)


#1

I installed MediaWiki with the oneclick install. I tweaked it a bit and it’s working great. But I have a problem when I try to upload images. I get this error:

Warning: shell_exec() has been disabled for security reasons in /home/.tait/username/domain/wiki/includes/Image.php on line 498

Beside this error, everything work great

thanks for help

Edit: I just found that I have a problem with Gallery Software on the same domain. This script was working perfectly since for days.

Warning: fopen(): open_basedir restriction in effect. File(/home/username/domain/album//Race/photos.dat.0) is not within the allowed path(s): (/dh/web/phpmyadmin:/tmp:/dh/solidclient:/usr/local/lib/php:/home/username:/home/.tait/username) in /home/.tait/username/domain/gallery/platform/fs_unix.php on line 55

Warning: fopen(/home/username/domain/album//Race/photos.dat.0): failed to open stream: Operation not permitted in /home/.tait/username/domain/gallery/platform/fs_unix.php on line 55


#2

hmm very strange. I’ve used something similar (system() command instead of shell_exec()) and it’s worked fine… maybe one for support?


#3

I think it’s because I changed "Run PHP as GCI) off.

I needed it for mod_rewrite in Wiki, but I think DH limit too much the PHP module when this option is off.

I will put it back on and see if it work.


#4

Unless your PHP scripts are running in CGI mode, all user scripts run as Apache’s user group instead of yours.

Since that means that any processes you execute also run as Apache’s user/group instead of your own, we can’t allow Apache-PHP to run external processes.

It’s a security thing.

nate.


#5

Thanks for clearing this.

I set back the PGP as CGI and everything is fine now. Sadly, I can’t use mod_rewrite… Guess it’s better having ugly URL than non working web site :smiley:


#6

I may be hopelessly confused about this, but I believe running PHP as CGI does not prevent you from re-rwriting URLs via mod-rewrite, as mod_rewrite is an Apache module. I have my domains set to run PHP as CGI, and use mod_rewrite with Mambo CMS (and other programs) to get “pretty” or “Search engine friendly” urls.

rlparker


#7

PHP and mod_rewrite are totally unrelated except that there are apparently some problems with passing variables in the URL using mod_rewrite when running PHP as CGI.

Out of curiosity, does anyone know where there’s a technical explanation of the problem with this? Never having run PHP as CGI before I was unaware of this limitation until recently. Can anyone supply a list of affected software (if, as the previous poster suggests, this doesn’t affect some applications)?


If you want useful replies, ask smart questions.


#8

kchrist,

I too have seen that admonition re the passing of variables being problematic, though I have not experienced problems with the set of rewite rules that ships with Mambo CMS, and if memory serves me correctly, others. One example of a mambo cms instalation working on Dreamhost with PHP as CGI and using mod_rewrite for “tretty” urls is at http://www.johnnystarr.com/ .

I agree that a list of “working” apps would be helpful as well as a technical explanation of what is involved. It is a little beyond my knowledge. For me, with mambo (sas well as other apps I have used) it “just works” with the applications’ supplied .htaccess file.

rlparker


#9

mod_rewrite don’t work at all with PHP as CGI. Wiki don’t even want to show something.

Anyway not a big problem, everything work now. Just don’t have the mod_rewrite


#10

I’m running PHP as CGI and using mod_rewrite on my site. What makes you think that it doesn’t work?


MacManX.com
I don’t work here. I’m just your typical support forum volunteer.


#11

well if I activate this option in MediaWiki, it simply don’t work. URLs are bad and show a 404.