Symfony2 assests in bundles directory 404 error - symfony

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 :)

Related

MAMP Start Page Only Shows Index

I'm trying to install Wordpress on MAMP using this tutorial. When I start the MAMP server and go to the MAMP startup page, I see this index instead of a GUI. As a result, I can't access the PHPMyAdmin GUI (despite the PHPMyAdmin link) to create a database for Wordpress. Does anyone know what I might be doing wrong? I'm running OSX 10.9.5.
Try that url to access phpmyadmin
http://localhost:8888/phpmyadmin/
This is the directory listing that Apache provides in some cases. When a folder is requested, Apache looks in a folder for a file name matching the DirectoryIndex directive, which are often files such as index.php, index.html, home.htm, and so on. Since none of those exist here, the directory listing is shown.
Basically, something isn't right here with your MAMP install; either this URL is not designed to be accessed by you ever or your installation is incomplete. First, try loading http://localhost:8888 directly and see if that works any better for you. Failing that, I suggest you make a backup of any MAMP related files (databases, web pages, or configuration changes) and reinstall. One possible cause of this is if the MAMP package is not installed to /Applications/
In short, when you're using an all-in-one package like MAMP this shouldn't happen. You say that when you uninstalled and reinstalled that fixed the problem which is what I would have suggested anyway. It seems something went wrong with the installation and that should (and did) fix it.
I add the solution that helped me in the similar situation just in case someone later will face the same problem when after the Wordpress has been installed, a browser just show "Index of/" instead of the required site.
Check the following points:
There is 'index.php' file in the root folder of your project. (web server tries to open exactly this file).
If the file actually is located there, check the configuration of your web server. For example in my case my web server is Apache 2.4. After I added the directive "DirectoryIndex index.php" in the Apache configurations file (thereby saying to the server which file it should open if it received the address of the root folder) my problem was solved.

Silverstripe install admin js errors

For some reason my admin screen just hangs with some javascript errors. I have it installed on xampp on windows 7 ultimate 64bit. What could be causing this? Ill post a screenshot of the errors any help would be nice! p.s. This is my first time installing silverstripe ever so be nice. :)
This sort of things usually occurs when combined asset files cannot be created. Make sure the web server user has write access to the assets/ and assets/_combinedfiles folders, then go to your-site.com/admin/pages?flush=1.
Alternatively, since this is a local install, run in dev mode. There are instructions in the documentation on how to set this.
As indicated by #simon_w, this issue occurs due to the folder permissions:
In your local environment, in addition to the way via yml config, you can just put the following in _config.php inside mysite folder.
Director::set_environment_type("dev");
In dev mode, the installation doesnt need to write to assets/_combinedfiles. However, you had better have write permission for assets folder anyway.
So, just increase permissions for assets and directories under it. Uploaded files are also stored there, if not sufficient permission, you can't upload files from the admin panel. Other functionalists may also be affected.

Drupal Export of Site Not Working For Subdirectory Levels Beyond Root Directory

I have to move an existing Drupal site from one server to another. I've done so by doing a mysql database export/import and copying over the files to the new server. On the new system, the root page comes up fine but if I try to go to any deeper directory levels I get a 404 Not Found Error.
so drupal.newserver.com -> works fine
but drupal.newserver.com/user -> gives me a 404 and happens,same for all subdirectories
Is there something that I'm missing that is part of a drupal export? Could it be related to the structure of the /sites directory which is under the webserver's docroot?- which has a folder named after the old server (ie drupal.oldserver.com but not drupal.newserver.com? Also, I noticed that there are _htaccess files and .hta files but not .htaccess files in the site files that I've copied over.
Sorry if I'm asking a bleedingly obvious question - I'm very new to Drupal. Thank you!
Check whether the clean url is enabled in your web server. To check try this:
drupal.newserver.com/?q=user.
Just to let anyone who might come across via a google search - I was able to get this to work . It turns out that while mod_rewrite was enabled, what I had to do was to enable the AllowOverride directive for the web directory in httpd.conf to be set to ‘All’. If it’s not set to this, the server won’t respect the .htaccess rules you put into the drupal directory. It’s been a while since I’ve worked with apache config files so it took a while to finally piece it together. The main breakthrough came when I realized that if I turned off clean-urls then the links worked but looked ugly and then was able to research clean_url.

System.Web.Optimization bundles are empty when running in a virtual directory

I'm having problems when deploying my application to a server using a virtual directory in IIS.
I have configured the same files to run under the default website in a virtual directly and also in a new website root running on port 81. Both configurations use their own identical app pools. While the site on port 81 works fine the site running in a virtual directory doesn't load the bundles.
In the page I see links with missing versions in the URL, such as:
<link href="/MyVirtualDir/Content/css/site?v=" rel="stylesheet">
The URL returns a 200 status from the server, but the content is completely empty.
I have looked on SO at questions like this which references this bug ticket but my understanding is that this is when the files being included in the bundle are 'virtual' or not under the physical folder root. Which is not true in my case.
Cheers for any help you can give me. I can't believe that this configuration wouldn't be supported so I must be doing something wrong somewhere!
Update:
I think a ticket describing my problem has been raised on the web optimisations codeplex site here http://aspnetoptimization.codeplex.com/workitem/55 Not that this gets me any further though :(
After comparing with a new project I tracked down the problem:
I was using T4MVC (trying to be clever and not use 'magic strings' in my code). So I was using a link such as
bundles.Add(new ScriptBundle("~/Scripts/all")
.Include("~"+Links.Scripts.Library.jqueryPlugin.jquery_ui_js), ...));
When this runs under a virtual directory it will resolve with the virtual directory name in the path, so it can't find the files.
I hope this helps someone else who runs into the same problem. Also, it looks like T4MVC are looking to improve the use of magic strings in bundles in future releases. See here for a discussion

Error: Forbidden Access Message (Drupal-6.x)

I'm new to Drupal and I'm trying to create multiple sites inside Drupal. I'm trying to create a symlink via the command line. I tried going to my browser to run the new installation for the new website, but I receive a message that says Forbidden Access.
To create the symlink in the terminal:
ln -s ~/Sites/drupal-6.20/sites/sitename2.com
My Drupal-6.20 folder is the root directory of my localhost.
In the browser to start the installation I tried:
http://localhost:80/sitename2.com
Short answer: the web root should be pointing to the index.php in the Drupal root for all of the sites you're hosting on that codebase.
In your case, you are getting an error because there's nothing in the /sites/yoursite.com directory that your webserver can run on it's own.
Longer answer: Configuring Drupal for multiple domains takes a little bit more reading and learning that can be summarized in an SO response.
The guide at http://drupal.org/getting-started/6/install/multi-site is a great place to start, and includes links to videos and additional tutorials in case you need additional help.
I don't know drupal that much, but i know other cms. And i think you should check for "permisions tab".
I worked with joomla, which i think is quite simmilar. And the first time you just have to go to http://localhost/. Installation started. And when it finnished, i had to delete installation folder out of localhost root.
But this is for joomla.

Resources