Easysoft Data Access

Why do not my PHP scripts appear to run on the web server?

Last Reviewed:
02nd January 2024

First, check the various PHP or Apache (or whatever web server you are using) forums and FAQs. In addition, here are a few tips specific to Apache/PHP.

  1. Did you build Apache with the PHP module?
  2. Make sure Apache knows what to do with a PHP script. You need to tell Apache in the httpd.conf (or one of the other config files) that PHP files (.phtml, php3, php4, php5, php7, phps and so on) should be passed to PHP . You do this with lines like these:
    AddType application/x-httpd-php5
    AddType application/x-httpd-php5 .phtml

    These lines tell Apache to pass files ending in .php5 and .phtml to PHP for processing.

  3. Check you can run a simple PHP script. Create a file called test.php5 in the htdocs directory of your web server containing:
    You should see PHP info below:

    Then go to the URL http://my_web_server/test.php5 (replace my_webserver with the appropriate machine and domain name) in your browser to see if you get a page of PHP information back. If you do not, something far more serious is wrong with your Apache/PHP configuration than not being able to make ODBC connections from PHP through an Easysoft ODBC driver.

If all the above is OK, you might try these actions:

  1. Examine your Apache error log. This file is named in your Apache configuration file(s) (e.g. httpd.conf) with the "ErrorLog" setting.
  2. Make sure you followed the PHP INSTALL file and copied the sample php ini file (e.g. php5.ini-dist) to the correct place. Some options in this file can prove useful for debugging:
    1. "track_errors = On" stores the last error in the php_errormsg variable.
    2. "error_reporting = 7" outputs Normal errors, Normal warnings, Parser errors.
    3. "error_log = filename" defines the file errors/warnings will be sent to.

If PHP appears to be working, but you do not get data back through your Easysoft ODBC driver then see the sections on turning on logging in the relevant Easysoft product documentation.

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)