codeigniter

Several time ago, i build my own app or web app with code igniter. There is no error when i build and test my app on server or call it with http://localhost/myapp.

Different case in implementation. I found problem after installed new client and call this web app from client browser. Commonly you can call your web app with http://ip address/myapp. But in my case there is nothing happen after it.

investigate start.

Loading...

XAMPP or another server emulator check

In older version XAMPP you must edit your configuration for server. This necessary do before your client can load your project.

  1. Open the httpd.conf file in the C: \ xampp \ apache \ conf folder, edit the file using notepad or notepad ++ to make it easier.
  2. Look for the LoadModule text vhost_alias_module modules / mod_vhost_alias.so and remove the # sign in front of it.
  3. Look for the Include text “conf / extra / httpd-vhosts.conf” if in front of it there is a sign # remove the sign.
    Next we need to manage who can access XAMPP on the server computer, the steps are as follows.
  • Open the httpd-xampp.conf file in C: \ xampp \ apache \ conf \ extra.
  • At the bottom there are posts like the following

Order deny,allow  
Deny from all  
Allow from ::1 127.0.0.0/8 \  
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \  
fe80::/10 169.254.0.0/16  
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var  
</locationmatch> 

to add a computer with a specific IP address such as 192.168.1.3 can be done by adding the text as follows.

Allow from 192.168.1.3 
Allow from 192.168.1.4

<locationmatch i:=”” licenses=”” phpmyadmin=”” security=”” server-info=”” server-status=”” webalizer=”” xampp=””>  
Order deny,allow  
Deny from all 
Allow from ::1 127.0.0.0/8 \  
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \  
fe80::/10 169.254.0.0/16  
Allow from 192.168.1.3
Allow from 192.168.1.4  
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var  
</locationmatch> 

To give access to all users in the network can change the code “order deny, allow and Deny from all” to “Allow from all”.

    Restart XAMPP

if your XAMPP is update version do this for your code igniter app

in new version of XAMPP do not change httpd conf. Change this configuration not affected with your app. This happen with my web app to. In my case not XAMPP configuration affected error.

Deep investigate see in configuration in your code igniter file. You can found it in application folder inside config. same thing you can edit with notepad++. Check your code

$config[‘base_url’] = “http://localhost/myapp

Well, the application doesn’t work because the application running on the client side is always redirected to localhost even though there is no problem when running the application on the server.

we need to set it in the url base to:

$config[‘base_url’] = “http://&#8221;.$_SERVER[‘HTTP_HOST’];
$config[‘base_url’] .= preg_replace(‘@/+$@’,”,dirname($_SERVER[‘SCRIPT_NAME’])).’/’;

0/5 (0 Reviews)

10 COMMENTS

  1. Hello mates, pleasant piece of writing and nice arguments commented here,
    I am actually enjoying by these.

  2. I think the admin of this web page is in fact working hard for his site,
    since here every stuff is quality based material.

  3. Hello my friend! I wish to say that this article is awesome, nice written and come with almost all important
    infos. I would like to look extra posts like this .

  4. Wow, fantastic blog structure! How lengthy have you ever been blogging for?
    you make blogging look easy. The whole look of your web site is great, as well
    as the content material!

  5. I was wondering if you ever considered changing
    the structure of your website? Its very well written; I love what youve got to say.
    But maybe you could a little more in the way
    of content so people could connect with it better. Youve
    got an awful lot of text for only having one or two pictures.
    Maybe you could space it out better?

  6. I’ll right away grasp your rss as I can not in finding your email subscription link or e-newsletter service.
    Do you’ve any? Please let me know so that I may just subscribe.
    Thanks.

  7. Everything is very open with a clear clarification of the challenges.
    It was definitely informative. Your website is useful.

    Thank you for sharing!

LEAVE A REPLY

Please enter your comment!
Please enter your name here