Questions tagged [apache]

Use this tag (along with an appropriate programming-language tag) for programming questions relating to the Apache HTTP Server. Do not use this tag for questions about other Apache Foundation products. Note that server configuration questions are usually a better fit on https://serverfault.com

Apache web server can be quickly and easily installed for development tasks, especially those related to PHP, Perl, and MySQL, using some packages such as XAMPP.

Note that, by historical convention, the term "Apache" is used to refer to the Apache Server Project (httpd), with which the tag is associated. This point must be clarified because the Apache Server Project is just one of over 350 open-source projects and initiatives provided by the Apache Software Foundation (also sometimes referred to simply as "Apache".)

Use the tag only for programming questions relating to the Apache HTTP Server. Note that server configuration questions may be a better fit on Server Fault.

Latest stable version

Resources

Related tags

,

92396 questions
207
votes
5 answers

How to debug Apache mod_rewrite

I have two main problems with mod_rewrite: There is no meaningful error reported when I have an invalid rule To reliably test each modification, I have to erase Google Chrome's cache. This isn't rocket science, but I have to hit Ctrl + Shift +…
puk
  • 16,318
  • 29
  • 119
  • 199
201
votes
11 answers

How to Set AllowOverride all

I want to set the AllowOverride all But I don't know how to do it. I have found the following code by searching the google and pasted it in .htaccess: AllowOverride All But after pasting it I started receiving…
Munib
  • 3,533
  • 9
  • 29
  • 37
198
votes
26 answers

Accessing localhost (xampp) from another computer over LAN network - how to?

I have just set up a wi-fi network at home. I have all my files on my desktop computer (192.168.1.56) and want to access localhost over there from another computer (192.168.1.2). On my desktop I can access localhost through the normal…
bcosynot
  • 5,653
  • 10
  • 34
  • 47
193
votes
40 answers

Django stops working with RuntimeError: populate() isn't reentrant

I've been developing a Django web application deployed on an Apache server with WSGI, and everything has been going smoothly. Today, I made some minor changes to my app's admin.py in an attempt to customize the build-in Django Admin interface, and…
Edward
  • 5,942
  • 4
  • 38
  • 55
191
votes
9 answers

PHP $_SERVER['HTTP_HOST'] vs. $_SERVER['SERVER_NAME'], am I understanding the manual pages correctly?

I did a lot of searching and also read the PHP $_SERVER docs. Do I have this right regarding which to use for my PHP scripts for simple link definitions used throughout my site? $_SERVER['SERVER_NAME'] is based on your web server's config file…
Jeff
  • 5,962
  • 16
  • 49
  • 81
188
votes
12 answers

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

I tried to restart my Apache server on CentOS 5.0 and got this message: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName Here is the /etc/hosts file: 127.0.0.1 server4-245 …
user1220351
  • 1,885
  • 2
  • 12
  • 6
188
votes
11 answers

Deny access to one specific folder in .htaccess

I'm trying to deny users from accessing the site/includes folder by manipulating the URL. I don't know if I have to deny everything and manually make individual exceptions to allow, if I can just deny this one folder, or if there's a rewrite…
user2835191
186
votes
15 answers

Apache redirect to another port

I've struggled with this for some time and am definitely doing something wrong. I have Apache server and a JBoss server on the same machine. I'd like to redirect traffic for mydomain.example to JBoss localhost:8080/example. The DNS is currently…
agentcurry
  • 2,405
  • 3
  • 17
  • 21
186
votes
11 answers

How do you redirect HTTPS to HTTP?

How do you redirect HTTPS to HTTP?. That is, the opposite of what (seemingly) everyone teaches. I have a server on HTTPS for which I paid an SSL certification for and a mirror for which I haven't and keep around for just for emergencies so it…
mauriciopastrana
  • 5,010
  • 7
  • 35
  • 36
183
votes
13 answers

MAMP Pro 3.05 on Mavericks updated to Yosemite - Apache does not start

I have been running MAMP Pro 3.05 successfully in Yosemite up to DP4 on a partition that was a clean install of Yosemite. I now have run the installer for DP5 over my Mavericks install, and now that MAMP Pro install will not start Apache. It says…
Steve
  • 14,401
  • 35
  • 125
  • 230
181
votes
3 answers

Only variable references should be returned by reference - Codeigniter

After the server PHP upgrade I am getting the following error with PHP Version 5.6.2 on Apache 2.0 A PHP Error was encountered Severity: Notice Message: Only variable references should be returned by reference Filename: core/Common.php Line Number:…
Techie
  • 44,706
  • 42
  • 157
  • 243
181
votes
11 answers

PHP Fatal error: Call to undefined function json_decode()

Apache is logging PHP Fatal error: Call to undefined function json_decode(). After some googling, it seems this problem is a result of not having the latest version of php. Oddly, running php --version ouputs PHP 5.5.1-2+debphp.org~precise+2 (cli)…
MirroredFate
  • 12,396
  • 14
  • 68
  • 100
175
votes
8 answers

Redirect all to index.php using htaccess

I am writing a simple PHP-based MVC-ish framework. I want this framework to be able to be installed in any directory. My PHP script grabs the request uri and breaks it off into segments. It makes segment 1 the controller and segment 2 the action.…
David Ericsson
  • 2,570
  • 2
  • 19
  • 33
174
votes
9 answers

Adding VirtualHost fails: Access Forbidden Error 403 (XAMPP) (Windows 7)

I've got a XAMPP installation running on Windows 7. As soon as I add a VirtualHost to httpd-vhosts.conf, BOTH the 'regular' http://localhost AND the new dropbox.local aren't working. This is what I added to my httpd-vhosts.conf:
Highmastdon
  • 6,960
  • 7
  • 40
  • 68
174
votes
7 answers

How can I make PHP display the error instead of giving me 500 Internal Server Error

This has never happened before. Usually it displays the error, but now it just gives me a 500 internal server error. Of course before, when it displayed the error, it was different servers. Now I'm on a new server (I have full root, so if I need to…
Rob
  • 7,980
  • 30
  • 75
  • 115