Jump to content

Recommended Posts

It maybe related to my other post about outdated value

 

I got myself a server and now it's on Centos 5.11 with Apache 2.2.3, PHP 5.3.3, & MySQL 5.0.95

I put all database inside as well as the web files.

 

And just about the time when I think it's all done I tested and...things are just wrong...

2 web file folders were put to 2 sub directory of var/www/html

1 using mysql_connect and another mysqli_connect

 

The one using mysql_connect can connect just fine, however some list are blank, while the one using mysqli_connect totally can't connect to the database.

Then I cut a pieces of the connection part n put it alone to test the connection, but I get blank page

	$con=mysqli_connect("localhost","username","password","dbname") or die("Error ".mysqli_error($con));

Completely nothing but a blank page is the result of the code.

I wish I can see error page so I can start with the wrong part, but here again...I'm clueless on what's going on

[root@localhost ~]# yum list installed | grep mysql
mysql.x86_64                             5.0.95-5.el5_9                installed
mysql-connector-odbc.x86_64              3.51.26r1127-2.el5            installed
mysql-server.x86_64                      5.0.95-5.el5_9                installed
php53-mysql.x86_64                       5.3.3-26.el5_11               installed
[root@localhost ~]# php -m | grep mysql
mysql
mysqli
pdo_mysql
[root@localhost ~]#

Anyone know the solution or this or had the same problem can shed a light into this ?

 

 

 

Thanks in advance,

Link to comment
https://forums.phpfreaks.com/topic/294232-blank-page/
Share on other sites

Speaking of outdated,

I got myself a server and now it's on Centos 5.11 with Apache 2.2.3, PHP 5.3.3, & MySQL 5.0.95

Upgrade! PHP 5.3 and MySQL 5.0 are years old and no longer supported - latest versions are PHP 5.6 and MySQL 5.6 (which is pure coincidence).

 

Find your php.ini and make sure you have

error_reporting = -1
display_errors = on
set. Then restart Apache.
Link to comment
https://forums.phpfreaks.com/topic/294232-blank-page/#findComment-1504209
Share on other sites

Thanks requinix,

 

Well, now confusion deepen....

I just turn on the display error n either with error_reporting = -1 or the previous value which is E_ALL & ~E_DEPRECATED...both displayed something indeed....

 

It's now displaying my line of code along with the <?php ?> tags

 

Any idea what's missing here ?

 

Regarding that outdated version...well, I tried to investigate the previous outdated value problem...well, there's complication with whole downtime stuffs...but, well...hopefully that's not the case, anyway I just want to give it a hand on trying it myself first with the limited resources available here.

 

BTW, speaking of which...should I get to the latest, should I go with Centos 5 or 6 ?

 

Addition :

[root@localhost etc]# yum list installed | grep "php"
php53-cli.x86_64                         5.3.3-26.el5_11               installed
php53-common.x86_64                      5.3.3-26.el5_11               installed
php53-gd.x86_64                          5.3.3-26.el5_11               installed
php53-mcrypt.x86_64                      5.3.3-1.el5                   installed
php53-mysql.x86_64                       5.3.3-26.el5_11               installed
php53-pdo.x86_64                         5.3.3-26.el5_11               installed
php53-xml.x86_64                         5.3.3-26.el5_11               installed
php53-xmlrpc.x86_64                      5.3.3-26.el5_11               installed

Thanks n regards,

Edited by Levian
Link to comment
https://forums.phpfreaks.com/topic/294232-blank-page/#findComment-1504215
Share on other sites

Go for the latest everything.

 

I don't know CentOS but generally there's a package that serves as the PHP module for Apache. I don't see that in your list. Without it you can't run PHP from Apache (unless you use a different execution method). The package probably has "apache2" and "php53" in the name.

Link to comment
https://forums.phpfreaks.com/topic/294232-blank-page/#findComment-1504219
Share on other sites

yum upgrade

Update everything, then sudo yum install php mysql php-mysql

 

php and mysql should be the more current one.  You'll know before it installs, when it asks you if you would like to continue installing of what is reviewed above the question.

 

If it doesn't say 5.6, then it's an older version, so you may have to search for the package.

Either way, when it's all said an done, either restart apache, php and mysql, or just restart the entire server.

 

I'm by no means a linux expert, but I've picked up bits and pieces along the way, I'm running Centos as well.

Link to comment
https://forums.phpfreaks.com/topic/294232-blank-page/#findComment-1504231
Share on other sites

Thanks for the reply guys,

 

Well, requinix I edited with those php53 lists on grep...

I can't find ones with "apache2" though...

[root@localhost ~]# yum list installed | grep "httpd"
httpd.x86_64                             2.2.3-91.el5.centos           installed
httpd-manual.x86_64                      2.2.3-91.el5.centos           installed
system-config-httpd.noarch               5:1.3.3.3-1.el5               installed
[root@localhost ~]# rpm -qa | grep httpd
httpd-manual-2.2.3-91.el5.centos
httpd-2.2.3-91.el5.centos
system-config-httpd-1.3.3.3-1.el5

Those httpd however should means apache is installed n the page to the var/www/html point out to apache installation.

 

Zane, I'll retry those (I recall I'd upgrade almost everything if not everything, but my mind is quite hazy with the confusion), but isn't 5.11 is a later version compared to 5.6 ? it sounds more of a downgrade than an upgrade for me...but maybe I'll go for 5.10 or something which probably more stable.

 

Well, I'm not asking experts...I'm asking ppl who are willing to help n whoever it is...is very much appreciated.

 

Ok, off with another series of try-to-fix-this, be back to post whatever I find

Link to comment
https://forums.phpfreaks.com/topic/294232-blank-page/#findComment-1504299
Share on other sites

php53-common-5.3.3-26.el5_11.x86_64 from installed has depsolving problems
  --> php53-common conflicts with php-common
Error: php53-common conflicts with php-common
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

Well, that's the result of yum install php...since I have already had php53 in mine as listed above, that's probably why...

 

yum upgrade itself only brings up fribidi n jdk update, those doesn't seem relevant, but anyway here it is

Dependencies Resolved

================================================================================
 Package               Arch      Version                       Repository  Size
================================================================================
Updating:
 fribidi               x86_64    0.19.2-2.el5                  epel        53 k
 java-1.6.0-openjdk    x86_64    1:1.6.0.34-1.13.6.1.el5_11    updates     43 M

Transaction Summary
================================================================================
Install       0 Package(s)
Upgrade       2 Package(s)

So far, it's as if no php runs n browsing the page only gives me line of codes or a list of files n folders..

Link to comment
https://forums.phpfreaks.com/topic/294232-blank-page/#findComment-1504300
Share on other sites

Oh...I thought you were talking about CentOS version...

As the PHP it's stated as 5.3.3

[root@localhost etc]# php -v
PHP 5.3.3 (cli) (built: Oct 31 2014 09:52:36)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Well, I'll try 5.4, could you recommend which repo should I pick the installer from ?

I'd been reading some stuffs about webtatic n ius n stuffs...

Link to comment
https://forums.phpfreaks.com/topic/294232-blank-page/#findComment-1504306
Share on other sites

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.