Solved

PHP Config File

Posted on 2012-04-08
4
321 Views
Last Modified: 2012-04-09
I have this php web site that I have to make it run under IIS with mysql. here is the code for config.php

I cant get it run please help

in apachee server lines with define works fine but on IIS I couldnt define them correctly. what am I doing wrong. I am not a php person :(


<?php
//DIR
// DIR
// define('DIR_APPLICATION', '/home2/topo5249/public_html/kitap1/catalog/');
// define('DIR_SYSTEM', '/home2/topo5249/public_html/kitap1/system/');
// define('DIR_DATABASE', '/home2/topo5249/public_html/kitap1/system/database/');
// define('DIR_LANGUAGE', '/home2/topo5249/public_html/kitap1/catalog/language/');
// define('DIR_TEMPLATE', '/home2/topo5249/public_html/kitap1/catalog/view/theme/');
// define('DIR_CONFIG', '/home2/topo5249/public_html/kitap1/system/config/');
// define('DIR_IMAGE', '/home2/topo5249/public_html/kitap1/image/');
// define('DIR_CACHE', '/home2/topo5249/public_html/kitap1/system/cache/');
// define('DIR_DOWNLOAD', '/home2/topo5249/public_html/kitap1/download/');
// define('DIR_LOGS', '/home2/topo5249/public_html/kitap1/system/logs/');
// Config Overrides
// See: http://expressionengine.com/wiki/Config_Overrides/
// See: http://expressionengine.com/wiki/Hidden_Configuration_Variables/
$CFG->wwwroot   = 'http://www.gulver.com.tr';
$CFG->dirroot   = 'C:\Gulver Web Production\';
$CFG->DIR_SYSTEM  = 'C:\Gulver Web Production\SYSTEM';
$CFG->DIR_DATABASE  = 'C:\Gulver Web Production\SYSTEM\DATABASE';
$CFG->DIR_LANGUAGE  = 'C:\Gulver Web Production\catalog\language\';
$CFG->DIR_TEMPLATE  = 'C:\Gulver Web Production\catalog\view\theme\';
$CFG->DIR_CONFIG  = 'C:\Gulver Web Production\SYSTEM\CONFIG\';
$CFG->DIR_IMAGE  = 'C:\Gulver Web Production\IMAGE\';
$CFG->DIR_DOWNLOAD  = 'C:\Gulver Web Production\DOWNLOAD\';
$CFG->DIR_CACHE  = 'C:\Gulver Web Production\SYSTEM\CACHE\';
$CFG->DIR_LOGS  = 'C:\Gulver Web Production\SYSTEM\LOGS\';
//DB
$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'mydbname';
$CFG->dbuser = 'myDbSuer';
$CFG->dbpass = 'myDbPasswrd';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';
?>
0
Comment
Question by:HASANDIZ
  • 2
4 Comments
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37820970
please go through below link to have PHP with MYsql on IIS. their can be many other things which may be breaking.. like environment variables.

http://www.dreamincode.net/forums/topic/39791-installing-and-configuration-iisphpmysql/
0
 

Author Comment

by:HASANDIZ
ID: 37821010
my phpinfo.php works fine, but my index.php does not
http://www.gulver.com.tr/phpinfo.php
0
 

Author Comment

by:HASANDIZ
ID: 37821026
I need to make these lines to define these directories that my application uses.

// define('DIR_APPLICATION', '/home2/topo5249/public_html/kitap1/catalog/');
// define('DIR_SYSTEM', '/home2/topo5249/public_html/kitap1/system/');
// define('DIR_DATABASE', '/home2/topo5249/public_html/kitap1/system/database/');
// define('DIR_LANGUAGE', '/home2/topo5249/public_html/kitap1/catalog/language/');
// define('DIR_TEMPLATE', '/home2/topo5249/public_html/kitap1/catalog/view/theme/');
// define('DIR_CONFIG', '/home2/topo5249/public_html/kitap1/system/config/');
// define('DIR_IMAGE', '/home2/topo5249/public_html/kitap1/image/');
// define('DIR_CACHE', '/home2/topo5249/public_html/kitap1/system/cache/');
// define('DIR_DOWNLOAD', '/home2/topo5249/public_html/kitap1/download/');
// define('DIR_LOGS', '/home2/topo5249/public_html/kitap1/system/logs/');
0
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 37821470
Add these statements to the top of your index.php script:
error_reporting(E_ALL);
ini_set('display_errors', TRUE);

Then remove the double slashes from the statements (// turns the statement into a comment).

Try it again and post back here if you're still having issues with it.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question