Rubycas-server character encoding issue (Internal server error) - rubycas

Since a couple of months ago we are using in production environment a rubycass-server 1.0 validating against Active directory (Microsoft 2008 r2 server). We are using ruby 1.9.2p180, sinatra-1.1.3... We are having problems with Spanish and Catalan languages. If a user types ñ or ç … in the login or password field when he sends the form it produces an “internal server error” message. I have activated the debug mode in the config.yml options but when this error rises it does not appear any hint into the log file. A couple of days ago I tried the last version of rubycas 1.1.0 and this error (Internal server..) didn’t happen but if the login/password had any of this characters the validation always failed with the message “password incorrect”. I think it is an encoding error.
Has anybody found a solution to this problem?
Thanks in advance,

Solved. Problem was caused because we were using an old version of net-ldap (0.1.1). I updated this gem to the last version (0.3.1) and works like a charm.

Related

iconv() illegal character issue on Live server in Laravel 4 / dom2pdf

I have a Laravel 4.2 application which renders text to a PDF using dom2pdf (0.4) which works fine on the dev server but not live. It throws a 'iconv(): Detected an illegal character in input string' error on live which I believe is due to a long hyphen ( – ) in the text. Each system is using exactly the same data.
Is there a setting on the live server to work around this? All text is stored as utf8_unicode_ci in the MySQL database, and the html for the PDF has a utf-8 charset directive in the header. Both servers are running Apache/CentOS/Cpanel, dev server is running PHP Version 5.5.38 while live is 5.5.34.
Found the issue - it was because the mbstring PHP extension was not installed on the live server. If this is absent Laravel/dom2pdf falls back to its own mbstring implementation which was failing in my case.
Now mbstring is installed it works fine. Thanks to those who looked.

Error when retrieving associated data on. Linux only

Prior this problem I had another issue related to the same subject. The problem has been sorted thanks ta #ndm.
Link the previous problem: Cakephp 3. Windows and Linux OS returning different result when querying the database
I have an article page and I am retrieving the associated data with articles. Article comments.
I have the following line of code
$this->Articles->find()->contain('ArticleComments');
This line of code on both local Windows 10 machine and production Debian server retrieves all articles including their comment. find a link to a screenshot of the returned result using Cakephp debugging function pr($object)
Screenshot of the returned result: http://s29.postimg.org/f76brygw6/cakephp.jpg
Now the only problem I have, which occurs only on the production Debian server is that despite the aforementioned line of code is returning articles and article comments I cannot use this object. For an instance if I try the following code:
$this->Articles->find()->contain('ArticleComments')->toArray();
Or
$this->set('articles', $this->Articles->find()->contain('ArticleComments'));
I get this error:
Cannot convert value to integer
InvalidArgumentException
And the following error in tmp/error.log: http://s14.postimg.org/4e88qp6j4/cakephp_error.jpg
Again, this error occurs only on my Debian server and if I retrieve just articles by the following code it works fine.
$this->Articles->find()
What I have done to fix this issue:
Triple checked (twice) table and classes names. 100% sure the issue is not file naming one.
checked both machines PHP and Cakephp version. My Debian server runs PHP 5.6.15-1~dotdeb+zts+7.1 (cli) and My Windows 10 runs PHP 5.6.8 (cli). Cakephp versions are the same. Cakephp 3.1.4
The problem is, probably, the way you are loading the associations. You are required to tell Cake in what plugin your table class lives. Instead of doing this:
$this->hasMany('ArticleComments')
You need this:
$this->hasMany('Comments.ArticleComments')
Problem solved!
The issue was not coming from Linux nor CakePHP.
On my local machine which happens to be Windows OS I am running MySQL version 5.6.24 and on my live server, which runs Linux debian I have MySQL 5.5.46.
I had database columns "datetime" which is supported in 5.6 but was causing a problem in version 5.5.
I simply changed the column type to "timestamp" and the issue was resolved.
Both environments are running different OS's and an enormous amount of time was spent to ensure the issue is not Windows to Linux problem(i.e. filename case sensitivity). CakePHP misleading error messages has delay me to resolve the problem also.
I am glad after more than a month the problem is fixed :D

Cannot Connect to Mysql Database From delpi Xe5 TSqlConnection

I am trying to connect to MySQL database using Delphi Xe5 and fire monkey mobile application.
I am using an TSQLConnection to connect to the database but i get an error DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path.
I have read the below articles of which none had a solution that worked.
Articles:
DBX Error: Driver could not be properly initialised
http://wiltonsoftware.com/posts/view/getting-embarcadero-dbexpress-mysql-working-dbx-error-driver-not-initialized
None of their solutions seem to work, i use delphi xe5 on Windows 64x.
I have tried downloading the zip file libmysql.dll and coppied into the following paths mentioned but to no avail.
C:\Users\Public\Documents\RAD Studio\12.0\Bpl
C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\bin
Can anybody please assist me in understanding why i am not able to connect to my MySQL database?
Your error message
DBX Error: Driver could not be properly initialized. Client library may be missing,
not installed properly, of the wrong version, or the driver may be missing from the
system path.
is the standard generic one from DBX and just seems to mean "something went wrong somewhere". Error-reporting doesn't seem to be DBX's strong point; a couple of times recently I've had that error when the problem turned out to be quite different than it might lead you to expect. What's annoying about it is that I only found out because I happened to have "Break on exception" turned on in the IDE and could see that the initial exception came with quite different and more revealing info, but the DBX driver seems to re-raise with that text entirely replaced by its generic, info-free version, at least in the circumstances I ran into.
AS you've subsequently found out, a FireDAC connection may succeed in connecting where a DBX one fails, and even where it fails, its error messages are more specific than DBX's. It's a shame because I find FD more fidly to set up (like I always forget its SqlWait component and it doesn't tell me that I have until r/time). So, I'm not suggesting anyone should switch to FireDAC if they've already got DBX working on a given database, just that FD can be a useful diagnostic tool.

Trying to fix this error message "Invalid authentication method set in configuration: coookie" on the - phpMyAdmin page, when using MAMP?

I just restarted MAMP after months to start using it with Wordpress. Apache and MySQL Servers are both running fine (are green) and the start page launches fine. However the phpMyAdmin page is giving an error message:
phpMyAdmin - Error
Invalid authentication method set in configuration: coookie
[For what it's worth - I've cleared the browser cache ond cookies and have found negligible relevant material (solutions) around the issue, so far.]
Any known steps to resolve this issue?
You have one "o" too many in your coookie (check your PhpMyAdmin configuration file).

MySQL server has gone away: Rails on Passenger (Redmine)

I am making use of Redmine a web based software tracking tool, its perfect for my needs. However, I keep coming across this error in my production.log.
ActiveRecord::StatementInvalid
(Mysql::Error: MySQL server has gone
away: SELECT * FROM issue_relations
WHERE (issue_relations.issue_from_id
= 6) ): app/models/issue.rb:234:in after_save'
app/controllers/issues_controller.rb:196:in
edit'
When I add a ticket or update a ticket I get the below error and the above is recorded in my logs. It returns this via the browser after about 15 seconds. I have tried it several times, other areas of the app work fine.
Internal error
An error occurred on the page you were
trying to access. If you continue to
experience problems please contact
your redMine administrator for
assistance.
Back
I am using Ruby on Rails 2.3.8 on Phusion Passenger. Gem version 1.3.7. Active record 2.3.8. mysql (2.8.1 ruby x86-mingw32 x86-mswin32, 2.7.3 mswin32).
I am not a Ruby on Rails programmer and I am at loss on what else I can do to narrow this down. I had quick Google and found that as of rails 2.3 there is an option to reconnect so in my database.yml file I placed a reconnect true, but this didn't help!
Thanks all for any help
The list of usual suspects: http://dev.mysql.com/doc/refman/5.0/en/gone-away.html (all checkable on the MySQL-side of things).
Try putting the code from this Gist in a file in {rails application}/config/initializers/active_record_connections.rb: http://gist.github.com/238999
That said, this should probably not be happening in the first place - and if requests are taking 15 seconds to load, that also suggests that something else is going on. Can you share what appears in the logs before this error?