Questions tagged [php]

299 questions
7
votes
3 answers

Session Cleanup in Craft

Just had an e-commerce site go down due to Craft's custom way of handling Sessions. The session directory never gets cleaned up, causing the sessions folder to be littered with tens to hundreds of thousands of orphaned files, causing my server to…
user814584
  • 273
  • 1
  • 6
6
votes
1 answer

CraftCMS > UserSessionService should be compatible with CWebUser

I've migrated my Craft project from CentOS/PHP5 to Ubuntu/PHP7 --- since then I'm seeing this message in /craft/storage/runtime/logs/phperrors.log [14-Jun-2017 14:40:49 UTC] PHP Warning: Declaration of Craft\UserSessionService::login($username,…
Leo Leoncio
  • 473
  • 3
  • 9
2
votes
1 answer

Can I send a status message from an external (standalone) PHP script to the Craft engine?

Note: this question pertains to Craft 2 Pro. Craft 3 is not currently an option. What I need to do I have some stand-alone utilities that don't need to exist within the Craft framework, so I would really rather not have to go down the road of…
nmjk
  • 123
  • 5
2
votes
1 answer

503 Response on fresh install, FastCGI possible culprit

I've spent all of today trying to configure a server block that will let me install Craft 2.62797 on a Digital Ocean droplet running Ubuntu 14.04 with NGINX and PHP 7. After uploading the craft directory and a public directory with the index.php…
Erik G
  • 103
  • 4
1
vote
2 answers

Can’t run Craft CMS :( Your server doesn’t meet the following requirements to run Craft CMS:

Can’t run Craft CMS :( Your server doesn’t meet the following requirements to run Craft CMS: The Mcrypt extension is required. Please talk to your host/IT department about upgrading your server. I am on Craft 2.6 and PHP 7.1. I have the mcrypt…
1
vote
1 answer

How do entry elements render a default string but also return an object at the same time?

So this is more of a PHP question than a Craft question, but the only example I can offer is one I've seen in Craft. {{ craft.entries.id(4).one() }} Returns a simple string like: "About Page" {{ dump(craft.entries.id(4).one()) }} Returns the entire…
Mark Notton
  • 2,337
  • 1
  • 15
  • 30
1
vote
1 answer

Change php.ini to max execution 120

I found the php.ini file, but I don't see where to change max execution to 120. Thank you for your support.
Bren Bauer
  • 11
  • 1
1
vote
1 answer

Pass custom variable to view

Coming from a Yii2 background, I am accustomed to doing things in an MVC way. I have set up a demo Craft CMS application to have a play around with. I've created a "singles" page (homepage) and got it displaying data. What I want to know is, how do…
MAX POWER
  • 111
  • 1
1
vote
2 answers

Help! Craft issues after changing PHP version

We have an install of the latest Craft on a Nexcess shared account. By default, the account runs PHP 5.4.x. We were working on and configuring the site for about a week - no issues of any kind until today. We used the Nexcess control panel to update…
Mike
  • 699
  • 3
  • 19
1
vote
2 answers

Is there any danger to Craft from upgrading from PHP 5.5 to PHP 5.7?

As of July 2016, PHP branch 5.5 is unsupported. The PHP version my server currently is running is 5.5.9 which implies that the server will not receive any security updates going forwards. I'm told that Craft recommends using 5.7. Is there any…
patrick.altair
  • 481
  • 3
  • 16
1
vote
2 answers

Disabling unused PHP functions and Craft

The php.ini file has an option called disable_functions. You can add unsafe functions to it so that they cannot be run. Does anyone have any guidelines for a good setup with Craft for this. I realize that this is somewhat sort of subjective, but I'm…
Davin Studer
  • 143
  • 5
0
votes
0 answers

Has anyone experienced any cURL error 28: timeout errors using php 7.4 and craft 3.5?

So the site was working on a new server. But over night I am now seeing the site hang and not load. When it does give an error it gives a cURL error 28 with connection timed out on various resources it may be trying to load like google or other…
Lettie
  • 2,033
  • 2
  • 15
  • 26
0
votes
0 answers

MacOS 10.15 Beta and CraftCMS

i'm running a macOS 10.15 Beta (to check out SwiftUI) but now i'm running into problems with craft, specifically with the php zip extension. It's PHP 7.3.5 and i can't update it, because the install process doesn't recognize my system as an macOS…
mrnb
  • 1