Topic Closed
4 Posts

Hello all,

I am trying to install gpEasy 4.3.4, on Apache 2.4 running on Fedora, with PHP 5.5.15 installed, and I am having problems getting the steps:

3 Using your web browser, navigate to the folder you just uploaded the unzipped contents to.
4 Your browser should now be displaying the gpEasy installation page.

To display the gpEasy installation page. When I navigate to the gpEasy folder, I get this displayed in the browser:

Error: PHP is not running

gpEasy requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.

This looks more like a configuration issue getting php to work in Apache (and I am a php newbie), and I must say that the "easy" installation instructions are very light in this area. I have tried various things in httpd.conf to get it working as a cgi, but without success. Some questions, if I may:

- is this more a problem getting php to recognise .php extensions, rather than a cgi configuration issue?
If, in a terminal session in the gpEasy directory, I type:
$ php index.php
then I successfully get a load of html output to the screen. But when I type:
.$ ./index .php
(I have chmod +x all the .php files) then I get shell errors, as the lines in the php are interpreted as bash commands. Is there a way to associate .php files with the /usr/bin/php command?

- for info, I made these mods to my apache httpd.conf:
AddHandler application/x-httpd-php5 .php       (this had no effect, I tried other variants from various php support sites.)
AllowOverride all (so that the .htaccess directives get noticed, I believe that this is necessary)
added ExecCGI to the options
added index.php to the DirectoryIndec directive (this works, and it makes no difference if I specify the full path to the php files)

- do I need to be running mod_php? (I hope not. I compiled apache with the --prefix and --enable-module=so options)

Thanks for listening, all ideas gratefully received.


Edited: 7 years ago#7232

2 Posts
mod_php is a apache module which allows it to interprete php scripts. and when you run php script from the console, it uses php engine directly without disturbing apache and mod_php module.
Edited: 7 years ago#7234

4 Posts

Thank you for the reply, stasuss. I had hoped to run php as cgi rather than a module (I'm just looking at gpeasy now, I'll optimise it later) as this is usually easier to setup.

Anyway, I've got it working as a module now, and here's what I did, maybe it will help other php noobs like me who found the abundance of diverse methods and documentation confusing:

Environment: Fedora 20, Apache 2.4 compiled with --prefix and --enable-module=so options (and no others, so default worker model).

Copy  /usr/lib64/httpd/modules/ to the Apache modules directory (I am not sure if this module is just there with the default fedora installation, or if it appeared as a result of doing a yum install php)
Add these directives to httpd.conf:

LoadModule php5_module modules/
AddHandler php5-script .php
AddType application/x-httpd-php5 .php

Sart Apache and that's it.

I would really love it if a CMS came in an all in one package, so that users did not have to mess around with this stuff.


Edited: 7 years ago#7235

193 Posts
1 Themes

I would really love it if a CMS came in an all in one package, so that users did not have to mess around with this stuff.

Bundling PHP with a CMS would be equivalent to bundling Windows with MS Word. It definitely does not make sense. And since the installer requires PHP to be up and running, you'd have a very complex installation process.

I don't know the exact percentages, but most hosts already have PHP installed (although you sometimes have to ask for it to be activated). Most users don't have to mess with that stuff.

I'm not sure what environment you're working in. Hosted service or configuring your own server?

7 years ago#7236

4 Posts

With respect, I think it would be more like using .NET to build a word processor package, without supplying the necessary redistributable libraries, or providing clear documentation about where to obtain them.

In answer to your question, I am testing on my own server, which has been built using ootb software with default options.

My point is that with a standard OS (I've tried two, Fedora 20 and RHEL 6) and a standard web server built using the default options, even the installation program does not work without extra configuration. Getting web servers to work with PHP is no doubt bread and butter for PHP experts, but is not necessarily for people who just want to develop a simple web application.

If, as you say, PHP is available on most hosts, then the bundle would only be the CMS plus Apache, and would install Apache in a way that PHP worked with it. I appreciate that the location of the PHP module varies with distro and 32/64 bit combinations, in which case the "bundle" would include clear instructions that at least mention the typical locations. It would also include httpd.conf directives that would work (not just the PHP aspect), or would require documented customisation.

I see that I have entered the forum with a criticism, for the record I must say that I do like what I have seen of gpEasy so far (now that it's running).

Edited: 7 years ago#7238

193 Posts
1 Themes

I guess we're bound to disagree on this point. Apache and PHP are completely separate from the CMS and should remain so.

PHP is a requirement for running this (and most other) CMSs. You should ensure that you have a functional installation of PHP before installing the CMS. You can test that by creating a .php file containing <?php phpinfo(); ?> and opening that file in a web browser. Or you can try installing the CMS and get the error you got.

To get a PHP server running properly, look for documentation on LAMP, MAMP, or WAMP depending on the OS you want to use.

7 years ago#7239

4 Posts

Well, I guess we do have to agree to disagree, on the bundling at least, and we'll leave the php and Apache installation (and gpEasy-specific configuration) to the web developer who was looking for an easy CMS to install and use. Maybe it's more a documentation issue than a bundling issue.

Getting back the PHP questions I posed in my OP, you say: "To get a PHP server running properly, look for documentation on LAMP, MAMP, or WAMP depending on the OS you want to use"

I can confirm that the modest steps I performed were the result of considerable amount of time trawling various php forums, sites, documentation etc. It is clear that there is a lot of confusion "out there" (and version specific stuff, which is understandable) about the best way to configure these things. Anyway, the questions I have are:

- are the directives I mentioned in my second post a "proper" way to run php in Apache (as far as I can tell it works OK)?

- is the browser test you mention above opening the .php as a file (File/Open) or as a web server resource (http://servernane/whatever.php)?

- as mentioned in my OP the command
$ php index.php
works (php "runs" the index.php) but I is there something more that  is needed that yum install doesn't do, so that php isn't "turned off" as the error message puts it?

I hope I'm not coming across as obtuse here, as much as anything I want the confidence knowing that my current test config isn't going to have problems down the line due to an incomplete configuration, and so I can document the correct steps for configuring different servers.


7 years ago#7242

193 Posts
1 Themes

We agree on 2 things. Documentation could be improved and error reporting could be more precise.

What I'd do next is create a page named test.php containing <?php phpinfo(); ?> and place it at the root of your server. Then open a browser and navigate to http://localhost/test.php (if that doesn't work, try your machine's IP address instead of localhost). You should get a page that gives you all the details about your PHP config. Hopefully that will help you identify the problem.

As for the "proper" way to run php, I'm the wrong guy to ask. With commercial servers, I just run it the way the host set it up and in most cases it just works. on my test server, I run MAMP, which does the hard work for me. Unfortunately, it's not available for Linux.

7 years ago#7244

Topic Closed



elFinder 2.1.50 in Upcoming Release

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News


Company located in T├│rshavn, Faroe Islands. * Webpage Design * Consultant & Provider of a wide range of programs for visually impaired and dyslextics.

Find out more about our Provider Spotlight

Log In