appprodUrlGenerator not found in production enviroment - php

When I clear cache in my project on server I get this error:
[Wed Feb 08 17:58:33 2012] [error] [client 127.0.0.1] PHP Fatal error: Class 'appprodUrlGenerator' not found in /home/hdc/www/app/vendor/symfony/src/Symfony/Component/Routing/Router.php on line 261
And when I access the page I get this one:
[Wed Feb 08 17:58:35 2012] [error] [client 127.0.0.1] PHP Fatal error: Class 'appprodUrlGenerator' not found in /home/hdc/www/app/app/cache/prod/classes.php on line 1083
I've tried almost everything I can think of: reinstall vendors, clear with/out debug, warmup, removing cache by hand.
Have anyone idea where it could came from or what problem it could be?

You need to warm your caches (which include a dumped container and a dumped router) in production by executing
php app/console --env=prod cache:warmup

Related

Getting a blank screen after copying a Drupal-7 project to my server

I am fairly new to Drupal.
I just got an already existing Drupal project and want to install it.
I copied it to: /var/www/html/myprojects/mydrupalproject
Then I got this error in my error.log from apache2:
[Thu May 03 17:55:41.603774 2018] [php7:notice] [pid 11604] [client
127.0.0.1:41930] PHP Notice: Constant DATE_RFC7231 already defined in /var/www/html/myprojects/mydrupalproject/includes/bootstrap.inc on
line 258, referer: http://127.0.0.1/myprojects/
[Thu May 03 17:55:41.604601 2018] [php7:error] [pid 11604] [client
127.0.0.1:41930] PHP Fatal error: require_once(): Failed opening required
'/var/www/html/myprojects/mydrupalproject/profiles/clusters_public/modules/contrib/apc/drupal_apc_cache.inc'
(include_path='.:/usr/share/php') in
/var/www/html/myprojects/mydrupalproject/includes/bootstrap.inc on
line 2632, referer: http://127.0.0.1/myprojects/
So I tried to use the original .htaccess info in case it was the problem but I still get exactly the same error in the log. Any help?
Failed opening required
'/var/www/html/myprojects/mydrupalproject/profiles/clusters_public/modules/contrib/apc/drupal_apc_cache.inc'
Does this file exist on your webserver and is it accessable? Are the correct file-rights set?

Understanding Drupal PHP Error Log

My developer team at General Motors has no PHP experience but we have to help with a Drupal/PHP site that went down. I took the 10 lines from the error logs that look important. Could anyone help us understand what's happening from these 10 lines? Any help is appreciated.
PHP Warning: Module 'hash' already loaded in Unknown on line 0
[Sun Jul 23 11:30:04 2017] [notice] Apache/2.2.12 (Linux/SUSE) mod_ssl/2.2.12 OpenSSL/0.9.8j-fips configured -- resuming normal operations
[Sun Jul 23 11:30:05 2017] [notice] Graceful restart requested, doing restart
PHP Warning: Module 'hash' already loaded in Unknown on line 0
[Sun Jul 23 11:30:05 2017] [notice] Apache/2.2.12 (Linux/SUSE) mod_ssl/2.2.12 OpenSSL/0.9.8j-fips configured -- resuming normal operations
[Sun Jul 23 11:30:39 2017] [error] [client 198.208.85.51] ALERT - possible memory corruption detected - unknown Hashtable destructor (attacker '198.208.85.51', file '/www/theblog/index.php', line 19), referer: https://theblog.com/
[Sun Jul 23 22:18:58 2017] [error] Hostname theblock.com. provided via SNI and hostname theblock.com provided via HTTP are different
[Sun Jul 23 22:18:58 2017] [error] Hostname theblock.com. provided via SNI and hostname theblock.com provided via HTTP are different
[Sun Jul 23 22:59:46 2017] [error] [client 198.208.85.51] PHP Fatal error: Call to a member function getElementsByTagName() on a non-object in /www/theblock/modules/filter/filter.module on line 1123
[Sun Jul 23 23:07:21 2017] [error] [client 198.208.85.51] PHP Fatal error: Call to a member function getElementsByTagName() on a non-object in /www/theblock/modules/filter/filter.module on line 1123
Recollecting what was last done might help to resolve your issue. Since in apache error log the showing issue in filter module, check for latest text format if you have updated. (The failing point is when conversion happens from a DOM object back to an HTML snippet). Also verify if you have installed any new module prior to this failure.(if yes try to disable that module using db)

PHP Fatal error: Class 'SassParser' not found

I just installed the peroxide HAML/SASS engine for Drupal 7.x and its oxygen theme, activated and Set as default, then gave chmod -R 777 sites/all just to be sure I don't get any rwx errors.
I have the sass (ruby gem version) installed(in sass: /usr/local/bin/sass /home/danthe/.rvm/gems/ruby-2.2.1/bin/sass)
I see a blank page now, can't even login to admin panel, everything is blank(`cause of the PHP Fatal Error).
My log says
[Sun Jul 19 21:14:19.607260 2015] [:error] [pid 2507] [client 127.0.0.1:42531] PHP Fatal error: Class 'SassParser' not found in /home/danthe/public_html/AtmTopTech/sites/all/themes/engines/peroxide/peroxide.engine on line 186
sh: 1: sass: not found
[Sun Jul 19 21:14:19.656532 2015] [:error] [pid 1424] [client 127.0.0.1:42532] PHP Fatal error: Class 'SassParser' not found in /home/danthe/public_html/AtmTopTech/sites/all/themes/engines/peroxide/peroxide.engine on line 186
[Sun Jul 19 21:14:19.740176 2015] [:error] [pid 2506] [client 127.0.0.1:42533] PHP Fatal error: Class 'SassParser' not found in /home/danthe/public_html/AtmTopTech/sites/all/themes/engines/peroxide/peroxide.engine on line 186
[Sun Jul 19 21:14:19.815207 2015] [:error] [pid 1427] [client 127.0.0.1:42534] PHP Fatal error: Class 'SassParser' not found in /home/danthe/public_html/AtmTopTech/sites/all/themes/engines/peroxide/peroxide.engine on line 186
This is in my ../peroxine.engine on line 186
// Setup the Sass Parser
$options = _peroxide_get_sass_options($theme);
$parser = new SassParser($options);
peroxide does not rely on entirely Ruby version of SASS compiler, it's only capable of compiling with Ruby version of compiler. You have to clone the repository with the engine recursively, as it is specified in Installation guide.
Peroxide uses phamlp as SASS compiler, it is specified as Git Sub-module for the Peroxide repository.
cd sites/all/themes (or whatever your theme directory is)
mkdir engines
cd engines
git clone --recursive git://github.com/codeincarnate/peroxide.git
The error that you're having is not caused by permissions, it's a Fatal Error in php in peroxide.engine#L186
The PHP script fails to create a new instance of SassParser object, which is defined in /phamlp/blob/master/sass/SassParser.php
Please make sure that the folder is present and contains the phamlp source code. /home/danthe/public_html/AtmTopTech/sites/all/themes/engines/peroxide/phamlp

PHP Pear Installer stuck at 30%

I tried to install PHP Pear on my Webspace. I uploaded the installer file from http://pear.php.net/go-pear
In the first run I got the following screen returned:
Starting installation ...
Loading zlib: ok
Bootstrapping Installer...................
Bootstrapping PEAR5.php............(remote) ok
Bootstrapping PEAR.php............(remote) ok
Bootstrapping Archive/Tar.php............(remote) ok
Bootstrapping Console/Getopt.php............(remote) ok
So I searched a long time but finaly found it in this article: Fatal error: Class 'PEAR' not found in /home/user1/public_html/go-pear.php on line 697
Installation in progress ...
(If the page stops loading before the end of the installation, then just reload it)
30 %
Starting installation ...
Loading zlib: ok
Bootstrapping Installer...................
Bootstrapping PEAR5.php............(remote) ok
Bootstrapping PEAR.php............(remote) ok
Bootstrapping Archive/Tar.php............(remote) Not Foundok
Bootstrapping Console/Getopt.php............(remote) ok
Extracting installer..................
Downloading package: PEAR.............
I did as described but now it stops at 30% and I don't know how to get further.
Does someone have an idea?
Thanks in advance
Franz-Georg
As far as I can see the error log contains the following statements:
[Wed May 27 11:27:55.577416 2015] [fcgid:warn] [pid 3097] [client ip:41115] mod_fcgid: stderr: PHP Fatal error: Class 'PEAR' not found in /var/www/vhosts/domain/pear/go-pear.php on line 697, referer: http://domain/go-pear.php?step=install
[Wed May 27 11:34:04.653829 2015] [fcgid:warn] [pid 3097] [client ip:42225] mod_fcgid: stderr: PHP Strict Standards: Non-static method PEAR::setErrorHandling() should not be called statically in /var/www/vhosts/domain/pear/go-pear.php on line 705, referer: http://domain/go-pear.php?step=install
[Wed May 27 11:34:05.012466 2015] [fcgid:warn] [pid 3097] [client ip:42225] mod_fcgid: stderr: PHP Fatal error: Class 'Archive_Tar' not found in /var/www/vhosts/domain/pear/go-pear.php on line 742`, referer: http://domain/go-pear.php?step=install
domain means my domain.
Since you have no console on your web host, you cannot use the pear CLI tool to install packages even if you get PEAR installed.
Follow the shared hosting installation docs then.

MySQL is crashing with the error "Lost connection to MySQL server at 'reading initial communication packet', system error: 111

My website crashes at random times because of a problem with MySQL and I can't quite pinpoint it. For one, the crash itself happens very seldom (perhaps once a month) so I can't replicate it. Because of that, I don't know what exactly is causing the issue.
When I first built our site many years ago, I was using mysql_ calls to connect to the database. I learned the error of my ways and started using PDO. Unfortunately, there is a LOT of code that used the mysql_ calls and I haven't gotten around to replacing every single one of them yet. So, my site has a mix between PDO and mysql_ calls.
When the site connects to the database, it first calls mysql_connect() and then connects to PDO through a wrapper.
The error I'm receiving comes into play when I use mysql_connect(). I've dug through logs and I can't find a specific cause for the error. As soon as it happens, it crashes the MySQL server and therefore the website. I can't even assume that mysql_ is the problem because it crashes before it even gets to the PDO wrapper. It might just be a MySQL connection issue.
I've done some searching and it looks like some others have recommended revising bind-address in my.cnf, which I've done.
I've also gone through the website and tried to remove as many mysql_ calls as possible.
Here's some example logfile output, with some info redacted:
Error connecting to database. Reason: Lost connection to MySQL server at 'reading initial communication packet', system error: 111
[Mon Jun 09 13:01:29 2014] [error] [client ****] PHP Warning: Creating default object from empty value in database.php on line 89
[Mon Jun 09 13:01:29 2014] [error] [client ****] PHP Fatal error: Call to a member function setErrorCallbackFunction() on a non-object in database.php on line $
[Mon Jun 09 13:01:29 2014] [error] [client ****] PHP Warning: Creating default object from empty value in database.php on line 89
[Mon Jun 09 13:01:29 2014] [error] [client ****] PHP Fatal error: Call to a member function setErrorCallbackFunction() on a non-object in database.php on lin$
[Mon Jun 09 13:01:29 2014] [error] [client ****] PHP Warning: mysql_connect(): Lost connection to MySQL server at 'reading authorization packet', system error: 0 in $
[Mon Jun 09 13:01:29 2014] [error] [client ****] PHP Warning: Creating default object from empty value in database.php on line 89
[Mon Jun 09 13:01:29 2014] [error] [client ****] PHP Fatal error: Call to a member function setErrorCallbackFunction() on a non-object in database.php on line $
[Mon Jun 09 13:01:29 2014] [error] [client ****] PHP Warning: Creating default object from empty value in database.php on line 89
[Mon Jun 09 13:01:29 2014] [error] [client ****] PHP Fatal error: Call to a member function setErrorCallbackFunction() on a non-object in database.php on lin$
[Mon Jun 09 13:01:29 2014] [error] [client ****] PHP Warning: mysql_connect(): Lost connection to MySQL server at 'reading authorization packet', system error: 0 in $
Any help would be greatly appreciated.
If the MySQL server crashes, then this issue is caused by the MySQL daemon itself and not your client code.
It can't be the database (schema) either, as you don't get to this point. (the DB is selected after succesful connection )
Make sure that:
MySQL binaries are the latest version or at least the latest version that ships via your distribution package management (same for all libs used by MySQL)
the RAM in your server is sound, maybe run a memcheck
the harddisk in your server is sound, maybe run smart utils or a full disk scan

Categories