How to test website on multiple browsers? - php

I need to test my website on multiple browsers (mainly ie8 & ie7), but bare in mind this website uses PHP which is running on a local server (using WAMP stack). The website is not on-line yet.
Furthermore, the website is interactive so simple screenshots will not do.
Can someone please help me find a tool that helps me test my site keeping in mind of the 2 things mentioned above. Thanks!

The best method is to put it online and use BrowserStack. It's an online service that creates a virtual machine, forwarded to your computer by Flash. The website will be slow, but still interactive. It's free for 30 minutes, or free for 3 months if you make an account via this Microsoft website. It's then quite cheap for that kind of service.
If you really want to test on your local server, you can use Internet Explorer 9, tap the F12 button to bring the developper tools, and then select a browser mode, like IE 7.

If you're using WAMP you can simply launch the desired browser and then go to
localhost/your_website_folder
Of course you must know where your localhost refers to. In WAMP it should be
C:\wamp\www
by default. So to access your website, you need to put it in C:\wamp\www\your_website_folder.

http://www.browserstack.com/
This is a web based virtual machine that tests pretty much every browser.
It can also set up a tunnel to test on your local host.
You get a short amount of time for free - just make sure you log out when you finish testing to stop it eating into your free trial period further

Related

PHP and node.js on the same server

I am using PHP for the backend of my website and I am introducing a node.js chat. I have everything figured out as far as authentication between the two, and my only problem now is switching between port numbers. How is this handled? Ideally I'd like to hide the port number and I've tried virtual hosts for this, but no matter how I configure the virutal host the server does not load and appears to be down. I am using cloudflare if this matter. But hiding the port isn't required. I just want to smoothly link to the chat app on port 2053 from the PHP app on port 443, and have the chat app link back to the PHP site. PHP uses apache. I can't find any easy way to do this. Been at this problem for days.
After much much research, trial and error I've figured out a few things.
My site consists of mainly PHP, I want to use node.js on a separate page as a chat app. I thought this would be easy, but I was mistaken. It's a lot of pain to get both node.js and PHP to work together flawlessly, and if I knew back then what I know now I might have went a different route. But I have things working for the most part and I am happy.
Some useful info:
If you want to link back to 80 or 443 from your node page, use the full URL with http/s.
If you want to use a virtual host it's only possible on Apache 2.4+ because socket.io can't communicate through it without some apaache mods that allow websocket proxing. It's also possible with NGINX from what I hear but I am less familiar with it.
So in the end I am just keeping the port number and allowing hyper links between the two. This is a temporary solution until I upgrade to either Apache 2.4 or NGINX.

REST API advice for beginner

I'm pretty new in this part of programming so any help would be appreciated.
I've made an app and now I want to allow the user to buy via Braintree. I have implemented it with help of some tutorials using PHP SDK, tested on phone using XAMPP and ngrok. It works perfectly (generates token, makes a payment using testing cards) but now I want to move it online. Just simply move that folder from XAMPP instalation folder somewhere online so I (and all other useres) don't need to use ngrok.
Actually, want to replace
final String API_GET_TOKEN = "https:/smthng-random.ngrok.io/braintree/main.php";
final String API_PAY = "http://smthng-random.ngrok.io//braintree/pay.php";
with
final String API_GET_TOKEN = "https:/WHATEVER/main.php";
final String API_GET_PAY = "https:/WHATEVER/pay.php";
so that can give me the same what I've got with xampp and ngrok.
Thanks in advance
btw: PHP is not my better side of programming so it would be great just to move those 2 files (main.php & pay.php) just like they are :) And I've just found that firebase might be option but just exploring for now :)
I think your request is unclear - it's not REST API advice at all, it's about deploying an application to a live environment.
You have successfully installed your web development environment locally (XAMP, nginx) and now it's time to go live.
You basically need a Linux server capable of running, well, apache mysql, php (get where that XAMP comes from?)
This is only an overview, search how to do each of the topics I'll describe:
1. Find a host. (You should go to the shared, vps hostings if you're inexperienced, otherwise, there are way better hosts like linode, digital ocean and AWS, but those can be a little more challenging for beginners.
2. Buy a domain
3. Point the domain's DNS to your host's IP address or NS
4. Now, upload those files you mentioned to the servers public folder. Servers public folders might differ, specially from shared / vps hostings to full-blown Linux instances. If you go the "cloud" way (digital ocean, etc) usually you'll drop the files at /var/www/html
You'll have to set up virtual hosts if you decide to go for the full blown Linux instances
The files should be accessible now. Make sure versions are consistent between your machine and your servers.

Drupal 7 to Local Server

I currently work for a company that is developing a web and mobile application. I've been programming for a while now, but am less familiar with web development. I previously had been writing specialized python scripts for the company; they wanted me to transition into developing their web app. The web dev is currently being outsourced, so there aren't employees at the company that are familiar with how the website was developed. The third party is aware of my task, but is not very helpful and would prefer I only make changes locally.
What I need to do :
I need to put the Drupal site onto a local server, so I can make changes without breaking what was previously built or being on the outsourced web server.
Site specs:
Drupal 7.52
mySQL
PHP 5.6.30-1
Apache/2.2.22
My specs:
Windows 10
I have the website files (code and database). I keep encountering the same error, and have tried a number of different solutions and web stacks. When I go to upload our database into phpMyAdmin, I get an error about the database being too large (unzipped, around 118,000 KB, zipped, around 12,000 KB). I have tried a number of workarounds, and keep falling short. I've changed max_allowed_packets, $cfg['UploadDir'], and many more recommendations given here on Stack Overflow.
I've uninstalled everything from my system, so I can just start over from scratch. If anyone can give a set of instructions for how I would take the website files, upload the large database, and then have a copy of the website on a local server, that would be miraculously helpful.
Thank you!
You could use a virtual machine like this project https://www.drupal.org/project/vdd, which has what you need for local development and you will not need to mess up with our local OS

Can I run mySQL when my computer is off?

This may sound like a dumb question, but I'm new to this. I'm setting up a website, and I want it to be able to have access to a MySQL database. I've recently downloaded MySQL 5.6 and have used the Workbench and Command Line Client to learn to make databases.
But all of this seems to be running of localhost, so I think it's just running off my computer, and when I shut it down the website won't be able to access it.
Is this correct?
Do I have to run it somewhere else to keep it accessible to my website 24/7, even when my computer is off?
Well, yes it is running of localhost unless you deployed it on another server. Yes, you have to run it somewhere else if you want it to run when your PC is turned off. In fact, if you want to make a website and use a database for it then there are many services out there that provide free hosting and come with a MySQL database.
An example would be freehosting.com without intending to do advertisement. A quick research would show you many alternatives.
Currently its running on your localhost or your computer. To make accessible website 24/7 to need to using hosting services like, Godday, Hostgator, bluehost or there hosting.
You can purchage you domain at very low cost with full services on Godday with full support.
In computer networking, localhost is a hostname that means this computer and may be used to access the computer's own network services via its loopback network interface.
Source: https://en.wikipedia.org/wiki/Localhost
In other words: every computer is its own "localhost", not just yours, and generally MySql and other database engines use localhost as default value.
See also https://dev.mysql.com/doc/refman/5.0/en/connecting.html
If you want to have your database accessible from the net without to use an external hosting service you have to keep your computer running 24/7. Don't forget to buy a good UPS (uninterruptible power supply).

Bizarre timeout in Web CMS, ideas?

I know this kind of thing cannot be adequately answered without a link to the live example. Unfortunately, I can't set one up right now as it's a back-end login and creating a safe public login would be too much to do at this point. Sorry. I'm hoping for ideas and input from people who may have experienced something similar in the past.
I am setting up a CMS for a client with a DSL connection in Spain.
The CMS is hosted on a straightforward standard, LAMP based, shared hosting package in a network center in Germany.
It comes with a .com domain.
When my client tries to log in to the CMS using Internet Explorer 7, everything works fine.
When she tries to log in using Firefox, she gets to the login form, submits it - and then the connection times out.
When she logs in using Firefox but using "domain.com" instead of "www.domain.com", everything works fine.
This happens on all computers that are hooked up to that line. One Windows XP, one Windows Vista.
The front-end part of the site, as well as a second, older CMS, work fine in all browsers.
I do not have access to the raw access logs.
I have not been able to reproduce this behaviour on any other connection.
Debugging ideas are welcome. Remote diagnosis is extremely difficult as the line is too slow to set up a proper remote connection.
If you are limited by how you can troubleshoot this, have the client install Fiddler - Web debugging proxy and then run the trace, and send you the logs, Fiddler will analyze the traffic (be it proxy or DNS timeout, etc)
Take a look if you have not used it before:
http://www.fiddler2.com/Fiddler2/version.asp
Check that Firefox and IE are using the same proxy settings.
DNS issues? can you put here your A records to check is everything is ok?

Categories