Solved a little problem php and mysql

I am Arabic, sorry for my English I try make it good :D

Everything was working 100%
I use code poweroff in ssh and then if i open my website (php and mysql) it just open white page (it is working before i turning the server off). If I add PHP like index.php it work normal but without any contact with the database
and MySQL work normal I can login everything is normal
I reinstall mysql55-server, php55 and php55-extensions nothing change

1-last think before turning the server off only I remove phpMyAdmin from /usr/local/www
2-i use webmin to update pkg every day maybe i turning off when he is doing a update for some pkg

this is the content in httpd-error.log maybe help :(

Code:
[Mon Dec 05 21:53:15.254574 2016] [mpm_prefork:notice] [pid 1114] AH00169: caught SIGTERM, shutting down
[Mon Dec 05 21:54:31.009746 2016] [:notice] [pid 778] ModSecurity for Apache/2.9.1 (http://www.modsecurity.org/) configured.
[Mon Dec 05 21:54:31.021597 2016] [:notice] [pid 778] ModSecurity: APR compiled version="1.5.2"; loaded version="1.5.2"
[Mon Dec 05 21:54:31.021611 2016] [:notice] [pid 778] ModSecurity: PCRE compiled version="8.39 "; loaded version="8.39 2016-06-14"
[Mon Dec 05 21:54:31.034136 2016] [:notice] [pid 778] ModSecurity: YAJL compiled version="2.1.0"
[Mon Dec 05 21:54:31.034144 2016] [:notice] [pid 778] ModSecurity: LIBXML compiled version="2.9.4"
[Mon Dec 05 21:54:31.034151 2016] [:notice] [pid 778] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Mon Dec 05 21:54:38.032667 2016] [mpm_prefork:notice] [pid 779] AH00163: Apache/2.4.23 (FreeBSD) PHP/5.5.38 configured -- resuming normal operations
[Mon Dec 05 21:54:38.032734 2016] [core:notice] [pid 779] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Mon Dec 05 21:56:00.380046 2016] [:error] [pid 794] [client 213.6.0.41:50843] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/www/apache24/data/www.example.com/inc/daten.inc.php on line 5
[Mon Dec 05 21:56:00.424085 2016] [:error] [pid 794] [client 213.6.0.41:50843] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 79
[Mon Dec 05 21:56:00.424218 2016] [:error] [pid 794] [client 213.6.0.41:50843] PHP Warning:  fopen([WEB]SQL_Injection.txt): failed to open stream: Permission denied in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 81
[Mon Dec 05 21:56:00.425962 2016] [:error] [pid 794] [client 213.6.0.41:50843] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 136
[Mon Dec 05 21:56:00.425984 2016] [:error] [pid 794] [client 213.6.0.41:50843] PHP Fatal error:  Call to undefined function mysql_connect() in /usr/local/www/apache24/data/www.example.com/index.php on line 16
[Mon Dec 05 21:56:13.722705 2016] [:error] [pid 793] [client 213.6.0.41:50855] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/www/apache24/data/www.example.com/inc/daten.inc.php on line 5
[Mon Dec 05 21:56:13.723048 2016] [:error] [pid 793] [client 213.6.0.41:50855] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 79
[Mon Dec 05 21:56:13.723116 2016] [:error] [pid 793] [client 213.6.0.41:50855] PHP Warning:  fopen([WEB]SQL_Injection.txt): failed to open stream: Permission denied in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 81
[Mon Dec 05 21:56:13.723198 2016] [:error] [pid 793] [client 213.6.0.41:50855] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 136
[Mon Dec 05 21:56:13.723209 2016] [:error] [pid 793] [client 213.6.0.41:50855] PHP Fatal error:  Call to undefined function mysql_connect() in /usr/local/www/apache24/data/www.example.com/index.php on line 16
[Mon Dec 05 21:56:15.989114 2016] [:error] [pid 794] [client 213.6.0.41:50862] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/www/apache24/data/www.example.com/inc/daten.inc.php on line 5
[Mon Dec 05 21:56:15.989283 2016] [:error] [pid 794] [client 213.6.0.41:50862] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 79
[Mon Dec 05 21:56:15.989340 2016] [:error] [pid 794] [client 213.6.0.41:50862] PHP Warning:  fopen([WEB]SQL_Injection.txt): failed to open stream: Permission denied in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 81
[Mon Dec 05 21:56:15.989396 2016] [:error] [pid 794] [client 213.6.0.41:50862] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 136
[Mon Dec 05 21:56:15.989406 2016] [:error] [pid 794] [client 213.6.0.41:50862] PHP Fatal error:  Call to undefined function mysql_connect() in /usr/local/www/apache24/data/www.example.com/index.php on line 16
[Mon Dec 05 21:56:31.631752 2016] [:error] [pid 879] [client 180.76.15.138:35265] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/www/apache24/data/www.example.com/inc/daten.inc.php on line 5
[Mon Dec 05 21:56:31.632131 2016] [:error] [pid 879] [client 180.76.15.138:35265] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 79
[Mon Dec 05 21:56:31.632198 2016] [:error] [pid 879] [client 180.76.15.138:35265] PHP Warning:  fopen([WEB]SQL_Injection.txt): failed to open stream: Permission denied in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 81
[Mon Dec 05 21:56:31.632227 2016] [:error] [pid 879] [client 180.76.15.138:35265] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /usr/local/www/apache24/data/www.example.com/inc/security.inc.php on line 136
[Mon Dec 05 21:56:31.632250 2016] [:error] [pid 879] [client 180.76.15.138:35265] PHP Fatal error:  Call to undefined function mysql_connect() in /usr/local/www/apache24/data/www.example.com/index.php on line 16
 
please post your pkg info
Code:
# pkg info
alsa-lib-1.1.2                 ALSA compatibility library
ap24-mod_security-2.9.1        Intrusion detection and prevention engine
apache24-2.4.23_1              Version 2.4.x of Apache web server
apr-1.5.2.1.5.4_1              Apache Portability Library
autoconf-2.69_1                Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203      Wrapper script for GNU autoconf
automake-1.15_1                GNU Standards-compliant Makefile generator
automake-wrapper-20131203      Wrapper script for GNU automake
avahi-app-0.6.31_5             Service discovery on a local network
bash-4.4                       GNU Project's Bourne Again SHell
bigreqsproto-1.1.2             BigReqs extension headers
binutils-2.27_4,1              GNU binary tools
bison-2.7.1,1                  Parser generator from FSF, (mostly) compatible with Yacc
boehm-gc-7.6.0                 Garbage collection and memory leak detection for C and C++
bootstrap-openjdk-r351880_1    Oracle's Java 6 virtual machine release under the GPL v2
ca_root_nss-3.27.1             Root certificate bundle from the Mozilla Project
cairo-1.14.6_1,2               Vector graphics library with cross-device output support
cmake-3.6.2                    Cross-platform Makefile generator
cmake-modules-3.6.2            Modules and Templates for CMake
compat7x-amd64-7.4.704000.201310.1 Convenience package to install the compat7x libraries
cups-2.1.4                     Common UNIX Printing System
curl-7.51.0_1                  Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
damageproto-1.2.1              Damage extension headers
db5-5.3.28_4                   Oracle Berkeley DB, revision 5.3
dbus-1.8.20                    Message bus system for inter-application communication
dbus-glib-0.104                GLib bindings for the D-BUS messaging system
dejavu-2.35                    Bitstream Vera Fonts clone with a wider range of characters
dialog4ports-0.1.6             Console Interface to configure ports
docbook-1.5                    Meta-port for the different versions of the DocBook DTD
docbook-sgml-4.5_1             DocBook SGML DTD
docbook-xml-5.0_3              DocBook XML DTD
docbook-xsl-1.76.1_3           XSL DocBook stylesheets
dri2proto-2.8                  DRI2 prototype headers
expat-2.2.0                    XML 1.0 parser written in C
fixesproto-5.0                 Fixes extension headers
fontconfig-2.12.1,1            XML-based font configuration API for X Windows
freetype2-2.6.3                Free and portable TrueType font rendering engine
gbm-11.2.2                     gbm library
gdbm-1.12                      GNU database manager
getopt-1.1.6                   Replacement for getopt(1) that supports GNU-style long options
gettext-runtime-0.19.8.1       GNU gettext runtime libraries and programs
gettext-tools-0.19.8.1         GNU gettext development and translation tools
glib-2.46.2_3                  Some useful routines of C programming (current stable version)
glproto-1.4.17                 GLX extension headers
gmake-4.2.1_1                  GNU version of 'make' utility
gmp-5.1.3_3                    Free library for arbitrary precision arithmetic
gnome_subr-1.0                 Common startup and shutdown subroutines used by GNOME scripts
gnutls-3.4.15                  GNU Transport Layer Security library
gobject-introspection-1.46.0   Generate interface introspection data for GObject libraries
help2man-1.43.3_1              Automatically generating simple manual pages from program output
icu-57.1,1                     International Components for Unicode (from IBM)
indexinfo-0.2.5                Utility to regenerate the GNU info page index
inputproto-2.3.1               Input extension headers
intltool-0.51.0_1              Tools to internationalize various kinds of data files
iso8879-1986_3                 Character entity sets from ISO 8879:1986 (SGML)
java-zoneinfo-2016.f           Updated Java timezone definitions
javavmwrapper-2.5_2            Wrapper script for various Java Virtual Machines
jpeg-turbo-1.4.2               SIMD-accelerated JPEG codec which replaces libjpeg
jsoncpp-1.7.3                  JSON reader and writer library for C++
kbproto-1.0.7                  KB extension headers
libEGL-11.2.2                  OpenEGL library
libGL-11.2.2                   OpenGL library that renders using GLX or DRI
libICE-1.0.9_1,1               Inter Client Exchange library for X11
libSM-1.2.2_3,1                Session Management library for X11
libX11-1.6.4,1                 X11 library
libXau-1.0.8_3                 Authentication Protocol library for X11
libXaw-1.0.13,2                X Athena Widgets library
libXdamage-1.1.4_3             X Damage extension library
libXdmcp-1.1.2                 X Display Manager Control Protocol library
libXext-1.3.3_1,1              X11 Extension library
libXfixes-5.0.3                X Fixes extension library
libXi-1.7.7,1                  X Input extension library
libXmu-1.1.2_3,1               X Miscellaneous Utilities libraries
libXp-1.0.3,1                  X print library
libXpm-3.5.11_4                X Pixmap library
libXrender-0.9.10              X Render extension library
libXt-1.1.5,1                  X Toolkit library
libXtst-1.2.3                  X Test extension
libXv-1.0.11,1                 X Video Extension library
libXvMC-1.0.10                 X Video Extension Motion Compensation library
libXxf86vm-1.1.4_1             X Vidmode Extension
libarchive-3.2.1,1             Library to create and read several streaming archive formats
libatomic_ops-7.4.4            Atomic operations access library
libcheck-0.10.0                Unit test framework for C
libclc-0.2.0.20151006          Required library functions for OpenCL C programming language
libdaemon-0.14_1               Lightweight C library that eases the writing of UNIX daemons
libdevq-0.0.2_1                Generic Device Query and Monitor interface
libdrm-2.4.66,1                Userspace interface to kernel Direct Rendering Module services
libedit-3.1.20150325_2,1       Command line editor library
libffi-3.2.1                   Foreign Function Interface
libfontenc-1.1.3               The fontenc Library
libgcrypt-1.7.3                General purpose crypto library based on code used in GnuPG
libglapi-11.2.2                Common GL api library used by Mesa based ports
libgpg-error-1.24              Common error values for all GnuPG components
libiconv-1.14_9                Character set conversion library
libidn-1.33_1                  Internationalized Domain Names command line tool
libltdl-2.4.6                  System independent dlopen wrapper
liblz4-131                     LZ4 compression library, lossless and very fast
libmcrypt-2.5.8_3              Multi-cipher cryptographic library (used in PHP)
libpaper-1.1.24.4              Library providing routines for paper size management
libpciaccess-0.13.4            Generic PCI access library
libpthread-stubs-0.3_6         This library provides weak aliases for pthread functions
libtasn1-4.9                   ASN.1 structure parser library
libtool-2.4.6                  Generic shared library support script
libxcb-1.11.1                  The X protocol C-language Binding (XCB) library
libxml2-2.9.4                  XML parser library for GNOME
libxshmfence-1.2               Shared memory 'SyncFence' synchronization primitive
libxslt-1.1.29                 The XSLT C library for GNOME
libzip-1.1.2                   C library for reading, creating, and modifying ZIP archives
llvm37-3.7.1_3                 LLVM and Clang
lzo2-2.09                      Portable speedy, lossless data compression library
m4-1.4.17_1,1                  GNU m4
makedepend-1.0.5,1             Dependency generator for makefiles
mkfontdir-1.0.7                Create an index of X font files in a directory
mkfontscale-1.1.2              Creates an index of scalable font files for X
mod_php55-5.5.38_2             PHP Scripting Language
mpfr-3.1.5                     Library for multiple-precision floating-point computations
mysql55-client-5.5.52          Multithreaded SQL database (client)
mysql55-server-5.5.52          Multithreaded SQL database (server)
nasm-2.11.08_1,1               General-purpose multi-platform x86 and amd64 assembler
nettle-3.2                     Low-level cryptographic library
ninja-1.7.1_1,2                Ninja is a small build system closest in spirit to Make
oniguruma5-5.9.6_1             BSDL Regular Expressions library compatible with POSIX/GNU/Perl
openjdk-7.111.01,1             Java Development Kit 7
p11-kit-0.23.2                 Library for loading and enumerating of PKCS#11 modules
p5-Authen-PAM-0.16_2           Perl interface to the PAM library
p5-IO-Tty-1.12_1               Flexible I/O Perl5 module that allows manipulation of pseudo-TTYs
p5-Locale-gettext-1.06         Message handling functions
p5-Net-SSLeay-1.78             Perl5 interface to SSL
p5-XML-Parser-2.44             Perl extension interface to James Clark's XML parser, expat
patch-2.7.5                    GNU patch utility
pciids-20160621                Database of all known IDs used in PCI devices
pcre-8.39                      Perl Compatible Regular Expressions library
perl5-5.20.3_15                Practical Extraction and Report Language
php55-5.5.38_2                 PHP Scripting Language
php55-ctype-5.5.38_1           The ctype shared extension for php
php55-dom-5.5.38_1             The dom shared extension for php
php55-extensions-1.8           "meta-port" to install PHP extensions
php55-filter-5.5.38_1          The filter shared extension for php
php55-hash-5.5.38_1            The hash shared extension for php
php55-iconv-5.5.38_1           The iconv shared extension for php
php55-json-5.5.38_1            The json shared extension for php
php55-opcache-5.5.38_2         The opcache shared extension for php
php55-pdo-5.5.38_1             The pdo shared extension for php
php55-pdo_sqlite-5.5.38_1      The pdo_sqlite shared extension for php
php55-phar-5.5.38_1            The phar shared extension for php
php55-posix-5.5.38_1           The posix shared extension for php
php55-session-5.5.38_2         The session shared extension for php
php55-simplexml-5.5.38_1       The simplexml shared extension for php
php55-sqlite3-5.5.38_1         The sqlite3 shared extension for php
php55-tokenizer-5.5.38_1       The tokenizer shared extension for php
php55-xml-5.5.38_1             The xml shared extension for php
php55-xmlreader-5.5.38_1       The xmlreader shared extension for php
php55-xmlwriter-5.5.38_1       The xmlwriter shared extension for php
pixman-0.34.0                  Low-level pixel manipulation library
pkg-1.8.8                      Package manager
pkgconf-1.0.1                  Utility to help to configure compiler and linker flags
png-1.6.23                     Library for manipulating PNG images
postfix-3.1.3,1                Secure alternative to widely-used Sendmail
presentproto-1.0               Present protocol specification
printproto-1.0.5               Print extension headers
py27-Babel-2.3.4               Collection of tools for internationalizing Python applications
py27-Jinja2-2.8                Fast and easy to use stand-alone template engine
py27-MarkupSafe-0.23           Implements XML/HTML/XHTML Markup safe string for Python
py27-alabaster-0.7.6           Modified Kr Sphinx theme
py27-docutils-0.12             Python Documentation Utilities
py27-enum34-1.1.6              Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7
py27-imagesize-0.7.1           Python image size library
py27-pygments-2.1.3            Syntax highlighter written in Python
py27-pystemmer-1.3.0_1         Snowball Stemming Algorithms for Information Retrieval
py27-pytz-2016.6.1,1           World Timezone Definitions for Python
py27-setuptools27-23.1.0       Python packages installer
py27-six-1.10.0                Python 2 and 3 compatibility utilities
py27-snowballstemmer-1.2.0_1   Snowball stemming library collection for Python
py27-sphinx-1.4.6_1            Python documentation generator
py27-sphinx_rtd_theme-0.1.9    Mobile-friendly py-sphinx theme
python2-2_3                    The "meta-port" for version 2 of the Python interpreter
python27-2.7.12                Interpreted object-oriented programming language
recordproto-1.14.2             RECORD extension headers
renderproto-0.11.1             RenderProto protocol headers
scons-2.5.0                    Build tool alternative to make
sdocbook-xml-1.1_2,2           "Simplified" DocBook XML DTD
sqlite3-3.14.1_1               SQL database engine in a C library
swig13-1.3.40_1                Simplified Wrapper and Interface Generator
t1lib-5.1.2_4,1                Type 1 font rasterization library for Unix/X11
tpm-emulator-0.7.4_1           Trusted Platform Module (TPM) emulator
trousers-0.3.13_1              Open-source TCG Software Stack
unzip-6.0_7                    List, test, and extract compressed files from a ZIP archive
videoproto-2.3.2               Video extension headers
w3m-0.5.3_5                    Pager/text-based WWW browser
webmin-1.810                   Web-based interface for system administration for Unix
xcb-proto-1.11_1               The X protocol C-language Binding (XCB) protocol
xcb-util-0.4.0_2,1             Module with libxcb/libX11 extension/replacement libraries
xcb-util-renderutil-0.3.9_1    Convenience functions for the Render extension
xcmiscproto-1.2.2              XCMisc extension headers
xextproto-7.3.0                XExt extension headers
xf86bigfontproto-1.2.0         XFree86-Bigfont extension headers
xf86vidmodeproto-2.3.1         XFree86-VidModeExtension extension headers
xmlcatmgr-2.2_2                SGML and XML catalog manager
xmlcharent-0.3_2               XML character entities
xmlto-0.0.28                   Front-end to an XSL toolchain
xorg-macros-1.19.0             X.Org development aclocal macros
xproto-7.0.28                  X11 protocol headers
xtrans-1.3.5                   Abstract network code for X
yajl-2.1.0                     Portable JSON parsing and serialization library in ANSI C
zip-3.0_1                      Create/update ZIP files compatible with PKZIP
 
Be aware that all mysql_* functions were removed in PHP 7.0, this imply you rewrite your code first to use mysqli or PDO instead. Or at least, you'll need to install pecl-mysql (never tried myself) to still use them on PHP 7.X, but it is not a good idea.

yes i try php70 there is no pkg in databases/php70-mysql so i remove all php

I do not want to hang server again, I do not know how dealing with a freebsd viry good php7.0 It seems a little harder

so i install php56 & php56-extensions & mod_php56 everything is work good now :)

thank you agin for help me :p
 
Back
Top