Results 1 to 11 of 11

Thread: [RESOLVED] PHP Scripts not running on web server[URGENT]

  1. #1

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Resolved [RESOLVED] PHP Scripts not running on web server[URGENT]

    Hello everybody,

    I have successfully uploaded my php/MySql website on the hosting server. Previously the site was running on some other server, and now I have transferred it to 1and1.

    The problem is I am unable to run php scripts. If .php file contains simple html, its executed, but if it contains php code, I receive page cannot be displayed error. However, if in the same file I disable php scripts, it runs.

    Any ideas ??

    Thanks.

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Re: PHP Scripts not running on web server[URGENT]

    is your server set up to properly handle the php application type?

    Perhaps the php parser isn't working properly

  3. #3

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Re: PHP Scripts not running on web server[URGENT]

    Here is the PHP info the server.

    www.rxclubamerica.com/test.php

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: PHP Scripts not running on web server[URGENT]

    Make sure the PHP file has execute permissions, make the permissions on your php files the same as on test.php (which works) or use 755 which is a good value.

  5. #5

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Re: PHP Scripts not running on web server[URGENT]

    How can I check permissions on hosting server and what is 755 and how to set it?

    Thanks.

  6. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: PHP Scripts not running on web server[URGENT]

    Use your hosting admin software (e.g. Cpanel/DirectAdmin) or an FTP client. 755 is an octal permissions value used on Unix-based servers. If your server is Windows based I'm not sure how you do it remotely.

  7. #7

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Re: PHP Scripts not running on web server[URGENT]

    My server is Unix-based.

    Thanks.

  8. #8
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: PHP Scripts not running on web server[URGENT]

    Turn off friendly HTTP error messages in Internet Exploerer by going to Tools->Internet Options->Advanced. This will tell you the exact error your pages are producing. Most probably a 500 error.

    If it is a 500 error, you will need to find out what part of your script is causing the PHP interpreter to fall over. Pick a script and insert a line as follows:
    Code:
    die('here');
    This will kill the script and print 'here', mor importantly if this occurs before the interpreter crashes you won't get a 500 error. Keep moving this line down in your script until you find the line which causes it to fall over.

    Eventually you'll finsd the line which is causing the problem, if it is not immeadiatly apprent why its happening post here and let us take a look.

    I also notice that asp style tags are turned off, you are not using these are you. I.e:
    PHP Code:
    <%
    echo(
    'phpcode');
    %> 
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  9. #9

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Re: PHP Scripts not running on web server[URGENT]

    Attached image shows the error message I'm getting. I have turned off friendly error messages in Internet Explorer.

    Thanks.
    Attached Images Attached Images  

  10. #10
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: PHP Scripts not running on web server[URGENT]

    Now you need to find out what is causing it.
    Quote Originally Posted by visualAd
    If it is a 500 error, you will need to find out what part of your script is causing the PHP interpreter to fall over. Pick a script and insert a line as follows:
    Code:
    die('here');
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  11. #11

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Re: PHP Scripts not running on web server[URGENT]

    The issue has been resolved. Basically an include file was redirecting http:// to https:// and those pages who do not include the file were running. I commented out the code and site is up now.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width