Deployment Issue In Symfony2 - Can't Find Registered Bundles? - deployment

I'm transferring my project from the laptop to a test/production server. I'm copying the files to the server via FTP. So far, I can access the /web/config.php file and /web/app_dev.php files alright.
However, when I go to try and load a page it comes up with the following error:
ReflectionException: Class Knp\Menu\ItemInterface does not exist
In the error report, all the files look to be held in the following root directory:
/var/www/vhosts/domain.co.uk/subdomains/dev/httpdocs/
On the laptop however, the root directory was www:
C:\wamp\www
Everything on the test server is held in the httpdocs folder. What do I need to do to fix this error?
Cheers
EDIT:
I have moved everything in to a www folder, held within httpdocs folder. It's completely broken doing that, no pages will load.

The issue occured from an incorrectly configured .htaccess file on the development server.
During the configuration, the root directory wasn't changed to /web. Once this was changed however, the plugin worked.

Related

Deploying a Static website on Server

I am trying to built a static website using godaddy server. I created a folder say Manage inside public_html in which there is an index.php. Now when I am trying to open this page on browser with URL "www.mysite.com/Manage/index.php" It is showing error, File not found, 404 error. So what possible error I might be making?
There could be a few reasons. If you are using an RHEL-based distribution for your server, you need to edit the master Apache configuration file /etc/httpd/conf.d/userdir.conf and change two things:
Change UserDir disabled to UserDir disabled root
If #UserDir public_html is commented change it to UserDir public_html
This tells Apache that the directory containing each user's html files is a subdirectory of their home directory called public_html.
You may also need to change the permissions of your user directory and your public_html directory to allow Apache to read and execute inside them. To do this, run the following commands:
sudo chmod o+x /home/myusername
sudo chmod o+rx /home/myusername/public_html
Restart Apache and see if it works.
The source for this knowledge is not my brain. It comes from the wonderful course at Washington University in St. Louis CSE 330 Rapid prototype development.
At first look to error.log. If you use nginx find in /var/log/nginx, if httpd in /var/log/httpd.
And what do you mean about "static"? PHP preprocessor generate html from *.php files, so you index.php is not static.
For this case you need to setup LAMP stack.

ownCloud directory renamed / No such file or directory

I installed ownCloud on my webspace (I don't own a server), accessing it with a specific subdomain (i.e. http://sub.domain.com). I now had to rename the originally directory, which I did, and pointed the subdomain to the new directory. Sadly, ownCloud isn't working anymore. So I took a look at the log file:
"Unable to create file (...) No such file or directory"
So I guess ownCloud tries using the old path. Where can I change this setting?
Just solved the problem - had to change the
datadirectory
inside the ownCloudPath/config/config.php

Netbeans Remote Synchronize doesn't list files when a subdirectory is used as upload directory

I've setup several sites previously to use Netbeans Remote Synchronization so I can edit files on the server from my machine and it has worked perfectly.
The problem I'm having right now is that when my FTP configuration in Netbeans uses the root folder it lists everything correctly but when I use a sub directory for example website.com/subdir as the upload directory or as the FTP initial directory the sync results come up blank - doesn't list anything at all on the remote side except directories in that sub directory.
My PC is a windows 7 64 bit machine, and the server is a standard shared hosting account running CPanel.
Also, I have been able to run the subdir synchronization on a different pc, could it be the firewall on this one? If so, why does it list the root folder properly?
Has anyone else had this issue? Any suggestions on how to fix it?
Thanks.
found the problem. The FTP path on this PC required the /public_html before the subfolder paths. i.e. essentially ftp://mydomain.com/public_html/path/to/subfolder
This wasn't the case on my laptop as I used the subfolder path right after the domain i.e. ftp://mydomain.com/path/to/subfolder and it worked fine, different versions of netbeans perhaps.

Permission denied when overwriting files with Codekit

Using MAMP Pro, I've set up a virtual host for a site where I run Codekit (http://incident57.com/codekit) to autocompile LESS files to its directory. I've set the owner of the host to www, this interferes with Codekit's preferences in some way though and it isn't able to overwrite any file when compiling (the app displays an "EACESS, permission denied" error). Tried several approaches with setting file permissions for different folders but without success. Ideas?
You should be adding to CodeKit the actual folder where your project files exist on disk, not the virtual host that Mamp sets up.

Is there a way to get the absolute path of the context root in tomcat?

I have a problem that, after a lot of reading and research, seems like tomcat is running another instance of itself and thus serving an old version of my updated app (or somehow has cached an older version of my webapp somewhere only serves that.)
I work on the app in eclipse on a windows machine and deploy it on a Linux server as a ROOT app (Renaming the war file to a ROOT.war).
What I'd like to know is if there's a way to locate the older version that tomcat is serving by getting tomcat to log an output of the context root of the servlet that's serving the older version of the app.
As it stands it the moment any files created by the updated app get created in the right directory but because the app instances are different it can't access the files shortly after they're created.
Any help/hints would be welcomed
To answer the question in the title, let your code basically do the following:
System.out.println(getServletContext().getRealPath("/"));
To solve the problem described in the question, shutdown Tomcat and delete everything in its /work directory, delete the expanded WAR in /webapps and remove the /Catalina subdirectory of /conf directory (if any) and then restart.