Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: jorgebravoc on October 14, 2012, 01:59:12

Title: Installation Issue Localhost port
Post by: jorgebravoc on October 14, 2012, 01:59:12
Hi everyone,

I just started testing out the new Elxis and I found a very rare situation, the installer wouldn't show any CSS or JS file.... so going to the source of the file I saw that the port of my localhost was being duplicated. It showed as http://localhost:8888:8888/includes/.......etc

So, what I did is go to the install.class.php  file and comment out the following code in line 583:

Code: [Select]
/*
if ($port > 0) {
$this->url = $protocol.'://'.$host.':'.$port.$urlpath;
} else {*/
$this->url = $protocol.'://'.$host.$urlpath;
/*}*/

I'm using MAMP on a mac and all the files are located on the htdocs folder which acts as a root for the local server, now MAMP uses a port, I don't know why exactly but here you have a solution in case somebody steps into the same problem.

I will continue with the installation, if I find something else I'll let you know, I hope this is not something I'll have to deal with after the installation, if so.... please let me know before I get my head all wrapped around it..

thanks a lot
Title: Re: Installation Issue Localhost port
Post by: datahell on October 15, 2012, 10:02:44
Thanks for reporting this.
I will check running apache on a different port than the default and do fixes if needed.
Title: Re: Installation Issue Localhost port
Post by: mazzeltof on October 17, 2012, 11:01:20
also working on a mac try a fresh in stall

with this solution
Hi everyone,

I just started testing out the new Elxis and I found a very rare situation, the installer wouldn't show any CSS or JS file.... so going to the source of the file I saw that the port of my localhost was being duplicated. It showed as http://localhost:8888:8888/includes/.......etc

So, what I did is go to the install.class.php  file and comment out the following code in line 583:

Code: [Select]
/*

but i'm getting this return

[quote]"http://localhost/elxis_4.0_nautilus/ 'can not be opened because there are too many redirects occurred. This problem can occur if you open a page that contains a redirect to another page that points back to the original page.[/quote]


if ($port > 0) {
$this->url = $protocol.'://'.$host.':'.$port.$urlpath;
} else {*/
$this->url = $protocol.'://'.$host.$urlpath;
/*}*/

I'm using MAMP on a mac and all the files are located on the htdocs folder which acts as a root for the local server, now MAMP uses a port, I don't know why exactly but here you have a solution in case somebody steps into the same problem.

I will continue with the installation, if I find something else I'll let you know, I hope this is not something I'll have to deal with after the installation, if so.... please let me know before I get my head all wrapped around it..

thanks a lot


but with this solution i get

Quote
"http://localhost/elxis_4.0_nautilus/ 'can not be opened because there are too many redirects occurred. This problem can occur if you open a page that contains a redirect to another page that points back to the original page.

Regards
Title: Re: Installation Issue Localhost port
Post by: jorgebravoc on October 17, 2012, 20:05:32
Are you using MAMP? As I mentioned, I use MAMP and this software uses the port 8888 as default for the Apache Server, so with the solution I gave you basically tell to Elxis, don't check if the port is greater than 0 therefore do not add the port in use to the URL. This way you don't get the duplicate port and calls to CSS and JS will work.

If you are using MAMP your URL is incorrect (http://localhost/elxis_4.0_nautilus/ ) because it should have a port in it. If you are not using MAMP then check your software as this solution is for a Mac MAMP user ;) 


Let me know if I can be of any help with your installation
Title: Install on different port fix
Post by: datahell on October 17, 2012, 21:52:09
Here is how to fix Elxis installer in case you run the web server in a different port than the default.

Open file includes/install/install.class.php
Go to line 545
Find this:
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
Add bellow:
if (strpos($host, ':') !== false) {
   $hparts = preg_split('@\:@', $host, 2, PREG_SPLIT_NO_EMPTY);
   $host = $hparts[0];
}

This fix was applied in Elxis 4.0 rev1328
Title: Re: Installation Issue Localhost port
Post by: mazzeltof on October 18, 2012, 12:24:43
sorry but does not work
with or without port in the url i keep getting

Quote
"http://localhost/elxis_4.0_nautilus/ 'can not be opened because there are too many redirects occurred. This problem can occur if you open a page that contains a redirect to another page that points back to the original page.

greetings
Title: Re: Installation Issue Localhost port
Post by: datahell on October 18, 2012, 13:01:20
The fix I posted is for running the web server in different port.
As for installation in a folder use a name for the elxis folder without special symbols (elxis_4.0_nautilus is a bad folder name), for example elxis4, and make sure you use the latest Elxis version. It should work!
Title: Re: Installation Issue Localhost port
Post by: jorgebravoc on October 18, 2012, 22:19:36
yes, you should never have Elxis inside a folder named with dots, dashes, slashes, or any special character, just plain letters or numbers.

When you unzip the Elxis compressed file you get a folder with the same name, rename the folder, or go inside and copy all its contents to the root folder of your server.
Title: Re: Installation Issue Localhost port
Post by: mazzeltof on October 23, 2012, 18:05:06
ok now it is working
in the passed i could use any name with dots and dashsss. renamed it elxis4 and it works

Thanks