I'm sorry if this question seems to be stupid...I've just forgot how to do that.
If my main URL is : http://localhost/Website/web/app_dev.php/
I would like to access the same page with the URL Website/
I remembered it were about hosting so I've just add 127.0.0.1 website to my hosts file and now I can access with the URL http://website/Website/web/app_dev.php/
But I still miss something to get what i want...i just can't remember where I have to go, I think it's not really and directly Symfony related problem. Have you an idea ? Thanks a lot
If you are using the builtin server (bin/console server:run or start) then you have to specify the port also (http://localhost:8000/Website/web/app_dev.php/)
In fact I figure it out, it was the file httpd_conf from apache i was looking for. It's all fine now. Sorry for your time.
Related
For example, when I type stackoverflow.com, I understand how the correct webserver is found. But how does the webserver know which folder to show?
I would guess that there is some kind of config for domain->folder? How does that work?
by visiting stackoverflow.com you open the / route so it searches about this route in its routes and runs the function with this route
In symfony2, I'm using the liipImagineBundle to produce thumbnails on the fly. It used to work perfectly on my local server but I've been having trouble after hosting the site of a shared server. I've been experiencing the same problem as described here and here, that is, the source is http://my_domain.com/media/cache/resolve/my_thumb/uploads/images/entry/DSC_04121.jpg instead of http://out-of-the-nest.com/media/cache/my_thumb/uploads/images/entry/DSC_04121.jpg.
Thanks to those two questions, I know where the problem stems from but the solutions proposed are no help for me. I don't have accessing to the configuration files, or to php.ini. I've tried changing the permissions of the cache with filezilla but it doesn't change much. Also, as mentioned in the symfony2 documentation, I've tried using umask(0002); and umask(0000); in app.php and app_dev.php, to no avail.
I'm really not sure what to do here, can someone help me?
Edit
Turns out it might not be a permission issu after all. Symfony throws a NotLoadableException: Source image not found in "/home/outoftheoo/app/../web/uploads/images/entry/DSC_04121.jpg" which is to be expected because the web folder doesn't exist, I renamed it www because that's what ovh expects. I did configure liip so that it would know (I think anyway) by putting a
web_path:
web_root: %kernel.root_dir%/../www
cache_prefix: media/cache
in config.yml but it doesn't seem to be enough
P.S: If it happens to be relevant, the shared hosting server in question is provided by OVH.
Edit 2
Found the problem. config.yml was missing a:
loaders:
default:
filesystem:
data_root: %kernel.root_dir%/../www
The resolve you are seeing is normal for the first time liipimagine needs to create the thumbs url, so it is not an error in the image path(empty your web/media/cache directory on your local and refresh and you will see it there too). The fact that it is failing to create the thumbs is why you keep seeing the resolve.
What does the app_dev say when you use the resolve link? enable it for the remote host and check
I recently moved my Drupal 7 site to a new hosting server and I'm stuck at the login page. As soon as I try and log in, I get directed back to the same page, but the URL changes from /user to /user/1, which leads me to believe that I am actually logged in, but I'm not being forwarded to the correct page.
I tried cleaning my cache, emptying the cache tables in the DB but nothing helped.
Any ideas?
EDIT: To make things a bit more clear, I've used the specific server for various other Drupal 7 sites, so I know for a fact that the server configuration is not at fault here.
I suspect your $cookie_domain in /sites/default/settings.php is incorrect.
Try making it match your new domain and ensure there's a leading dot .
$cookie_domain = '.mydomain.co.uk';
Sometimes problems relating to logging in after a site migration can be because mod_rewrite was enabled on the first machine but not the second. A simple way to test this is to use the ?q= URL format (http://site.localhost?q=user) and see if you can log in like that. If that works then you can either disable clean urls from within the Drupal interface, or enable mod rewrite in Apache.
In my case the issue was solved only after refreshing .htaccess file in drupal root folder.
You can take the source here: https://github.com/drupal/drupal/blob/7.x/.htaccess
seddonym's comment about mod_rewrite led me to a slightly different solution. I was having the same problem but was able to solve it by copying the file rewrite.load from /etc/apache2/mods-available to /etc/apache2/mods-enabled.
I think the files in mods-enabled are some sort of link files (I am novice at linux still) but copying the files worked just fine. Maybe someone will come along and tell us the proper way to do this.
Sometimes all you need is to clear the cookies for the domain/website - it's possible you have old cookies alive that are causing this.
Get a cookie manager to help simplify this, e.g.:
Edit This Cookie (for Chrome)
Other answer might be that rewrite php module is not installed, to do that do the followings:
sudo a2enmod rewrite
Restart apache2
sudo service apache2 restart
In my case it was very stupid, on my page.tpl.php, there wasn't any "content" and the page--user.tpl.php didn't get read. Only had the line to show content in the page.tpl.php
Although that it is unlikely that you're as stupid as me. ;) Maybe it will be helpful anyway.
Arne
I've searched around and found a lot of advice saying to modify the hosts file as such:
127.0.0.1 mydomainname.com
I've done that, but my actual site at mydomainname.com is still being used. Any other troubleshooting steps I could take? Any other suggestions?
Restart your browser, try ipconfig /flushdns (I'm a bit hazy on Windows DNS caching so that may or may not help here) or restart your computer. Unless you've done something really weird, the hosts file should have priority, so something must be caching the DNS result.
simply setup your canvas address as localhost. Unless you're using FBML, it works. See http://fbgraph.computerbeacon.net/tutorial/section1/createnewapp.aspx for an example.
Just make your redirect_uri your localhost address like:
https://graph.facebook.com/oauth/authorize?client_id={consumerKey}&redirect_uri=http://localhost:4403/Handshake
I have mine set up in visual studio to switch between localhost and live return_url's depending on whether debug or release is selected
Usually when I get the url of a request i use Request.RawUrl.
This gives /default.aspx for example.
However recently my host changed something and now the name of the application directory is displayed as well so i get /appdirname/default.aspx.
Now why does it give me the directory of the application? It looks as if my website is a subapplication of another website. So when you go to mydomain.com the rawurl will be:
/appdirname/default.aspx
I believe each domain has it's own website defined in iis or am i mistaken.
I am not asking for a workaround, which should be pretty straightforward, I am asking why this is happening and how, what kind of IIS setup causes this to happen?
PS.
And the worst part is i had this issue with godaddy and i was happy my host didnt have it but now both hosts have the same problem.
The Request.RawUrl method returns everything after the domain declaration, so if your full url is:
http://www.yourdomain.com:8080/directory/Page.aspx
then the method will return
/directory/Page.aspx
That's all it does. That's all it claims to do. As you say, your hosting provider must have changed something, which is very naughty, and the workaround should be easy. There is a good chance that they have introduced some kind of url redirection, but the best way to find out is to get in touch with their helpdesk and ask them what is happening. I find that most successful hosting companies tend to respond in good time to this kind of question. Otherwise they tend to become formerly-successful hosting companies.
Ric Strahl has this to say about it: http://www.west-wind.com/weblog/posts/132081.aspx