⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Saving data does not work if base_url in config.php is anyhting other than "/" or "http://youdomain.com/"



bluepicaso
  • profile picture
  • Member

Posted 26 August 2014 - 06:14 AM

I face this problem almost everytime.

In config.php if your base url is something like "/folder/folder_2/"

Sving records via CRUD does not work.

Though it works fine with just "/" on web server or "http://localhost/folder/folder_2" on localhost.

 

weird issue.

 


Amit Shah
  • profile picture
  • Member

Posted 04 September 2014 - 07:03 AM

Hi there

 

It dose not matter if you do not provide the base url in the config file. The system automatically picks up... so u need not set it there.


lunitik
  • profile picture
  • Member

Posted 04 November 2014 - 00:41 AM

My app runs out of a sub-folder (domain.com/myapp/) and I have the same problem. I tried setting the right path using $crud->set_crud_url_path(site_url('/myapp/admin/users/index')); but no luck. Any help would be greatly appreciated.


lunitik
  • profile picture
  • Member

Posted 04 November 2014 - 00:42 AM

I face this problem almost everytime.

In config.php if your base url is something like "/folder/folder_2/"

Sving records via CRUD does not work.

Though it works fine with just "/" on web server or "http://localhost/folder/folder_2" on localhost.

 

weird issue.

I am curious: Did you find a workaround?


Amit Shah
  • profile picture
  • Member

Posted 04 November 2014 - 16:36 PM

Well..

i never actually went and configured config.php - base_url ...

it is designed to pick stuff up automatically unless you exclusively wana define it.. as i never encountered a situation to define it..

i recommend - not to do the same...!! it will automatically pickup the path even if you into subfolder or the base folder.


lunitik
  • profile picture
  • Member

Posted 04 November 2014 - 22:51 PM

Well..

i never actually went and configured config.php - base_url ...

it is designed to pick stuff up automatically unless you exclusively wana define it.. as i never encountered a situation to define it..

i recommend - not to do the same...!! it will automatically pickup the path even if you into subfolder or the base folder.

 

I will remove the base url and see how it goes.. Thank you


lunitik
  • profile picture
  • Member

Posted 05 November 2014 - 02:37 AM

Amit

 

I set base_url to '' and tried to add a record. Since my application runs under "/app/", the form's action url still starts with "/app/app/controller/etc....". So there is a bug in that functionality which @bluepicaso also experienced. I tried setting the crud_path etc but no luck.