INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

PHP conneting to MySQL give blank page on OpenSuSE 13.2 with MariaDB 10.0.20

PHP conneting to MySQL give blank page on OpenSuSE 13.2 with MariaDB 10.0.20

PHP conneting to MySQL give blank page on OpenSuSE 13.2 with MariaDB 10.0.20

(OP)
Hi all
I read many questions ans answers to this problem but nothing solve my.
First let me say that this code is running fine on our ASP. Only on my Test Box its resulting in a blank page
All Components (Apache2, PHP 5.6.1 and MariaDB 10.0.20) working fine. I can retrieve Data with phpMyAdmin or connect with user / passwd from config files
direct in mysql

We have two different filesets.
1.) which is also working is that the php-file calls a required variables.php which build the connectstring and do the connect to db.
2.) which is not working is that another php-file loads a php in subdirectory which retrieve the variables for connect from config.php from the root dir and prepare the connect which is used in many other scripts.

My question is now what I have to configure in php or apache to get it running on my SuSE Linux Box.
generally it will work - this is shown in case 1 But 95% is in case 2 and all is running at our ASP.

variablen.php

CODE -->

<?php
$db_server = "localhost";
$db_user = "db_user";
$db_pass = "db_pass";
$db_name = "db_name";

$db_connection = mysql_connect($db_server, $db_user, $db_pass);
$selected_db = mysql_select_db($db_name, $db_connection); 

CODE -->

<?php
$db_server = "localhost";
$db_user = "db_user";
$db_pass = "db_pass";
$db_name = "db_name"; 

where can I look ? In error_log of apache is nothing reported.
thanks in advance
appi

RE: PHP conneting to MySQL give blank page on OpenSuSE 13.2 with MariaDB 10.0.20

Turn on Error Reporting for PHP, so instead of a white screen you get an explanatory error message.

At the top of your main PHP script:

CODE

error_reporting(E_ALL);
ini_set('display_errors', 1); 

When developing you should set this in PHP.ini so its always on, and can catch fatal errors as well. The above code will only show non fatal errors. Since any fatal errors would prevent the code from being run.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech

RE: PHP conneting to MySQL give blank page on OpenSuSE 13.2 with MariaDB 10.0.20

(OP)
thanks vacunita

yes i have tried this. But same situation.
Only change was that I get the message "Deprecated mysql_connect()" but only if I cjange to use the variablen.php also in main scriptset.

This I switched off with error_reporting(E_ALL, ^E_DEPRECATED); - but than again blank page

@Chris - you are right, I have seen too late that my last reading was in MySQL, so better I have to post it in PHP I guess

appi

RE: PHP conneting to MySQL give blank page on OpenSuSE 13.2 with MariaDB 10.0.20

(OP)
I will do the follow up now in PHP Forum because I have figured out that the Connect via Script works fine
The question is regarding differences between the working way of PHP 5.4.42 and 5.6.1 and mysql 5.1.73 and mariaDB 10.0.20

But I guess its more in the PHP site

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close