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
2answers
27 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.
1
vote
1answer
72 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 ...
3
votes
2answers
70 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 ...
0
votes
1answer
21 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
4answers
210 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
0answers
56 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
2answers
644 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
2answers
58 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
1answer
46 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
1answer
32 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
1answer
51 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
1answer
18 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
0answers
33 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
2answers
66 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
2answers
65 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
1answer
81 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
1answer
35 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
1answer
79 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
3answers
145 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
1answer
126 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
1answer
185 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
0answers
48 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
1answer
37 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
0answers
48 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
1answer
31 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
1answer
74 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: ...
1
vote
2answers
89 views

Civi 5.x not recognizing PHP 7.1 in Drush

This is the second site I've noticed this on - in both cases, the site is running PHP 7.1.32, as reported on the Drupal system status page. Error message: CiviCRM requires PHP 7.0.0+. The web ...
3
votes
0answers
37 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
1answer
59 views

CiviCRM on Debian 10 gives warning about PHP MySQL Driver (libmysqlclient)

Recently moved my CiviCRM install to a server running Debain 10 which brings: php7.3 MariaDB 10.3.17 Everything seems to be working fine, except that in the system checks I'm now seeing this error/...
5
votes
3answers
242 views

Upgraded to PHP 7.2; no errors but Sparkpost doesn't receive and send CiviMail

I upgraded to PHP 7.2 and received the system warning​ stating "your SMTP password will not be stored encrypted, and if you have recently upgraded from a PHP that stored it with encryption, it will ...
1
vote
1answer
30 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?
1
vote
0answers
35 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 ...
3
votes
1answer
124 views

SSL-encypted Database connection for CiviCRM?

I am in the middle of deploying a CiviCRM instance and have decided for scalability and security reasons to separate my web server and database server. I have a set of self-signed certificates ...
6
votes
2answers
254 views

Get URL of custom image field

I would like to display pictures which are defined as custom "File" fields within an event. I currently to this by generating URLs having the following format: MY_URL?q=civicrm/file&reset=1&...
1
vote
1answer
129 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 ...
0
votes
1answer
139 views

Unable to hide PHP 'notice' warning

We are moving our CiviCRM site over from Drupal to Wordpress. We have this fully working on our developer's server (nginx), but on our live server (Apache), we see an error when loading some CiviCRM ...
0
votes
1answer
43 views

How to get a data for a perticular logged in user ( through API)?

I gave an ACL role to users for data segregation. I want to fetch data from database but data must filter i.e. ACL. How to get data. Also I want a userkey and sitekey?
1
vote
2answers
97 views

Broken SMTP after switching to PHP 7.2

Recently I updated CiviCRM to version 5.10.4 and while I was at it updated Drupal to 7.64 (using drush). Everything appeared fine. Then I noticed in the CiviCRM System Status report that PHP 7.1 which ...
1
vote
0answers
21 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
0answers
24 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
2answers
57 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 ...
3
votes
1answer
48 views

How to set a id attribute to button?

I am creating a button using php pear. Button (php code) $this->addButtons(array( /** * Array for 'next' button */ array( 'type' => 'next', 'name' => E::ts('Next'), ...
5
votes
1answer
85 views

Why do click and open reports show times in UTC rather than the site's timezone?

The mailing and click tracking reports are showing times in UTC. There is no PHP MySQL timezone mismatch - and mysql -e 'select now()' and date return the right times - as per timezone.
2
votes
1answer
77 views

Upgrading a server that's hosting CiviCRM to get to PHP 7

I did the deed and upgraded from Debian 8 to 9 and from PHP 5.6 to PHP 7.0. I wanted 7.1 but the host recommended I stick with the native packages since the 7.1 broke the SOAP function. I've been ...
1
vote
0answers
128 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
2
votes
1answer
38 views

Redirect to dashboard instead of redirect to add form

I've installed wordpress Version 4.9.8 with civiCRM. Now i have create one new menu name is "userdata" But when i click on menu "Userdata" it will redirect to the dashboard. Instead of dashboard it ...
1
vote
2answers
70 views

Upgraded php from 5.6.30 to 7.0.32, civicrm still gives PHP out of date error

I upgraded php from 5.6.30-0+deb8u1 to 7.0.32-1~dotdeb+8.1 and civicrm is still giving me a php out of date error. When I run php -v it says 7.0, but civicrm still thinks I'm on 5.6. Do I need ...
1
vote
1answer
26 views

Upgrading Custom Extension for PHP 7: How to I instantiate a mysqli data object

I've just upgraded a site from CiviCRM 4.6.38 LTS to CiviCRM 5.7 because we upgraded the server to PHP 7.1.x. As a result 2, custom extensions are warning me because they used mysql_real_escape_string(...
3
votes
1answer
484 views

timestamp mismatch

I have a host running in a different time-zone from where I am operation and unless I set the website time zone to the hosting time zone I get the following error in CiviCRM: Timestamps reported by ...
3
votes
1answer
273 views

Error with CiviVolunteer after upgrading to PHP 7.1

Via permissions page and system status page. Warning: Declaration of CRM_Volunteer_Permission::check($permissions) should be compatible with CRM_Core_Permission::check($permissions, $contactId = ...