apache2.2

Apache ErrorDocument with absolute path

佐手、 提交于 2019-12-05 10:39:34
I have a server with several virtual hosts. Now I want to set up the error documents for the whole server. I have located my error sites in /var/www/error/*, but with the ErrorDocument Directive I am only able to set the error document relative to document root, but I want to use the absolute path (e.g /var/www/error/404.html). Has anyone an idea how I can get this? I don't think this can be done directly inside the statement: The ErrorDocument will always have to be relative to the DocumentRoot . According to the docs , the only alternative seems to be specifying an external URL, but that is

PHP Error: “Call to undefined function mysqli_connect()”

匆匆过客 提交于 2019-12-05 09:31:57
In PHP I'm getting this error: Call to undefined function mysqli_connect() I checked my php.ini file and there is no ; in front of extension=php_mysql.dll or extension=php_mysqli.dll . I think the I am getting this error because my figuration File (php.ini) Path is C:\Windows . How would I change it to C:\Apache2.2\php\php.ini ? On Ubuntu machines you can try: sudo apt-get install php5-mysql since the basic PHP5 install does not include the mysqli_connect function. You can set the path using PHPIniDir in .htaccess or your server config. ie. PHPIniDir "C:/Apache2.2/php" You won't have to

Django JWT Authentication behavior different between local & mod_wsgi servers with Django REST framework

霸气de小男生 提交于 2019-12-04 03:17:14
I am trying to determine why authentication for protected resources using the Authorization: header behaves properly when using a local development server but not on my deployed apache 2.2 w/mod_wsgi implementation. I am using django 1.8 with django-rest-framework and the django-rest-framework-jwt lib for JWT based authentication. The apache server is ver 2.2 with mod_wsgi. This is all running on an ubuntu 12.04 instance (python 2.7). Working case with manage.py runserver on localhost: # manage.py runserver is running curl -s -X POST \ -d '{"username":"test@test.com", "password":}' \ http:/

The PDO extension is required for this adapter but the extension is not loaded

∥☆過路亽.° 提交于 2019-12-01 06:04:11
I am getting the following exception when i try to use the fetchall method of the Zend_Db_Table_Abstract class... An error occurred4545 EXCEPTION_OTHER Exception information: Message: The PDO extension is required for this adapter but the extension is not loaded Stack trace: #0 D:\www\TestProject\library\Zend\Db\Adapter\Pdo\Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 D:\www\TestProject\library\Zend\Db\Adapter\Abstract.php(448): Zend_Db_Adapter_Pdo_Mysql->_connect() #2 D:\www\TestProject\library\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('DESCRIBE

Giving PHP write permission in Apache

☆樱花仙子☆ 提交于 2019-11-29 04:51:16
I'm relatively new to configuring Apache. I have a PHP script that writes a JSON file based on values retrieved from $_GET . <?php file_put_contents('State.json', "{ do: '" . $_GET['do'] . "' }"); echo "Success"; ?> I run that code by create an XHR request. Ally.xhr('/Cream/Foam?do=someCommand'); The page it returns says failed to open stream: Permission denied on line 3. <Directory "~/Dropbox/Web"> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> Those are the permissions given to the root server folder. What do I need to change to

fabric appears to start apache2 but doesn't

和自甴很熟 提交于 2019-11-29 01:54:11
问题 I'm using fabric to remotely start a micro aws server, install git and a git repository, adjust apache config and then restart the server. If at any point, from the fabfile I issue either sudo('service apache2 restart') or run('sudo service apache2 restart') or a stop and then a start, the command apparently runs, I get the response indicating apache has started, for example [ec2-184-73-1-113.compute-1.amazonaws.com] sudo: service apache2 start [ec2-184-73-1-113.compute-1.amazonaws.com] out:

How to accomplish “AuthType None” in Apache 2.2

匆匆过客 提交于 2019-11-28 16:40:23
http://httpd.apache.org/docs/trunk/mod/mod_authn_core.html#authtype talks about "AuthType None", and has an awesome example of exactly what I need to do - unfortunately, it appears to be new to 2.3/2.4. Is there any equivalent feature in 2.2? The authentication type None disables authentication. When authentication is enabled, it is normally inherited by each subsequent configuration section, unless a different authentication type is specified. If no authentication is desired for a subsection of an authenticated section, the authentication type None may be used; in the following example,

The PDO extension is required for this adapter but the extension is not loaded

蹲街弑〆低调 提交于 2019-11-27 07:03:09
问题 I am getting the following exception when i try to use the fetchall method of the Zend_Db_Table_Abstract class... An error occurred4545 EXCEPTION_OTHER Exception information: Message: The PDO extension is required for this adapter but the extension is not loaded Stack trace: #0 D:\www\TestProject\library\Zend\Db\Adapter\Pdo\Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 D:\www\TestProject\library\Zend\Db\Adapter\Abstract.php(448): Zend_Db_Adapter_Pdo_Mysql->_connect() #2 D:\www