Questions tagged [php]
PHP is a server-side scripting language designed primarily for web development. CiviCRM is written in PHP.
33
questions with no upvoted or accepted answers
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 ...
3
votes
2
answers
101
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 ...
3
votes
0
answers
795
views
Does the 'timestamp mismatch' error cause any real problems?
I am getting the following error when I log in to CiviCRM:
Timestamps reported by MySQL (eg "2015-11-06 13:44") and PHP (eg
"2015-11-06 11:44" ) are mismatched.
I have reported this separately ...
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 &...
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
0
answers
62
views
Find contacts with multiple relationships of same type
We try to gather total number of users of same Relationship Type but different number of Relationships (mean, user can be a Member of no / 1 / 2 3 .. etc. Organisations).
Here's a code we use:
$...
2
votes
0
answers
44
views
Trying to understand CiviAccounts workflow
I've read the CiviAccounts Data Flow document and I'm trying to figure out the order things get done.
Here's my situation: My organization collects membership dues at a national level. But part of ...
2
votes
0
answers
58
views
What is the minimum PHP version for CiviVolunteer?
Some screens for CiviVolunteer on PHP 5.3.x - e.g.
/civicrm/volunteer/loghours?reset=1&action=add&vid=2&snippet=json
produce a 500 Error (pop up text: 'Network' error; please refresh and ...
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
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
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 ...
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
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 ...
1
vote
0
answers
52
views
phpseclib version
I'm attempting to add CiviCRM to a site based upon the Open Social Drupal distribution. I'm hitting a brick wall due to a versioning conflict - not with the two systems directly, but to the support ...
1
vote
0
answers
27
views
How to use symfony and doctrine 2 framework for building an extension?
I created an extension using core php and CiviCRM tool(civix). I want to use a symfony(framework) and doctrine(ORM). Beacuse ORM provide some methods to store and retrieve methods are there. Symfony ...
1
vote
0
answers
29
views
Assigning a php associative array to JS?
I am trying to assign a php array to js.
// On the Server:
CRM_Core_Resources::singleton()->addVars('myNamespace', array('foo' => 'bar'));
// In the JS file or inline script
CRM.alert(CRM....
1
vote
0
answers
144
views
PHP Missing Extension "mcrypt" in Joomla
In my panel civicrm display mistake: "PHP Missing Extension "mcrypt". I am add screen with this post. In screen show this mistake.
Pleas help me to fix this bug.
PHP Missing Extension mcrypt joomla
1
vote
0
answers
23
views
Formatting search queries from Civi
Can anyone tell me where I can find the php or css that affects how search profiles are formatted? I want to alter how it looks on the webpage because it clashes with the flow of the website. Any ...
1
vote
0
answers
54
views
Migrate Jooomla installation to new server
Having a terrible time when changing server and updating Joomla and Civicrm. Apologize for the length of this post, but thought is would be helpful to anyone who can address my issues.
Here's the ...
1
vote
0
answers
186
views
Duplicate Entry UI_External_Identifier MySQL Error
Everytime I try to import a backup of my CiviCRM sql database, I always get an error: #1062 - Duplicate entry '' for key 'UI_external_identifier' in phpmyadmin (4.7.0, PHP version: 7.1.4, mysql 5).
I ...
1
vote
0
answers
89
views
How to spoof users to unit test ACL logic
Starting to think about unit testing access control permission logic in API calls.
Is there an established pattern for this?
Within CiviUnitTestCase and ACLPermissionTest there are these snips:
...
1
vote
0
answers
15
views
Email cant get retrieved in php
I use php in webform to redirect to an URL after the form is submitted
$email = [submission:values:civicrm_1_contact_1_fieldset_fieldset:civicrm_1_contact_1_email_email:nolabel];
header('Location: /...
1
vote
0
answers
115
views
What are the recommended disable_functions for Civicrm, if any?
I've seen various security checklists suggesting the use of disable_functions in php.ini, giving a wide variety of functions to disable.
Is this a good practice with Civicrm, and if so, what are the ...
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
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 ...
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
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:
...
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 ...
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 ...
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 ...
0
votes
0
answers
46
views
CiviCRM 4.7 WP and CentOS 6 PHP repo
I am in complete disagreement with Coleman that this is off-topic and should be shoved out to the General Unix and Linux StackExchange. As I seem to be unable to communicate with Coleman through ...