tags:

views:

173

answers:

1

Hi, i have a php web application.This application works on windows server but doesn't work on linux server.I think this is about php.ini or file permissions.Whta can be other reasons for this situaion?What must be the basic php.ini configurations for this situation?Thanks for advance...

+6  A: 

Never ask "What can be other reasons". We are not weather forecasters here. We are programmers. And have tools to be certain, what particular problem experiencing now.

The only thing you need is to ask PHP to tell you, what's the problem.

The easiest way is to put into your config file these lines

ini_set('display_errors',1);
error_reporting(E_ALL);

and see what your app will say.
It can be permissions or or php.ini. All will be told.
Quite easy, eh? ;)

if these magic lines won't help, there are several other ways, manual has a good manual in it:
http://php.net/manual/en/configuration.changes.php

then your server goes public, don't forget to change these lines to

ini_set('display_errors',0);
ini_set('log_errors',1);
error_reporting(E_ALL);

and see error messages in the error log, not revealing it to the possible hackers and innocent users

Col. Shrapnel
I want to ask my question more spesifically.My php pages have somehow converted to ANSI character encoding type while uploading to the server.Is there any way to make the pages work even thaey have ANSI character encoding type?In other way i open all the pages and save them as UTF-8 one by one
cubuzoa
@cubuzoa the file encoding doesn't affect script execution. ANSI or UTF or even 1256 would work as well. And how do you know it has been converted? for the ansi symbols utf-8 has same codes - there is no difference between them
Col. Shrapnel
when i save as the page with notepad there is current encoding type as ANSI
cubuzoa
@cubuzoa well you can choose another encoding when save. But again: encoding doesn't affect script execution. Te script will run being saved in any encoding. Can you run any scripts on your server? Do you have any not interacting with ajax? Do you have any idea what these scripts do? Start debug a little?
Col. Shrapnel