Apache webroot icons not loading - php

I know this is a silly question, but I would like to know why it is happening so.
I am using wamp server version 2.1. While viewing directories in localhost, the images beside the files are not getting loaded. Refer image below. On inspect of the image, I see it fails to load /icons/folder.gif, where can I find those images and how to load them?

Step 1, Edit "httpd-autoindex.conf" file like;
Alias /icons/ "C:/wamp/bin/apache/apache2.4.2/icons/"
<Directory "C:/wamp/bin/apache/apache2.4.2/icons">
Options Indexes MultiViews
AllowOverride None
Require all granted
</Directory>
Step 2, remove first "#" characters from "httpd.conf" file in
Include conf/extra/httpd-autoindex.conf
and
LoadModule autoindex_module modules/mod_autoindex.so
lines
Step 3, restart all services from wamp try icon

it is pointing to wrong dir in
C:\wamp\bin\apache\YOUR_VERSION\conf\extra\httpd-autoindex.conf
Alias /icons/ "/httpd-2.2-x64/icons/"
<Directory "/httpd-2.2-x64/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
should be
Alias /icons/ "icons/"
<Directory "icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
restart server

For whatever reason, you've either removed or moved the icons folder or you've modified a file that points to that folder somewhere on your machine...
The icons folder should reside in: C:\wamp\bin\apache\Apache(version)\
Here are the icons: http://jordanarsenault.com/icons.zip
If they are not already there, put them there.

jsut find the "httpd-autoindex.conf" file from c:\wamp\bin\apache\apache2.4.9\conf\extra folder from apache(your version) folder
find this line "Directives controlling the display of server-generated directory listings".
below this line there will be a address like this "C:/Apache2.2/icons/" (little difference may be there) (2 times)
edit it like this "D:/wamp/bin/apache/apache2.4.9/icons/" (into your directory not the same)
(be careful to use your directory address not the same as above)
it will work...
or check this link and find the answer http://forum.wampserver.com/read.php?2,27544,27861#REPLY

Related

Trying to include the contents of htaccess in httpd.conf

I'm trying to include .htaccess inside httpd.conf for better performance.
I am following the instructions from the readme file here to improve site performance. I took the .htaccess and placed it in my website root folder C:/xampp/htdocs/apps then inside httpd.conf I've got the code below. then I restarted apache. The problem is i don't think the .htaccess rules are being applied
Is this the correct way of including .htaccess and am I including it in the correct directory?
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Include C:\xampp\htdocs\apps\.htaccess
</Directory>
If you want to "include" the contents manually in directory context with the Include directive, set AllowOverride to none, otherwise you are applying the same configuration twice, once in directory and another through AllowOverride method.
If you just want to have a .htaccess file (wouldn't figure why because you seem to have access to the main configuration), then AllowOverride all would be enough.
If you just want to .htaccess and make sure it is being applied you can just:
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
and add junk text in the .htaccess file inside this directory, if it is being read, Apache will responde with a 500 error, if it is not, chances are you are landing in another virtualhost where this directory is not set.
AllowOverride All
should already tell apache to let .htaccess override all settings. There is no need to include it manually i think.

apache url rewrite connection reset on root directory

in my apache sites-available/default file i had change the config to folowing:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All //originally was AllowOverride None
FallbackResource rewrite.php //i added this line, too
Order allow,deny
allow from all
</Directory>
i wanted to handle all url calls in my own rewrite.php file. this works, when i visit my site at http://192.168.1.104:4567/web/knxzkcha but doesnt work when i go for http://192.168.1.104:4567/web/. i got this problem in firefox : The connection to the server was reset while the page was loading.
the index site http://192.168.1.104:4567/web/index.php works flawlessly and shows me my index.php file. all i want is to let me show the index file when visiting the root directory, too. /var/www points to the /web directory. i have some ubuntu 12.04 server 64 LTS edition
when i rewert the config lines, the root gives me the index file by default.
You do not need to add AllowOverride All, telling apache to avoid IO by checking existence of .htaccess files in current directory and all parents directories with AllowOverride None is a good recipe for speed. Avoid .htaccess files if you can edit Apache configuration.
Now FallbackResource is a quite new feature and may have some bugs. Did you check the ErrorLog for details? Could you try that with LogLevel debug?
It seems you problems is with directories, maybe you could fix it by enforcing usage of your fallback when a Directory is requested, try to add:
DirectoryIndex rewrite.php

Edit httpd.conf - Require/include no longer works

Running latest Zend Server on Windows 7x64, I was playing around with different ways to sync htdocs into dropbox and edited two lines of httpd.conf.
DocumentRoot "C:\Program Files (x86)\Zend\Apache2/htdocs"
<Directory "C:\Program Files (x86)\Zend\Apache2/htdocs">
with various symlinks, dropbox locations, etc.
Put it back to the way it was and php includes and require no longer work. I know the scripts are fine as the exact same scripts work on my desktop with the exact same development environment.
I put all my usernames/passwords/database names/etc in a php file that is generally stored outside the htdocs directory.
require_once('constants.php');
(In the same dir for purposes of troubleshooting, have tried everything from $_SERVER to dir.
Throws this error:
Warning: require_once(1): failed to open stream: No such file or directory in C:\Program Files (x86)\Zend\Apache2\htdocs\index.php on line 17
Fatal error: require_once(): Failed opening required '1' (include_path='.;C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library') in C:\Program Files (x86)\Zend\Apache2\htdocs\index.php on line 17
Scripts are working fine on another machine with exact same software.
For the purposes of testing scripts, even require_once in same dir doesn't work.
Made a backup of httpd.conf before changing, put it back with no effect.
Copied httpd.conf off healthy machine, no change.
Completely re-installed the entire zend package twice, no change.
At a loss as to what could be causing this. Any ideas?
This is out of the box from the healthy machine, # removed:
DocumentRoot "C:\Program Files (x86)\Zend\Apache2/htdocs"
Each directory to which Apache has access can be configured with respect
to which services and features are allowed and/or disabled in that
directory (and its subdirectories).
First, we configure the "default" to be a very restrictive set of
features.
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
Note that from this point forward you must specifically allow
particular features to be enabled - so if something's not working as
you might expect, make sure that you have specifically enabled it
below.
This should be changed to whatever you set DocumentRoot to.
<Directory "C:\Program Files (x86)\Zend\Apache2/htdocs">
Possible values for the Options directive are "None", "All",
or any combination of:
Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
Note that "MultiViews" must be named *explicitly* --- "Options All"
doesn't give it to you.
The Options directive is both complicated and important. Please see
http://httpd.apache.org/docs/2.2/mod/core.html#options
for more information.
Options Indexes FollowSymLinks
AllowOverride controls what directives may be placed in .htaccess files.
It can be "All", "None", or any combination of the keywords:
Options FileInfo AuthConfig Limit
AllowOverride None
Controls who can get stuff from this server.
Order allow,deny
Allow from all
</Directory>
No quotes are used in Apache config IE:
ServerName yoursite.com
DocumentRoot C:\www\your_site
<Directory C:\www\your_site>
Options FollowSymLinks MultiViews
... rest of stuff
</Directory>
In addition your include may need the absolute path depending on you Apache settings .. IE
require_once('C:\www\your_site\outside_http_docs\constants.php');
Fixed it. Windows permissions requiring file outside the scope of htdocs.

In which directory i should keep my workspace or project

I have installed XAMPP in my machine(Windows XP OS). And I have Eclipse as IDE.
Now my question is, In which directory i should keep my workspace (or project).
Whether I should keep under the path "C:\xampp\php\www" OR under "C:\xampp\htdocs".
You need to change the DocumentRoot value in c:\xampp\apache\conf\httpd.conf from
DocumentRoot "C:\xampp\htdocs"
to
DocumentRoot "E:/MyProject/Source/Admin"
and configure permissions also.
<Directory "E:/MyProject/Source/Admin">
Options +Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>
and then restart the apache server(in xampp control panel). so from there onwards whenever you access http://localhost/ it will execute the files under E:/MyProject/Source/Admin
see for more info.
http://httpd.apache.org/docs/2.0/mod/core.html#documentroot
http://www.apachefriends.org/en/xampp-windows.html#529
Looking at the Where I change the start page? section of XAMP's FAQ (quoting) :
The DocumentRoot folder is
"\xampp\htdocs". There is the
index site (index.php) the real
start page which is loaded after
executing of "http://localhost/".
So, I'd say, in your case, you'll have to work in C:\xampp\htdocs.
Still, of course, you can change that by modifying Apache's configuration and/or creating new VirtualHosts.

Setting custom php include path in .htaccess on mac os x

in
/Users/username/Sites/somesite/.htaccess
I have
AllowOverride All
php_value include_path ".:/Users/username/Sites/somesite/inludesFolder:/usr/lib/php"
I have also modified
/etc/apache2/httpd.conf
to
AllowOverride All
and restarted websharing, but it's not finding the additional include path. I'd like to avoid modifying the php.ini or setting this additional include path with the PHP
The AllowOverride within the .htaccess file itself isn't legal like that, and might be causing an error that stops further processing. Since the point of AllowOverride is to restrict what .htaccess files can do, it isn't usually useful within an .htaccess file. Try taking it out and see if it works.
Also, rather than modify /etc/apache2/httpd.conf, Mac OS X's configuration is set up so that you drop a file in /etc/apache2/users to configure your own directory. Files in there will persist across system updates and even upgrades!
For example, on my system, the file `/etc/apache2/mark' is:
<Directory "/Users/mark/Sites/">
Options Indexes MultiViews SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Categories