What is url in ajax - ajax

I am developing a cross platform application using cordova. I have to send data from a form in app to a database which is on the on a local server created using XAMPP. MY .php file is in htdocs in xampp. I have tried many different things but nothing worked, the problem seems to be with ajax url. What value is given in ajax url. Now, my database is on my laptop using xampp server.

You should give webserver ip adresse and path to you'r PHP file.
Don't forget you will test from an Android or IOS apps and so there havent access to localhost.
So if you'r PHP file path is : localhost/hello.php you have to check you'r ip adress (cmd -> ipconfig) and then use this url on you'r ajax request : 192.168.XXX.XXX/hello.php

Related

How to host Laravel project on Raspberry Pi

I have scoured the depths of the internet for this solution and I come up empty handed. I have installed apache server on my pi and when I access the IP address from another computer, it pulls up the correct index.html page. So the server is working fine. My problem is that I can't get my Laravel app to work. When I deploy my laravel apps to other hosting sites, I put everything except the "public" folder into a separate folder in the file tree, and edit the index.php file in the public folder to match the new file structure of pointing to the autoload.php and bootstrap files. None of that is working for me in the apache server on the Pi. Can someone tell me how to do this or where there is legitimate documentation on how to do it. Please don't point me to any google articles that come up in the first 3 pages because i've read and tried them all.
The only thing that happens right now is that when i go to "IPaddress/project_folder" in the URL, it just brings up the file tree in the browser as opposed to pointing to my "/" route within the laravel project.

move codeigniter project from localhost to live server

Trying to move the codeigniter project from laptop server to live server. Uploaded the files in Public_HTML and I modified the config.php, base_url, .htaccess as needed and also upgrade the Database... when i run project default controller called correctly when other controller can not call this message show 404 Page Not Found. config.php and .htaccess files update as correct information. This same project run successfully on Local or Desktop server but produce Error on live server 404 Page Not Found home controller (default controller) call but other controller not call.
What is your server? And whats your configuration file?
Make sure you enable mod rewite if you are using apache
a2enmod rewrite
Have you removed index.php from url? Try to access another controller like this.
<domain>/index.php/<controllername>

Why am I getting broken access to layouts.app (for lavravel app) on heroku hosting but not on localhost?

I am a student and have created my first Laravel App (A blog app). I have a layout/master view created named app.blade.php in resources/views/layouts folder.
I am using laravel 5.6.
It works perfectly on localhost but not on heroku hosting.
Here is my project structure
Here is my code in home.blade.php
Heroku hosting error screen below
Localhost view
clueless about this problem. I need your support.
EDIT
I solved the problem. I am on a windows system while hosting on a linux platform. So my sweet innocent windows was not updating the "Layouts" on server with "layouts".
But I am with another problem
Regards,
Arpan
but loading /login /register correctly
Now this doesn't end here,
when I type /login with the url it gives me
Now I observe that when i click the link it shows me Not secure connection and displays properly but when typing there is https but not displayed correctly.
Please help me analyse and figure out the issue.
Github repo link : https://github.com/ArpanKIIT2017/blog4b/
Its because the app was unable to find the file. But everything looks good. can you check if the file exists on remote server.
what are you using to push the files to remote server?.
try running
php artisan view:clear
on both local and heroku
Actually Heroku doesn't support SSL in free tier. So https actually won't work.
Finnaly migrated my app to postgre sql.
Problem mainly was due to the uppercase and lowercase representation of "Layouts".
So my app is Up and Running only with one problem that is heroku doesn't support file uploads. It is not storing any file upload. Searching solution for that but not related to this post.
Thank You

error when accessing laravel project in ubuntu server 16.04

I have problem when i try to access my webapp in my ubuntu server 16.04..
when i try to type my server ip with the laravel folder it showing this message,
The requested URL /laravel_spk-matautama/home was not found on this server.
but then i try to put index.php on my link like this url
http://xxx.xxx.xxx.xxx/laravel_spk-matautama/index.php/home
it works, but the problem is it wont embed the masterpage layout.
Do like this, to access your home page
http://xxx.xxx.xxx.xxx/laravel_spk-matautama/public

xampp - no longer loads local website but always redirects to internet version of site

I have a website that is live and a version that I am working on locally using XAMPP. For some reason every time I try to load:
http://localhost/websitename
or
http://127.0.0.1/websitename
it goes to the internet version. This has only started happening. All services are started. XAMPP is working for all other sites that I am working on locally.
Check your site settings as I believe you're having the url in your website set to the live version.
This can have alot of reasons.
What does your windows host file have for redirect rules (C:/Windows/system32/drivers/etc/host) I assume that you use Windows because you said "xampp", correct me if im wrong)
Check for header(); redirects within your websites php scripts.
Do you have a v-host entry redirecting you to another url in your v-host config of your apache?
Check if you have any hard-coded url's? or redirects? in the project that are redirecting to the live version.

Resources