Questions tagged [php]
PHP is a server-side scripting language designed primarily for web development. CiviCRM is written in PHP.
198
questions
0
votes
0
answers
11
views
Uncaught PHP Exception - DB Error: no such field
Dears,
Any idea on how to find the origin of this issue ? Site says 'unexpected error, please try again later' ...
[Fri Dec 01 00:00:01.474392 2023] [error] [pid 319782] mod_proxy_fcgi.c(887): [client ...
0
votes
1
answer
39
views
CIVICRM WP critical error after migrating to PHP 8.1
I am running CIVICRM on WordPress 6.4.1 with PHP 7.4. Upgraded both platforms to the latest versions. After changing php version from 7.4 to 8.1, I get a WP critical error. After enabling WP debug,...
0
votes
1
answer
16
views
Civievent live page giving error 500
this isn't really an issue, just a quick PSA. I have the latest wordpress and civicrm 5.66.1. When trying to access civievent live/test registration page, I kept getting an error 500. However, I ...
1
vote
1
answer
87
views
CSV Download from a custom pop up
I have a function that lists score for a dog:
<h3>Your Dog's Scores</h3>
{crmButton href="#" class="button-name" title="Download CSV" icon="icon-class-...
0
votes
0
answers
21
views
civiEvent calendar not showing details after php 8.1 upgrade
Running civiCRM 5.66.0 on WP 6.3.2 upgraded to php 8.1 over the weekend.
The internal civicEvent calendar no longer displays event titles, or previous events at all.
We are also using the Event ...
1
vote
3
answers
86
views
Safe way to upgrade to PHP 8.1
CiviCRM 5.66 now calls for PHP 8.1. What's a safe way to do this upgrade? Using cPanel I changed to 8.1 while logged in to a test site, and all was well - I'm sure I've done this the same way before ...
1
vote
1
answer
40
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
41
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 ...
1
vote
1
answer
75
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
48
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 "...
0
votes
1
answer
64
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-...
0
votes
1
answer
52
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:
...
2
votes
0
answers
64
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
48
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
51
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
1
answer
71
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()
->...
2
votes
1
answer
66
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
2
answers
78
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&...
2
votes
1
answer
448
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
96
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
43
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
51
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/...
1
vote
1
answer
111
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 ...
0
votes
1
answer
96
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 ...
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
45
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
58
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
71
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
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
1
answer
113
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) );
...
1
vote
0
answers
98
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 ...
1
vote
1
answer
348
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
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
21
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 ...
1
vote
2
answers
151
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 ...
1
vote
1
answer
66
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
131
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 /...
3
votes
1
answer
176
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
212
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
81
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
53
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
105
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:
...
3
votes
0
answers
53
views
Update sequence for verrry old versions of CiviCRM, Wordpress and PHP
I'm tasked with updating an old installation of CiviCRM for another org - they have CiviCRM 4.6.3 and WordPress 4.5.18 running on a shared server that's on PHP 5.4.
I don't yet know if it'll be ...
2
votes
1
answer
105
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 ...