ruyho Posted February 4, 2010 Share Posted February 4, 2010 Hi all, A newbie with php and is stuck with this problem: I have 2 domain names say www.example.com www.sample.com these domain is pointing to a subdirectory from my hosting www.example.com => www.example.com/dir1 www.sample.com => www.example.com/dir2 Now i just have a simple php script to run phpinfo(), it works under www.example.com but i get a 500 error when running the same script under www.sample.com Do i need to setup some path variable here? Many thanks Ruy Quote Link to comment https://forums.phpfreaks.com/topic/190868-php-script-not-working-under-different-paths/ Share on other sites More sharing options...
WolfRage Posted February 4, 2010 Share Posted February 4, 2010 Do you have a .htaccess file in that second directory. Usually a 500 is caused by a misconfigured .htaccess file. Make sure you can see hidden files on the server because it will only show up if hidden files are viewable. Quote Link to comment https://forums.phpfreaks.com/topic/190868-php-script-not-working-under-different-paths/#findComment-1006621 Share on other sites More sharing options...
ruyho Posted February 5, 2010 Author Share Posted February 5, 2010 Thanks for your reply WolfRage I have no .htaccess file in my root directory, checked no hidden files anywhere. The problem was fixed by the tech support guy changed my directories to permission 755. Just trying to learn from this, since I have no idea how that would have fixed the issue. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/190868-php-script-not-working-under-different-paths/#findComment-1007215 Share on other sites More sharing options...
wildteen88 Posted February 5, 2010 Share Posted February 5, 2010 You're better of looking at your sites error log. 500 Internal Server Error messages can be caused by anything, looking at your sites (aka apache's) error log it will show the actual error. Quote Link to comment https://forums.phpfreaks.com/topic/190868-php-script-not-working-under-different-paths/#findComment-1007573 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.