Atom PHP Live Preview - php

I would like to achieve the impossible! After much research I simply can not get a live preview of a basic PHP website to work in my environment.
I have Windows 7/10 development machines and the first goal is to be able to make changes to PHP / CSS / SCSS files and see the changes appear automatically, on saving a document - without having to refresh the browser manually.
I'm using Atom v1.5, Wampserver v3.0.6 and have tried almost everything....LiveReLoad, BrowserSync etc etc.
The current setup works apart from live preview, in that I can display the websites and even go to different machines on the LAN and get to the website....but if I try and install Atom packages and or Chrome browser extensions, I generally get absolutely no response (i.e. no error message.)
Many thanks for anyone who can help with this - it surely must be a basic requirement for any professional developer?

Even though I've only just asked this question - I'd been working on it all day....however I have finally found a combination of tools and settings that worked!
The solution I found is:
Install Atom Live Server
Install Chrome Live Web Server Extension
Set the "Actual Server Address" in the Chrome Extension to whatever you have set in your Wampserver Alias - your httpd-hosts.conf file
Set the "Live Server Address" to your localhost + the port number gained from starting Atom Live Server: something like "http://127.0.0.1:4769"
Allow these requests through your firewalls on all applicable machines.
Note that Atom Live Server starts with a different port every time - so use the built in options to start on a fixed port, so that you don't have to keep changing the settings in the Chrome extension.
E.G. In Atom editor, ctrl-alt-5 to start it on port 5000

Related

Symfony local web server with domain proxy inconsistent behavior

I cannot seem to get consistent results with the Symfony local webserver using custom domains.
I initially set the proxy up according to the documentation here and it initially worked quite well. However on subsequent returns to working on the project it will most of the time fail to work, and I cannot seem to find the right sequence of steps to take in order to make the local server work with the proxy domains.
I understand that others have had issues with Chrome proxy settings and I've followed the steps to omit that to no avail.
I am running Symfony 5.3.7 for this project, locally on MacOS Big Sur 11.6. This morning returning to the project I have tried the following to no avail...
Stop and restart the proxy symfony proxy:stop & symfony proxy:start
Stop and restart the local server: symfony server:stop & symfony server:start -d
Flush the MacOS DNS cache
Clear the Chrome DNS cache
Remove bad proxies from Chrome
Reapply proxy settings in Chrome
Verified that the proxy PAC file is in place in the networks settings
Verified that automatic proxy configuration is checked in the network settings
Cleared all browsing data in Chrome
Restarted Chrome
I have tried various combinations of all these steps.
I've removed and reattached the proxy domains with the Symfony CLI.
I've tried other browsers including Safari and Firefox.
When I start the server, I can see that the domains are attached, or when I navigate to http://localhost:7080 I can see they are attached and 'running'.
When I visit the local domains I get the following error:
This site can’t be reached
Check if there is a typo in (domain).wip.
DNS_PROBE_FINISHED_NXDOMAIN
The only way I can visit the local site is thru the local host IP and the port that is assigned when I start the Symfony Server.
Try to open your website in incognito mode (so that all plugins get disabled). For me, I had a plugin for TunnelBear VPN. After I disabled the plugin, it started to work.

Website is not loading in chrome and firefox

My magento website is not loading in chrome and firefox.It works fine in IE only. I cleared the chrome cache and history but it not display my website it shows like "This webpage is not available ERR_SSL_VERSION_OR_CIPHER_MISMATCH ". How to solve this error i am working on this issue for last 2 days.
That's nothing to do with your website as such, that's a server configuration issue.
Most likely your server is still trying to serve https requests using SSL3, which has been removed in Chrome 40 (and I guess firefox as well, but I don't have the changelogs to hand to check)
This is a good tool to check your SSL settings:
https://www.ssllabs.com/ssltest/
This will confirm any issues, and advise on fixes.
If you don't have full server access, then you'll need to speak to your host.

How to test website on multiple browsers?

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

localhost doesn't work

I'm trying to solve out my problem since more than a week, but with no results until now.
When I try to open localhost/phpmyadmin, or any php file, I get on this message:
Internet Explorer cannot display the webpage ".
The same happens with Mozilla; no errors, but the page keeps loading without answer.
My configuration
Windows 7 32bit
Wampserver 2.2D ( all services are running ) green status, server online
My hosts file
127.0.0.1 localhost
::1 localhost
IIS is stopped, but I don't think it's a problem with port 80.
I tried going directly to 127.0.0.1, it didn't work.
I will appreciate any advice.
Thanks
You may want to check your firewall authorizations...
I had same problem; I have since added wampserver as authorized program to my firewall and, as above, stopped IIS services in control panel/admistrative tools.
I had similar problem, a lot of research and analysis but nothing helped. Finally I came across UwAmp which works like a charm for me ever since then. Try it out:
http://www.uwamp.com/
It also supports multiple versions of PHP which you can switch by single click anytime you want.
Ok so if you have IIS on, stop it.
Go to cpanel and search administrative tools, component services, services (local), and scroll to the w's to find and stop:
World wide web publishing service
and
Web deployment agent service (something like that)
Good luck.

PDT XDebug. How to debug with ip address but not localhost

I am developing a PHP project and using PDT with XDebug which is working smoothly at localhost. (By the way, I am using XAMPP in windows 7)
Now, I want to debug some of the features from other PCs which need to use my local IP(or pc name) for request.
But I even can not debug at my local PC with IP address that is like http://127.0.0.1/xxx or http://192.168.1.yyy/xxx.
I have looked up some articles which introduced to change some settings in the php.ini and httpd.conf files. But there is no help to me (I have done some of them at the begining of I setting up the project and without problem to use localhost).
What I did is that first launch one browser (ie, ff, safari, etc.),
and enter the url I want to debug(of course there is no any response at this time)
Then I add ?XDEBUG_SESSION_START=ECLIPSE_DBGP just behind the url.
Secondly I launch another browser and enter the url I want to debug again,
but this time, you will have the PDT been going into debug mode.
Soruce: http://devzone.zend.com/1147/debugging-php-applications-with-xdebug/
by searching XDEBUG_SESSION_START which gave me the hint.

Categories