Jump to content

Help with PHP within HTML


sapien

Recommended Posts

Hello everyone,

 

I need some help running a PHP script within an HTML document (index.html)

 

Important Information:

Now, the issue is that when I try to place a form within my page it doesnt show up (blank space) and everything after the php code is blank (in the browser). Here is the PHP that was inserted:

 

<?php
require_once('../formcraft/function.php');
formcraft(1);
?>

 

Also, the text at the forefront of my parallax background is missing.

 

I tried adding this to my .htaccess file (taken from my host's php wiki) in order to treat all pages as php:

 

AddHandler fcgid-script .html
FCGIWrapper "/dh/cgi-system/php53.cgi" .html

 

The permissions of all important folders is set to 755. All folder paths are correct.

 

I've contacted the author of the script but he isn't being very helpful. So! Any help with this seemingly disastrous issue would be greatly appreciated.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/286142-help-with-php-within-html/
Share on other sites

Have you checked your server error logs? What you've described sounds like PHP stopped executing in the middle of the code, which could mean a syntax error or that there's something the form builder requires that you don't have set up yet.

Have you checked your server error logs? What you've described sounds like PHP stopped executing in the middle of the code, which could mean a syntax error or that there's something the form builder requires that you don't have set up yet.

 

Ok, I checked my error logs and its saying:

 

[error] [client] File does not exist: /home/usr/website.com/category/assets, referer: http://www.website.com/category/index.php

 

However, the appropriate folders DO exist.

Your PHP errors are probably being written somewhere else then.

 

DreamHost? Don't use that AddHandler/FCGIWrapper thing and just name your file with .php instead. Then try your script and, assuming it fails again, check your error log once more.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.