Questions tagged [php]

PHP is a server-side scripting language designed primarily for web development. CiviCRM is written in PHP.

Filter by
Sorted by
Tagged with
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. ...
Ken Williams's user avatar
1 vote
1 answer
63 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. ...
Marsh's user avatar
  • 650
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' => "...
deepak's user avatar
  • 197
1 vote
2 answers
123 views

How are CiviCRM form names defined (civicrm_validateForm)?

I am attempting to perform form validation on various CiviCRM forms (profile forms and forms within contribution pages) by hooking into hook_civicrm_validateForm. In my php code, I would like to ...
Ivan's user avatar
  • 167
1 vote
1 answer
31 views

Help with Drupal upgrade

I currently use Drupal 7.5.3 and need to upgrade to 7.5.4. Running it with CiviCRM. I'm a novice with this site and need a little hand holding to figure this out. Basically the site admin is AWOL and ...
Kenneth Briggs's user avatar
1 vote
1 answer
42 views

Tracked Opens No

Track opens stopped working recently. Clicking on tracked opens gnerates the following error message: Fatal error: Class 'Database' not found in /home/xxxxxx/public_html/includes/bootstrap.inc on ...
Shai's user avatar
  • 609
1 vote
2 answers
88 views

configuration variables: where is the documentation?

This is changing between 4.6 and 4.7. Where is the best place to see what each setting does?
ErichBSchulz's user avatar
  • 1,571
1 vote
3 answers
255 views

Where is include_path set?

I try to get rid of this persistent and annoying warning message: Warning: is_dir(): open_basedir restriction in effect. File(/usr/share/pear/api/v3) is not within the allowed path(s): (/var/...
ñull's user avatar
  • 1,208
1 vote
1 answer
907 views

Call to undefined function dl() error w/Joomla 3.5.1 & PHP 7

I've just installed CiviCRM on a Joomla 3.5.1 site to learn how to use it. I am seeing an issue that I have a question about. As long as I use Php 5.6 the installation works properly. If I try to ...
Greg's user avatar
  • 51
1 vote
2 answers
199 views

Coding Custom Report

I'm having some trouble coding a custom report. I found the following tutorial which was helpful, but I'm having trouble with the actual coding as I am still new to civiCRM developing, and I haven't ...
Becca's user avatar
  • 297
1 vote
4 answers
100 views

If I use php to display a count from my database am I causing a security problem?

I would like to count and display on my front page how many people have signed a civi petition. This I have been able to do using php as below. What I am wondering is if I am causing any kind of ...
Caroline B's user avatar
1 vote
1 answer
143 views

Error while saving new contribution

I have recently migrated my CiviCRM installation from one server to another server. Now facing an issue in saving new contribution. If I save the contribution without checked "Send Receipt?" it will ...
Ashwin's user avatar
  • 179
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 ...
Alessandro Bronzo's user avatar
1 vote
1 answer
49 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 ...
astroned's user avatar
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 ...
cray146's user avatar
  • 153
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: ...
johnramsden's user avatar
1 vote
1 answer
34 views

Is Civicrm 4.7.20 compatible with PHP 7.? - only using core components and one extension, cividiscount

I set up our website using Civicrm 4.7.20, MySQL 5.0.11, PHP 5.6 and Apache 2.4 some time ago; I will update (soon ISA) but want to know whether I can activate php 7 now?
Lesley Evensen's user avatar
1 vote
1 answer
255 views

Attachment API File Upload

I'm working on a file upload of an image with a registration form. The file is being passed to PHP correctly, and I can check its properties in the $_FILES variable. I used the API Explorer to get the ...
repertor's user avatar
1 vote
2 answers
76 views

getting this error: PDOException: SQLSTATE[23000]

After installation I am getting this error: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'civicrm_handler_field_custom_file-class' for key 'PRIMARY': INSERT ...
flik's user avatar
  • 121
1 vote
1 answer
154 views

Fix for "Incorrect Resource URL" message

In my Wordpress installation of CiviCRM I have had a persisting System Status:Error message since version 4.7.28 which was still present despite upgrade to 4.7.31. This appeared to be a false-...
geoffp22's user avatar
1 vote
1 answer
1k views

Any way to avoid "deprecated function" messages in the Drupal dblog?

I am getting a LOT of entries in the Drupal dblog (watchdog) about a deprecated PHP function, as described here - Debug PseudoConstant I'm trying to debug a different issue and the presence of these ...
naomi's user avatar
  • 1,247
1 vote
2 answers
83 views

How to extract field from an array returned from an API3 call

I am trying to extract a custom field from a contact record. The API returns an array of the following form: Array ( [0] => 0 [1] => 3 [2] => array ( [0] => array ( ...
Martin Fuggle's user avatar
1 vote
3 answers
41 views

Issue with custom report that shows all users registered for event in last 2 years but not this year

I am using Drupal 7 and CiviCRM 4.6.28. I am trying to create a report that will display all of the users who registered for an event in 2015 and 2016, but not yet in 2017. I have the report working ...
Kimberlie Davis's user avatar
1 vote
1 answer
347 views

New install, system status says "cron not running" and "timestamp mismatch"

Running CiviCRM 4.7 on WordPress 4.7.3, hosted on a shared Linux server at 1and1.com. The WordPress site is using PHP 7.0 but apparently the latest version I can use from the command line is 5.5. Two ...
Michael H.'s user avatar
1 vote
1 answer
56 views

How do I examine the symfony event handlers that are active?

The API kernel uses a symfony event system at it's heart. How on earth do I find out where all those events are going?
ErichBSchulz's user avatar
  • 1,571
1 vote
1 answer
20 views

Hook permissions `type`

Looking at hook_civicrm_aclWhereClause I see there is a $type parameter but there is currently no documentation for this type. What are the allowed values?
ErichBSchulz's user avatar
  • 1,571
1 vote
1 answer
38 views

Column deductible_amount not getting filled in on table civicrm_line_item

We use price fields/line items for all of our contributions. I noticed that on the line_item table the column deductible_amount is not filling in. I checked and Price Fields do not seem to have an ...
Iowa Boy's user avatar
  • 2,388
1 vote
1 answer
79 views

cron.php display warning in error_log

running CiviCRM 4.7.8 WordPress The following is appearing in the error_log whenever cron.php runs: [Fri Jun 24 16:01:06 2016] [error] [client ...] PHP Warning: date(): It is not safe to rely on the ...
Codedogs's user avatar
  • 321
1 vote
1 answer
221 views

Installed CiviCRM in Wordpress via ftp, but it doesn't appear in plugin directory

I have Wordpress 4.2.5 running, with PHP 5.4. I am installing CiviCRM 4.6.8. I followed the directions here: http://wiki.civicrm.org/confluence/display/CRMDOC/WordPress+Installation+Guide+for+CiviCRM+...
Georgia's user avatar
  • 11
1 vote
2 answers
143 views

Inserting a calculated value

Currently I am working on a civicrm-wordpress plugin. I have two custom fields displayed for a contact: - Date of consent - Age at recruit When the user enters the date of consent I would like to ...
Csaba's user avatar
  • 173
1 vote
1 answer
290 views

Creating a custom (select) field and update option values from php

I use Wordpress with CiviCRM. I would like to create a custom select field and populate the option values with php. After investigating the forum and the documentation I think I should create a hook (...
Csaba's user avatar
  • 173
1 vote
1 answer
37 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 [...
Paul Butler's user avatar
1 vote
0 answers
60 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 &...
Srinivas Narula's user avatar
1 vote
0 answers
44 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-...
yksflip's user avatar
  • 11
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 ...
Rose Lanigan's user avatar
  • 1,000
1 vote
1 answer
347 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 ...
gebseng's user avatar
  • 81
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 ...
kapn's user avatar
  • 791
1 vote
0 answers
79 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 ...
pkollasch's user avatar
1 vote
0 answers
51 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 ...
Logan Bear's user avatar
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 ...
deepak's user avatar
  • 197
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....
deepak's user avatar
  • 197
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
Вася Пупкин's user avatar
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 ...
DerpyBirds's user avatar
1 vote
0 answers
53 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 ...
GrannyKat's user avatar
  • 473
1 vote
1 answer
44 views

problem upgrading php

I updated to CiviCRM 4.7.28 (on Wordpress). However, I have not been able to update the PHP to the 5.6 version. In fact, after much searching, I don't seem to be able to come up with the correct way ...
Andrew Hawkins's user avatar
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 ...
Kristine's user avatar
  • 1,173
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: ...
ErichBSchulz's user avatar
  • 1,571
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: /...
Gustavo's user avatar
  • 11
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 ...
Andyg8's user avatar
  • 1,611
1 vote
1 answer
474 views

MySQL support not included in PHP - Wordpress Heroku

Got this error on heroku wordpress with ClearDB Mysql Connected. Everything works expect this: Any ideas? Thanks.
Shin's user avatar
  • 13