darklitch
12-13-2005, 12:19 AM
I am having trouble installing a PHP proxy. I have uploaded my files:
http://theghsgames.orgfree.com/config.php
http://theghsgames.orgfree.com/classWebPage.php
http://theghsgames.orgfree.com/URLproxyServer.php
I ran the config.php file, but all i get is a blank screen. I downloaded this proxy at http://sourceforge.net/projects/php-proxy/
any ideas? I am 100% sure that the advertising is not messing the proxy up because i ran it on my computer and it did the same thing.
Sphere
12-13-2005, 06:19 AM
<?
/*
This program is free software; you can redistribute it and/or modify
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**********************************\
* filename: config.php *
* date: 5/6/2002 *
* Notes: Edit this file, rather *
* than the server script *
\**********************************/
global $mime_dl;
global $server;
global $redirectIP;
global $fileVar;
global $encryptPage;
/*Mime Types***********************\
* These are mime types you don't *
* want to have downloaded by *
* default (false is required) *
\**********************************/
$mime_dl["text/html"]=false;
$mime_dl["application/pdf"]=false;
$mime_dl["application/x-javascript"]=false;
$mime_dl["application/x-shockwave-flash"]=false;
$mime_dl["image/bmp"]=false;
$mime_dl["image/gif"]=false;
$mime_dl["image/jpeg"]=false;
$mime_dl["image/tiff"]=false;
$mime_dl["text/css"]=false;
$mime_dl["text/directory"]=false;
$mime_dl["text/plain"]=false;
/*Server Vars***********************\
* Change these to match your server *
* Comment out redirectIP to have *
* the proxy work on all ips (by *
* absolute URLs) *
\***********************************/
$server = "http://php-proxy.sourceforge.net";
$redirectIP = "http://www.sourceforge.net";
$fileVar="file";
?>
The config isn't a install file.
Just edit the vars in it and it should work.
(i miss a nice readme file in the rar package though :P)
darklitch
12-15-2005, 11:36 AM
its still not working, but now I have an error message:
Warning: fopen(/) [function.fopen (http://localhost/test/function.fopen)]: failed to open stream: No such file or directory in c:\wamp\www\test\classWebPage.php on line 83
Warning: array_shift() [function.array-shift (http://localhost/test/function.array-shift)]: The argument should be an array in c:\wamp\www\test\classWebPage.php on line 84
Warning: array_shift() [function.array-shift (http://localhost/test/function.array-shift)]: The argument should be an array in c:\wamp\www\test\urlproxyserver.php on line 83
Warning: Invalid argument supplied for foreach() in c:\wamp\www\test\urlproxyserver.php on line 69
Warning: Cannot modify header information - headers already sent by (output started at c:\wamp\www\test\classWebPage.php:83) in c:\wamp\www\test\urlproxyserver.php on line 140
and I edited the vars to:
/*Mime Types***********************\
* These are mime types you don't *
* want to have downloaded by *
* default (false is required) *
\**********************************/
$mime_dl["text/html"]=true;
$mime_dl["application/pdf"]=true;
$mime_dl["application/x-javascript"]=true;
$mime_dl["application/x-shockwave-flash"]=true;
$mime_dl["image/bmp"]=true;
$mime_dl["image/gif"]=true;
$mime_dl["image/jpeg"]=true;
$mime_dl["image/tiff"]=true;
$mime_dl["text/css"]=true;
$mime_dl["text/directory"]=true;
$mime_dl["text/plain"]=true;
/*Server Vars***********************\
* Change these to match your server *
* Comment out redirectIP to have *
* the proxy work on all ips (by *
* absolute URLs) *
\***********************************/
$server = "http://theghsgames.orgfree.com";
/*$redirectIP = "http://www.sourceforge.net";*/
$fileVar="file";
I ran this on my computer and got the error message. When I ran it online I could download the file. My host does support php. A simple hello world works. Any ideas?