Welcome! Log In Create A New Profile

Advanced

Blank Browser Page

Posted by Zolani Zono 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Blank Browser Page
January 29, 2013 11:14PM
Good day to all,

I am supplementing this module, and I added some changes and improved my web side but now its giving me problems when I'm uploading it into the server, pages that have HTML code only work well but those that have php code in them do not display any thing in the browse and the php code doesn`t process that data into the MySql database. Mind you on my PC it is working well.

What could be the problem? any help is appreciated.

Thank You
avatar Re: Blank Browser Page
January 29, 2013 11:21PM
Hi

Does the hosting package you use support php?

----------------------------------------------------------------------------------------

int get_random_number() {
return 4;
}
Re: Blank Browser Page
January 30, 2013 01:14AM
Yep, it is the freeoda free web hosing area, and last year it uploaded everything successfully.
I even tried removing very html code from those php pages but the same thing is happening every day.
avatar Re: Blank Browser Page
January 30, 2013 09:06AM
Check that your code is between the php tags:
Language: PHP
<?php //your code here ?>

Is the file saved as a .php file, like index.php? The code won't work in a .html or a .txt. You can add html to php files:
Language: PHP
<!DOCTYPE html> <html> <head> <title>Some page</title> </head> <body> <?php //you can add the code like this $name = "Bob"; echo "Hello world, my name is ".$name; ?> </body> </html>

----------------------------------------------------------------------------------------

int get_random_number() {
return 4;
}
Re: Blank Browser Page
January 30, 2013 10:24PM
Yebo, its within the php tags and it is saved as .php... and also it works with only the code within the php tags without any HTML code around on my PC.
avatar Re: Blank Browser Page
January 30, 2013 10:49PM
Try adding just this file with the code to you web-root and see if the php executes.

file name: index.php
Language: PHP
<?php phpinfo(); ?>
If this doesn't work you need to get another host or open a ticket and ask them to see why your php is not being executed. If it does echo it means the problem lies in you code and we'll have to dig a bit deeper. smiling smiley

----------------------------------------------------------------------------------------

int get_random_number() {
return 4;
}
avatar Re: Blank Browser Page
January 31, 2013 10:11AM
I asked around. You can also check to see if the file has execution rights on the server. Someone else's idea, but you can check.

C H Pelser
NDINL
Re: Blank Browser Page
February 03, 2013 03:32PM
@ Acidface21 if it doesn't have any execution rights what can i do?

@ 49940236 - PetrusPJ, also phpinfo(); doesn't display anything, I created a page with only

<?php
phpinfo();
?>

and uploaded it and still it displays nothing..... confused smiley angry smiley confused smiley
avatar Re: Blank Browser Page
February 03, 2013 09:41PM
You can give the file execution rights by going to the file manager section, select the file you want to edit and select Chmod. In Chmod you'll be able to add the execution rights.

----------------------------------------------------------------------------------------

int get_random_number() {
return 4;
}
avatar Re: Blank Browser Page
February 04, 2013 06:20PM
If the basic php file did not display and the file execution rights did not solve the problem, then I think you must contact the admins of the site you are using. They might be the best to answer and help if the php does not execute. You of course did contact them as well, right? What was their reply? As well you did check that you followed the steps for the creation of the site to the letter, right?
Sorry, only registered users may post in this forum.

Click here to login