I have a script that loads a php page for variables. There are no problems when the swf is uploaded to the site but when I run it locally, I keep getting "Error opening URL" messages. I'm using absolute pathing and if I paste the URL my script is using in a browser, the correct page opens. This only started happening after the site changed servers. Any ideas what the problem could be? Thanks.
The "Error opening URL" seems to be caused by a number of issues. I have tried to keep track of all the different solutions I have used in the past to fix the problem. Ever time I encounter the "Error opening URL" the solution is different. Hopefully one of these solutions helps you.
I usually find the following solutions on google.
- Make sure crossdomain policy is setup correctly.
- Set a bunch of variables like Security.allowDomain(domainHERE)
- Change publishing setting for your flash file.
- Make sure your connecting to the right url.
Here is what works for me... usually.
1) Make sure you are connecting to the right URL.
Use the full path, don't use relative links. Also, copy and paste the url in your web browser to see if it connects.
You can also use flash.events.HTTPStatusEvent.HTTP_STATUS to view the HTTP headers but I would recommend you check out solution 5 first. Its a much easier way with more details.
Source: http://www.judahfrangipane.com/blog/2007/02/15/error-2032-stream-error/
2) Put a crossdomain.xml file in the root of your server (usually public_html or www)
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>
Source:
http://www.senocular.com/pub/adobe/crossdomain/policyfiles.html
3) While editing the flash file, press Ctrl + Shift + F12
Make sure Local playback security is set to Access Network Only.
4) If you are hosting locally using MAMP, WAMP, XAMP or something similar, skip this step. Otherwise, Call your webhost and yell at them ;)
I have hosted with godaddy, hostgator and liquidweb. It seems that all of them have some kind of firewall setup blocking flash from accessing the files you want it to.
Give your host a call, tell them your problem and ask them to whitelist the files you are trying to connect to and you should be good to go.
Remember, everytime you want to connect to a new file, it has to be whitelisted. I always forget this and it takes me 3 hours to figure out why changing the name of my file or moving it messes everything up. :)
5) Use Charles Web Debugging Proxy Program to gather some important information.
I will break this down into a few steps.
Usually for me the "Error opening URL" is due to a coding problem on the site I'm trying to connect to.
Open Charles
Run your flash file
Select the site your flash file tried to connect to in Charles side bar.
View the Response tab near the top.
On the Response tab you should see a few other tabs near the bottom. View the Headers tab.
See what HTTP_Status was returned. Then look search this page to see what that status code means. It will give a somewhat broad definition but it still helps narrow things down.
500 Means a problem with your server... If your server is running fine, then its most likely a code problem.
Then view the Text tab near the bottom of the Response tab. This will show you exactly what that webpage looks like to flash. If your server is in some kind of debug mode where it displays errors, this is where you will see them.
Well I hope this helps someone. I will try to continue to update it with more issues and solutions I run into. This is probably the number one problem I run into with flash. Super annoying!
Crossdomains.xml file possibly?
not really a solution, but a work-around:
before CTRL-ENTER on your .fla, do a CTRL-S
this seems to work about 90% of the time for me
NOTE: I never had this problem until one random day about 6 months ago. Now it plagues most of my old projects, cs4 or cs6.
Related
I Have wepApi project but I want to use it with adobe photoshop.So I design to web site with adobe and after I convert to html file.But When I try to open it with localhost it's giving me error.But it's working on live server.
enter image description here
I never used before abode but I have to for one project.So maybe someone know what is the solution?
There are several potential causes for this problem. Here are a few potential answers:
Ensure that your local machine is running a web server. The HTML file won't be able to connect to your API without a web server.
Ensure that the URL you are using to access the HTML file is correct. The format should be "http://localhost/path/to/file.html."
Make sure your web server is operational and properly configured if you use one.
Make sure your HTML file is free of syntax mistakes. To check for issues, you can use a tool like the W3C Markup Validation Service.
I hope this is useful.
My boss has tasked me with remaking his business website from the ground up. I'm pretty new to web design and am learning as I go. Our webhost created a WordPress staging site that I can work on while the original site stays up and running. Recently we've encountered a real problem: a very important page on our original (current) website has a filename that includes an ampersand. It loaded perfectly for customers for over a decade, but now suddenly refuses to load, returning a "bad request" error message for any browser we've tried. The page's URL is in this format:
www.example.com/Gems&Rocks.htm
I changed all instances of '&' to 'n' in the HTML code as well as the file names associated with it, and that got the page working again. Problem is, there are hundreds of other pages across the internet that backlink to this important page under its original name. My boss is adamant that I find a way to get the original filename with the ampersand in there so we don't lose business. He thinks this is all my fault, but I did absolutely nothing to change the old website. The webhost's tech tells me he can't do anything about it, and that this emergent problem wasn't caused by anything he did because he hasn't changed anything on the webserver in over a year. He says the '&' is a reserved character and shouldn't have been in the pathname anyway. Nevertheless, our page loaded just fine for many years.
Searching the web has done me no good, it's like I'm the only person in the world who has encountered this problem. But surely someone else has had such a thing happen. So I guess my specific questions are:
Did pages with '&' in their name suddenly stop loading for everyone or just our website?
Is there a way to "trick" our website into loading the page instead of deciding the '&' is a "bad request"?
Can a URL redirector be set up that sends users from "Gems&Rocks.htm" to GemsnRocks.htm?
The "bad request" error comes from your web host's server. If it worked previously, but now shows that error, then something MUST have changed on the server.
It is possible that you might be able to redirect that request. You don't say what server your web host is using. It's likely to be some version of Apache and you probably have .htaccess configuration available to you. One option might be to put something like this in your .htaccess file:
RedirectMatch 301 ^/Gems\&Rocks\.htm$ https://example.com/GemsnRocks.htm
Whether or not that works will depend on the server that you are running on and how it is configured.
When creating a new database through PHPMyAdmin and trying to access localhost/newdatabase, I get this message:
"Object not found! The requested URL was not found on this server. If
you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404 localhost Apache/2.4.34 (Win32) OpenSSL/1.1.0i PHP/7.2.9"
The file doesn't show in xampp/htdocs either, only in xampp/mysql/data.
If i create files directly in htdocs, they work perfectly on localhost/.
Why has the file not been created in htdocs?
The content of the htdocs folder are files that can be interpreted by the browser such as HTML5, CSS, JS, etc... in order to show a webpage along with it's funcionality to whoever accesses it. A database in the other hand can't directly be opened by a browser, but rather accessed within the server by a backend language like PHP, in order to get the information that can be stored in it through tables. You seem to be new to web programming, so I'd recommend to quickly google some beginner tutorials that can help you to understand the most important concepts. To take on from your kind of confusion, I'd point you to expand your knowledge on these concepts:
HTML5
CSS
PHP
MySQL
Once you get the grasp of them and identify each by their core funcionality, you'll be good on your way to make webpages. Later on you'll find yourself with demands like making your webpage look nice and clear, and also to make it load fast, but there's time for everything and the concepts I pointed are the best start for you.
if you wanna open your database URL = http://localhost/phpmyadmin/
File directory ~ xampp/htdocs for source code such as extension file .php .html .js or other.
if you wanna load localhost a URL is http://localhost:80 (auto find index file to first load)
Sample given as image folder for my code. Hope that can help you to understand xampp
I have a website that displays a lot of messages and images, usually through normal HTML tags. We now have a file server where we would like it to be our one stop place to retrieve files and images.
I can create links that allow me to download files from the server but I can't find anyway of displaying the images on the web pages.
To clarify a bit more, our web page is running through a server we'll call SERVER1, and we used to just retreive our files from that server. Now we are still running the website through SERVER1 but want to display images from a different server named FILESERVER.
links like
http://SERVER1/imagedocs/image.jpg used to work but
http://FILESERVER/imagedocs/image.jpg doesn't work
while
file://FILESERVER/imagedocs/image.jpg does work but I believe this is because I have a local connection to the server and will not work if I apply it to the website.
Any clues on what I should be looking for as a solution.
the file:\\ means it's a local file opened by your browser.
There might be various reasons why you can't access stuff that are currently on your server. I will take as granted that the file is actually on your second server, and you havent made a typo ( you can still double check it though, double check the filepath too (( maybe it was ROOT/dir/image.jpg and now it's ROOT/image.jpg)) ). Do you know if your 2nd server is blocking connections perhaps ? Have you succesfully connected to it? i'd suggest you to ping your server adress to see if you got a response, if it does ping, we going to need more infos about the way your server have been set up.
So I have a booking system on my website with the URL domain.co.uk/booking. I wanted to add it to a different site I have, domain.com.au/booking. It is a simple drag and drop then run an install.php file. However my domain.com.au/booking does not find anything there. the files are there in the EXACT same way as they are in my domain.co.uk site which runs fine. Are there any reasons why the path would not be found that i may simply be over looking?
N.B the error that appears is
The requested URL /booking/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
If you are on a linux server, /booking/ does not equal /booking. That could explain the difference between the two sites (one is hosted on linux, the other is not).
Though this is just a wild guess.