my wampserver 2.5. Projects was not opening projects - server

I have installed wampserver 2.5 in windows 8. When I click on project in local host is is redirecting to only the project name. Lets take the project name as project1 , when I click on the folder in local host it is directing to project1 it supposed to direct to localhost/project1 something like that.
I have seen some answerers here and changed line 30 in index.php file in www directory. I haven't changed the port at all. And still now it was not opening. It is directing to localhost/project1 but index.php file in project1 was nt displaying. It is saying internal server error.

if you already changed line 30 in index.php
$suppress_localhost = true;
to
$suppress_localhost = false;
it should be ok, could you bring what is contents of your project1/index.php ?
also check your /wamp/logs/apache_error.log for details.

Related

Where do I put cpanel backup files on www folder?

I am using lamp to test a cpanel backup on ubuntu 16.04.
The website is a prestashop 1.4 bunch of folders.
enter image description here
As you can see in the image, there are many folders within folders. What do I put on www folder to show up on localhost?
I added the "public html" folder in it but it says 404 not found.
Assuming you have everything routed properly in php and you have your config setup accordingly, you should put all of it in your www folder.
Put all of your files in www, then start your webserver and try to open products.php (per example) in your browser.

XAMPP - how to set root folder of website in htdocs?

I installed XAMPP and created simple website (a folder 'website' in htdocs folder) that contains a link Info.
If I type localhost/website in browser I get a default homepage. But if I click the link, it goes to localhost/info (which does not exist), instead of localhost/website/info. I could use <a href="/website/info">, but it would be weird to refactor all the links when changing site name.
So what is the usual setting or solution that people uses when developing sites in XAMPP?
You have to change DocumentRoot in httpd.conf file to folder. In your example where you have website directory.
For more sites, you have to have more hosts and then set virtual hosts.
Here is link how to do that in Win. But point is the same in all OS.

MAMP--I don't know what the web URL should be when setting up a testing server in Dreamweaver

I use Dreamweaver and I have a file (PhpTest.php) that I placed in the htdocs folder within the MAMP folder. I've assigned the testing server a name and I've specified a connection type (local/network) and appropriate server folder (a folder that doubles as the PhpTest.php Dreamweaver site folder). Now it's asking me to assign a website URL and I'm at a total loss. I've tried
http://localhost/PhpTest/
as well as the URL of the MAMP ready-page, but nothing's working (I use Chrome, and if it's not already apparent I'm only just now learning PHP).
Anyone have any ideas?
If PhpTest.php is in htdocs you should try:
http://localhost:8888/PhpTest.php
Have you started mamp? (You should start the server by double clicking on the mamp app icon)
To check that 8888 is the correct port you can click on the faq tab in the mamp launch web page .

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

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.

Where is the web server root directory in WAMP?

Also is the web server root directory the place where you put your site files and later acces them with localhost/file_name in the browser?
If you installed WAMP to c:\wamp then I believe your webserver root directory would be c:\wamp\www, however this might vary depending on version.
Yes, this is where you would put your site files to access them through a browser.
In WAMP the files are served by the Apache component (the A in WAMP).
In Apache, by default the files served are located in the subdirectory htdocs of the installation directory. But this can be changed, and is actually changed when WAMP installs Apache.
The location from where the files are served is named the DocumentRoot, and is defined using a variable in Apache configuration file. The default value is the subdirectory htdocs relative to what is named the ServerRoot directory.
By default the ServerRoot is the installation directory of Apache. However this can also be redefined into the configuration file, or using the -d option of the command httpd which is used to launch Apache. The value in the configuration file overrides the -d option.
The configuration file is by default conf/httpd.conf relative to ServerRoot. But this can be changed using the -f option of command httpd.
When WAMP installs itself, it modify the default configuration file with DocumentRoot c:/wamp/www/. The files to be served need to be located here and not in the htdocs default directory.
You may change this location set by WAMP, either by modifying DocumentRoot in the default configuration file, or by using one of the two command line options -f or -d which point explicitly or implicity to a new configuration file which may hold a different value for DocumentRoot (in that case the new file needs to contain this definition, but also the rest of the configuration found in the default configuration file).
Everything suggested by user "mins" is correct, and excellent information.
WAMP 2.5 provides a default Server Configuration display when you enter localhost into your browser. This maps to c:\wamp\www, as described in previous posts. Creating subdirectories under www will cause Projects to appear on this display. A click and you're in your project.
I have various projects under different directory structures, sometimes on shared drives which makes this centralized location of files inconvenient. Luckily, there is a second feature of WAMP 2.5, an Alias, which makes specifying the location of one (or more) disparate web directories quite easy. No editing of configuration files. Using the WAMP menu, choose Apache > Alias directories > Add an Alias.
WAMP has evolved nicely to provide support for a variety of developer preferences.
If you use Bitnami installer for wampstack, go to:
c:/Bitnami/wampstack-5.6.24-0/apache/conf (of course your version number may be different)
Open the file:
httpd.conf in a text editor like Visual Studio code or Notepad ++
Do a search for "DocumentRoot". See image.
You will be able to change the directory in this file.
To check what is your root directory go to httpd.conf file of apache and search for "DocumentRoot".The location following it is your root directory
this is the path to the web root directory c:\wamp\www
you can create different projects by adding different folders to this directory and call them like:
localhost/project1 from browser
this will run the index.html or index.php, lying inside project1
Here's how I get there using Version 3.0.6 on Windows