Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Martin Hansen on August 05, 2002, 12:51:07 AM
-
I have created a test4.php, that does someting. It works nicely on a server, that runs php out there somewhere.
But when I try to run it on the E-smith (4.1.2) nothing happens. I store it in the html directory.
What's wrong?
-
In E-Smith 4.1.2 PHP is the primary directory is disabled. If you require PHP in the primary directory (/home/e-smith/files/primary/html) you can do the following:
From console:
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
pico -w 95AddType10PHPprimary
[Add these lines]
#Add PHP support to the Primary website
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
[Save changes and close]
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/init.d/httpd restart
/etc/rc.d/init.d/httpd-admin restart
You should now have PHP support in the primary html directory. This change is not necessary for the ibays, as you can define PHP/CGI support from the e-smith manager.
Hope this helped,
Nathan
-
Nathan,
I tried your suggestion and it didn't work. rebooted the computer as well. Did it work for anyone else?Nathan Fowler wrote:
>
> In E-Smith 4.1.2 PHP is the primary directory is disabled.
> If you require PHP in the primary directory
> (/home/e-smith/files/primary/html) you can do the following:
>
> From console:
> mkdir -p
> /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
> cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
> pico -w 95AddType10PHPprimary
> [Add these lines]
> #Add PHP support to the Primary website
>
> AddType application/x-httpd-php .php .php3 .phtml
> AddType application/x-httpd-php-source .phps
>
> [Save changes and close]
> /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
> /etc/rc.d/init.d/httpd restart
> /etc/rc.d/init.d/httpd-admin restart
>
> You should now have PHP support in the primary html
> directory. This change is not necessary for the ibays, as
> you can define PHP/CGI support from the e-smith manager.
>
> Hope this helped,
> Nathan
-
Are you naming your files with a .php, .php3, or .phtml extension?
Thanks,
Nathan
-
The pages are in html, but the scripts are in php extentions
-
Did you write these or are they prefab? Do they have opening and closing PHP delimeter tags?
-
They're basically prefab, but I changed the directories so they point correctly.
include "./counter/phphits.php";
phphitsAddHit();
?>
This coding works on an Ibay but not in the main html folder.