Solved

PHP Config File

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

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now