file_get_contents() for Apache 2

Author Message

Paul Thomas

Friday 21 January 2005 1:16:46 am

Hi,

I receive the following error:

Fatal error: Call to undefined function: file_get_contents() in /home/httpd/vhosts/DOMAIN]/httpdocs/lib/eztemplate/classes/eztemplatefileresource.php on line 245
Fatal error: eZ publish did not finish its request

The execution of eZ publish was abruptly ended, the debug output is present below.

I am running php4.3.10 (the correct version with file_get_contents) & apache 2.0.40 on RH9

One of the messages I read seem to suggest that Apache 2 doesn't work with ezP - any ideas/work arounds?

I've searched through the forum, and all I can find is references to upgrade php to 4.3 (which I have)....

tia

paul.

Hans Melis

Friday 21 January 2005 4:12:28 am

Hi Paul,

Apache2 and eZ publish do work together (btw, it's actually PHP and Apache2 and not an eZ publish issue). We have Apache2 serving several eZ publish sites, and all my test installs use Apache2 as well.

PHP 4.3.10 indeed has the file_get_contents() function, but are you 100% sure that your eZ publish pages are served by PHP 4.3.10? What I do to verify the PHP Apache is using, is:
- edit index.php
- Make the first line of code: phpinfo(); exit();
- Access any page.

If that page also says PHP 4.3.10 then you have a really weird problem.

Hans
http://blog.hansmelis.be

Paul Thomas

Friday 21 January 2005 4:26:39 pm

Hi,

Its definetly 4.3.10.

However, I did notice Virtual Directory support is disabled....????

Anyway, I tried installing WebGUI as an alternative. In doing the install, ezp has started working!
Obviously I had screwed up one of the files... but questioning what I had done got it working for me ~ cheers!

Paul.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:03:54
Script start
Timing: Jan 31 2025 06:03:54
Module start 'layout'
Timing: Jan 31 2025 06:03:54
Module start 'content'
Timing: Jan 31 2025 06:03:54
Module end 'content'
Timing: Jan 31 2025 06:03:54
Script end

Main resources:

Total runtime0.0163 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.2500151.2266
Module start 'layout' 0.00550.0024 739.476636.6797
Module start 'content' 0.00790.0070 776.156390.1875
Module end 'content' 0.01490.0014 866.343833.9922
Script end 0.0163  900.3359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002112.8176140.0001
Check MTime0.00105.9359140.0001
Mysql Total
Database connection0.00074.347110.0007
Mysqli_queries0.003420.832030.0011
Looping result0.00000.055510.0000
Template Total0.00105.910.0010
Template load0.00074.414310.0007
Template processing0.00021.435410.0002
Override
Cache load0.00053.021310.0005
General
dbfile0.003018.097280.0004
String conversion0.00000.032240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs