Problem with paths (huge redirect issues)

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
faglork

Re: Problem with paths (huge redirect issues)

Post by faglork »

Hare wrote: Hopefully my host will finally disable safe_mode quite soon. I'll update this topic once it's done. I'm hoping safe_mode is the root of these problems...
Just to confirm: I run all my sites in safe_mode, never had a problem with CMSMS.

Cheers,
Alex
Hare
Forum Members
Forum Members
Posts: 87
Joined: Sat Jun 03, 2006 11:46 am

Re: Problem with paths (huge redirect issues)

Post by Hare »

Hmm...

I just did a clean install of 1.1.1. The installer showed only green bullets so everything should be ok. Doesn't work. Same problem as previously.

I guess I have no other option to suggest changing the host...
Pierre M.

Re: Problem with paths (huge redirect issues)

Post by Pierre M. »

Hello again,

@faglork : thank you for the confirmation.

@Hare : I'm sorry, I'm now confused since August 15th. No more safe mode, all green lights and 1.1.1. This sounds good. Could you please precise what "Doesn't work. Same problem as previously" means ? Please describe how to reproduce your problem step by step.

Pierre M.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Problem with paths (huge redirect issues)

Post by calguy1000 »

Have you checked and disabled mod_rewrite, and mod_security.  It looks like some of the urls are getting rewritten for some reason.  well, that's my current guess anyways.

There are ways to disable mod_rewrite, and particularly mod_security in a .htaccess file.  If that doesn't work you can ask your host about them.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Hare
Forum Members
Forum Members
Posts: 87
Joined: Sat Jun 03, 2006 11:46 am

Re: Problem with paths (huge redirect issues)

Post by Hare »

First of all. Thanks guys for your help.

@Pierre M: The situation is exactly like before. I'm not sure how anyone can really reproduce these problems. I've done CMSMS installations on at least 8 different hosts without these problems. This is the first time I'm having real issues. As I said, clean install 1.1.1. Here are a couple of examples of the problems I'm experiencing.:

When I enter my login details and press ok I get sent to the frontpage of my installation (www.domain.com) even though the login should go to www.domain.com/installation/admin/. It doesn't matter if the installation is at the root level or in a subfolder. The only way to login is to first try and get thrown out and then manually try again directly the url www.domain.com/admin.

This same problem occurs in most admin level tasks like typing a news entry. If I go to the news module and create a new article and press submit my browser again skips the subdirectories and goes to the public frontpage:

Code: Select all

http://www.domain.com/moduleinterface.php?mact=News,m1_,defaultadmin,0&m1_tab_message=articleadded...
It just seems to skip the admin directory. The funny thing is that it displays admin information on the public template.

Oh and TinyMCE doesn't work. I just did a clean install on another host and it's working fine (my own apache server) but I just can't get this thing to work.

@Calguy
My host doesn't use Apache so I don't think htaccess files work? Sun server, details on a previous message.
Last edited by Hare on Sun Aug 26, 2007 7:52 pm, edited 1 time in total.
Pierre M.

Re: Problem with paths (huge redirect issues)

Post by Pierre M. »

Hello,
Hare wrote: When I enter my login details and press ok I get sent to the frontpage of my installation (www.domain.com) even though the login should go to www.domain.com/installation/admin/. It doesn't matter if the installation is at the root level or in a subfolder. The only way to login is to first try and get thrown out and then manually try again directly the url www.domain.com/admin.
This is very very strange. I haven't read such feedback in these forums yet. I think Calguy1000 is right : there must be some rewriting/redirecting activated somewhere in SunOne Webserver. If you have successfully installed many times on other hosts, you should ask your hosting provider. Begin with http access/error logs.
This is why the documentation keeps a list of known working configurations.

Pierre M.
Hare
Forum Members
Forum Members
Posts: 87
Joined: Sat Jun 03, 2006 11:46 am

Re: Problem with paths (huge redirect issues)

Post by Hare »

Did more debugging and I think I've found the problem. I don't know how to fix it though, help?

I just tried the following PHP code

Code: Select all

echo '1  ';
echo $_SERVER['PHP_SELF'].'<br /><br />';

echo '2  ';
echo $_SERVER['SERVER_PORT'].'<br /><br />';

echo '3  ';
echo $_SERVER['HTTP_HOST'].'<br /><br />';

echo '4  ';
echo $_SERVER['SERVER_NAME'].'<br /><br />';

echo '5  ';
echo $_SERVER['SERVER_NAME'].'<br /><br />';

echo '6  ';
echo $_SERVER['REQUEST_URI'].'<br /><br />';
Guess what? REQUEST_URI doesn't return a value. Nothing comes out. CMSMS uses a separate "redirect" function and I quess it can't function properly if there's no request_uri value available. Any ideas how to fix this?

Otherwise things look ok. The returned values match my working Apache installation.

Could someone help me hack the redirect function?
Last edited by Hare on Thu Aug 30, 2007 7:09 pm, edited 1 time in total.
Pierre M.

Re: Problem with paths (huge redirect issues)

Post by Pierre M. »

Hare wrote: Guess what? REQUEST_URI doesn't return a value. Nothing comes out.
Does it output the s after the "6" ? Please retry with an echo "7 : end" at the end.

Pierre M.
alby

Re: Problem with paths (huge redirect issues)

Post by alby »

Hare wrote: Did more debugging and I think I've found the problem. I don't know how to fix it though, help?

I just tried the following PHP code

Code: Select all

echo '1  ';
echo $_SERVER['PHP_SELF'].'<br /><br />';

echo '2  ';
echo $_SERVER['SERVER_PORT'].'<br /><br />';

echo '3  ';
echo $_SERVER['HTTP_HOST'].'<br /><br />';

echo '4  ';
echo $_SERVER['SERVER_NAME'].'<br /><br />';

echo '5  ';
echo $_SERVER['SERVER_NAME'].'<br /><br />';

echo '6  ';
echo $_SERVER['REQUEST_URI'].'<br /><br />';
Guess what? REQUEST_URI doesn't return a value. Nothing comes out. CMSMS uses a separate "redirect" function and I quess it can't function properly if there's no request_uri value available. Any ideas how to fix this?

Otherwise things look ok. The returned values match my working Apache installation.

Could someone help me hack the redirect function?
Check with:

print_r($_SERVER);

Alby
Hare
Forum Members
Forum Members
Posts: 87
Joined: Sat Jun 03, 2006 11:46 am

Re: Problem with paths (huge redirect issues)

Post by Hare »

PierreM: Yeah it prints out "6 

"

Unfortunately I can't debug more tonight (need to get some sleep, early morning). I'll post more details tomorrow. I think it's an issue with the Sun webserver. It just doesn't return request_uri. I think this has been a problem with other systems used on IIS etc?
Hare
Forum Members
Forum Members
Posts: 87
Joined: Sat Jun 03, 2006 11:46 am

Re: Problem with paths (huge redirect issues)

Post by Hare »

alby wrote: Check with:

print_r($_SERVER);

Alby
Here it is. I replaced the actual domain with "domain.com". Same thing with the path, I changed the domain name to "namechanged". The "redirect.php" is just the test file containing "print_r($_SERVER);".

Here's the output in all its glory. Hopefully this helps:

Code: Select all

Array
(
    [HTTP_HOST] => www.domain.com
    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 6.0; fi; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
    [HTTP_ACCEPT] => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    [HTTP_ACCEPT_LANGUAGE] => fi,en;q=0.5
    [HTTP_ACCEPT_ENCODING] => gzip,deflate
    [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
    [HTTP_KEEP_ALIVE] => 300
    [HTTP_CONNECTION] => keep-alive
    [HTTP_REDIRECT_STATUS] => 200
    [PATH] => /opt/iweb/webserver/bin/https/bin:/usr/sbin:/usr/bin:/bin:/usr/bin
    [TZ] => EET
    [LD_LIBRARY_PATH] => /usr/lib/lwp:/opt/iweb/webserver/bin/https/lib:/jre/lib/sparc/server:/jre/lib/sparc:/jre/lib/sparc/native_threads::/usr/lib/mps/secv1:/usr/lib/mps:/usr/lib/mps/sasl2:/opt/openldap/lib
    [SERVER_SOFTWARE] => Sun ONE Web Server/6.1
    [SERVER_PORT] => 80
    [SERVER_NAME] => www.domain.com
    [SERVER_URL] => http://www.domain.com
    [REMOTE_HOST] => XXX.XXX.XXX.XXX
    [REMOTE_ADDR] => XXX.XXX.XXX.XXX
    [REDIRECT_STATUS] => 200
    [HTTPS] => OFF
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_PROTOCOL] => HTTP/1.1
    [REQUEST_METHOD] => GET
    [SCRIPT_NAME] => 
    [PATH_INFO] => /test/redirect.php
    [PATH_TRANSLATED] => /data/iweb/storage/NAMECHANGED/data/test/redirect.php
    [PHPRC] => /config/php/www.pl
    [PHP_SELF] => /test/redirect.php
    [argv] => Array
        (
        )

    [argc] => 0
)
Hare
Forum Members
Forum Members
Posts: 87
Joined: Sat Jun 03, 2006 11:46 am

Re: Problem with paths (huge redirect issues)

Post by Hare »

Thanks. I'll try to modify the code but it's not very easy since it's not commented...

Any help making the redirect function work would be very much appreciated and imho would also help the community (wider support for hosts).
Hare
Forum Members
Forum Members
Posts: 87
Joined: Sat Jun 03, 2006 11:46 am

Re: Problem with paths (huge redirect issues)

Post by Hare »

I just can't get this working. The redirects aren't the only problem.

this is what my tinymce path looks like in the admin pages:

Code: Select all

<__script__ type="text/javascript" src="http://www.domain.com/test/modules/TinyMCE/tinyconfig.php"></__script>
it should be ...com/test/admin/modules...

This was a clean 1.1.1 installation.
Last edited by Hare on Sun Sep 02, 2007 3:14 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Problem with paths (huge redirect issues)

Post by calguy1000 »

I'm still thinking you've got a mod_rewrite or a mod_security issue.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “CMSMS Core”