Install went fine, chmod 77 to the appropriate directories, silly_safe_mode line inserted in config.inc.php, edited config table to have the directory without trailing slash (as i read somewhere on this board), also tried with trailing slash, but...
When I login as admin (all fine) and goto the config page and try to submit changes it brings me back to yhe /config.php instead of the /fotoalbum/config.php subdirectory where i installed the script.
Same happens with all commands i use while in admin mode and when i log out. They bring me back to the root. Can't do anything else. Probably a silly mistaka to maka but nevertheless.. Can't find any table or config file where i should add the base installation directory. Anyone please? Thanks!
edit config.php, find<form action="$PHP_SELF" method="post">
and change it to<form action="config.php" method="post">
GauGau
cool, that worked for the config... but not for the other pages and functions:
tried:
- add user (same problem, to root)
- create new group
- create category
- other functions... as well as after logging IN (after the welcome message).
so for the config it worked, but have not been able to use the other functions.
Could it have something to do with $gallery_url_prefix?
Thanks for your quick response!
Theo
btw same thing wit sending e-cards... all functions seem to refer to the root of my web insted of the installation directory.
if the var $PHP_SELF doesn't work for you on all pages, edit the place where it initially is set up: edit init.inc.php and look for
Quote// Initialise the $CONFIG array and some other variables
$CONFIG = array();
$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
$REFERER = urlencode($PHP_SELF . (isset($HTTP_SERVER_VARS['QUERY_STRING']) && $HTTP_SERVER_VARS['QUERY_STRING'] ? '?' . $HTTP_SERVER_VARS['QUERY_STRING'] : ''));
$ALBUM_SET = '';
$FORBIDDEN_SET = '';
$CURRENT_CAT_NAME = '';
$CAT_LIST = '';
and modify the red line accordingly.
GauGau
i have this line in my init.inc.php already. Do you mean i should replace the variable with the url? like:
$PHP_SELF = isset($HTTP_SERVER_VARS['http://www.defakkel.com/fotoalbum']) ? $HTTP_SERVER_VARS['http://www.defakkel.com/fotoalbum'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
I tried that... and that does not work...
Tnx.
umph... sure, the stuff I quoted is the code that's already there, and the thing you tried won't work of course.
Take a look at phpinfo() (http://www.php.net/phpinfo/) and look for $HTTP_SERVER_VARS['SCRIPT_NAME'] and $HTTP_SERVER_VARS['REDIRECT_URL']). You might as well want to check $_SERVER["PHP_SELF"], $_SERVER["SCRIPT_NAME"] and $PHP_SELF (in fact the server vars)...
Tell us what you got there...
GauGau
I am sorry. You totally lost me now. What should i get where? :cry:
I have followed your link, which brings me to the PHP manual.
I have a phpinfo.php in my root at www.defakkel.com but all that information does not make any sense to me.
I have tried the phpinfo.php at www.defakkel.com/fotoalbum but I am affraid it all looks spagetti to me. Other than a "Notice: Constant SILLY_SAFE_MODE already defined in /data/members/paid/d/e/defakkel.com/htdocs/www/fotoalbum/include/config.inc.php on line 4" when i execute phpinfo provided with the package, then the normal interface and then some information I can't really interpret.
I am not a skilled php programmer (not a programmer at all), all i do is have my way with the variables and that normally works fine. Got Yabb working fine as i did with Mambo, but this is beyond me. So I am affraid i got nothing :-(
So for short... lost!
just create a phpinfo output as stated in the php.net manual, upload it to your webserver, run it in your browser. Then scroll to the bottom, copy-and-paste the block that is labelled "PHP Variables" into your next posting here on the board. We'll then have a look at the vars that you have on your server and will together find out what changes need to be applied to init.inc.php to make it work properly.
GauGau
pfew... thought i was loosing it.. phpinfo does not give me back the variables. Just a clear page. (INFO_MODULES) (INFO_CONFIGURATION) and all the others work, but not the (INFO_VARIABLES). I missed those when i tried () - so tried phpinfo(INFO_VARIABLES).
Was browsing even beyond the bottom of my page at warp speed yo find any cloaked variables devices, but I suppose those damn Lycos Klingons did it again :roll: ... See for yourself at www.defakkel.com/phpinfo.php (a complete phpinfo()).
oh yeah, the benefits of free webhosting :wink: . Try printing the required vars with a script, like this:<?php
print "$HTTP_SERVER_VARS['SCRIPT_NAME'] =".$HTTP_SERVER_VARS['SCRIPT_NAME']."<br />";
print "$HTTP_SERVER_VARS['REDIRECT_URL'] =".$HTTP_SERVER_VARS['REDIRECT_URL']."<br />";
print "$_SERVER['PHP_SELF'] =".$_SERVER['PHP_SELF']."<br />";
print "$_SERVER['SCRIPT_NAME'] =".$_SERVER['SCRIPT_NAME']."<br />";
print "$PHP_SELF =".$PHP_SELF ."<br />";
?>
GauGau
actually it is not free hosting... I have a web package at lycos. Script returns:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /data/members/paid/d/e/defakkel.com/htdocs/www/test.php on line 2
Remove the first $'s
<?php
print "HTTP_SERVER_VARS['SCRIPT_NAME'] =".$HTTP_SERVER_VARS['SCRIPT_NAME']."<br />";
print "HTTP_SERVER_VARS['REDIRECT_URL'] =".$HTTP_SERVER_VARS['REDIRECT_URL']."<br />";
print "_SERVER['PHP_SELF'] =".$_SERVER['PHP_SELF']."<br />";
print "_SERVER['SCRIPT_NAME'] =".$_SERVER['SCRIPT_NAME']."<br />";
print "PHP_SELF =".$PHP_SELF ."<br />";
?>
I had the same problem that I (think) solved by replacing
$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
with
$HTTP_SERVER_VARS['SCRIPT_NAME'];
I don't know if that won't cause some other problems but for now, it works...
yoo! did that.. reply when executed in root:
HTTP_SERVER_VARS['SCRIPT_NAME'] =/test.php
HTTP_SERVER_VARS['REDIRECT_URL'] =/test.php
_SERVER['PHP_SELF'] =/test.php
_SERVER['SCRIPT_NAME'] =/test.php
PHP_SELF =/test.php
but.. when executed in subdirectory fotoalbum (thought that would give you some more info...)
HTTP_SERVER_VARS['SCRIPT_NAME'] =/test.php
HTTP_SERVER_VARS['REDIRECT_URL'] =/test.php
_SERVER['PHP_SELF'] =/fotoalbum/test.php
_SERVER['SCRIPT_NAME'] =/test.php
PHP_SELF =/fotoalbum/test.php
Only 'php_self' returns with a path...
then $_SERVER['SCRIPT_NAME'] is the var to go for!
GauGau
I will, I will go for it... Ahum. How?? Can you please tell me what to do with it... Or not to do with it... Running a script is somewhat different than understanding and editing..
tnx
in include/init.inc.php, search for
Quote// Initialise the $CONFIG array and some other variables
$CONFIG = array();
$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
$REFERER = urlencode($PHP_SELF . (isset($HTTP_SERVER_VARS['QUERY_STRING']) && $HTTP_SERVER_VARS['QUERY_STRING'] ? '?' . $HTTP_SERVER_VARS['QUERY_STRING'] : ''));
$ALBUM_SET = '';
$FORBIDDEN_SET = '';
$CURRENT_CAT_NAME = '';
$CAT_LIST = '';
and replace it with
Quote// Initialise the $CONFIG array and some other variables
$CONFIG = array();
$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : $_SERVER['SCRIPT_NAME'];
$REFERER = urlencode($PHP_SELF . (isset($HTTP_SERVER_VARS['QUERY_STRING']) && $HTTP_SERVER_VARS['QUERY_STRING'] ? '?' . $HTTP_SERVER_VARS['QUERY_STRING'] : ''));
$ALBUM_SET = '';
$FORBIDDEN_SET = '';
$CURRENT_CAT_NAME = '';
$CAT_LIST = '';
GauGau
Titooy... i tried it and (believe it or not) it works now... I don't even wamma know why but gratefull. Thanks for all the help guys!
Dear all,
I followed your thread very carefuly since it seems that i have the same problem i am also hosted by lycos.
So to check again my Global variable I run also ths test.php
in the root
HTTP_SERVER_VARS['SCRIPT_NAME'] =/test.php
HTTP_SERVER_VARS['REDIRECT_URL'] =/test.php
_SERVER['PHP_SELF'] =/test.php
_SERVER['SCRIPT_NAME'] =/test.php
PHP_SELF =/test.php
and in copermine
HTTP_SERVER_VARS['SCRIPT_NAME'] =/test.php
HTTP_SERVER_VARS['REDIRECT_URL'] =/test.php
_SERVER['PHP_SELF'] =/coppermine/test.php
_SERVER['SCRIPT_NAME'] =/test.php
PHP_SELF =/coppermine/test.php
So same cause same solution right
I change config.php and int.inc.php
but unfortunaely i am stil stuck because when i try to save my config (using coppermine/config.php) is sill searching for /config.php which doesn't exist..
Please help
Thanks
are you actually using cpg1.2.x?
Joachim
Hi Joachim,
Thanks for your quick reply !
Actually, I use cpg1.3.2.
Am i in the wrong thread ???
Nary
yes, the thread you were replying to is very old and has been posted in the cpg1.2 support board, which is (as you posted) not the coppermine version you're using. However, this has been asked quite often on the cpg1.3 support board as well. The solution is generic: your server doesn't have all server vars it should have. If it is yours to administer, change the server config accordingly. If you're webhosted and /or can't change the server config, you have two options:
- edit the place where the server vars are set up / checked: include/init.inc.php
Quote$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
(as suggested above)
- Edit the file you're having issues with, search the code for
Quote<form
and change the action attribute fromQuote<form action="$PHP_SELF" method="post">
to the actual filename (for config.php, this would be<form action="config.php" method="post">
etc.)
Joachim
Quote from: GauGau on February 28, 2005, 07:08:48 PM
- edit the place where the server vars are set up / checked: include/init.inc.php
Quote$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
(as suggested above)
- Edit the file you're having issues with, search the code for
Quote<form
and change the action attribute fromQuote<form action="$PHP_SELF" method="post">
to the actual filename (for config.php, this would be<form action="config.php" method="post">
etc.)
Hi,
same prob here too with coppermine 1.3.2 on lycos webhosting.
First possibility doesnt work for me is there a way to put in directoryname directly, since second possibility gives mixed results
eg catmgr.php "swallows" the dot before php so i have to edit url manually.
Plz help.
René
now it works ! i forgot to put a ";" on the end of the line. ;D
René
I never like to bump a post but I still havent found a fix. I run my own server with EasyPHP1.8. I have everything from that install on. I havent changed anything except putting my website into the www folder. How would I go about inserting these variables into the config. Which config would I edit. I am guessing the php config. I had coppermine installed before on Appserv which the installer included apache 1.3 and php4. I can no longer use it because it searches for a non existing file..... Anyway I have tried everything listed here. Even changing the php_self to config.php did not fix the config.php problem.