Welcome Guest, Not a member yet? Register   Sign In
How to install codeigniter and view at a temporary URL.
#1

Hi guys, how are you? I would like to take a doubt with you. I'm new to codeigniter and I'm doing a testing environment to use codeigniter. I currently use the CWP (Control Web Panel) to organize my test environment. I create the hosting account normally and would like to use the temporary url that it creates, for example teste.ddns.net/~client1. When downloading the latest version of codeigniter I put the content of public in my client's /home/client1/public_html folder. The rest of the directories are located in the root folder of the client /home/client1/codeigniter. I checked the permissions and owners of the file and they are ok. But typing the url http://teste.ddns.net/~cliente1 gives the message 500 Internal Server Error. Is it possible to function CI4 in this temporary url? I appreciate the help.
Reply
#2

(This post was last modified: 02-22-2021, 05:17 PM by John_Betong.)

Try the following and if the file name is not rendered then temporarily rename .htaccess file. If the file name is rendered then gradually move the test down the file until the 500 error appears again.

File: index.PHP

Code:
<?php 
echo __file__; die;
Reply
#3

Hi John_Betong, I put what you told me but the error message didn’t change Sad. Apparently codeigniter is not recognizing the url http://teste.ddns.net/~client1 as the main one on the site. about something but to no avail. I appreciate your help.
Reply
#4

Look at the application and web server logs.
Reply
#5

Try copying all of the public folder files into the public_html folder

On my website it is named public_html I rename public folder to public_html
and then just ftp all files to the root and it runs right off.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#6

(02-22-2021, 06:48 PM)dfavacho Wrote: Hi John_Betong, I put what you told me but the error message didn’t change Sad. Apparently codeigniter is not recognizing the url http://teste.ddns.net/~client1 as the main one on the site. about something but to no avail. I appreciate your help.

It is essential to get index.php to render the file name before modifying anything else.

it is not CodeIgniter that fails to recognize the URL, it is Apache2.

This Apache2 500 error must be solved before trying any CodeIgniter modifications.
Reply
#7

Since you have put the contents of public into home/client1/public_html, you have 2 options here.

1. Copy all other files into home/client1. Do not put inside codeigniter folder.

or

2. Copy all other files into home/client1/codeigniter1. Update the paths in app/Config/Paths.php to point to the new paths.
Reply
#8

Hi guys, I found out where the error was. I believe that when using the temporary URL in the CWP it does not allow you to use the options in the .htaccess: Options All -Indexes and Options + FollowSymlinks. Just comment these lines and the codeigniter works. Thanks to all for your help.
Reply
#9

As mentioned in a previous post that .htaccess file should have been temporarily renamed to test to see if Apache2 was rendering index.php. If rendered OK then proceed with further tests.

I believe .htaccess is mostly essential for "Pretty Urls". If there is no .htaccess file then CodeIgniter uses the following default method:

//app/config/App.php
Code:
/**
* --------------------------------------------------------------------------
* Index File
* --------------------------------------------------------------------------
*
* Typically this will be your index.php file, unless you've renamed it to
* something else. If you are using mod_rewrite to remove the page set this
* variable so that it is blank.
*
* @var string
*/
public $indexPage = ''; // 'index.php';
Reply




Theme © iAndrew 2016 - Forum software by © MyBB