PDA

View Full Version : Need PHP help



GilbertsGrape
02-23-2003, 10:54 AM
Need binary help
ok i really really really miss Gallery. that program was so awsome. untill my host disabled some things on their serves. some Bs about a security risk

anyways i would really like to get it going again. i fond some information on getting it to run again. and need soeme info / help doing it. can anyone make heads or tails out of this?

How do I run Gallery using PHP as a CGI?

For those of you who's server runs in safe mode, you can still use Gallery. You need to install a cgi-bin version of PHP on your server and instruct Gallery to use that instead of the one that's built in to your webserver. Note that in order for this to work, your server must be configured to read your .htaccess files! Here are instructions:
Obtain a CGI version of PHP for your platform. Jesse Lambdin is graciously hosting a set of prebuilt binaries here.

http://www.gallerymg.com/galleryusers/

If you can't find a binary for your platform, you can compile it yourself. Configure PHP properly by running
./configure --enable-force-cgi-redirect --disable-safe-mode --with-config-file-path=/usr/local/lib/php-cgi
and then make. The resulting binary will be called php in the top level directory of the PHP source. Then please submit this binary back to Jesse Lambdin so that he can include it on his page.

http://www.gallerymg.com/galleryusers/

Note: We specify the path to the PHP config file as /usr/local/lib/php-cgi so that all the binaries on Jesse's download page can be uniform and won't conflict with any other php.ini that your ISP might have. If you change this path but still want to donate your version of PHP to Jesse, please compile a version with the path specified as above and donate that one instead!


Upload the CGI version of PHP to /cgi-bin and call it php.cgi
chmod 755 /cgi-bin/php.cgi
Create a new directory in your webserver root called php-cgi and put gallery in that directory.
Create a new .htaccess file in your php-cgi directory (the one in your webserver root) and put the following lines in it:
RemoveHandler .php
AddType application/cgi-php php
Action application/cgi-php /cgi-bin/php.cgi
That's it. Now Gallery, and any other PHP app that you put in the cgi-php directory, should run using the CGI version of PHP. To make sure that you're running the CGI version, you can go to gallery/setup/phpinfo.php where you can see lots of info about PHP.


where to get gallery

http://gallery.menalto.com/modules.php?op=modload&name=News&file=index

GilbertsGrape
02-23-2003, 10:00 PM
bump...


comeon some of the computer portigies on here must know how to help me

GilbertsGrape
02-23-2003, 10:01 PM
Woah i am a Lieutenant Commander now... have to see how many post that is

coleslaw
02-23-2003, 10:18 PM
If you are trying to run this on a remote host that you have no control of, it's not going to work. However, if you're running this from your own webserver, it sounds pretty straight forward to me. The directions are self explanatory.

GilbertsGrape
02-24-2003, 07:02 AM
my host is

alwayswebhosting.com

sho.gun
02-25-2003, 10:52 PM
I think you might be out of luck... Most hosts running apache runs PHP as a service and module of apache. Basically, the PHP program on the host computer can be run 2 ways, as a service or as CGI. I'm not talking about YOUR php program, I'm talking about the actual program that interprets php code that is running on your host's computer...

I doubt they'll totally change how their php runs because there are lots of configuration changes they must do not only to php itself but to apache etc...

GilbertsGrape
02-26-2003, 06:35 AM
Originally posted by sho.gun
I think you might be out of luck... Most hosts running apache runs PHP as a service and module of apache. Basically, the PHP program on the host computer can be run 2 ways, as a service or as CGI. I'm not talking about YOUR php program, I'm talking about the actual program that interprets php code that is running on your host's computer...

I doubt they'll totally change how their php runs because there are lots of configuration changes they must do not only to php itself but to apache etc...


That really stinks, is there a work around?

this is my PHP info if that helps

http://rogerlgilbert.com/php.php

sho.gun
02-28-2003, 09:25 AM
Originally posted by GilbertsGrape



That really stinks, is there a work around?

this is my PHP info if that helps

http://rogerlgilbert.com/php.php

I don't think so... unless your host wants to reconfigure everything for everyone in that box.