firefox copies html files in /tmp/mozilla - html

I set up apache2 for training myself to write php and javascript files.
It functioned fine for a while.
Then the browser (Firefox) started asking me whether I wanted to open or download the files I was working on.
Even if I say "open", it first saves a copy of the file in
file:///tmp/mozilla_name0/index.html
and then it renders it in a new window.
I open the file with
http://localhost/index.html
I tried replacing localhost with 127.0.0.1
-> no effect
I tried "sudo chmod 000 mozilla_name0
-> it started using mozilla_name1 instead
I looked in about:preferences / Application but there is no option to tell Firefox what to do with html files. Probably because it should know!
I looked in about:config but I didn't see what I should change in there.
I looked online but I couldn't find this issue. I even searched in bugzilla.org
I don't know if this an apache issue, or what.
I don't think this is a browser issue because I installed opera, tried to make it execute my html file and it downloaded it instead.
Please help.

Related

MySQL is only downloading in zip format. How to fix it? Or how to open?

Yesterday I went to download MySQL, and I managed to install it, when the download finished, I double-clicked and the program opened normally. I created an account just for testing, so I didn't save the password, so I deleted MySQL to create another account... However when I go to download, now only the option to download in Compressed (zipped) Folder format appears, and I have no idea how to open any type of download in that format, I've tried following the steps taught in the videos and I couldn't either.
Is there a way to fix this? Because yesterday MySQL was downloading normally (as in the image below) and I had no difficulty opening it.
But now the download is just like this (as in the image), and I can no longer open the program.
Note: I use the 64 bit version of Windows 10.
I assume you're downloading MySQL community server from it's official page here: https://dev.mysql.com/downloads/mysql/
If you are, then you can see in the page there are 3 blue buttons
I assume that you are downloading from the "Other Downloads" section (no.2 in image).
could you share the link to the source where you downloaded MySQL?
Usually you should be able to unzip the contents of any .zip file by right clicking the archive in a explorer and choosing extract (not sure what the exact buttons in Windows are called since I don't use it).
Maybe your file got corrupted while you downloaded it (connection issues), have you tried re-downloading it?
I've just searched for the download and started it from the official website
(https://cdn.mysql.com//Downloads/MySQLInstaller/mysql-installer-community-8.0.32.0.msi). This starts the download of an .msi file in my case. Can you confirm that this still starts the download of a .zip file?

chrome extension reload on file change

I've been searching for-ever!
I`m working on windows and ubuntu, mostly on windows.
I searched the web for lot's of external libraries such as opn, open etc' but none of these could open this URL:
chrome://extensions
I want to put in the the script tag inside package.json
or in my build.js script
so that every time after I run "npm run build"
the chrome://extensions page will reload and also the additional page I`m testing on.
I once was able to do that exactly, but I lost that solution.
part of the problem is that I can't open chrome:
the ':' symbol is not recognized in the OS as valid protocol or something and it is escaped from chrome address bar if executed from command line.
I have tried many solutions.
I am not happy with the different resolutions proposed in the research I've made in Stack.O.
reloader as an extension is out of the question I want a script.
your kind help.
Assaf.
Clerc - for Chrome Live Extension Reloading Client
I built Clerc for exactly this purpose. npm run build won't be enough though. You need to hook up a LiveReload compatible server to watch for file changes, and clerc will listen for the reload messages.
Edit: Oh sorry. I missed the part where you said "reloader is out of the question". I still think this is your best option though.

Loading HTML and CSS file on local browser

I'm very new to coding and web development. I'm working with HTML and CSS at the moment. The trouble is, I can't see what I'm coding.
How do you load a HTML and CSS file onto a local host so that you can see what you are doing?
Really appreciate it if you could give your input. :)
I've had this question as well, haha. But you'll learn.
So there are two solutions here; one using a localhost and one just simply viewing the file.
I'm not sure what device you're on, but to view your file, just simply double click it as you would do to open any other file. Then you will be able to see your code and what you're programming.
The second solution is the use of a localhost; it's basically a test environment for your website to view it during development.
To set up a localhost on a Macintosh device, you simply go to the Finder and search for Terminal, later open it and write; python -m SimpleHTTPServer.
If you have a folder for your files as well (which is recommended for future reference), just use cd and type where it is. The easiest method would be placing it on the Desktop, and then write in the Terminal; cd Desktop -> cd the-folder-you-have-your-code-in and then write python -m SimpleHTTPServer.
To access this server, just type localhost in the search bar where you'd search for items on the web.
Hope this helps you, and welcome to the developing society!
For future reference, when you become a full-fledged developer, don't use Homestead/Laravel, it's a pain in the ass when you don't understand it. Use WAMP, MAMP, or XAMPP based on what device you're on.
Just open the html file with your browser. On Windows, in Windows Explorer right click on the file and choose open with, then choose your browser.
file:///[complete path to your file] does the trick in Chrome, Firefox and IE, but as #Atrix said, right click + open in [your favourite browser] works too.
You might want to install a full-fledged webserver one day or another though, like Apache or nginx. You also have full stacks servers available (usually coming with a PHP interpreter and a database server), like WAMP (on Windows), or XAMPP (on Windows, Linux and MacOS)
You can do the following:
On a Window machine at the prompt type start the-HTML-file-name
Here is an efficient alternative:
Go to W3Schools Tryit Editor. Wait for the page to fully load. Then enter the following line in the browser's console and press Enter:
document.getElementById('textareawrapper').setAttribute("onkeup","submitTryit(1)")
Now start typing your code in the text area. This is far better than working with a text editor as it shows the output directly as you type.

My website shows up as a blank page on my desktop

I have been developing a wordpress theme on my laptop and all is well, however when I checked it on my desktop today all that loads is a blank page. I have asked a couple friends to see if it loads for them and they all say that it does.
I am really not sure how it will not load on this computer, I've cleared the cache/cookies and reset the ip, still blank. I need to figure out what is going on quickly before this is supposed to be done.
The website url is http://bbmthemes.com/themes/modular/, the top left logo should be broken, other than that everything should work.
Can you think of anything that would make one computer not display anything but a blank page or what I could try to fix this?
Thanks so much
EDIT It displays blank in all browsers (firefox, chrome, ie9) on this desktop, and works in all browsers on the laptop. Also, I had already enabled phpconfig and checked for php errors before I noticed this. I had removed all php errors about a week ago and they were only minor things anyway. Very confused. Does it work for you guys even?
Turn on the wordpress debugging in wp-config.php file and run again to check is there any fatal error or not:
define('WP_DEBUG', true);
And be sure that error reporting is On
Maybe you are not in right path. I found this theme on your host refer to modular theme: http://bbmthemes.com/themes/smart/
Very frequent, this kind of problems arise because of the environment differences. You should check whether in php.ini short_open_tag=On is on or not. That might cause the problem. Also if your desktop machine is on the Linux machine php5-mysql package comes separately from php5 package.
Also as already mention you have to check log file.
In Ubuntu the location is - /var/log/apache2
On windows - the same directory where apache2 is installed.

FileReader API working in jsFiddle, but not from local file

I'm working on a Chrome/Firefox extension which will be using the file API to store files locally. I'm trying to get an example up and running but I'm running into issues which seem to center around Chrome. Can anyone explain why this jsFiddle works fine, but the exact same code, when run from a local file, doesn't work. Please note that it works fine in Firefox, just not in Chrome. Any ideas?
Chrome has unusually restrictive web security; many things, like Ajax, won't work when run locally. This is one of them. You can get around this problem by either using a local websever, like #ephemient suggests, or you can run Chrome in unsafe mode for testing:
chrome.exe --disable-web-security
Yep. Chrome's SOP prevents just about everything in file:// from working[1]. Use a local webserver instead.
If you are using chrome. Start the chrome from command line with the flag
--allow-file-access-from-files
chrome doesn't support for accessing local file without this flag.