CordovaResourceApi import unresolved phonegap

I am using phonegap-2.9.0 with file plugin. When I build project for android platform it creates two packages within the src/ folder:

org.apache.cordova.file
org.apache.cordova.filetransfer

I get below errors within these two packages:

1 - org.apache.cordova.file.FileUtils

Method testSaveLocationExists() from the type DirectoryManager is not visible
Method getFreeDiskSpace() from the type DirectoryManager is not visible
Method testFileExists() from the type DirectoryManager is not visible

2 - org.apache.cordova.filetransfer.FileTransfer

import org.apache.cordova.CordovaResourceApi unresolved
import org.apache.cordova.CordovaResourceApi.OpenForReadResult unresolved

Could someone please tell me what I should do to resolve these?

Thanks.

Setting up a subdomain with apache on linux

I can't believe that I haven't done this before, but I would like a definitive answer so I'm all set going forward.

I have an apache config file at /etc/apache2/sites-available/mysite which looks like this:

<VirtualHost *:80>
    ServerAdmin [email protected]

    DocumentRoot /home/sam/public_html
    <Directory />
            Options FollowSymLinks
            AllowOverride All
    </Directory>
    <Directory /home/sam/public_html>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

So this serves html and php files from ~/public_html all fine. But I have multiple projects there so would like to start using subdomains. What I want to do is serve files from ~/public_html/myproject/ as the root directory for myproject.localhost.

I have tried adding the following to the bottom of my apache file:

<VirtualHost myproject.localhost>
    DocumentRoot ~/public_html/myproject/
    ServerName myproject.localhost
    ServerAdmin [email protected]
    <Directory ~/public_html/myproject>
            Options Indexes FollowSymLinks
            AllowOverride FileInfo
            Order allow,deny
            Allow from all
    </Directory>
</VirtualHost>

but apache complains:

Restarting web server: apache2[Tue Aug 20 11:06:19 2013] [error] (EAI 2)Name or service not known: Could not resolve host name myproject.localhost -- ignoring!
 ... waiting [Tue Aug 20 11:06:20 2013] [error] (EAI 2)Name or service not known: Could not resolve host name myproject.localhost -- ignoring!

I know I'm committing a fundamental error, but I'm not sure what it is.

Any help much appreciated.

EDIT:

This is my complete file now:

<VirtualHost *:80>
    DocumentRoot /home/sam/public_html/ryua1226-magento/
    ServerName mydomain.localhost
    ServerAdmin [email protected]
    <Directory /home/sam/public_html/ryua1226-magento>
            Options Indexes FollowSymLinks
            AllowOverride FileInfo
            Order allow,deny
            Allow from all
    </Directory>
</VirtualHost>


<VirtualHost *:80>
    ServerAdmin [email protected]

    DocumentRoot /home/sam/public_html
    <Directory />
            Options FollowSymLinks
            AllowOverride All
    </Directory>
    <Directory /home/sam/public_html>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost> 

XAMPP, Apache – Error: Apache shutdown unexpectedly

I've just reinstaled XAMPP... + when I try to start my Apache server in the Control Panel I now get following errors:

16:50:25  [Apache]  Status change detected: running
16:50:26  [Apache]  Status change detected: stopped
16:50:26  [Apache]  Error: Apache shutdown unexpectedly.
16:50:26  [Apache]  This may be due to a blocked port, missing dependencies, 
16:50:26  [Apache]  improper privileges, a crash, or a shutdown by another method.
16:50:26  [Apache]  Press the Logs button to view error logs and check
16:50:26  [Apache]  the Windows Event Viewer for more clues
16:50:26  [Apache]  If you need more help, copy and post this
16:50:26  [Apache]  entire log window on the forums

Can anyone help slowe this?

Very best, T

Header names with underscores ignored in php 5.5.1 / apache 2.4.6

After upgrading to php 5.5.1 and apache 2.4.6, checking for certain headers is now broken (specifically, checking for HTTP_X_REQUESTED_WITH).

Through further testing I noticed that any custom header that contains an underscore is ignored (by this I mean it does not show up in PHP's $_SERVER array). So if I add a header named my-header, it becomes available as $_SERVER['HTTP_MY_HEADER'], but if I try adding a header my_header, it's not available in $_SERVER.

Error After upgrading to Apache 2.4.6

the "a2ensite""a2dissite" are not working
echo:
ERROR: Site XXXXXX does not exist!

I swear it exists in sites-available folder.

after I typed a2ensite and double clicked the Tab button, It shows the /root directory

There must be something wrong with the a2en/dissite script.

How can I make it back to work?

Thank you in advance

===================== Here are last lines of error log:

[Sun Aug 04 22:59:31.406192 2013] [mpm_event:notice] [pid 5378:tid 140459282536256] AH00489: Apache/2.4.6 (Ubuntu) configured -- resuming normal operations
[Sun Aug 04 22:59:31.406433 2013] [core:notice] [pid 5378:tid 140459282536256] AH00094: Command line: '/usr/sbin/apache2'
[Sun Aug 04 23:09:44.648984 2013] [mpm_event:notice] [pid 5378:tid 140459282536256] AH00491: caught SIGTERM, shutting down
[Sun Aug 04 23:09:46.001182 2013] [mpm_event:notice] [pid 5692:tid 139671144335168] AH00489: Apache/2.4.6 (Ubuntu) configured -- resuming normal operations
[Sun Aug 04 23:09:46.001490 2013] [core:notice] [pid 5692:tid 139671144335168] AH00094: Command line: '/usr/sbin/apache2'

Django cannot import name utils

If I run python manage.py runserver, it works fine. But when I try to have my site run through apache, I keep getting the error:

 mod_wsgi (pid=25005): Exception occurred processing WSGI script '/apps/peer-web/peer_web/wsgi.py'.
 Traceback (most recent call last):
   File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 236, in __call__
     self.load_middleware()
   File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/base.py", line 53, in load_middleware
     raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
 ImproperlyConfigured: Error importing middleware django.contrib.auth.middleware: "datetime initialization failed"
 mod_wsgi (pid=25005): Exception occurred processing WSGI script '/apps/peer-web/peer_web/wsgi.py'.
 Traceback (most recent call last):
   File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 236, in __call__
     self.load_middleware()
   File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/base.py", line 53, in load_middleware
     raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
 ImproperlyConfigured: Error importing middleware django.contrib.auth.middleware: "cannot import name utils"

EDIT: new traceback after re-installing Django

 mod_wsgi (pid=25005): Exception occurred processing WSGI script '/apps/peer-web/peer_web/wsgi.py'.
 Traceback (most recent call last):
   File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 236, in __call__
     self.load_middleware()
   File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/base.py", line 53, in load_middleware
     raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
 ImproperlyConfigured: Error importing middleware django.contrib.auth.middleware: "cannot import name utils"
 mod_wsgi (pid=25005): Exception occurred processing WSGI script '/apps/peer-web/peer_web/wsgi.py'.
 Traceback (most recent call last):
   File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 236, in __call__
     self.load_middleware()
   File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/base.py", line 53, in load_middleware
     raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
 ImproperlyConfigured: Error importing middleware django.contrib.auth.middleware: "cannot import name utils"

How do I fix this?