When I try to login I get an error: SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES) parametrs.yml: This file is auto-generated during the composer install My OS is Debian Thanks for your help. Answer This is due to your mysql configuration. Accord…
Tag: php
Filter array to retain all elements that have a key containing a searched string
I’m trying to do some predictive searching, and I am using preg_grep() as a way to get away from the LIKE in SQL. I have the following array: If I have Phorc I want all array elements (key and value), with a partial match of Phorc, so here Phorce => 123. Is this possible with preg_grep() ? I have tri…
Laravel – Maintenance mode just for some urls
I need to use the Maintenance mode using the artisan command “down”, but just for some urls… In my case, i want that all urls that starts with “/admin/*” continue working. Is there a solution?
TCPDF – loop data in two columns layout
Im using TCPDF, at the moment im a listing data in two columns using array_chunk which works fine. But i need data to be show in first columns and then second, see below: Currently: 1 2 …
retrieving multiple records associated to multiple records laravel 4.2
recently i asked this question which got one answer but unfortunately didn’t solve the problem, after that i got no more answers and i really need to fix this problem i have. Alright so i have to make a quiz website for my school in which a user should be able to play the quiz, this page need to show
WkHTMLtoPDF 0.12.2.1 PHP exec xvfb-run: Error: xauth command not found
I want to generate a PDF from a URL, so I execute the command by WkHTMLtoPDF as below: The above command works fine on Terminal, But when I invoke the command inside PHP failed! And show me an error message as below: I don’t know how to resolve this issue! Anyone can help me on this, my OS environment a…
BuddyPress, get url (link) of a group using the group id
I’am getting the id of a group using: But for the life of me I can’t figure out how to return the link to the group its self. I can grab the slug, but some groups are sub groups so I can’t just: Any help greatly appreciated. Answer Did you try: That will return the href value for the group.
phpseclib loadKey works on mac, not on CentOS
I am attempting to load a hardcoded (for the sake of testing) RSA public key in phpseclib (stable version 0.3.10). This code works perfectly correctly when run locally on my Mac and spits back out the key I entered: However when I push it to an AWS instance running CentOS, the loadKey call returns false. I…
Codeigniter doesn’t let me update entry, because some fields must be unique
So what I’m trying to do: Pull User data from database, including email address, username etc. Edit it Save it But I want to keep username and email unique. And for this I’m setting validation rules like this: And as you can see I have is_unique[users.username] and is_unique[users.email] rules. Bu…
How to autosubmit a form in JS when a field reaches a number of characters? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 7 years ago. Improve this question What better way to make a form having a autosubmit when a field is complet…