Webspace & Domain Names This is a discussion on, PHP not executing within the Freedom2Surf forum; I have a trivial php webpage on my f2s-hosted website, called phptest1.php and with content : <html> <body> pre-php text ...

Reply
 
LinkBack Thread Tools
Old 12-05-2009, 07:35 AM   #1
Tiscali User Member
 
Join Date: May 2009
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
PHP not executing

I have a trivial php webpage on my f2s-hosted website, called phptest1.php and with content :

<html>
<body>
pre-php text
<?php echo "message from php" ; ?>
post-php text
</body>
</html>

I execute it from a link from the index.html page on the same site and get a "website cannot display the page" error. A parallel and equivalent htmltest1.html page runs OK.

On my PC I use the WAMP development package & both .php & .html pages run OK on localhost.

I have loaded the WAMP php.ini file to the website but made no changes and still failed to run the .php page.

Do I need to execute/install/initialise/set up php on the website? Or what?

Thanks.
Ares is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-05-2009, 07:26 PM   #2
Former Freedom2Surf Staff
 
Join Date: Sep 2005
Posts: 10
Thanks: 0
Thanked 2 Times in 2 Posts
Re: PHP not executing

Can you post a link to the file/index.html where it links through to the php file?

also can you upload a phpinfo and view it?

<?
phpinfo();
?>

Brian
brian_ex-f2s is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13-05-2009, 04:28 PM   #3
Tiscali User Member
 
Join Date: May 2009
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Re: PHP not executing

Thanks for the response. I'm not entirely sure what you are asking/suggesting. I have stripped the problem down to a minimum. The website is www.rogerkeeling.f2s.com. There are 3 files involved, all held in folder /public_html/. They are:

index.html

<html>
<body>
<br>
<a href="htmltest1.html">htmltest1.html</a><br>
<br>
<a href="phptest1.php">phptest1.php</a>
</body>
</html>


htmltest1.html

<html>
<br>
web page in html
</html>


phptest1.php

<html>
<body>
pre-php text
<br>
<?php echo "message from php" ; ?>
<br>
<?php
phpinfo();
?>
<br>
post-php text
</body>
</html>


I have downloaded a WAMP development package from www.wampserver.com. The 3 files run as expected on my PC through localhost (ie. pages link OK from index and show the expected messages and phpinfo) suggesting that the above scripts are OK. I transfer the files to the website by ftp. Then, the index displays OK as does the linked htmltest1.html page, suggesting the site is broadly wholesome, but the phptest1.php link gives "the website cannot dipslay the page" error. It looks as though there should be some link or cross reference or initialisation process to fire up php pages. Any advice, ideas, examples, documenation appreciated.

Last edited by Ares; 13-05-2009 at 04:44 PM.
Ares is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13-05-2009, 04:46 PM   #4
freedom2surf Staff
 
Antonio_f2s's Avatar
 
Join Date: May 2008
Posts: 449
Thanks: 3
Thanked 65 Times in 53 Posts
Re: PHP not executing

Brian was asking you if you are able to upload a phpinfo to your webspace and view it...

If you would like me to have a look please PM me the password for your FTP folder...
__________________
Antonio

http://www.freedom2surf.net
Antonio_f2s is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13-05-2009, 05:19 PM   #5
Tiscali User Member
 
Join Date: May 2009
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Re: PHP not executing

Replied to Antonio with thanks.
Ares is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13-05-2009, 06:45 PM   #6
Former Freedom2Surf Staff
 
Join Date: Sep 2005
Posts: 10
Thanks: 0
Thanked 2 Times in 2 Posts
Re: PHP not executing

Without being able to look at your webspace, the link for the file htmltest1.html is

http://www.rogerkeeling.f2s.com/htmltest1.html

However, the php file links to:

http://www.rogerkeeling.f2s.com/publ...l/phptest1.php

normally your link does not need to include the public_html part so should be:

http://www.rogerkeeling.f2s.com/phptest1.php

There is more to it though as browsing to the above does not work either so it may be a permissions problem. From my previous post, can you upload a file called info.php with the below code in it:

<?
phpinfo();
?>

put this into public_html then browse to:

http://www.rogerkeeling.f2s.com/info.php
brian_ex-f2s is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13-05-2009, 10:56 PM   #7
Site Founder
 
Justin's Avatar
 
Join Date: May 2002
Posts: 4,355
Thanks: 4
Thanked 4 Times in 4 Posts
Re: PHP not executing

If I browse that page I get

Internal Server Error
Directory "/websites/LinuxPackage04/ro/ge/rk/rogerkeeling.f2s.com/public_html" is writeable by others suPHP 0.6.3


Looks like Tiscali are using suPHP on their servers, which is not something I've really seen on an ISP's servers before.

The beauty of the old F2S Email and Web platforms pre pipex takeover was they were so simple and did their job well. They were changed and despite numerous rehashes at trying to fixing them they've never hit the heights since.
__________________
Justin
Tiscali User
Justin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 14-05-2009, 06:04 AM   #8
Former Freedom2Surf Staff
 
Join Date: Sep 2005
Posts: 10
Thanks: 0
Thanked 2 Times in 2 Posts
Re: PHP not executing

It should work fine then as that appears to be a permissions problem. I think the permissions for the file should be set to 644 or rw r r.

The old servers were not very reliable and so were changed to the 123-reg/webfusion servers after the pipex take over, reliability of this platform is certainly far better.
brian_ex-f2s is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to brian_ex-f2s For This Useful Post:
Ares (14-05-2009)
Old 14-05-2009, 09:35 AM   #9
freedom2surf Staff
 
Antonio_f2s's Avatar
 
Join Date: May 2008
Posts: 449
Thanks: 3
Thanked 65 Times in 53 Posts
Re: PHP not executing

Def a permissions issue.... I changed the permissions for the folder and edited your index file (hope you didnt mind ) to correct the link and it is working OK now...
__________________
Antonio

http://www.freedom2surf.net
Antonio_f2s is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to Antonio_f2s For This Useful Post:
Ares (14-05-2009)
Old 14-05-2009, 09:39 AM   #10
Site Founder
 
Justin's Avatar
 
Join Date: May 2002
Posts: 4,355
Thanks: 4
Thanked 4 Times in 4 Posts
Re: PHP not executing

People keep telling me that the numerous migrations improved things. Indeed there were reliability problems with the old platforms. However these were only post Pipex takeover.

The email system is a good case in point. Stuart came on here saying there was hardware and memory problems with the servers, some years ago now, however the somewhat ironic thing is that after these problems had been 'fixed' with a number of new platforms, the service performed far worse then the old, so called broken platform was.

I'm sure if you look around you can see various issues with hugely delayed mail (Up to a month) as soon as postfix came on stream - these were completely unheard of with the old platform, despite it's so called flaws, it was a hell of a lot better at handling and processing email.

Not really suprising though, after the amount of staff that lost their jobs. who built this once fine ISP up.
__________________
Justin
Tiscali User
Justin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 14-05-2009, 01:00 PM   #11
Tiscali User Member
 
Join Date: May 2009
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Re: PHP not executing

Thanks to all respondents. Website is now working. Your help has come faster than I could react to it. These "not working at all" problems reach the hair-tearing level on the beaufort frustration scale so I am particularly grateful. Thanks, not just for advising the solution of setting permissions but implementing it too.
Ares is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 14-05-2009, 07:56 PM   #12
Former Freedom2Surf Staff
 
Join Date: Sep 2005
Posts: 10
Thanks: 0
Thanked 2 Times in 2 Posts
Re: PHP not executing

[QUOTE=Justin;95730]People keep telling me that the numerous migrations improved things. Indeed there were reliability problems with the old platforms. However these were only post Pipex takeover.


I was mearly on about the web platform. The old servers used to hang quite alot mainly due to bad scripts killing the servers.

The email platform was pretty good with just the odd incident of delays until it then got changed after the pipex take over and we all know what headaches that caused.
brian_ex-f2s is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 20-05-2009, 12:02 PM   #13
Site Founder
 
Justin's Avatar
 
Join Date: May 2002
Posts: 4,355
Thanks: 4
Thanked 4 Times in 4 Posts
Re: PHP not executing

Quote:
Originally Posted by brian_ex-f2s View Post
I was mearly on about the web platform. The old servers used to hang quite alot mainly due to bad scripts killing the servers.

The email platform was pretty good with just the odd incident of delays until it then got changed after the pipex take over and we all know what headaches that caused.
Admittley there were a few issues with scripts hanging the old servers, although I very rarely saw any problems because of this as they normally were fixed with a reason.txt file in FTP for the suspended owners website and were suspended quite quickly.

However Pipex were letting people run amock on these servers about 6 months after tha takeover, with absloutely no apparant monitoring, and allowing people to use ridicolous amounts of bandwidth, take a look at the thread below. No wonder the servers were hanging when abusers were not being dealt with. If someone can use 1TB of data in a day something is plainly wrong.

http://www.tiscaliuser.net/forums/we...-problems.html

As for the email platform I had 5-6 members of the family using it because it was the fastest email platform I'd ever used. Now I don't use it myself, as it's full of spam, prone to delays on both incoming and outgoing, sometimes plain does not work, and webmail is in dire need of updating and is now not exactly useful for on the move. The combined fact that the benefits of IMAP are all but gone when the thing doesn't work right means there is no way I can trust it, so I finally bit the bullet and got my own domain.
Attached Thumbnails
php-not-executing-may_hits.jpg  
__________________
Justin
Tiscali User
Justin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP versions php4ever Webspace & Domain Names 4 31-12-2009 07:52 PM
New server: PHP or FP extensions NOT BOTH kcider Webspace & Domain Names 5 09-02-2007 09:37 AM
PHP security problems oldi Webspace & Domain Names 0 01-11-2005 10:52 PM
Creating dirs with PHP or Perl scripts... Noiz Webspace & Domain Names 5 28-07-2005 11:54 AM
PHP sessions problem Tom_H Webspace & Domain Names 5 05-11-2004 11:12 AM


All times are GMT. The time now is 07:26 PM.