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
2
votes
4answers
211 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 ...
2
votes
2answers
571 views

Fatal error: Call to undefined function ctype_space()

Has anybody else seen this fatal error after upgrading to CiviCRM 5.3.2? It appears when trying to manage groups or create a new group in "Contacts" and I don't think we had this under 5.3.0. The ...
2
votes
1answer
173 views

“MySQL support not included in PHP”

I have drupal running perfectly; with mysql support. But CiviCRM still giving me this error - “MySQL support not included in PHP.” My PHP version is 5.6.31, as indicated in the screenshot below.
2
votes
1answer
166 views

Drupal - MySQL support not included in PHP

I am getting the following error on install of CiviCRM: PHP Configuration MySQL support MySQL support not included in PHP. I am running: CENTOS 6.8 Apache 2.4.18 Drupal 7.54 CiviCRM 4.7.16 ...
2
votes
2answers
400 views

How to reset CiviCRM?

When writing a re-initialisation script / extension or drupal module, how would you reset CiviCRM back to clean installation state? Is it possible to install "minimal" without components and their ...
2
votes
2answers
54 views

is there an easy local install method for civics and all dependent software

I'm investigating civicrm for a work use at the ngo where I work. We don't have in-house It team who can help install it. So I'm trying to do so myself. I have some experience using Ubuntu and basic ...
2
votes
1answer
339 views

Why can't I export my report to pdf?

I have a problem (well, in fact, more than one Why can't I export a Contact Detail report to CSV?) with civiReport. I can't export my contact report to pdf. At first, when I clicked I only got a ...
2
votes
1answer
85 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 ...
2
votes
1answer
60 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/...
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 ...
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 ...
2
votes
1answer
92 views

BAO vs API layer

I'm started to look at both the API and BAO classes. It seems there is a degree of scope overlap for the business logic. It seems to me that most logic should live in the BAO - but am I missing ...
2
votes
1answer
256 views

Dependency on php5.6-simplexml goes unchecked, is that a bug?

I'm trying to install CiviCRM 4.7.10 on Ubuntu 16.04/WordPress 4.6.1/PHP 5.6. After completing the installation, when I try to open the CiviCRM node in the WordPress admin menu, I get an error 500 ...
2
votes
2answers
81 views

PHP is being updated from version 5.5 to 5.6

My host is upgrading php from version 5.5 to 5.6 next week. I am running wordpress v 4.5.3 and civicrm v 4.7.10. Should I be concerned about anything going wrong with the running of my site after ...
2
votes
1answer
76 views

Fill Address/Phone enityRef

I'm writing an extension to customize the create new activity page. I need to add the 'With Contact' address and phone number to the page. When editing the /civicrm/CRM/Activity/Form/Activity.php how ...
2
votes
1answer
55 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 '...
2
votes
1answer
187 views

Issue with MySQL support

Attempting to install CiviCRM 4.6.38 in Wordpress 4.9.8, PHP 7.2.5, MariaDB 10.3.8, Nginx 1.14.0, Amazon Linux 2. Getting "MySQL support not included in PHP". PHPinfo shows mysqli and mysqlnd enabled.
2
votes
1answer
53 views

PHP Fatal Error on Custom Report

Background We have had Civicrm running for two years. last week a malicious attack occurred. We had to implement a back up copy taken of our crm on 12th June 2018. All is working except for a custom ...
2
votes
1answer
124 views

Using CiviCRM API in Drupal View

I am trying to use the Civi API within a Drupal view, in the global PHP field. It is all working, except for when I try to use an "Available Variable" from the view, it throws and error. When I hard ...
2
votes
1answer
42 views

PHP libraries in extensions

I've seen the conversation at: https://forum.civicrm.org/index.php?topic=27981.0. But I was wondering if anyone had experienced successfully embedding a PHP library in an extension. Specifically I ...
2
votes
1answer
144 views

"MySQL support not included in PHP error" in CiviCRM-4.7.10-wordpress

I'm getting the error "MySQL support not included in PHP" in the CiviCRM installer wordpress page. My setup is: Ubuntu 16.04 Wordpress 4.6.1 CiviCRM 4.7.10 php 7.0 with mysqli php extension ...
2
votes
2answers
75 views

When exporting contacts using custom selected fields, results in "Undefined Index ...Mapping.php Line 622"

When trying to export a list of Contacts selecting a previously defined set of Export Fields, system throws this error:"Notice: Undefined index: in /home/.../Core/BAO/Mapping.php on line 622" When ...
2
votes
0answers
30 views

CRON Error: Trying to get property of non-object in /.../libraries/joomla/session/handler/joomla.php on line 74 [duplicate]

How do I resolve this error, 'Trying to get property of non-object in /.../libraries/joomla/session/handler/joomla.php on line 74'? Here's line 74 or the joomla.php file, $cookie = $this->input->...
2
votes
0answers
60 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
0answers
37 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
0answers
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 ...
2
votes
0answers
745 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 ...
1
vote
2answers
71 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
3answers
64 views

best practice for using core base functions (CRM_Utils_System_Base) from an extension?

CRM_Utils_System_Base defines a great set of key functions that look like they should work in any system. What is the correct way to access this functionality within an extension? FYI these are the ...
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 ...
1
vote
2answers
99 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
1answer
269 views

CiviCRM running very slow on local network

CiviCRM running very slow on local network, but index.php ,phpmyadmin and joomla are fine. What could be the problem? I tried this solution (https://processwire.com/talk/topic/8320-local-dev-server-...
1
vote
1answer
173 views

SQL Syntax Error - When starting civicrm with joomla

Please help, i have no idea what is wrong, all is fine until i open civicrm with joomla, it displays sql syntax error, then when I try to look at my db functions with phpmyadmin there will be a whole ...
1
vote
1answer
60 views

How to get CiviCRM root via PHP?

I'm working on an extension and I need to include a PHP file that is in the civicrm module root dir. Is there a way to get this directory through PHP? I need it to work for all CMS, not just Drupal. ...
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
29 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(...
1
vote
2answers
257 views

How to use CiviCRM REST API in external PHP code

Been trying to get this to work for hours. Help would be greatly appreciated. userkey and sitekey are replaced with actual keys. I'm trying to run in a php file: $result = curl -X POST "https://www....
1
vote
3answers
169 views

Upgrade to 4.6.16+ caused site to fail with error

The upgrade from 4.6.10 to 4.6.16 ran and pronounced itself successful, but after re-enabling the modules The site reports an error which shows via Drush as: WD menu: CRM_Core_Exception: Invalid ...
1
vote
1answer
130 views

How to send email from CiviCRM and Wordpress

I am trying to send an email from CiviCRM and Wordpress. The test mailings work, but the scheduled mailings never go beyond being scheduled. I done some research online and I think I have to setup a ...
1
vote
1answer
17 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('...
1
vote
1answer
18 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
1answer
25 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. ...
1
vote
2answers
79 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
1answer
41 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. ...
1
vote
2answers
67 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' => "...
1
vote
2answers
98 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 ...
1
vote
1answer
29 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 ...
1
vote
1answer
39 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 ...
1
vote
2answers
85 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?
1
vote
3answers
237 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/...