Questions tagged [php]

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

Filter by
Sorted by
Tagged with
13
votes
2answers
752 views

Testing Extensions / Calling Hooks

I'm about to embark on writing a new extension for the Ecommerce module "Store" though this should relate to any extension hook. I am planning to "hook" into "store_order_complete_end" in order to ...
8
votes
5answers
3k views

ExpressionEngine on PHP7

PHP 7 Release Candidate 7 came out today. Rasmus Lerdorf has been giving talks on the advantages of PHP7 including benchmarking against many popular PHP applications -- for example here's the ...
7
votes
1answer
2k views

Expression Engine Rich Text Editor Tools

I'm trying to follow along with the rich text editor documentation in expression engine, but it's a little unclear to me: http://ellislab.com/expressionengine/user-guide/development/rte_tools.html I ...
7
votes
1answer
4k views

PHP error logging: force to always log errors to an error file

My ideal situation would be to always log errors to file, but only display errors to logged in Super Admins. This way I'll be able to tell if my users are triggering PHP errors even if they aren't ...
5
votes
1answer
159 views

Can't see root level non-ee php files

Weird one - haven't seen this before. Just launched a newly upgraded from ee1 to ee2 site at www.bankofmarin.com. Everything works fine. This is a Structure site and I have strict URLs on to enforce ...
5
votes
2answers
121 views

Is it possible to run ExpressionEngine along side a Cake PHP site?

I've been asked to add a CMS to an existing Cake PHP driven site. Cake PHP doesn't appear to drive much of the site outside of URL structure, templates and forms (there is no content management). The ...
5
votes
1answer
101 views

Computing word, image, video and audio file counts in a scalable way?

I am attempting to gather as much interesting metadata as possible to display for readers of an EE site I'm developing and am looking for guidance on methods (or indeed the feasibility) of computing ...
5
votes
1answer
700 views

Error on CP homepage from core/EE_Exceptions.php

I'm trying to secure my install of EE by following the instructions here, which involve moving my system directory above my web root, and renaming it. My site loads fine, and I can even navigate to ...
4
votes
2answers
5k views

How to run a php script silently (like a cron job) from an EE template

I've got a PHP script that updates an entry's status depending on certain criteria being met. I was planning on running this script as a cron job on my web server every hour. It'd also be nice if I ...
4
votes
3answers
451 views

setting a global var in an embedded template with PHP

I have a header template with PHP parsing on Input an the following code: <?php $this->EE->config->_global_vars['user_language'] = "nl"; ?> When I use {user_language} in my header ...
4
votes
2answers
271 views

PHP conditional inside EE conditional - parse order problem

This is a bit of a hard one to explain, but I will do my best. If you need any clarification just ask :) I have a template that needs to display a list of 3 upcoming events, listed by date ascending (...
4
votes
1answer
354 views

How Can I Stop a Progress Bar at 100%, When Donations Exceed That Amount?

This maybe more of a PHP solve, but the website is in ExpressionEngine. I'm using a Matrix field, Store to process donations, and reverse relationships. I basically set-up a progress bar using some ...
4
votes
3answers
340 views

Problem with phpstringfun and substr_count function

I'm using phpstringfun plugin to check a comma-delimited list for the presence of a single number. {exp:phpstringfun function="substr_count" par1="{member_group}"} {member-groups} {/exp:phpstringfun} ...
4
votes
2answers
151 views

Twitter Search 2 Plugin PHP Error (stdClass::$to_user_id_str)

Some of my ExpressionEngine (EE2) websites that run Twitter Search 2 by Exp:resso have recently started throwing out PHP Error Notifications, and I can't see why. A PHP Error Was Encountered Severity:...
4
votes
1answer
130 views

ExpressionEngine - I'm a beginner, have I set up my Channels correctly?

I'm a beginner at ExpressionEngine, so I'm wondering if this is actually the right way to do things. Here's how my site is laid out: Construction List of Construction case studies Case Study 1 Case ...
4
votes
2answers
939 views

How to check the EE version number via PHP?

I'm writing an add-on and need to check the current EE version from PHP. What is the best way to get the current ExpressionEngine version?
4
votes
1answer
447 views

Reformat external Date-Format to unix-timestamp / ee-compatible format

I have a date-field where I get some raw data from another system (I have no control over the export of the other system) … the date is published in the following format: 2010-10-26T07:11:18Z Is ...
4
votes
3answers
126 views

alternative to php var in template?

It's been a solid year since my last ee project. The things you forget over time :) At the top of my template I show the latest featured entry (limit="1" search:featured="yes"). Later in my template ...
4
votes
1answer
108 views

How to find out what class/function has invoked extension hook?

I have an extension that relies on certain extension hook. The hook can be invoked either by function from EE core or third-party module. I need to be able to tell what function / class has invoked ...
4
votes
1answer
925 views

CI is not including its PHP files properly?

Has anyone see then before? Warning: set_error_handler() expects the argument (_exception_handler) to be a valid callback in /home/nginx/domains/xxx.com/ee_core/codeigniter/system/core/CodeIgniter....
4
votes
1answer
560 views

WYGWAM PHP errors in CP after upgrade

A PHP Error was encountered Severity: Notice Message: Undefined index: config Filename: wygwam/helper.php Line Number: 535 A PHP Error was encountered Severity: Notice Message: Undefined index: config ...
3
votes
2answers
153 views

Is there a way to define snippets in the index.php or config.php file?

I'd like to define snippets dynamically in the index.php file. Is there a way to do this?
3
votes
2answers
642 views

upgrading multiple versions of EE to php 5.5

For security reasons we were recommended to upgrade to the latest version of php (from version 5.3 to version 5.5.X) to fix all the possible bugs out there for that version, however I'm a little bit ...
3
votes
2answers
846 views

Can't programmatically log member in

Can someone explain to me why I am not capable of forcing a new ExpressionEngine session to be generated for a specific user? I've been following this link: https://stackoverflow.com/questions/...
3
votes
2answers
122 views

Run plugin without affecting loading time (external)

I have a plugin which doesn't actually integrate with the website. It's purpose is to grab a column of the channel entries table and manipulate it every 24 hours. The plugin will only run each time a ...
3
votes
2answers
501 views

Dates before 1900 (even 1800) in EE 2.6?

With the changes to the way dates are handled in EE 2.6, can dates be set prior to 1900 (or even 1800) using the Date form field?
3
votes
2answers
7k views

increase upload_max_filesize with php.ini

I'm trying to increase the upload file size for my EE installation to 120MB. I have verified that I can modify these settings with my hosting service by adding a php.ini file to my webspace and ...
3
votes
3answers
501 views

Why are PHP and Stash variables not set as expected within EE conditionals?

I boiled my problem down to this template code on a template with "Allow PHP" set to "YES" and "PHP Parsing Stage" set to "Output": {if 1 == 1} First block <?php echo '1 == 1 is true'; ?> ...
3
votes
2answers
157 views

PHP inside a User loop — what am I doing wrong?

On an article page, I'm trying to output "more from this author" using the User add-on from Solspace. Unfortunately, there's a bug in the current version that prevents this from working: {exp:user:...
3
votes
2answers
94 views

Hide Category in Forum Breadcrumb

Is it possible to globaly hide the category-name in the Forum-Breadcrumb? {include:breadcrumb} includes the «Forum Home», Category, Forum and Title — but I wan't to get rid of the category. What do I ...
3
votes
1answer
226 views

How to create module tag output 'sub-loop'

I'm trying to do something like the following: {exp:my_tag my-param2="1" my-param2="2"} <li>{title}</li> <li><ul> {my_fields} <li>{field_label}: {...
3
votes
1answer
312 views

“Date field is required” error when saving entries

I'm using Store to manage products with lots of modifiers. At some point, a product will reach a number of modifiers where it starts producing a "Date field is required" error every time I try to save ...
3
votes
1answer
860 views

Can snippets contain PHP?

The documentation says: Snippets are expanded at a very early stage on each template, making it possible for them to hold dynamic content, ExpressionEngine tags, other variables, PHP, etc. The ...
3
votes
3answers
328 views

CE Image - Only generating half the images?

I've recently moved an EE site to a new server (a reasonably beefy VPS from Memset), after lots of hunting around changing paths, I've the site working with only one problem. CE Image is used on the ...
3
votes
2answers
5k views

jQuery AJAX POST data can't be accessed via PHP

The following allways evaluates if (isset($_POST["sort"])) as false: // Base template // Fired on click event (no JS console errors) $.post( "/path/to/ajax/target/", {sort: day} ); // AJAX target ...
3
votes
2answers
268 views

Entire site down - Seemingly random (and fatal) ExpressionEngine error

Every so often, my entire site goes down for an indefinite period of time. Restarting the MySQL service appears to temporarily fix the issue. I recently upgraded to EE 2.7 and about the same time my ...
3
votes
1answer
245 views

Logger.php throwing PHP errors

I'm getting some issues with some EE php errors, i believe its related to the EE Zoo Triggers Add On, but im finding it really tricky to debug and get the feeling I may be searching in the wrong place....
3
votes
1answer
2k views

Expression Engine PHP Error Log

How can i find or get an PHP Error Log? Not server-side, only on Expression Engine Level. On my server i can see an error log but to fix a problem with assets, i need a EE-side php error log.
3
votes
1answer
160 views

undefined constants FALSEOR and FALFALSEORFALSE

In a template I was working on recently, I started to get PHP Notices about undefined constants FALSEOR and FALFALSEORFALSE: A PHP Error was encountered Severity: Notice Message: Use of undefined ...
3
votes
2answers
592 views

PHP Error on Structure manage entries page

I'm experiencing the following PHP error on a site running Structure (3.3.6), and am having some trouble debugging it. The text of the error is: A PHP Error was encountered Severity: Notice Message: ...
3
votes
1answer
56 views

Expression Engine: Change the style of a template wrapped in another template

I have a post/posts template wrapped inside a template called blog-posts.html . I would like to have the post/posts template display a different grid column class than how it is displayed when it is ...
2
votes
2answers
1k views

Plugin help; Cannot redeclare fatal error

I'm writing my first plugin in attempt to learn more about the backend of EE and Codeigniter. My PHP is enough to get by, but I'm no expert. This plugin is as follows: <?php if ( ! defined('...
2
votes
3answers
1k views

Passing ID’s from a query to Channel Entries

I'm using quite a complex query using exp:query to generate the member ID's of members who have certain data in a custom field. I'm struggling on how to pass the generated ID's onto a channel entries ...
2
votes
1answer
179 views

SLASH constant isn't the same as “/” character [in PHP]?

I recently discovered that the EE/CI's SLASH constant isn't the same as the "/" character. Or, at least, in my plug-in code, (SLASH == "/") evaluates to FALSE... They output the same character, ...
2
votes
1answer
141 views

Creating Custom Libraries In ExpressionEngine

In EE I am trying to create a php class that will query an API. When I look at the documentation for creating your own library classes (here: https://docs.expressionengine.com/latest/development/...
2
votes
1answer
813 views

How to download Expression Engine version 3 and 4?

Please guide me how to download Expression Engine version 3 and 4.
2
votes
1answer
2k views

PHP 7 Error with ChannelImages: Fatal error: 'continue' not in the 'loop' or 'switch' context in…

I'm getting this error when trying to upload an image with ChannelImages 5.4.19 with EE 2.11.7: Fatal error: 'continue' not in the 'loop' or 'switch' context in /home/omart/public_html/system/...
2
votes
2answers
271 views

ExpressionEngine source control via git

Im trying use some form of source control with EE. I cannot clearly see a way to decouple the database from the templates and other structures, as would be the case in a most CMSes. Creating channels ...
2
votes
1answer
119 views

channel entries tag seems to run before my module function

The {exp:bmi_favorite:list_ids entry_type="recipe" site_id="1"} outputs 18|19 to be passed to the entry_id parameter. It does not work, unless I manually add the 18|19 into the entry_id, like entry_id=...
2
votes
2answers
50 views

How to trigger P&T Assets to Update Indexes from a template

I have created a PDF generating tool that creates certificates for members, creates a sub-folder within a one of my file upload directories, then places the file into the new directory. I am trying ...

1
2 3 4 5 6