When saving config file can't be found When saving config file can't be found
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

When saving config file can't be found

Started by Flipper01, December 24, 2004, 10:18:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Flipper01

I just installed coppermine 1.3.2 on: http://www.angorabeach.com/fotoalbum/

But when I try to change and save the config.php (http://www.angorabeach.com/fotoalbum/config.php) it goes to http://www.angorabeach.com/config.php and I get an error because this is not where the config.php is located.

Is this a known problem?

Hein Traag

I assume you read the docs, searched the board from top to bottom and then posted your question here ?

It says you don't have permission etc.. you sure you set all the right chmod rights ?

Flipper01

The settings are all correct, its just that when I try to update the config.php it goes back one directory.

My photoalbum is installed on: http://www.angorabeach.com/fotoalbum/
When pressing the 'save new configuration' button I'm redirected to http://www.angorabeach.com/config.php instead of http://www.angorabeach.com/fotoalbum/config.php

It's not that I get errors, I just get redirected to the wrong directory

Casper

there are some server setups that redirect all 'config' to the root.  try changing the name of config.php to something completely different, browse to it, and see if that works.  If it does, you will have to change the links in theme.php accordingly.

This has been changed in the next version.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Flipper01

Quote from: Casper on December 24, 2004, 01:18:42 PM
there are some server setups that redirect all 'config' to the root.  try changing the name of config.php to something completely different, browse to it, and see if that works.  If it does, you will have to change the links in theme.php accordingly.
I just tried it, but it keeps sending me back to the root.. :s

Casper

Use your database tool, and check the config table.  Look for the 'ecards_more_pic_target', and check it is the full url to you gallery, not just to your  home page.  Edit it if required.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Flipper01

I tried lots of things, but I think it has something to do with the server. I host the fotoalbum on Lycos..

Joachim Müller

check phpinfo: try to find out if you have $HTTP_SERVER_VARS['SCRIPT_NAME']

Joachim

smallseb

i have the same problem (http://forum.coppermine-gallery.net/index.php?topic=13019.0) but when i tryed to check phpinfo (located in coppermine folder) and there's nothing...

Joachim Müller


Flipper01

I checked this link: http://forum.coppermine-gallery.net/index.php?topic=2712

Read the thread and did the following:

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 = '';

;D And it works for my and probably all other Lycos users!!

thnx a lot!

Flipper01

Damn, it's not working completely..

I still get the error when:
- Switching from user to admin mode
- Batch add files
- Updating groups

Besides that I get a strange error when I try to view a file.

This is the link to my gallery: http://angorabeach.davestolk.com/fotos/cpg132/
I created a test account: login: test, pass: test

kegobeer

That's a custom theme you have.  Try switching to the classic theme, enable debug, and see what happens.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Flipper01

Quote from: kegobeer on January 06, 2005, 08:34:21 PM
That's a custom theme you have.  Try switching to the classic theme, enable debug, and see what happens.

Tried that and got this Debug infot:

Quote
USER:
------------------
Array
(
    [ID] => ac186a466e7ac5ed6baf64ee5ccbcbe0
    [am] => 1
    [liv] => Array
        (
           
  • => 3
            )

    )

    ==========================
    USER DATA:
    ------------------
    Array
    (
        [user_id] => 2
        [user_group] => 1
        [user_active] => YES
        [user_name] => test
        [user_password] => ********
        [user_lastvisit] => 2005-01-06 20:28:09
        [user_regdate] => 2005-01-05 11:48:21
        [user_group_list] =>
        [user_email] =>
        [user_website] =>
        [user_location] =>
        [user_interests] =>
        [user_occupation] =>
        [user_actkey] =>
        [disk_max] => 0
        [disk_min] => 0
        [can_rate_pictures] => 1
        [can_send_ecards] => 1
        [ufc_max] => 3
        [ufc_min] => 3
        [custom_user_upload] => 0
        [num_file_upload] => 5
        [num_URI_upload] => 3
        [can_post_comments] => 1
        [can_upload_pictures] => 1
        [can_create_albums] => 1
        [has_admin_access] => 1
        [pub_upl_need_approval] => 0
        [priv_upl_need_approval] => 0
        [group_name] => Administrators
        [upload_form_config] => 3
        [group_quota] => 0
        [can_see_all_albums] => 1
        [group_id] => 1
        [groups] => Array
            (
                [1] => 1
            )

    )

    ==========================
    Queries:
    ------------------
    Array
    (
       
  • => SELECT extension, mime, content FROM fotos_filetypes;
        [1] => SELECT * FROM fotos_users WHERE user_id='2'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '098f6bcd4621d373cade4e832627b4f6'
        [2] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM fotos_usergroups WHERE group_id in (1)
        [3] => SELECT group_name FROM  fotos_usergroups WHERE group_id= 1
        [4] => DELETE FROM fotos_banned WHERE expiry < 1105046533
        [5] => SELECT * FROM fotos_banned WHERE ip_addr='82.73.104.96' OR ip_addr='82.73.104.96' OR user_id=2
        [6] => SELECT title,keyword from fotos_albums WHERE aid='1'
        [7] => SELECT COUNT(*) from fotos_pictures WHERE aid='1'   
        [8] => SELECT * from fotos_pictures WHERE aid='1'    ORDER BY filename ASC  LIMIT 0 ,1
        [9] => SELECT title, comments, votes, category, aid FROM fotos_albums WHERE aid='1' LIMIT 1
        [10] => SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip FROM fotos_comments WHERE pid='3' ORDER BY msg_id ASC
        [11] => SELECT title,keyword from fotos_albums WHERE aid='1'
        [12] => SELECT COUNT(*) from fotos_pictures WHERE aid='1'   
        [13] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, title, caption,hits,owner_id,owner_name from fotos_pictures WHERE aid='1'    ORDER BY filename ASC  LIMIT 0 ,10
        [14] => SELECT count(*) from fotos_comments where pid=3 and msg_id!=0
        [15] => SELECT count(*) from fotos_comments where pid=2 and msg_id!=0
        [16] => SELECT count(*) from fotos_comments where pid=1 and msg_id!=0
    )

    ==========================
    GET :
    ------------------
    Array
    (
        [album] => 1
        [pos] => 0
    )

    ==========================
    POST :
    ------------------
    Array
    (
    )

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 4.3.10 - OK
    ------------------
    mySQL version: 4.0.18-log
    ------------------
    Coppermine version: 1.3.2
    ==========================
    Module: gd
    ------------------
    module doesn't exist
    ==========================
    Module: mysql
    ------------------
    module doesn't exist
    ==========================
    Module: zlib
    ------------------
    module doesn't exist
    ==========================
    Server restrictions (safe mode)?
    ------------------
    Directive | Local Value | Master Value
    safe_mode | On | On
    safe_mode_exec_dir | /data/apache/php/safe_exec | /data/apache/php/safe_exec
    safe_mode_gid | On | On
    safe_mode_include_dir | /data/apache/php/mmp_lib:/data/session | /data/apache/php/mmp_lib:/data/session
    safe_mode_exec_dir | /data/apache/php/safe_exec | /data/apache/php/safe_exec
    sql.safe_mode | Off | Off
    disable_functions | highlight_file,diskfreespace, exec, passthru, system, popen, show_source, php_uname, ini_alter, ini_restore, ini_set, getrusage, mysql_list_dbs, get_current_user, set_time_limit, getmyuid, getmypid, dl, leak, chgrp, link | highlight_file,diskfreespace, exec, passthru, system, popen, show_source, php_uname, ini_alter, ini_restore, ini_set, getrusage, mysql_list_dbs, get_current_user, set_time_limit, getmyuid, getmypid, dl, leak, chgrp, link
    file_uploads | On | On
    include_path | .:/data/apache/php/mmp_lib:/data/session | .:/data/apache/php/mmp_lib:/data/session
    open_basedir | no value | no value
    ==========================
    email
    ------------------
    Directive | Local Value | Master Value
    sendmail_from | no value | no value
    sendmail_path | /usr/sbin/sendmail | /usr/sbin/sendmail
    SMTP | localhost | localhost
    smtp_port | 25 | 25
    ==========================
    Size and Time
    ------------------
    Directive | Local Value | Master Value
    max_execution_time | 30 | 30
    max_input_time | -1 | -1
    upload_max_filesize | 50M | 50M
    post_max_size | 50M | 50M
    ==========================
    Page generated in 3.616 seconds - 17 queries in 3.244 seconds - Album set : [/size]

smallseb

it's the same to me. Every time. Even if i changed the source code... Maybe it won't works at all under lycos!

rphMedia

Hmm, I have a similar problem and decided to live with it.  The reference post is here -
http://forum.coppermine-gallery.net/index.php?topic=13405.msg61766#msg61766

I contacted my host and here's their response -

Quote
I apologize for the delay, it was very busy today -- apparently
when you have a directory which points to a folder -- such as
how ourphotogallery.org is pointed to the "/gallery" folder --
you cannot have a file called "config.php".

Because of how that domain needs to be configured on the server
it is not possible to have a file of this name in its root
directory.

The difference between your domain name and the one we gave you is because the domain is already
pointed to that folder.

I realize this sounds silly or like I'm simply trying to brush
this issue off, but this has actually come down from the server
administrators.  This is what they have told us.  You'll be able
to replicate this behavior if you point the subdomain to the
/gallery directory, or if you create another folder, point the
subdomain to said folder, and put a file in it called
"config.php".

I apologize for the confusion.

If you have any further questions do not hesitate to contact us.

I still don't buy that, but I can access the config.php file using the original domain and folder.

Joachim Müller

This has been reported before - on some webserver configurations, you can't use the file name "config.php" - we found out about this after the release of cpg1.3.x. For future releases, the file name of the config screen has been changed to avoid such difficulties. As a workaround, you can rename the file config.php to "foobar.php" (in other words: any file name you can think of that doesn't collide with filenames already used by coppermine) and then change the reference to it (the link from the admin menu that points to "config.php", to be edited in themes/yourtheme/theme.php), or you could then directly access the config page by manuall entering the new file name in the address bar of your browser.
We (the coppermine dev team) are sorry that the filename causes trouble for some users, but after all it's not us who are to blame, but webhost that have a "silly" webserver configuration that disallows the usage of certain valid file names.

HTH

Joachim

rphMedia

OK thanks, makes sense.  Like I said, another workaround is to login at my host root and it's fine.
You guys (dev team) don't need to be sorry at all.  This is the ultimate in Gallery packages out there; and I haven't found a single glitch in the entire structure. I have the 1.4 beta running also (playing around with it) waiting patiently for its final release!  Thanks for all the (hard volunteer) work on this. I still can't believe it's free.

smallseb

I thinlk i totally agree with you, and blame my host!
Thank you for all the hard work you make for us, the time you spend answering question...for troubles you don't made!