Solved

PHP Config File

Posted on 2012-04-08
4
319 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The viewer will learn how to dynamically set the form action using jQuery.
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…

777 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