I am trying to learn how to get a very simple php file to work on powweb, and I keep getting error messages. I have tried to follow the php scripting page directions on powweb, but I am not sure if I have done it correctly. Is there something else I need to do? Any help would be greatly appreciated.

Dani AI

Generated

A compact troubleshooting checklist for getting a simple PHP file to run on shared hosts (PowWeb and similar). Frequent root causes are: wrong filename extension, file placed outside the webroot, server not parsing PHP, suppressed errors, short PHP opening tags, or a syntax error. A minimal test quickly shows whether PHP is being executed.

Create a file named test.php in the public web directory and load it in a browser:

<?php
phpinfo();
?>

If the PHP info page appears, the host is parsing PHP. If the browser shows the raw PHP source, PHP is not configured for that location; contact the host. If the page is blank, enable error display temporarily to see parse/runtime errors:

<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
phpinfo();
?>

When asking for help, include the exact error text, the small script, the PHP version and the path used. As suggested, the error message is essential for diagnosis, and ’s point that syntax mistakes are common is worth noting. Short tags can silently fail on many hosts (see the PHP manual on tags: PHP short tag behavior). File permissions should typically be 644 for PHP files.

Recommended Answers

All 6 Replies

Can you at least copy your error message ..

No we cannot see what is spit on your computer and hence no help at all

Member Avatar for Member #120589

Ok, go to line 37 and delete the ',' - you need to place a ';' there instead. Also, further on line 202, take it out completely.

I think that a few of the commands are misspelt too. Check them - echo especially. :)

Ok, go to line 37 and delete the ',' - you need to place a ';' there instead. Also, further on line 202, take it out completely.

I think that a few of the commands are misspelt too. Check them - echo especially. :)

:-O

i am confused

Member Avatar for Member #120589

Unfortunately that's what happens when somebody doesn't post their code :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.