I use Fedora Core 5 as my server OS.
I have PHP5 and Apache 2.2 setup and running.
I cant get any code to accept a passed variable.
This code is all that is in the calling script and is generated by another script automatically:
<?php $clientip = $_SERVER['REMOTE_ADDR']; ?>
<?php include('http://sgen.mysite.com/runapps/weblinks/pages2.php?keyword=php-scripts&yourip='.$clientip); ?>
in the CALLED script: pages2.php,
$_GET('$keyword')
WILL NOT WORK! in any format.
register globals has been ON and Off
both same results.
The program when installed on Hostmonter works fine.
On my server it keeps giving me an error:
Warning: include(http://sgen.mysite.com/runapps/weblinks/pages2.php?keyword=php-scripts&yourip=11.11.11.11) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 406 Not Acceptable in /var/www/html/sgen/weblinks/php-scripts.php on line 1
Normally I dont give up and I usually find what I look for on the net or in books. This one seems to be unique. All refrences to error 406 are actual pages with error 406.
One thing I did manage to get to work :
<?php $clientip = $_SERVER['DOCUMENT_ROOT']; ?>
<?$keyword="php-scripts"?>
<?php include($clientip.'runapps/pages2.php'); ?>
It passes the correct directory and the keyword.
I added these lines to the template_page:
include("../config/config.inc");
$spword = $keyword; //set up a dummy for de-bug
$keyword_dash = $keyword; // it actually accepts the keyword now
and removed : $keyword_dash = $_GET['keyword'];
I have done so many things in the past 3 weeks to try to fix it that I cant remember all of them.
At this time I am searching for "OUT OF THE BLUE" or " OFF THE WALL" ideas.
One final note, I actually went so far as to set my PHP.INI file to exactly the same as Hostmoster, except that they use Php4 and I have Php5 and some added option I don't know what to do with.
The program was origionally written in PHP4 for use on Apache PRE 2.x.
I am guessing it is a configuration and/or permissions problem.
Anyone with ANY ideas?
I am not a complete newbie but I am by no means an expert as you can probably see by my code.