son Posted February 8, 2011 Share Posted February 8, 2011 Hi there,I have uploaded a php file to a live website and get the message:The requested URL /cgi-bin/php/index.php was not found on this server.It is clearly in the root directory and checking on my local machine it is working with Apache. What else could I check?Thanks,Son Link to comment Share on other sites More sharing options...
thescientist Posted February 8, 2011 Share Posted February 8, 2011 did you mean to put it in the webroot? i.e. htdocs? Link to comment Share on other sites More sharing options...
Synook Posted February 8, 2011 Share Posted February 8, 2011 Well, if it's in the document root, then it wouldn't be found in /cgi-bin/php/... Link to comment Share on other sites More sharing options...
son Posted February 10, 2011 Author Share Posted February 10, 2011 Well, if it's in the document root, then it wouldn't be found in /cgi-bin/php/...I uploaded it to main directory of website and access it via www.domain.co.uk/nameOfFile.php. I do not understand the error message "The requested URL /cgi-bin/php/nameOfFile.php was not found on this server" myself as this is not the location I requested the file from. ALso, I placed the same file in htm version on remote server. This one can be accessed without any issues and I clearly see they are both next to each other in my ftp client on remote site; the issue is with this php file... Does this make any sense?Son Link to comment Share on other sites More sharing options...
justsomeguy Posted February 10, 2011 Share Posted February 10, 2011 Move the file to the path in the cgi folder where it's telling you it's looking. Link to comment Share on other sites More sharing options...
son Posted February 14, 2011 Author Share Posted February 14, 2011 Move the file to the path in the cgi folder where it's telling you it's looking.Moving it into/cgi-bin/php/or/cgi-bin/bring now the error:The requested URL /test.php was not found on this server.son Link to comment Share on other sites More sharing options...
son Posted February 14, 2011 Author Share Posted February 14, 2011 I tried now all sorts of things, but think it must have something to do with php setup for this particular domain and I might have to call customer services... There are 5 domain names listed with same hosting, all other ones work and only this one does not which makes it even more strange...Son Link to comment Share on other sites More sharing options...
dsonesuk Posted February 14, 2011 Share Posted February 14, 2011 are you using an include or require_once, to access a external file, and forgot to create the folder these files are located in, and/or these particular files? Link to comment Share on other sites More sharing options...
son Posted February 14, 2011 Author Share Posted February 14, 2011 are you using an include or require_once, to access a external file, and forgot to create the folder these files are located in, and/or these particular files?This should work as I copied the whole site over to testing server (with relative links intacts) and all works well... In addition, I uploaded a php file to simply echo "test" and come across the same issue... Why could that be?Son Link to comment Share on other sites More sharing options...
dsonesuk Posted February 14, 2011 Share Posted February 14, 2011 change extension to .php5, and try it Link to comment Share on other sites More sharing options...
son Posted February 14, 2011 Author Share Posted February 14, 2011 change extension to .php5, and try itIt shows now<?phpecho "test";?>on page (not source code)...Son Link to comment Share on other sites More sharing options...
justsomeguy Posted February 14, 2011 Share Posted February 14, 2011 Have you looked for a FAQ or something about this on your host's website? I really doubt they're going to set up their server in a strange way and then not tell you how to run PHP on the server. Link to comment Share on other sites More sharing options...
son Posted February 14, 2011 Author Share Posted February 14, 2011 Have you looked for a FAQ or something about this on your host's website? I really doubt they're going to set up their server in a strange way and then not tell you how to run PHP on the server.We run php fine with all other domains (same host, same hosting deal). When you connect to live server you have all domains aswww.domain.co.uklisted and simply have to put it into right one.PHP works well on all other than this one...Son Link to comment Share on other sites More sharing options...
dsonesuk Posted February 14, 2011 Share Posted February 14, 2011 well it definitely found it, it just did not process it. can you check the version you are using by checking phpinfo() Link to comment Share on other sites More sharing options...
son Posted February 15, 2011 Author Share Posted February 15, 2011 well it definitely found it, it just did not process it. can you check the version you are using by checking phpinfo()Cannot run phpinfo as it brings the same problem, either it does not find it or when using .php5 it simply prints the function...Son Link to comment Share on other sites More sharing options...
justsomeguy Posted February 15, 2011 Share Posted February 15, 2011 PHP works well on all other than this one...Doesn't that sound like a great reason to ask the host? Link to comment Share on other sites More sharing options...
son Posted February 15, 2011 Author Share Posted February 15, 2011 Doesn't that sound like a great reason to ask the host?I spoke to host today and found that they had an error in config file. The websites were taken over from a smaller host company some time ago and when this happened apparently they made a mistake in the transfer; something to do with a script alias. Not entirely sure what they exactly meant as they were rather short, but seems to work now ok...Many thanks,Son Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.