简体   繁体   中英

codeigniter project migration from iis to apache2

I have migrated my project from Windows IIS to Mint Apache2. Unfortunately I am getting an error:

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request.

I have changed permissions on the files to 755. Normally if there is a CI error (connecting to db etc) it throws an error.

I have opened my index.php with VI, and I have noticed ^M on the end of each line in EACH FILE. This doesn't show in Aptana though. 每行末尾的奇怪结局

I have spent last half a year writing this app and I'm not very excited about this. Does anybody have any experience with this?

Thank you.

If you have access to the shell on your server and it's running Linux/Unix, try this:

for i in `find . -type f` ; do dos2unix $i $i; done

The for i in `find . -type f` ; for i in `find . -type f` ; part finds all FILES within the current directory.

Then, do dos2unix $i $i; done do dos2unix $i $i; done runs dos2unix which will convert all your ^M 's to the Unix standard which is just \\r .

If you want to test it out on a single file, make a copy of a file and replace find . with find filename.ext

Try adding this to your php.ini.

display_errors = On

This should show a proper error instead of just throwing a 500. From therein it should be relatively simple to debug.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM