Uploading Windows to Unix

Posted on 2004-10-28
Last Modified: 2006-11-17
Hi All -

I have a tiny php app that I created in windows and am now uploading to the UNIX based webserver.  Every page is getting  500-Internal Server Error.  So I'm figuring there's something I don't know about this migration.

Poking around I saw a number of people recommending using wordpad rather than notepad and also uploading with ASCII rather than binary.  I've tried several combinations, but still no luck.

For testing I'm using a really simple test page : <? echo("hello world") ?>  so I don't see how it can be anything on the page?  

This is my first go round with php, so I could very well have missed something obvious.

Thanks for the help.  - A

Question by:savageanne
    LVL 48

    Expert Comment

    hm php typical does not serv a internal 500 error. Typical it shows the php-source-code or a white page but not a 500 error.
    It does not mater if the php is code with windows or unix.

    Can you get the error-log of that server to get more infromation what is causing this 500-error?

    Looks like the servr you are uploading is not cofigured properly for php

    Try this as a testpage. does that output anything ??

    Author Comment

    Hi - thanks for the rapid response.  I did the phpinfo test, no change, still a 500 error.  HTML pages do load fine in case that triggers anything in your mind.

    The server is a hosting provider, and I don't have access to error logs.

    We have submitted a ticket thinking that php might not be configured correctly, but that seems unlikely since this is a relatively big service provider and I imagine they have a number of clients running php.

    - A

    Author Comment

    Just wanted to add that I did actually figure this out, hope this helps some other newbie in the future.

    Turns out there were two problems.

    (1) I didn't have the path to php in my files.  Added this as the very first line in the file:

    (2) Change the CHMOD on the files to 755 as instructed by my hosting provider.

    Accepted Solution

    PAQed with points refunded (250)

    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    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…
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    933 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

    13 Experts available now in Live!

    Get 1:1 Help Now