tomssupra Posted January 5, 2010 Share Posted January 5, 2010 Hi, Bit of a long shot but I was hoping someone may be able to point me in the right direction with this possible PHP config issue - the situation is: Domain name http://www.example.com purchased with 1and1 Linux Webspace purchased with GoDaddy I've setup DNS on http://www.example.com to point to my static IP'd webspace and typing http://www.example.com gives me a standard "ok" php response. The issue is, I can't actually run any PHP scripts when using http://www.example.com - I've tested it works with the godaddy address (which should be the same as far as i'm concerned?) - I seem to recall PHP only allows access from the default domain and needs to be told about other domains, is this right? Thanks in advance, Tom Quote Link to comment Share on other sites More sharing options...
SupraShaun Posted January 5, 2010 Share Posted January 5, 2010 Are you using full php tags i.e <?php rather than short tags . Short tags have to be enabled in the php.ini (if this is the problem). Also check the server error logs to see what they have to say about it all Just re read this, so you can execute php code when viewing the site on the godaddy temporary domain but not when viewing on http://www.example.com? Have you tried just uploading a test .htm file (just with html within it) to see if you get the same result when viewing on the different url's? Quote Link to comment Share on other sites More sharing options...
tomssupra Posted January 5, 2010 Author Share Posted January 5, 2010 Thanks Shaun, yeah, I tested with an index.htm to rule it out... nothing though - i've just checked the logs I have access to, it only shows the hits and the browser info - nothing about errors etc. Are the short tags for the root php.ini? Here is what I have in that: register_globals = off allow_url_fopen = off expose_php = Off max_input_time = 60 variables_order = "EGPCS" extension_dir = ./ upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" [Zend] zend_extension=/usr/local/zo/ZendExtensionManager.so zend_extension=/usr/local/zo/4_3/ZendOptimizer.so Many Thanks, Quote Link to comment Share on other sites More sharing options...
DamanC Posted January 5, 2010 Share Posted January 5, 2010 Silly question but is your static IP'd webspace actally running PHP? Quote Link to comment Share on other sites More sharing options...
SupraShaun Posted January 5, 2010 Share Posted January 5, 2010 So when you uploaded your test.htm you could view it on the temporary domain but not on http://www.example.com ? Quote Link to comment Share on other sites More sharing options...
tomssupra Posted January 5, 2010 Author Share Posted January 5, 2010 yep, exactly - works from default domain but not example - I get: "Not Found The requested URL /index.htm was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request." possibly a permission issue? - am I correct in assuming that setting the DNS for example.com to the default domain effectively makes them going to the same place? I’ve got a test OpenCart on there – I’ve install this many times so I know it should work… Thanks again Quote Link to comment Share on other sites More sharing options...
SupraShaun Posted January 5, 2010 Share Posted January 5, 2010 It will go to the same server, but not necessarily the same place (if that makes sense). What you would normally need to do is add a virtual host to you Apache httpd.conf file so that Apache knows what to do when it receives a request from that domain. But as your on shared hosting things will be slightly different. Do you have an option to "Add a domain" or similar in your control panel? Quote Link to comment Share on other sites More sharing options...
tomssupra Posted January 5, 2010 Author Share Posted January 5, 2010 hmm interesting... I always thought the "Add Domain" meant to purchase another one and add it on the same account... but it doesn't seem to have done that - i've added example.com under the default and it seems to be processing it now... I'll let you know - Thank you Quote Link to comment Share on other sites More sharing options...
tomssupra Posted January 6, 2010 Author Share Posted January 6, 2010 IT WORKS!!! Thanks a lot Shaun, you saved me loads of work... Quote Link to comment Share on other sites More sharing options...
johnny g Posted January 6, 2010 Share Posted January 6, 2010 Sounds like you're using cPanel on your host. There's a good bit of information here on using it - there's a few neat things it can do. Quote Link to comment Share on other sites More sharing options...
DamanC Posted January 6, 2010 Share Posted January 6, 2010 "Parked Domains" Quote Link to comment Share on other sites More sharing options...
SupraShaun Posted January 6, 2010 Share Posted January 6, 2010 IT WORKS!!! Thanks a lot Shaun, you saved me loads of work... No worries Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.