The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not able to run PHP file in preview mode without DNS

Discussion in 'General Discussion' started by Neeraj Kumar, Sep 25, 2016.

Tags:
  1. Neeraj Kumar

    Neeraj Kumar Registered

    Joined:
    Sep 24, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Deoghar
    cPanel Access Level:
    Root Administrator
    Hi friends,

    I have setup a new VPS and installed cpanel. Everything works fine but when i wanted to test PHP file on my server before transffering all the files on this VPS I have got error message
    "Not supported" on prevew mode e.g. 22.22.22.22/~username/test.php.

    How to excute php file on my server in preview mode. I want to check everyting in website preview mode before moving all the files on this new VPS. I have not updated DNS with this new IP. I want to make sure everything works fine before final moving to this server.

    Can you guys help me in this regards please. Thanks in advance.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    The "Not Supported" message will occur when using the "CGI" handler with Apache Mod_Userdir. You will need to use another handler (e.g. suphp) if you want to utilize Apache Mod_Userdir. Documentation on selecting PHP handlers with EasyApache 4 is available at:

    Manage PHP Handlers in EasyApache 4 - EasyApache 4 - cPanel Documentation

    In addition, you could also temporarily update the hosts file on your workstation to force the website to resolve to the server's IP address:

    hosts (file) - Wikipedia, the free encyclopedia

    Thank you.
     
Loading...

Share This Page