Questions tagged [php]
PHP is a server-side scripting language designed primarily for web development. CiviCRM is written in PHP.
196
questions
2
votes
2
answers
207
views
Mailing stopped working after CiviCRM, PHP and Drupal upgrade
Recently I upgraded:
Drupal core to 7.57
PHP from 5.6 to 7.0.28-1
CiviCRM from 4.7.27 to 4.7.31
Since I've done so I can't send mailings.
Basically I get the same thing like in the post described ...
2
votes
2
answers
317
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....
2
votes
4
answers
224
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
2
answers
814
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
1
answer
187
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
1
answer
174
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
2
answers
465
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
2
answers
57
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
1
answer
346
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
1
answer
61
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
2
answers
78
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&...
2
votes
1
answer
426
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 "...
2
votes
1
answer
105
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
1
answer
100
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
1
answer
81
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
1
answer
44
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
1
answer
100
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
1
answer
285
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
2
answers
83
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
1
answer
80
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
1
answer
65
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
1
answer
193
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
1
answer
64
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
1
answer
125
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
1
answer
44
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
1
answer
147
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
2
answers
80
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
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
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
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
2
answers
73
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
3
answers
70
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
2
answers
91
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
2
answers
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
1
answer
350
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
1
answer
184
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
1
answer
61
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
1
answer
73
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/...
1
vote
1
answer
24
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
2
answers
42
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
2
answers
151
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
1
answer
34
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
3
answers
176
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
1
answer
151
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
1
answer
80
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-...
1
vote
3
answers
74
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 ...
1
vote
2
answers
51
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/...
1
vote
1
answer
58
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/...