Questions tagged [php]

PHP is an open source general-purpose server-side scripting language.

Filter by
Sorted by
Tagged with
0
votes
1answer
75 views

Store Data in Channel Tag Variable

I'm using the EXP:QUERY tag to get the count of a channel. And I am basically trying to use this for page pagination, and its a custom pagination because of the type of template I'm building. And I ...
0
votes
1answer
156 views

Error when sending email via Communicate

We just moved from development server to live server and are having issues with email settings, we get the following error when trying to send an email: Fatal error: Call to protected method CI_Email:...
0
votes
1answer
490 views

Expression Engine PHP & Embed & entry_id_from

i have the following Line: {exp:channel:entries channel="orders" entry_id_from="{embed:LAST_ID}" sort="desc" dynamic="no"} LAST_ID file : <? include '!mysql.php'; $last_id = @mysql_result(...
0
votes
1answer
122 views

get function value in a plugin

i'm trying to write my own plugin and new to php to simplify i want to grab a string from the tempalte then do something with it How do i call getMyString() in another function? EDIT: class test { ...
0
votes
1answer
140 views

ExpressionEngine Classes

New to using Expression Engine Classes and not sure how to use the Email class. I created the class and placed it within my template, but now i get a Parse Error. Again new to EE. How would I go ...
0
votes
2answers
567 views

Server upgrade PHP 5.4 - Any issues?

I've just been emailed from my site host stating they will upgrade the servers to PHP 5.4.19. We're hosting a number of sites with them and all range from EE2.2 - EE2.5. The thing that sparked my ...
0
votes
2answers
252 views

PHP Errors - possible firewall block?

On the site, the errors shown below are appearing on the bottom of the home page, and also appear when I try and complete a SagePay test payment. Doing a bit of digging, it appears it may be ...
0
votes
1answer
239 views

ExpressionEngine and PHP parse order issue

I posted this question ExpressionEngine, php and stash - scope problem, please help and really appreciate the responses and take on board that mixing ExpressionEngine and PHP tags is bad practice, and ...
0
votes
2answers
566 views

System folder & database.php path

I moved my system folder above the root and was updating the database.php file and was confused about the correct path for one of the settings. Should it be: $db['expressionengine']['cachedir'] = '/...
0
votes
1answer
1k views

Creating session data in EE plugin

I am building an EE plugin and need to store some information in a session. How can I save and retrieve information from a session in an EE plugin? Thanks
0
votes
1answer
26 views

Other module tags inside tag data causing issue

I am creating a small plugin, and am having an issue. I am using Carthrob for my e-commerce, and want to take some information into the tag data for my plugin. My tag is the following: {exp:...
0
votes
1answer
477 views

How do I pass a variable to mySQL without using the query module?

I can echo the current entry_id but when I try to pass that variable to a mySQL statement, it doesn't work. {exp:channel:entries channel="test" entry_id="20"} <?php $entry_id = '{entry_id}'; ...
0
votes
1answer
444 views

Recovering from a site hack, preventing another one

I am trying to help someone recover from a hack and prevent a further incident. They are running version 1.7.3. The result of the hack was modified index.php files in the root and system folders ...
0
votes
2answers
116 views

PHP error on template export, after upgrading to 2.6

Getting the following when I try to export any template group... A PHP Error was encountered Severity: Notice Message: Undefined property: Design::$api Filename: cp/design.php Line Number: 3516 ...
0
votes
0answers
12 views

PHP Issue: To execute another ur using PHP function file()

I have a PHP CRON script that use to execute the external url using the code below every 5 minutes: echo file("https://..."); This line of code is not working after i upgrade my server from ...
0
votes
0answers
26 views

How to use {exp:query} results in {exp:channel} parameter?

Since i can not retrieve {parents} from grid field, i am trying to find simplest workaround. This works great: {exp:channel:entries channel='channel-one' entry_id=' <?php $...
0
votes
1answer
29 views

How to use a php hook to pull data into PayPal from Simple Cart

I was wondering how to connect Simple Cart add-on to PayPal using the PHP hooks. I'm new to using hooks, but would appreciate an example to get me going. I would like to display the 'price', 'qty' ...
0
votes
0answers
20 views

Okler Porto Template - Contact Form PHP Fatal Error - EE 5.2.6

I'm running EE 5.2.6 and also using the Okler Porto Theme HTML5 Template v7.2.6 (Most Recent). I have spliced up the Okler Porto Template into Header, Body and Footer. The issue I am having is with ...
0
votes
1answer
55 views

Custom PHP throwing an error {!-ra:0000

We have a need to pull in data from an external source using PHP. I’ve run into this issue before where EE doesn’t like the PHP formatting i’m using, yet it seems to work elsewhere. For example, if i ...
0
votes
1answer
27 views

Need help upgrading EE along with PHP on my website

I have a website built in ExpressionEngine but my developer is no longer working with freelance clients. I recently received a notice from my hosting company that my website's PHP is out of date and I ...
0
votes
1answer
44 views

EE contact form - interact with POST data before sending email

We're running ExpressionEngine 3.5.17 and using the in-built contact form. We have a requirement whereby if someone completes the "From" email address on the form, and it originates from a certain ...
0
votes
1answer
38 views

Parse some data with a plugin before sending as a email (plain text)

I'm trying to create a plugin to greet depends on the time of a day with a different phrase. The plugin works correctly on the ExpressionEngine environment but at the moment is not able to send any ...
0
votes
1answer
26 views

Unable to pick a few elements after migrating

I have recently cloned my ExpressionEngine CMS (2.3) website to a new VPS with Plesk as its control panel. For cloning, I copied all my files and imported the database from existing website into the ...
0
votes
1answer
183 views

A PHP Error was encountered

I am receiving 'A PHP Error was encountered' error messages when signing into expression engine. Nexcess support sent me the following information. What do I do to get this corrected? I am a novice ...
0
votes
1answer
238 views

Freeform: pass variable to confirmation page

I have a freeform form with a text field with a value. Users of this form are not logged in and I need to pass the value of that field to a second confirmation page where I am building a paypal form. ...
0
votes
1answer
111 views

Is it possible to bypass required fields when using {freeform:submit_previous}

I've got an issue with Solspace Freeform whereby the required field error message is being triggered if the user chooses to go the previous page without entering any information on the current page. ...
0
votes
1answer
203 views

$_POST empty but transferred

I am trying to access PHP's $_POST array from a template, using PHP within the template and have the expiration_date of the entry updated. The $_POST is empty, although the form is submitting to the ...
0
votes
0answers
48 views

In EE3 can I query the Model service for template info in my template's PHP?

I want to do something like: $templates = ee( "Model" )->get( "Template" )->all(); //Loop through them foreach( $templates as $template ) ... But when I try this, it hangs the page/server. Is ...
0
votes
2answers
30 views

Issues with custom module when moving to live server

I have build a custom module for ExpressionEngine. It works perfectly on my local dev environment, but when I move it to my live server it freaks out and gives me errors, most notably: Invalid ...
0
votes
1answer
51 views

How to send email report of total channel entries in Expression egnine on daily basis

hi I am new to Expression engine I am getting total channel entries using EE Tag :- {exp:stats channel="products" site="default_site"}{total_entries}{/exp:stats} Now I want a email report that gives ...
0
votes
0answers
560 views

Can't get CodeIgniter Helpers to work in Custom Module

I have very limited experience developing custom modules for ExpressionEngine, but have managed to get an API integrated and working. Now I am trying to input data via a form, using CodeIgniters Form ...
0
votes
0answers
79 views

Load framework outside of folder structure

OK so basically I'd like to load the EE framework and its container outside of an ExpressionEngine path... I know there's been some questions about this, but I haven't found a great answer, and it ...
0
votes
1answer
45 views

How to change Archive link url in Exrpession Engine

Expression engine archive is showing link in this manner eg. {exp:channel:month_links channel="news" limit="50"} {month}, {year}<br> {/exp:channel:month_links} http://www.example....
0
votes
1answer
174 views

AJAX Call on ExpressionEngine Install

$(document).ready(function () { $.ajax({ type: "POST", url: "/ajax/customcss", data: {channel: currentChannel}, }) .done(function( data ) { var jsonObj= JSON.parse(data); ...
0
votes
2answers
921 views

How can I change URL using .htaccess RewriteRule directives?

I have a URL like http://www.psreducators.com/agent-profile/?u=donald-mark, but I want the users to see the URL as http://www.psreducators.com/agent-profile/donald-mark. (donald-mark is the user ...
0
votes
1answer
248 views

Call thirdparty module function directly from PHP in template

I'm in a situation where I need to logout the current logged_in member without him clicking a logout link. (Javascript click trigger is not an option.) I'm using the great freemember module (https://...
0
votes
2answers
1k views

Use of undefined constant FILEINFO_MIME_TYPE

I'm currently testing a site (EE 2.10.1) and getting a string of the following errors when trying to do anything with image uploads. A PHP Error was encountered Severity: Notice Message: Use of ...
0
votes
2answers
387 views

Freeform and Dynamic Email Recipients

I have a Freeform form that is a request for information. There are checkboxes in the form for various locations on the site. I want to dynamically send emails based on the checkboxes that are ...
0
votes
1answer
515 views

Include Issue Calling an External PHP Script from Expression Engine

I'm trying to call an external PHP script from an Expression Engine form response template that sends emails using Mandrill API. The script I have works on regular PHP, I have tested it, but there is ...
0
votes
1answer
54 views

Date range in EE postmaster template

I have a notification setup that is pulling the top 5 most viewed entries within the specific channel, and I want to send this email with the top 5 most viewed entries, and I want to send this ...
0
votes
1answer
65 views

Template Not Detecting Plugin Class?

Working on a plugin integrating with the Active Campaign API. What I have is a folder inside third_party containing pi.ActiveCampaign.php with a lib folder containing the API. The class describing ...
0
votes
0answers
147 views

How to setup php pointing out from webroot?

I have this line in one file that tries to locate the EE system folder. It works just fine if the folder is inside webroot. But in my case, my folder is out from webroot and I'm totally helpless what ...
0
votes
1answer
73 views

Change in output for playa:parents inside Stash when going from PHP 5.3.x – 5.4.x

This template works fine on PHP 5.3.x: {exp:stash:set parse_tags="yes" conditionals="yes"} {stash:st_content} {exp:channel:entries channel="people" url_title="{segment_3}" dynamic="no"...
0
votes
0answers
45 views

Date set in an entry is outputting 4 hours behind the date set

One of the expressionengine sites I run is having a strange but that I suspect is something to with the recent server move we just did. In an entry the user can set a start/finish time of an event ...
0
votes
1answer
64 views

Convert a row's site_pages cell (inside exp_sites) into a key-value array

For the purpose of using PHP to automate the creation of custom URLs that will be placed in the Pages Module, I'm first retrieving and decoding the whole block of encoded, serialized data in the ...
0
votes
1answer
316 views

How to create custom PHP/Mysql page in ExpressionEngine?

I'm currently assigned to create custom page in ExpressionEngine (because that's the old code). I'm not getting used to ExpressionEngine and CodeIgniter either. I do inspecting the structure of ...
0
votes
1answer
120 views

How to capture EE embed output with Stash variable?

I have an EE embed that processes PHP code. I would like to capture that output with a Stash variable. I'm using a model/view approach, ie. have one template to retrieve the data and another to ...
0
votes
1answer
62 views

Using Reports module, need first row of CSV to be custom

I am using Nathan Pitman's Reports module to allow our client to export some custom information. I wrote up the SQL query and it works great. The only issue I have is that the first row (the header ...
0
votes
3answers
49 views

Sorting pictures with matching dates into galleries

I am attempting to build galleries of photos based on {photo_date}, a custom field containing the date on which each photo was taken. My list of photos looks something like this: Photo# {photo_date}...
0
votes
0answers
73 views

Search results to display category names

I need to work out how to incorporate category names into the search results url. I found a solution using php (noted below) which adds the relevant category names into the appropriate position in ...