Questions tagged [php]
PHP is a server-side scripting language designed primarily for web development. CiviCRM is written in PHP.
192
questions
0
votes
1
answer
39
views
Unable to install CiviCRM on Joomla 4.2.9 and 4.3.0 (updated)
We have been fruitlessly trying to install v 5.60.0 in Joomla. At first we tried php 8.2, but had to give up without success. Back to 8.1 gives no better results.
The latest error with php 8.2 is:
...
1
vote
1
answer
23
views
DB Error: extension not found
I'm running CiviCRM 5.63.1 on a Joomla 4 environment and using PHP 8.0.28.
cli.php keeps failing with these errors:
[code] => -25
[message] => DB Error: extension not found
[mode] => 16
[...
1
vote
1
answer
31
views
membershiprenewallink can't find membershiptype
everybody
Sorry if it's a newbie question, I hope you could help anyway.
My site (drupal 9 + civi + php 8.1) is actually working for anonymous users; as soon as a user login the WSoD appears (The ...
0
votes
1
answer
25
views
Undefined array key "email_greeting_display"
I'm trying to visualize a contact (organization) and I'm receiving the following warning in the "Communication preferences" section.
Warning: Undefined array key "...
2
votes
1
answer
63
views
How can I Add a File to an Activity in API v4?
I create activities using the API, and now I need to add an uploaded file (meaning it was uploaded in a Drupal form) to the activity. I tried this:
$results = \Civi\Api4\Activity::create()
->...
1
vote
1
answer
49
views
Undefined variable $store in Joomla.php on line 56 - CRM_Core_Permission_Joomla error
I am experiencing an issue with Joomla integration while using CiviCRM. I am getting the following error on line 56 of the "Joomla.php" file:
PHP Warning: Undefined variable $store in /home/...
0
votes
1
answer
69
views
Error when importing contacts - "Warning: Illegal string offset 'code'"
After importing a CSV of contacts, I'm getting a blank screen with the error message below. Typically, I get a report of how many contacts were skipped due to duplicates. It appears the data is ...
1
vote
1
answer
312
views
An active PHP session was detected
I'm running CiviCRM v5.32.2 and the CiviCRM WP REST API v0.1 plugin in Wordpress v5.6.
In Wordpress Site Health Status i get this warning:
An active PHP session was detected
A PHP session was created ...
0
votes
1
answer
43
views
Undefined array key "merge_same_household"
I'm trying to export contacts from the list in CiviCRM but got a visual warning which does not let me proceed:
Warning: Undefined array key "merge_same_household" in /bitnami/wordpress/wp-...
3
votes
2
answers
98
views
I get a WSOD when I use the search function on CiviCRM
CiviCRM was working fine until I downloaded an extension called CiviRules. I looked into the API for field UFMatch, clicked around in there, and pressed execute (got no warning that it was going to ...
1
vote
0
answers
48
views
Not able to upgrade civicrm from 5.33 to 5.60
I'm trying to upgrade civicrm from 5.33 to 5.60 and facing below issue and not able to go forward. Any help is much appreciated
[Error: Finish core DB updates 5.60.0]
CRM_Core_Exception: Parameter &...
1
vote
0
answers
33
views
civicrm wordpress installation fails with: You have requested a non-existent service "spec_gatherer"
I'm trying to install Civicrm on Wordpress within this docker setup: https://lab.3sd.io/tools/civicrm-docker/
I tried the michaelmcandrew/civicrm:5.59.2-wordpress-php8.1 and civicrm:5.56.0-wordpress-...
1
vote
1
answer
44
views
CiviCRM - Mailpoet plugin conflict with Html2Text
We upgraded CiviCRM to the most recent version back in November and had the problem in the related ticket with ANY report failing when ANY filter was enabled. The error was:
Error thrown
Call to ...
2
votes
2
answers
74
views
Cannot run scheduled jobs - cli.php errors out with uninformative "Error"
I upgraded to 5.56.0 from 5.55.2, run in Joomla 3.10, and power with php 7.4.32 and apache httpd 2.4.54. The very next cron run produced "Error". Running by hand also produces "Error&...
1
vote
1
answer
97
views
PHP 7.4 error, PHP 8 Fatal Error - TypeError: array_flip() related to Search Prefrences
I'm running against a fatal error when I attempt to update my user profile on a drupal9/civicrm5.49.5 setup (url path: /user/1/edit/profile/1).
The error message is as follows:
The website encountered ...
2
votes
1
answer
51
views
PHP Cannot Find File From Vendor Directory
After upgrading to PHP 8 (8.0.25) my CiviCRM install fails to be able to find /var/www/user/web/vendor/civicrm/civicrm-core/install/langs.php. This happens whenever I try and go to a /admin* page in ...
2
votes
1
answer
324
views
Class "IntlDateFormatter" not found after install
Just did a clean install of Joomla 4.23 with Civi 5.54.0 running on PhP 8.0 via xampp. Install went fine including databasee upgrade but can't get to CiviCRM dashboard. Error message is
'Class "...
0
votes
1
answer
85
views
CiviCalendar: Array and string offset access syntax with curly braces is deprecated
I'm trying to prepare a site for migration to a new host, and the copy of the site I've set up on the new host is generating masses of warnings that I'm not seeing on the current production ...
0
votes
1
answer
39
views
Will civicrm support in Laravel
I am familiar with Laravel but integrating CiviCRM was new to me. Is it possible to integrate the CiviCRM in Laravel?
If yes can anyone provide the steps to integrate?
Thanks in advance
1
vote
2
answers
50
views
Php Standalone Skript doesnt Query Database, APIv4 Simple Example
I tried to write a Standalone PHP-Skript for CiviCRM and looked after the Simple Example, but unfortunately it doesnt return something.
<?php
require_once '/var/www/html/wp-content/plugins/civicrm/...
0
votes
1
answer
86
views
How to hide these 'deprecated' type messages when implementing PHP 7.4?
Having just upgraded a site to 5.47.2 and noting that PHP 7.4 is recommended I rashly took this seriously :) and ended up with 3 messages that splat themselves over the top of the majority of screensm ...
1
vote
2
answers
42
views
CRM Core Exception Could not find valid session key form error
I know there are lots of threads on this with no clear solution. Posting again for any new input. Using cicivCRM 5.39.0.
0
votes
0
answers
21
views
"Current and Upcoming Events" is missing and trying to ICalendar.tpl.php file that does not exist
Ive been thrust into trying to help a buddy fix his civicrm deployment and I cannot find a way to generate this template necessary to populate that page.
Looking at the errors it is looking for the ...
1
vote
1
answer
24
views
Is there any way to apply two "NOT Like" conditions in Civicrm API?
Hi I am using Civicrm api v3. I am trying NOT Like condition with single condition it is working. But i need to apply two conditions with string1 and string2.
$contribution = civicrm_api3('...
0
votes
0
answers
41
views
Why does W3 Total Cache serve cached pages to logged in users (Wordpress)?
I'm using a contribution shortcode in a Wordpress page. I need the HTML/XML request to never load from cache for both logged-in and anonymous users.
In W3 Total Cache, I have the "Don't cache ...
1
vote
1
answer
57
views
CiviCRM WordPress Upgrade to 5.44.0 Error
When upgrading I get this error:
Fatal error: Cannot redeclare Matrix\adjoint() (previously declared in /home/xxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/vendor/markbaker/matrix/classes/...
1
vote
1
answer
29
views
Map firstname-lastname pairs to IDs
I have a long list of donations that I want to import. My first step was to ensure that all the contacts in the list exist in CiviCRM - that's done, and I spent a while deduplicating the records. ...
0
votes
1
answer
102
views
Select2 in php forms?
I have a simple quickform --
$this->add('text','trial_number','Trial Number',TRUE);
$this->add('date','Trial_Date',ts('Trial Date'),CRM_Core_SelectValues::date(NULL, 'Y M d',15,1) );
...
2
votes
4
answers
223
views
Personalized Drupal login link
I can send out personalized links from CiviCRM, as described here.
https://aghstrategies.com/content/how-create-one-click-personalized-links-civicrm-emails
They contain the contact id and a checksum ...
1
vote
0
answers
95
views
Contributions in WordPress causing fatal errors
WordPress v5.6.1
CiviCRM 5.34.0
php 7.3
No custom extensions that affect contributions except CiviDiscount.
When I try to add a new contribution or view contributions, I get an error and the log ...
5
votes
2
answers
658
views
What is the recommended level of PHP for CiviCRM? There seems to be some inconsistencies
See the wiki which says the minimum level is 5.4+
But see this linked page from the wiki which recommends 5.6 with a bare minimum of 5.3.10.
See also the system status for release 4.7 which says ...
1
vote
2
answers
81
views
API problem regarding to Word Replacement
I want to replace a word. I was trying to insert using API3 but it is not working properly.
Word replacement API3
$result = civicrm_api3('WordReplacement', 'create', [
'find_word' => "...
0
votes
1
answer
53
views
com_civicrm/civicrm/CRM/Core/BAO/SchemaHandler.php on line 730
Do you have any information about the solution of the error found in the image?
Joomla Version: 3.7.4
CiviCRM Version: 4.7.22
0
votes
1
answer
63
views
utfmb4 conversion gone wrong - Some columns in the databse have utf8mb4_general_ci others utf8mb4_unicode_ci causing and Illegal mix of collations
I've recently run utf8mb conversion (through API explorer) on civi 5.28. Everything seemed OK, but now whenever I try to access events dashboard I get Illegal mix of collations (utf8mb4_general_ci,...
2
votes
1
answer
65
views
DB error for sort_name when adding contacts with long names in 2 bytes UTF8 characters
The problem occurs when I try to add a contact (in the example it's an organization) with long name in Cyrillic (multiple words in it's name). I get the nativecode=1406 ** Data too long for column '...
3
votes
1
answer
20
views
membershipTypeValues hook not updating membership price
On my civicrm contribution page I have a field that I want to use to calculate the membership price.
Currently Im trying to use the membershipTypeValues hook to edit the price after the contribution ...
1
vote
0
answers
47
views
moving DB to a new server - PHP errors
I have been attempting to move a civi install to a new site with little success. I know I have managed this before with another site, so I am especially mystified.
I have reviewed the the guide at ...
0
votes
2
answers
74
views
condition on count from chained api call
I am trying to use the api to get all contacts without an address with locationtype billing. For this I use the contact get api, and do a chained address get call. Is there a way to put a condition on ...
1
vote
2
answers
140
views
Help to renew membership using the API
I would like to programatically renew memberships when a transaction has been completed in Woocommerce.
I want my members to have a more consistent experience and since I do a lot through the ...
2
votes
1
answer
99
views
Only configuration works — Fatal memory error on Drupal8 install
I'm trying to set up civicrm on a working drupal8 install and after the composer commands and a few of the suggested tweaks (like path setting), it seems to work ok. I can access the backend ...
1
vote
1
answer
58
views
Removing "List-Unsubscribe" from civimail headers (for when getting seemingly random unsubscribes)
There is a "header" entry automatically put into mailnigs from civimail (also when using flexmailer / mosaico) which some email clients use to enable unsubscribing (or opting out) from mailing lists.
...
0
votes
1
answer
126
views
Getting "set_time_limit() has been disabled for security reasons" when importing a CSV file into contacts
I'm getting "set_time_limit() has been disabled for security reasons" when importing a CSV file into my contacts.
The exact warning is "set_time_limit() has been disabled for security reasons in /...
0
votes
3
answers
158
views
is there a jobboard in civiCRM
new to civiCRM;-)
is there a jobboard in civiCRM
or to ask it in other words: does civiCRM has a board constructed more in the realm of an Applicant Tracking System OR does it allow to function as ...
3
votes
1
answer
170
views
Exhausted memory error
I am getting reports from users of blank screens when going to register for an event. This does not happen for most users.
The PHP error log says:
PHP Fatal error: Allowed memory size of 536870912 ...
6
votes
1
answer
208
views
packages/Net/UserAgent/Detect/APC.php flagged as malicious by Wordfence Firewall
Our Wordpress firewall Wordfence has flagged packages/Net/UserAgent/Detect/APC.php as possibly a malicious file. Based on past experience, I assume this is a false positive. However, I posted it ...
1
vote
0
answers
66
views
"You do not have permission to access this content" error after inputting data into an HTML form
I am working with an arts organization in my town and they recently migrated their civiCRM application (which is serving as a plugin to their wordpress website) from GoDaddy to InMotion. We are ...
0
votes
1
answer
41
views
New Extension Tab Zip Support Required Message
After upgrading to PHP 7.2, now receiving this message when trying to add a new Extension
ZIP Support Required
You will not be able to install extensions at this time because your installation of PHP ...
5
votes
0
answers
52
views
Setting note privacy to groups instead of just author [duplicate]
[On Civicrm 5.19.1, Drupal 7]
Is it possible within Civicrm to make a new privacy setting that limits viewing notes to an entire group, and not only the author?
We would like all tarification people ...
3
votes
1
answer
72
views
How to set read only field in Drupal CiviCRM
I would like to set a read only field in Drupal CiviCRM:
mymodule_civicrm_buildForm($formName, &$form) {
...
// Set default value
$defaults['readonly_field'] = xxx;
$form->setDefaults(...
1
vote
1
answer
104
views
Override CiviCRM contact import timeout using PHP-fpm and Nginx
I'm attempting to override the fpm time out from nginx just for the import. We are importing very large files, and it might take up to a couple hours to complete, so I need to set:
...