Error occurred while closing statement in dbal - mysql

In my silex web aplication I have this function:
function obtener_visible($conn, $articulo, $wid)
{
$q= $conn
->prepare('call vn2008.article_visible_single(?, ?)');
$q->execute(array(0 => $wid, 1=>$articulo));
$result = $q->fetch();
$conn->close();
return $result['suma'];
}
But when I call this function, I receive this error:
[Wed Oct 1 07:47:01 2014] PHP Warning: obtener_visible(): Error occurred while closing statement in /home/nelo/web/silex/almacen.php on line 0
[Wed Oct 1 07:47:01 2014] PHP Stack trace:
[Wed Oct 1 07:47:01 2014] PHP 1. {main}() /home/nelo/web/silex/index.php:0
[Wed Oct 1 07:47:01 2014] PHP 2. Silex\Application->run() /home/nelo/web/silex/index.php:38
[Wed Oct 1 07:47:01 2014] PHP 3. Silex\Application->handle() /home/nelo/web/silex/vendor/silex/silex/src/Silex/Application.php:481
[Wed Oct 1 07:47:01 2014] PHP 4. Symfony\Component\HttpKernel\HttpKernel->handle() /home/nelo/web/silex/vendor/silex/silex/src/Silex/Application.php:504
[Wed Oct 1 07:47:01 2014] PHP 5. Symfony\Component\HttpKernel\HttpKernel->handleRaw() /home/nelo/web/silex/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:61
[Wed Oct 1 07:47:01 2014] PHP 6. call_user_func_array() /home/nelo/web/silex/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:117
[Wed Oct 1 07:47:01 2014] PHP 7. {closure:/home/nelo/web/silex/index.php:18-22}() /home/nelo/web/silex/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:117
[Wed Oct 1 07:47:01 2014] PHP 8. executeFacade() /home/nelo/web/silex/index.php:20
[Wed Oct 1 07:47:01 2014] PHP 9. Verdnatura\Almacen\obtener_articulo->execute() /home/nelo/web/silex/facade.php:28
[Wed Oct 1 07:47:01 2014] PHP 10. obtener_visible() /home/nelo/web/silex/almacen/obtener_articulo.php:56
Can someone help me solve this error?

Related

why does python3.6 container uses the /usr/lib of python 3.9

I start a docker contain with
FROM python:3.6
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y apt-utils vim curl apache2 apache2-utils
RUN apt-get -y install libapache2-mod-wsgi-py3
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools==57.5.0
RUN pip install django==4.0 celery==5.2 ptvsd suds-py3 psycopg2 mysqlclient pysnmp pyparsing python-dateutil spyne lxml supervisor flower
ADD ./site-config.conf /etc/apache2/sites-available/000-default.conf
ADD ./www/project /var/www/html
WORKDIR /var/www/html
RUN chmod 775 /var/www/html/project
CMD ["apache2ctl", "-D", "FOREGROUND"]
And the apache file:
WSGIPythonPath /var/www/html/project:/usr/local/lib/python3.6/site-packages/
<VirtualHost *:80>
ServerName localhost
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html/project
Alias /static "/var/www/html/project/static"
WSGIScriptAlias / /var/www/html/project/project/wsgi.py
ErrorLog /var/www/html/logs/error.log
CustomLog /var/www/html/logs/access.log combined
</VirtualHost>
It installs both python 3.6 and 3.9 as I noticed:
All pips I installed are in 3.6 including mysqlclient
But when it tries to import _mysql, it checks the /usr/lib of python3.9 which gives an error because it in 3.6 not 3.9.
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
ImportError: cannot import name '_mysql' from partially initialized module 'MySQLdb' (most likely due to a circular import) (/usr/local/lib/python3.6/site-packages/MySQLdb/__init__.py)
Why doe this issue happen and how to prevent it?
Here are the logs for the django application, I get the error:
[Thu Mar 10 11:19:44.400586 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] mod_wsgi (pid=12660): Exception occurred processing WSGI script '/var/www/html/project/project/wsgi.py'., referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423410 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] Traceback (most recent call last):, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423482 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/MySQLdb/__init__.py", line 18, in <module>, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423498 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] from . import _mysql, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423533 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] ImportError: cannot import name '_mysql' from partially initialized module 'MySQLdb' (most likely due to a circular import) (/usr/local/lib/python3.6/site-packages/MySQLdb/__init__.py), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423558 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] , referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423568 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] During handling of the above exception, another exception occurred:, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423576 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] , referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423594 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] Traceback (most recent call last):, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423755 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/var/www/html/project/project/wsgi.py", line 16, in <module>, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423769 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] application = get_wsgi_application(), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423791 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423802 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] django.setup(set_prefix=False), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423821 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/__init__.py", line 24, in setup, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423831 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] apps.populate(settings.INSTALLED_APPS), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423849 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 114, in populate, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423870 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] app_config.import_models(), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423889 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/apps/config.py", line 301, in import_models, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423899 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] self.models_module = import_module(models_module_name), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423915 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423924 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] return _bootstrap._gcd_import(name[level:], package, level), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423939 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "<frozen importlib._bootstrap>", line 1030, in _gcd_import, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423958 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "<frozen importlib._bootstrap>", line 1007, in _find_and_load, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423976 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.423995 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "<frozen importlib._bootstrap>", line 680, in _load_unlocked, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424013 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "<frozen importlib._bootstrap_external>", line 790, in exec_module, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424033 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424051 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/models.py", line 3, in <module>, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424062 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424080 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/base_user.py", line 48, in <module>, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424090 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] class AbstractBaseUser(models.Model):, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424108 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 122, in __new__, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424118 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] new_class.add_to_class('_meta', Options(meta, app_label)), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424143 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 326, in add_to_class, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424154 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] value.contribute_to_class(cls, name), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424172 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/db/models/options.py", line 207, in contribute_to_class, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424184 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] self.db_table = truncate_name(self.db_table, connection.ops.max_name_length()), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424202 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/utils/connection.py", line 15, in __getattr__, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424212 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] return getattr(self._connections[self._alias], item), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424228 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/utils/connection.py", line 62, in __getitem__, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424238 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] conn = self.create_connection(alias), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424254 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/db/utils.py", line 204, in create_connection, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424264 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] backend = load_backend(db['ENGINE']), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424280 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/db/utils.py", line 111, in load_backend, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424290 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] return import_module('%s.base' % backend_name), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424306 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424316 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] return _bootstrap._gcd_import(name[level:], package, level), referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424332 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 15, in <module>, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424342 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] import MySQLdb as Database, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424357 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] File "/usr/local/lib/python3.6/site-packages/MySQLdb/__init__.py", line 24, in <module>, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424366 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] version_info, _mysql.version_info, _mysql.__file__, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.424418 2022] [wsgi:error] [pid 12660:tid 139881606039296] [client 172.23.0.1:43972] NameError: name '_mysql' is not defined, referer: http://localhost:8005/request/outgoing/
[Thu Mar 10 11:19:44.495983 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] mod_wsgi (pid=12660): Failed to exec Python script file '/var/www/html/project/project/wsgi.py'., referer: http://localhost:8005/request/search/
[Thu Mar 10 11:19:44.496864 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] mod_wsgi (pid=12660): Exception occurred processing WSGI script '/var/www/html/project/project/wsgi.py'., referer: http://localhost:8005/request/search/
[Thu Mar 10 11:19:44.497096 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] Traceback (most recent call last):, referer: http://localhost:8005/request/search/
[Thu Mar 10 11:19:44.497253 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] File "/var/www/html/project/project/wsgi.py", line 16, in <module>, referer: http://localhost:8005/request/search/
[Thu Mar 10 11:19:44.497269 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] application = get_wsgi_application(), referer: http://localhost:8005/request/search/
[Thu Mar 10 11:19:44.497292 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] File "/usr/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application, referer: http://localhost:8005/request/search/
[Thu Mar 10 11:19:44.497303 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] django.setup(set_prefix=False), referer: http://localhost:8005/request/search/
[Thu Mar 10 11:19:44.497321 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] File "/usr/local/lib/python3.6/site-packages/django/__init__.py", line 24, in setup, referer: http://localhost:8005/request/search/
[Thu Mar 10 11:19:44.497331 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] apps.populate(settings.INSTALLED_APPS), referer: http://localhost:8005/request/search/
[Thu Mar 10 11:19:44.497349 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 83, in populate, referer: http://localhost:8005/request/search/
[Thu Mar 10 11:19:44.497359 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] raise RuntimeError("populate() isn't reentrant"), referer: http://localhost:8005/request/search/
[Thu Mar 10 11:19:44.497391 2022] [wsgi:error] [pid 12660:tid 139881472829184] [client 172.23.0.1:43984] RuntimeError: populate() isn't reentrant, referer: http://localhost:8005/request/search/```
I had this issue before, I added virtual env with packages I need and added
WSGIDaemonProcess example.com python-home=/path/to/venv python-path=/path/to/mysite.com
WSGIProcessGroup example.com
Check details here Django documents
This answer is not why but a fix + using Venv in your situation is better

localhost:8080 this site can't be reached

I have xampp installed on my windows 8.1 32-bit. apache and MySQL are running. and i am having kind of weird problem. after a restart of my machine localhost runs but only and if tried reloading it won't load. so i tried some solutions over the internet, include clearing my cache. so i tried clearing my cache, localhost loaded but again only for one time, tried reloading it, but won't load . here is the error log for the day
[Thu Jul 07 01:09:02.134872 2016] [access_compat:error] [pid 8272:tid 1776] [client 100.93.115.237:57084] AH01797: client denied by server configuration: C:/xampp/htdocs/xampp/
[Thu Jul 07 12:27:38.232732 2016] [core:warn] [pid 5548:tid 392] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Jul 07 12:27:38.772405 2016] [ssl:warn] [pid 5548:tid 392] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Jul 07 12:27:42.577513 2016] [mpm_winnt:notice] [pid 5548:tid 392] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Thu Jul 07 12:27:42.577513 2016] [mpm_winnt:notice] [pid 5548:tid 392] AH00456: Server built: Aug 18 2012 12:41:37
[Thu Jul 07 12:27:42.577513 2016] [core:notice] [pid 5548:tid 392] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Jul 07 12:27:42.624392 2016] [mpm_winnt:notice] [pid 5548:tid 392] AH00418: Parent: Created child process 1128
[Thu Jul 07 12:27:44.139436 2016] [ssl:warn] [pid 1128:tid 356] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Jul 07 12:27:44.266630 2016] [mpm_winnt:notice] [pid 1128:tid 356] AH00354: Child: Starting 150 worker threads.
[Thu Jul 07 12:30:38.084960 2016] [core:warn] [pid 6960:tid 376] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Jul 07 12:30:38.412969 2016] [ssl:warn] [pid 6960:tid 376] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Jul 07 12:30:38.472973 2016] [mpm_winnt:notice] [pid 6960:tid 376] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Thu Jul 07 12:30:38.472973 2016] [mpm_winnt:notice] [pid 6960:tid 376] AH00456: Server built: Aug 18 2012 12:41:37
[Thu Jul 07 12:30:38.472973 2016] [core:notice] [pid 6960:tid 376] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Jul 07 12:30:39.464998 2016] [mpm_winnt:notice] [pid 6960:tid 376] AH00418: Parent: Created child process 5448
[Thu Jul 07 12:30:40.893037 2016] [ssl:warn] [pid 5448:tid 348] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Jul 07 12:30:40.957041 2016] [mpm_winnt:notice] [pid 5448:tid 348] AH00354: Child: Starting 150 worker threads.
[Thu Jul 07 13:16:55.613227 2016] [core:warn] [pid 5772:tid 392] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Jul 07 13:16:55.910117 2016] [ssl:warn] [pid 5772:tid 392] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Jul 07 13:16:56.925786 2016] [mpm_winnt:notice] [pid 5772:tid 392] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Thu Jul 07 13:16:56.925786 2016] [mpm_winnt:notice] [pid 5772:tid 392] AH00456: Server built: Aug 18 2012 12:41:37
[Thu Jul 07 13:16:56.925786 2016] [core:notice] [pid 5772:tid 392] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Jul 07 13:16:57.082044 2016] [mpm_winnt:notice] [pid 5772:tid 392] AH00418: Parent: Created child process 5560
[Thu Jul 07 13:16:58.566490 2016] [ssl:warn] [pid 5560:tid 396] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Jul 07 13:16:58.707150 2016] [mpm_winnt:notice] [pid 5560:tid 396] AH00354: Child: Starting 150 worker threads.

FIWARE Wirecloud: Error using X-FI-WARE-OAuth-Token request header

We are part of the FINISH accelerator and are deploying Wirecloud and KeyRock on our own servers using the docker containers provided by fiware.
We have KeyRock-IdM set up and linked to Wirecloud. We are trying to pass the logged-in users token to an API which returns data to a widget.
We found documentation about the "X-FI-WARE..." headers in the github code and wrote a test widget (main.js shown below). When deployed on the fiware labs instance, it works out of the box. When deployed on our local installation with a docker container it gives the following error: "Current user has not an active FIWARE profile". I scoured the settings.py file but have no idea where this error is coming from. I have DEBUG=True but nothing show up in the log. The user running the widget was logged in through the KeyRock IdM.
/*jshint globalstrict:true */
/*global MashupPlatform, ObjectStorageAPI, StyledElements*/
(function () {
"use strict";
var token_available = MashupPlatform.context.get('fiware_token_available');
var username = MashupPlatform.context.get('username');
alert(username + " has token?: " + token_available);
var url = MashupPlatform.prefs.get('keyRock_url');
var request = MashupPlatform.http.makeRequest(url, {
requestHeaders: {
"X-FI-WARE-OAuth-Token": "true",
"X-FI-WARE-OAuth-GET-Parameter": "access_token"
},
method: "GET",
onSuccess: function (response) {
alert("Success:" + JSON.stringify(response.responseText));
document.getElementById('response').textContent = response.responseText;
},
onFailure: function (response) {
alert("Failed:" + JSON.stringify(response.responseText));
},
onComplete: function () {
}
}
);
})();
How can i find out what is going wrong?
From the comment below, changed a python script:
edited the /usr/local/lib/python2.7/site-packages/wirecloud/fiware/proxy.py file in the docker container and replaced line 37 from raise ValidationError(error_msg) to a simple raise.
the log from /var/log/apache2/error.log is below
[Fri May 06 07:12:33.745550 2016] [wsgi:error] [pid 13:tid 139955375367936] Internal Server Error: /cdp/https/account.lab.fiware.org/user
[Fri May 06 07:12:33.745580 2016] [wsgi:error] [pid 13:tid 139955375367936] Traceback (most recent call last):
[Fri May 06 07:12:33.745584 2016] [wsgi:error] [pid 13:tid 139955375367936] File "/usr/local/lib/python2.7/site-packages/wirecloud/proxy/views.py", line 234, in proxy_request
[Fri May 06 07:12:33.745587 2016] [wsgi:error] [pid 13:tid 139955375367936] response = WIRECLOUD_PROXY.do_request(request, url, request_method, workspace)
[Fri May 06 07:12:33.745589 2016] [wsgi:error] [pid 13:tid 139955375367936] File "/usr/local/lib/python2.7/site-packages/wirecloud/proxy/views.py", line 144, in do_request
[Fri May 06 07:12:33.745592 2016] [wsgi:error] [pid 13:tid 139955375367936] processor.process_request(request_data)
[Fri May 06 07:12:33.745594 2016] [wsgi:error] [pid 13:tid 139955375367936] File "/usr/local/lib/python2.7/site-packages/wirecloud/fiware/proxy.py", line 59, in process_request
[Fri May 06 07:12:33.745597 2016] [wsgi:error] [pid 13:tid 139955375367936] token = get_access_token(request['user'], _('Current user has not an active FIWARE profile'))
[Fri May 06 07:12:33.745599 2016] [wsgi:error] [pid 13:tid 139955375367936] File "/usr/local/lib/python2.7/site-packages/wirecloud/fiware/proxy.py", line 33, in get_access_token
[Fri May 06 07:12:33.745602 2016] [wsgi:error] [pid 13:tid 139955375367936] if oauth_info.access_token is None:
[Fri May 06 07:12:33.745604 2016] [wsgi:error] [pid 13:tid 139955375367936] File "/usr/local/lib/python2.7/site-packages/social/storage/base.py", line 41, in access_token
[Fri May 06 07:12:33.745615 2016] [wsgi:error] [pid 13:tid 139955375367936] return self.extra_data.get('access_token')
[Fri May 06 07:12:33.745618 2016] [wsgi:error] [pid 13:tid 139955375367936] AttributeError: 'unicode' object has no attribute 'get'
Seems that the problem is related to the use of python-social-auth v0.2.18. Please update to v0.2.19. See this ticket in github for more info about this problem.
I guess you are adding an extra "-". Try "X-fiware-..."
Docker Hub contains bogus 'Official' images
After trying Alonzo's suggestion and the log not yielding an obvious solution, i decided to double check that the docker image i was using was trustworthy.
It turns out the docker image i was using (wirecloud/fiware-wirecloud) which states to be the official reference implementation is in fact an old version (0.8) owned by someone called 'Wirecloud'. If you search Wirecloud on docker hub or in Kitematic it is the first entry to show up.
I upgraded to the docker image fiware/wirecloud which is version 0.9, and now it works. I can see the access token passed to my back-end services.
Curiously, my test widget which i had modelled on the objectstorage.wgt example on https://wirecloud.conwet.etsiinf.upm.es/slides/attachments/objectstorage.wgt required updating to the new config.xml format before i could test.
I suggest:
a link to the correct wirecloud image on docker hub in the documentation.
contacting the 'Wirecloud' user and asking them to change the description of their image, or adding a comment with information about the official docker image.

Authenticating to Wirecloud via KeyRock

I set up a Wirecloud and an KeyRock instance on my own servers. Now I want to enable authentication to Wirecloud via KeyRock as described here: Integration with the IdM-GE
After going through the described steps upon opening <wirecloud_server>/login I land on the KeyStone login screen. When logged in I am asked th authorize the app and get redirected to <wirecloud_server>/complete/fiware/?state=<state_token>&code=<code_token> but there I only get a 500 error.
The Horizon (KeyRock-Frontend) log aswell as the Wirecloud log don't display any errors and thus I'm clueless what the problem might be.
EDIT1:
I changed the logging to debug and now I get the following message in the browser:
Environment:
Request Method: GET
Request URL: https://<wirecloud_server>/complete/fiware/?state=LhCRZqqOaB57Lo8kyYxhk5zWJBhTRshi&code=JH3mwLCmnBx19kZwtPoqNm1Gl4eIpv
Django Version: 1.6.11
Python Version: 2.7.9
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'wirecloud.commons',
'wirecloud.defaulttheme',
'compressor',
'south',
'wirecloud.catalogue',
'wirecloud.platform',
'wirecloud.fiware',
'social.apps.django_app.default')
Installed Middleware:
('wirecloud.commons.middleware.URLMiddleware',)
Traceback:
File "/usr/local/venv/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
112. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/venv/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
52. response = view_func(request, *args, **kwargs)
File "/usr/local/venv/lib/python2.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
57. return view_func(*args, **kwargs)
File "/usr/local/venv/lib/python2.7/site-packages/social/apps/django_app/utils.py" in wrapper
51. return func(request, backend, *args, **kwargs)
File "/usr/local/venv/lib/python2.7/site-packages/social/apps/django_app/views.py" in complete
28. redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
File "/usr/local/venv/lib/python2.7/site-packages/social/actions.py" in do_complete
43. user = backend.complete(user=user, *args, **kwargs)
File "/usr/local/venv/lib/python2.7/site-packages/social/backends/base.py" in complete
41. return self.auth_complete(*args, **kwargs)
File "/usr/local/venv/lib/python2.7/site-packages/social/utils.py" in wrapper
229. return func(*args, **kwargs)
File "/usr/local/venv/lib/python2.7/site-packages/social/backends/oauth.py" in auth_complete
375. state = self.validate_state()
File "/usr/local/venv/lib/python2.7/site-packages/social/backends/oauth.py" in validate_state
88. raise AuthStateMissing(self, 'state')
Exception Type: AuthStateMissing at /complete/fiware/
Exception Value: Session value state missing.
The apache log for my wirecloud vhost reads the following:
[Wed Jan 27 07:40:40.707138 2016] [wsgi:error] [pid 22571:tid 139868295030528] Internal Server Error: /complete/fiware/
[Wed Jan 27 07:40:40.707165 2016] [wsgi:error] [pid 22571:tid 139868295030528] Traceback (most recent call last):
[Wed Jan 27 07:40:40.707167 2016] [wsgi:error] [pid 22571:tid 139868295030528] File "/usr/local/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response
[Wed Jan 27 07:40:40.707169 2016] [wsgi:error] [pid 22571:tid 139868295030528] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Wed Jan 27 07:40:40.707171 2016] [wsgi:error] [pid 22571:tid 139868295030528] File "/usr/local/venv/lib/python2.7/site-packages/django/views/decorators/cache.py", line 52, in _wrapped_view_func
[Wed Jan 27 07:40:40.707173 2016] [wsgi:error] [pid 22571:tid 139868295030528] response = view_func(request, *args, **kwargs)
[Wed Jan 27 07:40:40.707175 2016] [wsgi:error] [pid 22571:tid 139868295030528] File "/usr/local/venv/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
[Wed Jan 27 07:40:40.707177 2016] [wsgi:error] [pid 22571:tid 139868295030528] return view_func(*args, **kwargs)
[Wed Jan 27 07:40:40.707179 2016] [wsgi:error] [pid 22571:tid 139868295030528] File "/usr/local/venv/lib/python2.7/site-packages/social/apps/django_app/utils.py", line 51, in wrapper
[Wed Jan 27 07:40:40.707181 2016] [wsgi:error] [pid 22571:tid 139868295030528] return func(request, backend, *args, **kwargs)
[Wed Jan 27 07:40:40.707183 2016] [wsgi:error] [pid 22571:tid 139868295030528] File "/usr/local/venv/lib/python2.7/site-packages/social/apps/django_app/views.py", line 28, in complete
[Wed Jan 27 07:40:40.707185 2016] [wsgi:error] [pid 22571:tid 139868295030528] redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
[Wed Jan 27 07:40:40.707187 2016] [wsgi:error] [pid 22571:tid 139868295030528] File "/usr/local/venv/lib/python2.7/site-packages/social/actions.py", line 43, in do_complete
[Wed Jan 27 07:40:40.707189 2016] [wsgi:error] [pid 22571:tid 139868295030528] user = backend.complete(user=user, *args, **kwargs)
[Wed Jan 27 07:40:40.707191 2016] [wsgi:error] [pid 22571:tid 139868295030528] File "/usr/local/venv/lib/python2.7/site-packages/social/backends/base.py", line 41, in complete
[Wed Jan 27 07:40:40.707204 2016] [wsgi:error] [pid 22571:tid 139868295030528] return self.auth_complete(*args, **kwargs)
[Wed Jan 27 07:40:40.707206 2016] [wsgi:error] [pid 22571:tid 139868295030528] File "/usr/local/venv/lib/python2.7/site-packages/social/utils.py", line 229, in wrapper
[Wed Jan 27 07:40:40.707208 2016] [wsgi:error] [pid 22571:tid 139868295030528] return func(*args, **kwargs)
[Wed Jan 27 07:40:40.707210 2016] [wsgi:error] [pid 22571:tid 139868295030528] File "/usr/local/venv/lib/python2.7/site-packages/social/backends/oauth.py", line 375, in auth_complete
[Wed Jan 27 07:40:40.707212 2016] [wsgi:error] [pid 22571:tid 139868295030528] state = self.validate_state()
[Wed Jan 27 07:40:40.707213 2016] [wsgi:error] [pid 22571:tid 139868295030528] File "/usr/local/venv/lib/python2.7/site-packages/social/backends/oauth.py", line 88, in validate_state
[Wed Jan 27 07:40:40.707215 2016] [wsgi:error] [pid 22571:tid 139868295030528] raise AuthStateMissing(self, 'state')
[Wed Jan 27 07:40:40.707217 2016] [wsgi:error] [pid 22571:tid 139868295030528] AuthStateMissing: Session value state missing.
The horizon log shows the following:
[Wed Jan 27 06:40:37.975296 2016] [wsgi:error] [pid 22572:tid 139868395742976] Login successful for user "idm".
[Wed Jan 27 06:40:38.089251 2016] [wsgi:error] [pid 22572:tid 139868362172160] DEBUG:idm_logger:Requesting authorization for application: 449efdc7913f434ea6e81ed49b1669e4 with redirect_uri: https://<wirecloud_server>/complete/fiware/ and scope: ['all_info'] by user idm
[Wed Jan 27 06:40:38.122259 2016] [wsgi:error] [pid 22572:tid 139868362172160] DEBUG:idm_logger:OAUTH2: Application 449efdc7913f434ea6e81ed49b1669e4 NOT alreadyauthorized
[Wed Jan 27 06:40:40.574809 2016] [wsgi:error] [pid 22572:tid 139868395742976] DEBUG:idm_logger:Authorizing application: 449efdc7913f434ea6e81ed49b1669e4 by user: idm
[Wed Jan 27 06:40:40.596301 2016] [wsgi:error] [pid 22572:tid 139868395742976] DEBUG:idm_logger:OAUTH2: Authorization Code obtained JH3mwLCmnBx19kZwtPoqNm1Gl4eIpv
[Wed Jan 27 06:40:40.596382 2016] [wsgi:error] [pid 22572:tid 139868395742976] DEBUG:idm_logger:OAUTH2: Redirecting user back to https://<wirecloud_server>/complete/fiware/?state=LhCRZqqOaB57Lo8kyYxhk5zWJBhTRshi&code=JH3mwLCmnBx19kZwtPoqNm1Gl4eIpv
Seems that this problem is happening when hosting the IdM server and WireCloud in the same domain. In that case, both services try to use the same cookie for the session as WireCloud and the IdM are based on Django. The same happens for the cookie used for the CSRF authentication token, although your error is not related to this cookie.
Please edit the settings.py file and provide a custom value for the SESSION_COOKIE_NAME and CSRF_COOKIE_NAME settings. E.g:
SESSION_COOKIE_NAME = "wcsessionid"
CSRF_COOKIE_NAME = "wccsrftoken"

Mysql 4 to 5 - Change script expression

I'm getting this error under error_log Apache
[Fri Nov 29 15:03:49 2013] [error] [client 81.15.135.11] SELECT COUNT(*),COUNT(DISTINCT UserName),COUNT(DISTINCT CallingStationId) FROM radacct WHERE AcctStartTime LIKE '%2013-11-22%', referer: http://www.company.com/caoad/charts.cgi
[Fri Nov 29 15:02:46 2013] [error] [client 81.15.135.11] SELECT SUM(AcctOutputOctets),SUM(AcctInputOctets) FROM radacct WHERE AcctStartTime LIKE '%2013-11-19%', referer: http://www.company.com/caoad/charts.cgi
SELECT COUNT(*),COUNT(DISTINCT UserName),COUNT(DISTINCT CallingStationId)
FROM radacct
WHERE AcctStartTime LIKE '%2013-11-10%'
SELECT SUM(AcctOutputOctets),SUM(AcctInputOctets)
FROM radacct
WHERE AcctStartTime LIKE '%2013-11-09%'
The syntax probably changed from Mysql 4 to 5 and I don't know exactly how should I change it to.
If anyone can give me some pointers that would be great. Thank you.
#!/usr/bin/perl
use Chart::Lines;
do "ho.pl";
$numdays = $forminput{'numdays'};
$partner = $forminput{'partner'};
my $nas = $forminput{'nasidentifier'};
if (!$numdays){
$numdays = 7;
}
$multiplier = 38;
if ($numdays > 30){
$small=1;
$multiplier = 8;
}
$g = Chart::Lines->new(50+($numdays*$multiplier),500);
#day_names = qw(Sun Mon Tue Wed Thu Fri Sat);
$accum=0;
for (my $count=$numdays; $count>0; $count--) {
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time() - 60*60*24*$count);
$mon++;
$montext = sprintf "%02d",$mon;
$mdaytext = sprintf "%02d", $mday;
$year = $year + 1900;
if ($partner){
%hotspotpartners = get_hotspot_trading_partners();
my $matchstring;
my $countage=0;
foreach (keys %hotspotpartners){
if ($hotspotpartners{$_} == $partner){
if ($countage != 0){
$matchstring .= " OR ";
}
$matchstring .= "NASIdentifier='$_'";
$countage++;
}
}
$sql = "SELECT COUNT(*),COUNT(DISTINCT UserName),COUNT(DISTINCT CallingStationId)
FROM radacct
WHERE AcctStartTime LIKE '%"."$year-$montext-$mdaytext%' AND ($matchstring)";
} else { $sql = "SELECT COUNT(*),COUNT(DISTINCT UserName),COUNT(DISTINCT CallingStationId) FROM radacct WHERE AcctStartTime LIKE '%"."$year-$montext-$mdaytext%'";
}
if ($nas){
$sql .= " AND NASIdentifier = '$nas'";
}
print STDERR $sql;
my $sth = $dbh->prepare( $sql );
$sth->execute();
($temp,$unique,$mac) = $sth->fetchrow();
if ($small){
$title="";
} else {
$title = "$day_names[$wday] $mday/$mon";
}
$g->add_pt($title, $temp,$unique,$mac);
$accum = $accum + $temp;
}
$accum = int($accum / $numdays);
my #legend_labels = qw(Total Unique MACS);
$g->set('sub_title' => 'Average : '.$accum.' logins per day');
$g->set('min_val' => 0);
if (!$small){
$g->set('grid_lines' =>'true');
}
$g->set('x_label' =>'Date');
$g->set('y_label' =>'Number of logins');
$g->set('legend_labels' => \#legend_labels);
$g->set('transparent' =>'true');
$g->cgi_png();
#
Error log after make changes on the script to:
use strict;
use warnings;
#
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Scalar value #abbr[$county] better written as $abbr[$county] at /var/www/cgi-bin/ovad/chart-day.cgi line 47., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$last" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 10., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "%forminput" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 10., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$last" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 11., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$last" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 12., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$last" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 15., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$last" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 22., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$last" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 28., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$last" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 35., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 39., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$sql" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 43., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$sql" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 44., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$dbh" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 45., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$sql" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 45., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 47., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "#legend_labels" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 52., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 53., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 54., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 55., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 56., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 57., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 58., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 60., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 61., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "#legend_labels" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 61., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 62., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 63., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Global symbol "#data" requires explicit package name at /var/www/cgi-bin/ovad/chart-day.cgi line 63., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Execution of /var/www/cgi-bin/ovad/chart-day.cgi aborted due to compilation errors., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:33 2013] [error] [client 82.15.145.17] Premature end of script headers: chart-day.cgi, referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "$numdays" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 6., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "%forminput" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 6., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "$partner" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 7., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "%forminput" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 7., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "%forminput" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 8., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "$numdays" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 9., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "$numdays" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 10., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "$multiplier" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 12., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "$numdays" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 13., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "$small" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 14., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "$multiplier" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 15., referer: /ovad/charts.cgi
[Fri Nov 29 15:36:34 2013] [error] [client 82.15.145.17] Global symbol "$g" requires explicit package name at /var/www/cgi-bin/ovad/chart-bandwidthhistory.cgi line 17., referer: /ovad/charts.cgi
What sort of field is 'AcctStartTime'? If it's a datetime field (or similar), I don't think you can use 'like' on it.
You probably want:
where date(acctStartTime) = '2013-11-09'