Questions tagged [php]
PHP is a server-side scripting language designed primarily for web development. CiviCRM is written in PHP.
208
questions
0
votes
1
answer
83
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
102
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
50
views
PHP 8.3 CiviCRM 5.74.4 "allowed memory size"
Cron has stopped running and an unexpected memory issue has popped up in logs
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
to allocate 1622016 bytes) in
/wp-content/plugins/...
0
votes
1
answer
76
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 "...
1
vote
1
answer
30
views
Overriding core php file that define basic class HTML_Quickform in order to add a new method to CRM_Core_Form
The QuickForm.php file that I want to override is located in civicrm/packages/HTML/Quickform.
I set my override directory to [civicrm.files]/override_php and put a copy of the originale file in ...
2
votes
1
answer
118
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()
->...
0
votes
1
answer
107
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 ...
3
votes
0
answers
74
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
29
views
cron job with error php deprecation - str_replace(): Passing null to parameter
I'm curing a Joomla instance CiviCRM. Just updated from Joomla 3 to joomla 4.4.1 with CiviCRM 5.68.1.
Updated too the server debian version from 11 to 12.
configured cron task with cv version v0.3....
3
votes
2
answers
106
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
1
answer
47
views
Looking for Experienced & Knowledgeable CIVICRM Freelancer
Looking for referrals for a knowledgeable, experienced CIVICRM expert (not a consulting company) that freelances and that I could keep on retainer to assist with CIVICRM technical and application ...
2
votes
1
answer
381
views
fatal error in "Smarty" after 5.69.2 upgrade
After upgrading CiviCRM to 5.69.2 (along with several extensions), I'm occasionally getting the following error:
Fatal error: Type of SmartyCompilerException::$line must be int (as in class Exception)...
0
votes
1
answer
332
views
Write failed: No space left on device
We currently have CiviCRM installed in a Bitnami solution in WordPress from a VM in Azure. In the last few days we have experienced problems logging in and when trying to access phpmyadmin we received ...
1
vote
1
answer
424
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
93
views
Cannot access CiviCRM: "Undefined property: CRM_Core_Config"
With CiviCRM 5.69.2 on WordPress 6.4.2 and PHP 8.1, I'm getting the following when trying to access CiviCRM:
There has been a critical error on this website. Please check your
site admin email inbox ...
2
votes
0
answers
36
views
PHP mail() not working with HTML messages in CiviCRM 5.68
After installing CiviCRM 5.68 if I try to send a mail formatted in HTML the mail is delivered with the name of the sender completely mispelled (e.g. [email protected] instead ...
0
votes
0
answers
30
views
cron job with error php Warning - Undefined property: CRM_Core_DAO::$contribution_id
I'm curing a Joomla instance CiviCRM. Just updated from Joomla 3 to joomla 4.4.1 with CiviCRM 5.68.1.
Updated too the server debian version from 11 to 12.
configured cron task with cv version v0.3....
1
vote
1
answer
60
views
CIVICRM: Custom Field that uses financial type id
I'm new to Civicrm PHP and extension development so I'm sorry if this is a dumb question. ^-^
I'm making an extension that creates a new custom field group, the custom field group is meant to ...
0
votes
0
answers
26
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 ...
1
vote
1
answer
153
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,...
1
vote
3
answers
249
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 ...
0
votes
1
answer
19
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
105
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
45
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
1
answer
58
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
100
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
93
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-...
2
votes
0
answers
86
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 &...
2
votes
0
answers
84
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
66
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
82
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
131
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
120
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
700
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
122
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
51
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
64
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
175
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
50
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
23
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
28
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
58
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
62
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
34
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
134
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
233
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
110
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
665
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
84
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