Ajax database in Joomla - ajax

How can I implement this script found on w3schools in Joomla 1.5? Ajax Database
I tried to make it work for Joomla and I get this error:
Not Found
The requested URL /component/virtuemart/getcustomer.asp was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Thank you.

Your server is complaining that it cannot find the file /component/virtuemart/getcustomer.asp, if you check the code it is referenced on the bottom:
xmlhttp.open("GET","getcustomer.asp?q="+str,true);
So you need to add the server page as well. However the code given in that example (under the title "The AJAX Server Page") is ASP code so it won't work(unless your server both supports ASP & PHP, very unlikely).
In short that example won't work for you. You need to check the other example:
http://www.w3schools.com/php/php_ajax_database.asp
You need to add both the html page & php page.

Related

WSDL has the wrong URL in the soap:address location Magento

I am working on Magento Soap API version 2. but During login call I am getting site complete index page HTML instead of valid data.
After Debug using Soap UI I have found that soap:address location URL is incorrect.
URL Coming: http://SITENAME/index.php/?type=v2_soap
Correct URL: http://SITENAME/api/v2_soap/?wsdl=1
I have checked in wsdl xml as well. It have default values there.
Anyone face the same issue ? Please Help !!
If you didn't change anything in Magento's code you should use this URL:
https://yourmagentosite.com/index.php/api/v2_soap/index/
if it will not work, try to use: https://yourmagentosite.com/index.php/api/v2_soap/
Also, keep in mind that some url may not work due to incorrect web server configuration, in this way you should look into web server config.

codeigniter custom 500 error

At this very moment I do not have any 500 error being thrown, but in case I ever do in the future I'm trying to customize a page so users never see that awful white screen.
I am having trouble adding said page. I have the page made and a controller that loads the page, but when I try and route the page in the route file or route it using .htaccess I'm still getting that white screen.
This is what I have tried in my route file
$route['500_override'] = 'notFoundErrorPage/serverError';
and then this is what I have tried in my .htaccess
ErrorDocument 500 http://writeyourfiction.com/NotFoundErrorPage/serverError
any help would be wonderful!
CodeIgniter does not have any custom error handlers aside from 404_override, so using one for any other HTTP code will be fruitless.
Apache has custom error pages as you've already attempted, but there are a couple of things to note that may be affecting your results:
1: A local URL begins with a /
A local URL to redirect to (if the action begins with a "/").
2: Specifying in an .htaccess may require additional configuration:
It may be used in .htaccess files if AllowOverride is set to FileInfo.
If you seek additional help, either here or elsewhere, please provide more information about your server environment: operating system, web server (e.g. Apache) and version, any relevant add-ons or modifications you may have made, etc.
It depends on the server software you are using. If you are using Apache, see here: http://httpd.apache.org/docs/2.2/custom-error.html
If you aren't using apache, google "[webserver software] custom 500 page".
If you're still having trouble, try asking on serverfault.com.

CodeIgniter: 404 Page not found on first launch

Good Day, I have used codeIgniter a little but whenever we download codeIgniter framework from their website and after extraction to the server root folder. If we access the framework we usually se a Welcome page. But here is a different situation that I'm seeing a 404 page not found error page. I have tried a lot but unable to identify what the hack is behind showing a 404 Page instead of the beautiful Welcome Page.
Not sure if it helps, but check the .htaccess and routes. I just answered a similar question here passing variable to default controller in codeigniter

Magento - Checkout not redirecting to success page

I'm working on a store deployed using Magento. It has one module which I wrote, which has event observers for checkout_type_onepage_save_order_after, checkout_type_multishipping_create_orders_saved_after, and admin_created_order_after.
When a customer places his/her order, Magento does not redirect to a success page when my module is enabled. When I disable my module, it redirects just fine. With or without my module, the order still goes through but it's not very user-friendly if there's no thank you message of some kind.
Anyone have any ideas what the problem is? There's no entry in any error log (Apache, PHP, Magento, or database).
Using magento 1.6.2.0 on PHP 5.
In case anyone else is having the same or similar problem, I just solved a very similar issue thanks to TonyTheJet's comment here. I am using onepagecheckout in Magento CE 1.7.02
If you have a stray echo command in your code, which will send raw text to the browser, this will cause a problem on the browser side in onepagecheckout.js . It does not correctly un-encode a subsequent JSON string sent by the server to say that the order was processed successfully. Because of that, the browser fails to send a GET to trigger the onepagecheckout controller successAction().
If you are using a protocol analyser or a tool like Firefox Firebug, the crucial JSON string should look like this. The order_creates=true is what should trigger a browser request for the success page:
{"success":true,"error":false,"order_created":true}

Getting 401 error in Joomla backend when trying to login\logout or edit anything

I have a website built on Joomla.Everything seemed to be going fine when all of a sudden I am noticing the following.
When I go to the administrator login page, once I fill my details and press login, I am getting a 401.shtml page with following message -
"Not Found
The requested URL /401.shtml was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.5 Perl/v5.8.8 Server at www.shillingstudios.com Port 80"
Now as per my understanding the 401 error would mean that I do not have the authorization to visit that page or do what I am trying to do.Maybe I am not entering the correct username or password.
However,my username and password are correct.Moreover if I go back to the admin login page I find that I am logged into the administrator panel, which means that my login attempt was successful even though I was directed to 401.shtml page.
The same thing happens when I try to logout(on refresh I find that I had successfully logged out)
When I try to Save/Edit/Close an Article/Category/Section I am redirected to the same page.But in each instance I am actually able to successfully do what I was trying to do.
The only change that I made prior to this issue was installing following plug-ins:
Set Generator tag plug-in
Title Manager plug-in
I installed both plug-ins for SEO purpose from http://extensions.joomla.org/extensions/site-management/seo-a-metadata
I thought that the issue might have caused due to installing these plug-ins so I disabled them, but the problem is still there.
I am trying to setup a website for an Android game that I am developing and Joomla seemed a good option for creating my own website. However I do not have much idea about PHP or MySQL or how Apache server works.So I am not able to determine why this is happening and what can possibly fix this, so any help will be appreciated.
You could try making sure that your website URL is in the 'live site' field in the config.php file. That can sometimes help.
First you should create your custom error pages – you can use a text/HTML editor of your choice (for example Dreamweaver). Once you are ready with the pages, upload them into a subdirectory of your public_html called errors. Then open your main .htaccess file and add the following lines in it:
serve custom error pages
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html
Important settings:
Search Engine Friendly URLs: Yes
Use Apache mod_rewrite: Yes
Mod_login settings: All defaults from installation
edit:
I did rename htaccess.txt into .htaccess

Resources