i am using symfony2, i want to test my server for mail functionality so i had create one simple phpMailer application and put into /web directory of my symfony2 project. Now, when i access that file with http://example.com/web/mail/index.php but it give me error,
No route found for "GET /web/mail/index.php"
i want to use this file as what we can do in cakephp. so anyone can help me write route for this ?
Thanks
As it was said in comments it's not the way you should implement it. But for a quick check you can use http://example.com/mail/index.php without /web directory in URL, 'cause web directory is usually configured as a root server's configuration.
Related
After doing some research, I still cannot understand why my assets in the bundles folder return 404 errors when I try to reach them.
I can see the files on the server, but when I try to reach them, symfony returns a 404 error.
For example, I have this file on the server : web/bundles/aluser/images/li-plus.png, but trying to access it with https://my-site.com/bundles/aluser/images/li-plus.png returns a 404 error. But on the other hand I can access files in https://my-site.com/images/li-plus.png for example.
I did the assets install and dump commands, cleared the cache but no results.
Thank you.
Unless you are on a local install it probably has to do with your server not pointing to the web folder. I had that problem on a shared hosting what i did was to make a symlink from server home (www, public_html or whatever) to web and it worked like a charm.
Thank you all for your answers,
they pointed me in the right direction (a problem with the server) :
I did a asset install and dump commands with the root user of the server, all files created were then associated to this root user, and apache wouldn't serve them anymore.
After a chown, everything was working again.
Thanks again :)
I have some folders in www/web/ which is the root.
It's the following folder: assets/exports/
And it contains a file export.xsl
When I do in javascript:
window.open('/assets/exports/export.xsl');
I'm going to the following link:
http://mywebsite/assets/exports/export.xsl
But I get a: 404 not found
Is symfony somehow protecting this link?
So, my question is, how can I access this file, so it starts downloading for the visitor?
From Symfony Documentation:
Keep in mind that web/ is a public directory and that anything stored here will be publicly accessible, including all the original asset files (e.g. Sass, LESS and CoffeeScript files).
Make sure you put the files in a proper directory: <symfony_root_dir>/web. See below.
Then accessing the http://mywebsite/assets/exports/export.xsl returns the file's content.
Check also your server configuration, virtual host config and read web server configuration guide from Symfony to see if you configured it properly.
This can be a silly question but I have had some issues with it. I am trying to implement jwplayer with meteor. Jwplayer will try to get a file based off the url you suggest. So I tried to place a file in localhost:3000/test.mp3. When I tried to hit that url I get just the default site. This would work if I used tomcat. Is there something I can do to get the files relative to meteor directory?
Thanks for your help.
In the /public directory, per the docs:
Lastly, the Meteor server will serve any files under the public directory, just like in a Rails or Django project. This is the place for images, favicon.ico, robots.txt, and anything else.
Meteor hasn't yet implemented server side routing and all directories are ultimately flattened. So for the time being, you can access your file at http://localhost:3000/test.mp3, but that may change in the future.
I have symfony web files in web root folder where the project is running. I have site files such as index.html, aboutus.html and contactus.html files. I have put these files into public_html/site/ How to access these files by default using routing.yml? also project should run in index.php
Hm...If you want to add to your project some static pages, I would recommend you this method.I think this is the right way. For index.php ,well read this
Why don't you make a new module for static pages and move the html content into it?
You have to understand that routing system in symfony is used for connect requested urls to controllers. So you can't use it to provide generating urls for static pages outside of your symfony application. That files are just like files of foreign site.
So you can just use link_to('about us', $this->getRequest()->getHost().'/about_us.html');
I would like to know how to configure the flex crossdomain.xml in tipfy with the Google app engine skd.
Please advice. Thanks.
Edit:
Tipfy is a framework using in Gae.
I would like to know:
where I can place the crossdomain.xml, in the root or other place,
do I need script to redirect to the xml,
what files that I need to modify, eg. app.yaml.
any other things or file I need to modify or create to make it work.
Thanks.
Place the crossdomain.xml anywhere in your app (eg, the root of the app), then use a static file handler to configure it in app.yaml. You don't need to touch any framework code at all.
If you are using GAE the app url will be typically http://myapp.appspot.com and the Flash player will need a cross domain file from http://myapp.appspot.com/crossdomain.xml. In a Java environment it is as simple as creating this file in web folder of the project, that's it. It will be the same for Python, put this in your app's web root folder, not Google's web server root folder. This worked for me.