Jump to content

Recommended Posts

Hello to everybody.

 

I will try to explain my problem as precise as possible. But I cannot explain it to myself. I'll try. Maybe one of you had a similar problem and can show me the way to solving it.

 

I have developed a small CRM application.

Users are able to log-in. There is a session generated which contains a user_name and a user_id.

 

Queries in the MySQL database consist of SELECT, INSERT, UPDATE, DELETE.

I open the connection to the db at the beginning of every file and close it (even if not necessary) at the end of every file.

 

Nothing special so far.

 

I am using a little bit of javascript in order to open new windows and after saving form data in these windows closing them and simultaneously refresh the referral page.

 

Of course there are some variables that are passed over by hidden-fields in forms or by attaching them to links.

 

That is pretty much all.

 

Some users complain that they are from time to time being "thrown out of" the system on sending a form. They get a browser message "Website cannot be displayed" or the next page stays blank.

Additionally sometimes they have problems accessing this website/application after a "crash" for about 20 minutes.

 

I do not know what is going on since I do not have these problems.

Max execution time is standard 30 seconds which should be enough since the sql queries are not really complicated.

 

I am testing on a new server. no changes.

Server specs:

PHP 4.4.2

Linux

MySQL 4.0.24

 

Is there anybody who experienced a similar problem. What can I check?

 

I do not have these problems.

If there is a php programming mistake wouldn't the same problems occur on any computer and for any user???

What might cause the "Page cannot be displayed / blank page" error?

Sessions? SQL queries? db connection? javascript?

 

Many thanks

 

Tom

Link to comment
https://forums.phpfreaks.com/topic/85327-page-cannot-be-displayed-blank-page/
Share on other sites

Unfortunately not.

The website is hosted with a service provider.

Thus I do not have many possibilities to check log files etc.

 

Furthermore since it is a CRM application the data it contains is pretty much confidential customer data.

 

So I know that my question is very theoretic.

But maybe somebody can give me a hint into the right direction.

Hi,

 

  With the problems you have mentioned i have listed down some of the possible things below... can you have a look at it.. Iam not sure about the message "Website cannot be displayed"....

1. Whether we are checking the session in each and every page. If session expires where we are redirecting the link to.. Also check whether the session is maintained correctly.

 

2. Check whether there is any loop running for a  long time in the file (after the user submits the form).

 

3. Check the file name where the values are submitted, when the user submits the form .. (since it's a Linux Server file name will be case sensitive)...

 

4. Whether you have access to FTP .. We can create our own error log directory and change it using ini_set() into the specified path .... Then we can see if there is any error listed in the log...

Hi.

 

Thanks for the input.

 

To your proposals:

 

1. At the top of each page I am checking the session with

 

if(!isset($_SESSION['user_id'])) {
header("Location: login.php");
exit;
}

 

And in the login.php I check the other way round

 

if(isset($_SESSION['user_id'])) {
header("Location: index.php");
exit;
}

 

2. I will check that. thanks.

 

3. in forms I always use action="<? echo $PHP_SELF ?>". so i do not write the filenames myself.

 

4. sounds good. right now i do not know exactly how to do that. but i will figure out.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.