Solved

Uploading Windows to Unix

Posted on 2004-10-28
220 Views
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

0
Question by:savageanne
    4 Comments
     
    LVL 48

    Expert Comment

    by:hernst42
    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 ??
    <?php
    phpinfo();
    0
     

    Author Comment

    by:savageanne
    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
    0
     

    Author Comment

    by:savageanne
    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:
    #!/usr/local/bin/php

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

    Accepted Solution

    by:
    PAQed with points refunded (250)

    modulo
    Community Support Moderator
    0

    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