Accounts didnt transfer correctly

Started by manvbf, 10-09-2011, 02:51:33

Previous topic - Next topic

manvbfTopic starter

I acquired a hosting company from a friend, and I've been spending today moving their accounts onto a new server.

Well, the php on some of the accounts will not work. When you access a php extention, you're prompted to download a file.

Its not like this for all the accounts, just a few.

Does anyone know how I can fix this?
  •  


electra

Did you tried to upgrade PHP, it may fix the issue..
Reliable hosting? try HOSTGATOR and WEBHOSTINGHUB.
  •  


hostaddonltd

check the versions of php on both the servers check whether necessary handlers present in .htaccess
Host Addon Ltd [nofollow] | Premium Hosting Services | Dedicated Servers | Reseller Hosting
Free Server Monitoring Service [nofollow]
  •  

PlotHost

#3
The behavior you described, where accessing a PHP file prompts a download, typically occurs when PHP is not properly installed or configured to work with the web server.

Here are a few steps you can take to troubleshoot and potentially resolve the issue:

1. Verify PHP installation: Make sure PHP is installed correctly on the new server. Check if the necessary PHP packages are installed and that the version is compatible with the websites you are hosting. You may also need to ensure that the PHP module is enabled in your web server configuration.

2. Check PHP settings: Review the PHP configuration file (php.ini) and verify that it has the correct settings. Pay close attention to the "mime-types" section, as incorrect settings here could cause PHP files to be downloaded instead of executed by the server.

3. Restart web server: After making any changes to the PHP configuration, restart your web server to apply the changes. This will ensure that the updated PHP settings take effect.

4. Verify file extensions: Double-check that the file extensions of your PHP files are correct. PHP files should have the ".php" extension. If you find any inconsistencies, update the file extensions accordingly.

5. Test with a simple PHP script: Create a simple "hello world" PHP script and place it on the affected accounts. Then try accessing it to see if it executes properly. If it does, the issue might be specific to certain PHP files or configurations within those accounts.

6. Check file permissions: Ensure that the PHP files have the correct file permissions set. They should typically have read and execute permissions for the web server user. Incorrect permissions can prevent PHP from executing properly.

7. Review error logs: Check the error logs of your web server and PHP for any relevant error messages. They can provide valuable information on what might be causing the issue. Look for any specific error codes or error messages that could guide you towards a solution.

8. Test PHP functionality: Create a PHP test script that checks the features and functionalities that are not working on the affected accounts. This could include functions like database connections, file manipulation, or other specific PHP features. By isolating the problem, you can identify if it's related to a particular module or configuration.

9. Compare account configurations: Compare the account configurations between the accounts that work correctly and those that don't. Look for differences in the web server configuration, PHP version, or any custom settings that could affect PHP execution. Identifying any discrepancies can help pinpoint the source of the issue.

10. Seek professional assistance: If you've exhausted all troubleshooting options and are still unable to resolve the problem, consider reaching out to a professional system administrator or developer who specializes in hosting environments. They may have more advanced tools and knowledge to diagnose and fix the issue.

11. Check for conflicting directives: Review the configuration files of your web server (e.g., Apache's httpd.conf) and ensure there are no conflicting directives or misconfigurations that could affect PHP execution. Pay attention to any lines that specifically handle PHP or MIME types.

12. Test different PHP versions: If possible, try switching to a different version of PHP to see if that resolves the issue. Some PHP extensions or code may be incompatible with certain PHP versions. You can typically switch PHP versions through your hosting control panel or by modifying the server's PHP configuration.

13. Disable security plugins or settings: If you have any security plugins or settings in place (such as mod_security or SELinux), temporarily disable them to see if they are causing conflicts with PHP execution. Remember to re-enable them afterward to maintain server security.

14. Check for missing PHP dependencies: Ensure that all required PHP dependencies and extensions are installed on the new server. Some PHP scripts may require specific extensions or libraries to function correctly. Verify that these dependencies are properly installed and enabled.

15. Enable error reporting: In your PHP configuration file, set the error_reporting directive to display all errors and warnings. This can help you identify any specific errors that are preventing PHP scripts from executing correctly. Remember to turn off error reporting once the issue is resolved to prevent sensitive information from being displayed.

16. Reinstall PHP: If none of the above steps yield any results, consider reinstalling PHP on the new server. This can help ensure a clean installation and resolve any potential issues with the PHP installation or configuration files.

17. Check for conflicting .htaccess files: Make sure there are no conflicting or misconfigured .htaccess files in the affected accounts. These files can override server settings and cause issues with PHP execution. Review the .htaccess files in the root directory and any subdirectories of the affected accounts.

18. Test on a different web browser: Try accessing the PHP files on a different web browser or device to see if the issue persists. Sometimes, browser-specific configurations or caching can cause problems with PHP execution. Clearing the cache or using a different browser can help identify if it's a browser-related issue.

19. Test on a different server: If possible, try moving the affected accounts to a different server to see if the issue persists. This can help determine if the problem is specific to the server environment or if it's related to the account configuration or code.

20. Enable PHP error logging: Enable PHP error logging by adjusting the log_errors and error_log directives in your php.ini file. This will generate an error log that can provide more detailed information about any errors occurring during PHP execution. Review the error log to help pinpoint the cause of the problem.

21. Test with a fresh PHP file: Create a fresh PHP file with minimal code and place it in the affected accounts. Test if this simple PHP file executes without any issues. If it works as expected, gradually add back code from the original PHP files until you identify the specific code snippet causing the problem. This can help isolate and fix the issue within the problematic PHP files.

22. Consult with hosting support: If you've tried all the above steps and are still unable to resolve the issue, consider reaching out to your hosting provider's support team. They have access to server logs and can provide specific guidance based on their knowledge of the hosting environment.
PlotHost.com - Cheap Hosting [nofollow]
99.9% uptime | 15 days money back | 24/7 support
  •