PHP XSL:key 'match' pattern compliation failed - php

I have the following key but get an apache error when I try to run the code.
<xsl:key name="dt" match="//eprint[substring(date,1,4) >= $year]" use="substring(date,1,4)" />
The error I get is:
[Thu Jul 12 10:51:18.724468 2018] [php7:warn] [pid 24089] [client 127.0.0.1:34808] PHP Warning: XSLTProcessor::importStylesheet(): Forbidden variable in /home/david/Documents/staffpub/inc/staff.php on line 54, referer: http://localhost:81/test_jsonp.html
[Thu Jul 12 10:51:18.724614 2018] [php7:warn] [pid 24089] [client 127.0.0.1:34808] PHP Warning: XSLTProcessor::importStylesheet(): compilation error: file /home/david/Documents/staffpub/inc/sorts/year.xsl line 5 element key in /home/david/Documents/staffpub/inc/staff.php on line 54, referer: http://localhost:81/test_jsonp.html
[Thu Jul 12 10:51:18.724634 2018] [php7:warn] [pid 24089] [client 127.0.0.1:34808] PHP Warning: XSLTProcessor::importStylesheet(): xsl:key : 'match' pattern compilation failed '//eprint[substring(date,1,4) >= $year]' in /home/david/Documents/staffpub/inc/staff.php on line 54, referer: http://localhost:81/test_jsonp.html
[Thu Jul 12 10:51:18.732938 2018] [php7:warn] [pid 24089] [client 127.0.0.1:34808] PHP Warning: XSLTProcessor::transformToXml(): No stylesheet associated to this object in /home/david/Documents/staffpub/inc/staff.php on line 59, referer: http://localhost:81/test_jsonp.html
I guess there is something wrong with the key set up, but I am unsure what.
Is anyone able to point me in the right direction?
A sample data set is
<?xml version='1.0' encoding='utf-8'?>
<eprints xmlns='http://eprints.org/ep2/data/2.0'>
<eprint id='http://dsfdsfs'>
<eprintid>3424243242423</eprintid>
<date>2012-12</date>
</eprint>

Related

PHP Fatal error: require(): Failed opening required 'template/header.phtml' (include_path='.:/usr/share/php')

I have created a website and just uploaded it on a virtual host, but when I try accessing it I get the "This page isn’t working (HTTP ERROR 500)" and I got this from the error log file, I understand it is something to do with the file paths but I don't know how to fix it. does anyone know how to fix it?
[Sun Dec 20 00:18:28.000823 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Warning: require(/home/ae504/public_html/AuctionSystem/View/Template/header.phtml): failed to open stream: No such file or directory in /home/aee504/public_html/AuctionSystem/View/index.phtml on line 1
[Sun Dec 20 00:18:28.000849 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Stack trace:
[Sun Dec 20 00:18:28.000853 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP 1. {main}() /home/aee504/public_html/AuctionSystem/index.php:0
[Sun Dec 20 00:18:28.000856 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP 2. require_once() /home/aee504/public_html/AuctionSystem/index.php:5
[Sun Dec 20 00:18:28.000859 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Fatal error: require(): Failed opening required '/home/ae504/public_html/AuctionSystem/View/Template/header.phtml' (include_path='.:/usr/share/php') in /home/aee504/public_html/AuctionSystem/View/index.phtml on line 1
[Sun Dec 20 00:18:28.000862 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Stack trace:
[Sun Dec 20 00:18:28.000865 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP 1. {main}() /home/aee504/public_html/AuctionSystem/index.php:0
[Sun Dec 20 00:18:28.000868 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP 2. require_once() /home/aee504/public_html/AuctionSystem/index.php:5
/home/ae504/public_html/AuctionSystem/View/Template/header.phtml
The file doesn't exist or is not readable. Simple *nix error
Either your templating engine is not producing it, or it is being produced but not readable. Given your error report, there is no way of telling. Suggest you go look at whatever framework you are using.

Wordpress admin page is blank

We migrated a wordpress site from a cpanel hosting to AWS. The specifications of the box on AWS are as follows :-
OS : Ubuntu 14.04
PHP : 5.6
Wordpress : 4.6
i can see that some requests for static files are still going to the old site for eg. wpac.css http://ip2n.trillbjm.com/files/modules/wordpress-access-control/public/css/wpac.css
We can See the menu items on Left hand side but nothing is visible at the centre of the screen.
I can see below messages in apache2 error.log. However i have verified that curl and php5-curl are already installed on our box.
[Sun Jul 09 20:18:41.365204 2017] [:error] [pid 19222] [client 52.25.187.99:60379] PHP Fatal error: Call to undefined function curl_version() in /var/www/html/files/modules/postie/lib/pCurlConnection.php on line 10
[Sun Jul 09 20:18:41.392122 2017] [:error] [pid 19220] [client 67.176.114.208:65308] PHP Warning: Illegal string offset 'version' in /var/www/html/files/modules/postie/postie.php on line 271, referer: http://dev.ipledge2nigeria.com/login-3/?redirect_to=http%3A%2F%2Fdev.ipledge2nigeria.com%2Fwp-admin%2F&reauth=1
[Sun Jul 09 20:18:41.727913 2017] [:error] [pid 19220] [client 67.176.114.208:65308] PHP Fatal error: Call to undefined function curl_version() in /var/www/html/files/modules/postie/postie.php on line 274, referer: http://dev.ipledge2nigeria.com/login-3/?redirect_to=http%3A%2F%2Fdev.ipledge2nigeria.com%2Fwp-admin%2F&reauth=1
[Sun Jul 09 20:18:46.131197 2017] [:error] [pid 19220] [client 67.176.114.208:65308] PHP Warning: Illegal string offset 'version' in /var/www/html/files/modules/postie/postie.php on line 271, referer: http://dev.ipledge2nigeria.com/wp-admin/
[Sun Jul 09 20:18:46.423979 2017] [:error] [pid 19220] [client 67.176.114.208:65308] PHP Fatal error: Call to undefined function curl_version() in /var/www/html/files/modules/postie/postie.php on line 274, referer: http://dev.ipledge2nigeria.com/wp-admin/
[Sun Jul 09 20:18:48.692803 2017] [:error] [pid 19220] [client 67.176.114.208:65308] PHP Warning: Illegal string offset 'version' in /var/www/html/files/modules/postie/postie.php on line 271, referer: http://dev.ipledge2nigeria.com/wp-admin/edit.php
[Sun Jul 09 20:18:48.978328 2017] [:error] [pid 19220] [client 67.176.114.208:65308] PHP Fatal error: Call to undefined function curl_version() in /var/www/html/files/modules/postie/postie.php on line 274, referer: http://dev.ipledge2nigeria.com/wp-admin/edit.php
I was able to solve this eventually. Below error message indicated the root cause :-
[Sun Jul 09 20:18:48.978328 2017] [:error] [pid 19220] [client 67.176.114.208:65308] PHP Fatal error: Call to undefined function curl_version() in /var/www/html/files/modules/postie/postie.php on line 274, referer:
I had three php installations on my ubuntu box - php5, php5.6 and php7. php5 had curl installed in it but was being ignore by apache. apache was using php5.6. I went to /etc/apache2/mods-enabled and removed all the php links except for php5.

PHP query does not show any results on apache webserver

Alright so. I have a relative simple task. Here is the fully functional working code of a query that does work. It works
<?php
$query = array(
'address'=>'https://mcapi.ca/query/94.12.141.113:25577/info'); //Grab statistics from URL.
$response = json_decode(file_get_contents($query['address']), true); //Decode the JSON response.
?>
It works. I've seen it work with my own two eyes.
The problem is now that I'm hosting the file. (obviously it has html code for the web page where the result of this query is called and displayed on the page(which also works)). When I host the file on my apache webserver which has been port forwarded and what have you - it's online. I go to the page.... scroll to the bottom and find that there are no results for this query. So my thinking is that apache is blocking links to other sites from within the files for some security reasons... sod that I want to see my results. So anyone know of such a setting? Maybe even a file that I can go and visit to change said setting?
Now what I want to know:
Is it the code?
if so how can I fix it?
Is it a setting in the webserver?
if so... you guessed it... how can I fix it?
and if it is none of the above... what is it?
Any and all help is much appreciated.
This is the error log as requested
[Sun Jan 01 14:18:42.055662 2017] [:error] [pid 5052:tid 1068] [client ::1:49636] PHP Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\\Apache24\\htdocs\\index.php on line 4
[Sun Jan 01 14:18:42.055662 2017] [:error] [pid 5052:tid 1068] [client ::1:49636] PHP Warning: file_get_contents(https://mcapi.ca/query/94.12.141.113:25577/info): failed to open stream: Invalid argument in C:\\Apache24\\htdocs\\index.php on line 4
[Sun Jan 01 14:18:46.248600 2017] [:error] [pid 5052:tid 1068] [client ::1:49636] PHP Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\\Apache24\\htdocs\\gallery.php on line 4, referer: http://localhost/
[Sun Jan 01 14:18:46.248600 2017] [:error] [pid 5052:tid 1068] [client ::1:49636] PHP Warning: file_get_contents(https://mcapi.ca/query/94.12.141.113:25577/info): failed to open stream: Invalid argument in C:\\Apache24\\htdocs\\gallery.php on line 4, referer: http://localhost/
[Sun Jan 01 14:18:47.697728 2017] [:error] [pid 5052:tid 1068] [client ::1:49636] PHP Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\\Apache24\\htdocs\\about.php on line 4, referer: http://localhost/gallery.php
[Sun Jan 01 14:18:47.697728 2017] [:error] [pid 5052:tid 1068] [client ::1:49636] PHP Warning: file_get_contents(https://mcapi.ca/query/94.12.141.113:25577/info): failed to open stream: Invalid argument in C:\\Apache24\\htdocs\\about.php on line 4, referer: http://localhost/gallery.php
[Sun Jan 01 14:18:48.495928 2017] [:error] [pid 5052:tid 1068] [client ::1:49636] PHP Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\\Apache24\\htdocs\\index.php on line 4, referer: http://localhost/about.php
[Sun Jan 01 14:18:48.495928 2017] [:error] [pid 5052:tid 1068] [client ::1:49636] PHP Warning: file_get_contents(https://mcapi.ca/query/94.12.141.113:25577/info): failed to open stream: Invalid argument in C:\\Apache24\\htdocs\\index.php on line 4, referer: http://localhost/about.php
[Sun Jan 01 14:34:21.958403 2017] [:error] [pid 5052:tid 1084] [client ::1:49819] PHP Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\\Apache24\\htdocs\\index.php on line 4
[Sun Jan 01 14:34:21.958403 2017] [:error] [pid 5052:tid 1084] [client ::1:49819] PHP Warning: file_get_contents(https://mcapi.ca/query/94.12.141.113:25577/info): failed to open stream: Invalid argument in C:\\Apache24\\htdocs\\index.php on line 4

Apache2 won't run a Script, PHP-CLI do

I've wrote a script which reads a log-file and write it into an Database. Because of many different line-types it would take about 30 minits executiontime.
Log-Files got:
~20 MB filesize
~200.000 lines
If I include it to my website, the script would run only with small log-files(~2MB tested), it won't run till end if i'm using normal-log-files. I included the script like this:
<?php
include "logLauncher/main.php";
?>
The strange thing is if i using a syscall it would run.
<?php
system("php5 logLauncher/main.php");
?>
Three last entrys in file: /var/log/apache2/error.log
[Wed Aug 26 11:11:22.210994 2015] [:error] [pid 18893] [client 192.168.0.100:54746] PHP 1. {main}() /var/www/cowrean_logs/alpha/main.php:0, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:22.211004 2015] [:error] [pid 18893] [client 192.168.0.100:54746] PHP 2. include() /var/www/cowrean_logs/alpha/main.php:121, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:22.211014 2015] [:error] [pid 18893] [client 192.168.0.100:54746] PHP 3. include() /var/www/cowrean_logs/alpha/mod_focus.php:192, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:28.131411 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Notice: A session had already been started - ignoring session_start() in /var/www/cowrean_logs/alpha/main.php on line 47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:28.131462 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Stack trace:, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:28.131481 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 1. {main}() /var/www/cowrean_logs/alpha/main.php:0, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:28.131494 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 2. session_start() /var/www/cowrean_logs/alpha/main.php:47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:29.080694 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Notice: A session had already been started - ignoring session_start() in /var/www/cowrean_logs/alpha/main.php on line 47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.080728 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Stack trace:, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.080741 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 1. {main}() /var/www/cowrean_logs/alpha/main.php:0, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.080751 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 2. session_start() /var/www/cowrean_logs/alpha/main.php:47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.081747 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Notice: Undefined property: mysqli::$close in /var/www/cowrean_logs/alpha/mod_execute_log.php on line 131, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.081769 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Stack trace:, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.081790 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 1. {main}() /var/www/cowrean_logs/alpha/main.php:0, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.081801 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 2. include() /var/www/cowrean_logs/alpha/main.php:118, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:35.819211 2015] [:error] [pid 21277] [client 192.168.0.100:54748] PHP Notice: A session had already been started - ignoring session_start() in /var/www/cowrean_logs/alpha/main.php on line 47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?left=7&top=1&right=0
[Wed Aug 26 11:11:35.819247 2015] [:error] [pid 21277] [client 192.168.0.100:54748] PHP Stack trace:, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?left=7&top=1&right=0
[Wed Aug 26 11:11:35.819267 2015] [:error] [pid 21277] [client 192.168.0.100:54748] PHP 1. {main}() /var/www/cowrean_logs/alpha/main.php:0, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?left=7&top=1&right=0
[Wed Aug 26 11:11:35.819279 2015] [:error] [pid 21277] [client 192.168.0.100:54748] PHP 2. session_start() /var/www/cowrean_logs/alpha/main.php:47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?left=7&top=1&right=0
I would not post whole config-files because "/etc/php5/apache2/php.ini" and "/etc/php5/cli/php.ini" got more than 600 lines!
I think these lines could be interested, but they are in both files identical -.-
post_max_size = 20M
max_execution_time = 30
memory_limit = -1
Got anyone have a solution for me to kick out the syscall from my code? And include the log-reader script directly into my page? Syscalls doesn't look fine!
Ubuntu 14.4
PHP5
Apache2
PHP-CLI
In the script in question add this at the top of the code
<?php
ini_set('max_execution_time', -1 );
This will tell PHP not to timeout this script.
It has its dangers, for example if you manage to code and infinite loop then the script will run till you kill either apache or PHP, depending on your configuration.
It is best not to change this in the php.ini as that will effect every php script.

I just upgraded to PHP5 - Everything is deprecated, Apache is blank

I have no idea of what version of PHP I was using before, but I'm guessing it was an older version because it was working just fine before I switched from Nginx to Apache. I think I was using an older version of PHP on Nginx. Anyhow this is an example of code that is said to be deprecated. I am now on PHP 5.5.9.
<?php
// Establishing Connection with Server by passing server_name, user_id and password as a parameter
$connection = mysql_connect("localhost", "username", "password");
// Selecting Database
$db = mysql_select_db("database", $connection);
session_start();// Starting Session
// Storing Session
$user_check=$_SESSION['login_user'];
// SQL Query To Fetch Complete Information Of User
$ses_sql=mysql_query("select name from table where name='$user_check'", $connection);
$row = mysql_fetch_assoc($ses_sql);
$login_session =$row['name'];
if(!isset($login_session)){
mysql_close($connection); // Closing Connection
header('Location: index.php'); // Redirecting To Home Page
}
?>
All of my pages use PHP code similar to this so I'm just going to post one of them. This is my error log.
[Mon Jan 12 03:03:40.456254 2015] [mpm_event:notice] [pid 2415:tid 3074542208] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Mon Jan 12 03:03:40.456344 2015] [core:notice] [pid 2415:tid 3074542208] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 12 03:04:42.038619 2015] [mpm_event:notice] [pid 2415:tid 3074542208] AH00491: caught SIGTERM, shutting down
[Mon Jan 12 03:04:43.100702 2015] [mpm_prefork:notice] [pid 3617] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Mon Jan 12 03:04:43.100786 2015] [core:notice] [pid 3617] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 12 03:04:44.344041 2015] [mpm_prefork:notice] [pid 3617] AH00169: caught SIGTERM, shutting down
[Mon Jan 12 03:04:45.489917 2015] [mpm_prefork:notice] [pid 3708] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.5 configured -- resuming normal operations
[Mon Jan 12 03:04:45.489959 2015] [core:notice] [pid 3708] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 12 03:06:19.837552 2015] [mpm_prefork:notice] [pid 3708] AH00169: caught SIGTERM, shutting down
[Mon Jan 12 03:06:20.873964 2015] [mpm_prefork:notice] [pid 3925] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.5 configured -- resuming normal operations
[Mon Jan 12 03:06:20.874005 2015] [core:notice] [pid 3925] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 12 03:07:37.795009 2015] [:error] [pid 3932] [client 108.162.238.215:57356] script '/var/www/html/info.php' not found or unable to stat
[Mon Jan 12 03:09:01.713565 2015] [:error] [pid 3928] [client 108.162.238.215:28781] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4
[Mon Jan 12 03:09:06.002298 2015] [:error] [pid 3928] [client 108.162.238.215:28781] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4
[Mon Jan 12 03:09:17.906216 2015] [:error] [pid 3946] [client 108.162.238.215:64299] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4
[Mon Jan 12 03:09:23.456198 2015] [:error] [pid 3931] [client 108.162.238.215:36456] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4, referer: https://epicmc.us/404.php
[Mon Jan 12 03:09:26.631794 2015] [:error] [pid 3931] [client 108.162.238.215:36456] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4, referer: https://epicmc.us/404.php
[Mon Jan 12 03:09:55.207111 2015] [mpm_prefork:notice] [pid 3925] AH00169: caught SIGTERM, shutting down
[Mon Jan 12 03:09:55.300465 2015] [mpm_prefork:notice] [pid 3996] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.5 configured -- resuming normal operations
[Mon Jan 12 03:09:55.300511 2015] [core:notice] [pid 3996] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 12 03:09:59.717164 2015] [:error] [pid 4001] [client 108.162.238.215:16174] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4, referer: https://epicmc.us/404.php
[Mon Jan 12 03:10:25.281382 2015] [:error] [pid 4002] [client 108.162.238.215:18754] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4
[Mon Jan 12 03:11:03.812550 2015] [:error] [pid 3999] [client 108.162.238.215:47026] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4
[Mon Jan 12 03:11:39.560256 2015] [:error] [pid 4016] [client 108.162.238.215:28585] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4
[Mon Jan 12 03:14:36.371451 2015] [:error] [pid 4001] [client 108.162.238.215:29588] PHP Notice: Undefined index: player in /var/www/html/stats.php on line 7
[Mon Jan 12 03:14:36.387589 2015] [:error] [pid 4017] [client 63.142.248.45:58023] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/api.php on line 9
[Mon Jan 12 03:14:36.387889 2015] [:error] [pid 4001] [client 108.162.238.215:29588] PHP Warning: file_get_contents(http://epicmc.us/api.php?task=stats&player=): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error\r\n in /var/www/html/stats.php on line 7
[Mon Jan 12 03:14:36.387942 2015] [:error] [pid 4001] [client 108.162.238.215:29588] PHP Notice: Undefined index: player in /var/www/html/stats.php on line 10
[Mon Jan 12 03:14:36.387956 2015] [:error] [pid 4001] [client 108.162.238.215:29588] PHP Notice: Undefined index: player in /var/www/html/stats.php on line 20
[Mon Jan 12 03:14:36.388029 2015] [:error] [pid 4001] [client 108.162.238.215:29588] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4
[Mon Jan 12 03:14:40.516471 2015] [:error] [pid 4001] [client 108.162.238.215:29588] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/api.php on line 9
[Mon Jan 12 03:16:26.882760 2015] [:error] [pid 4003] [client 108.162.214.137:51884] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4, referer: https://epicmc.us
[Mon Jan 12 03:18:35.605165 2015] [mpm_prefork:notice] [pid 3996] AH00169: caught SIGTERM, shutting down
[Mon Jan 12 03:18:36.649524 2015] [mpm_prefork:notice] [pid 4105] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.5 configured -- resuming normal operations
[Mon Jan 12 03:18:36.649586 2015] [core:notice] [pid 4105] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 12 03:18:40.845243 2015] [:error] [pid 4111] [client 108.162.238.215:26322] PHP Notice: Undefined index: player in /var/www/html/stats.php on line 7
[Mon Jan 12 03:18:40.849347 2015] [:error] [pid 4112] [client 63.142.248.45:34942] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/api.php on line 9
[Mon Jan 12 03:18:40.849619 2015] [:error] [pid 4111] [client 108.162.238.215:26322] PHP Warning: file_get_contents(http://epicmc.us/api.php?task=stats&player=): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error\r\n in /var/www/html/stats.php on line 7
[Mon Jan 12 03:18:40.849660 2015] [:error] [pid 4111] [client 108.162.238.215:26322] PHP Notice: Undefined index: player in /var/www/html/stats.php on line 10
[Mon Jan 12 03:18:40.849671 2015] [:error] [pid 4111] [client 108.162.238.215:26322] PHP Notice: Undefined index: player in /var/www/html/stats.php on line 20
[Mon Jan 12 03:18:40.850012 2015] [:error] [pid 4111] [client 108.162.238.215:26322] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 4
[Mon Jan 12 03:22:59.264503 2015] [:error] [pid 4110] [client 108.162.238.215:39205] PHP Fatal error: Call to undefined function mysqli_connect() in /var/www/html/session.php on line 3
[Mon Jan 12 03:25:15.361204 2015] [:error] [pid 4109] [client 108.162.238.215:31116] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 3
[Mon Jan 12 03:26:55.673865 2015] [:error] [pid 4108] [client 108.162.238.215:44137] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 3
[Mon Jan 12 03:26:59.193970 2015] [:error] [pid 4112] [client 108.162.238.215:43815] PHP Notice: Undefined index: player in /var/www/html/stats.php on line 7
[Mon Jan 12 03:26:59.197756 2015] [:error] [pid 4125] [client 63.142.248.45:44475] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/api.php on line 9
[Mon Jan 12 03:26:59.197950 2015] [:error] [pid 4112] [client 108.162.238.215:43815] PHP Warning: file_get_contents(http://epicmc.us/api.php?task=stats&player=): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error\r\n in /var/www/html/stats.php on line 7
[Mon Jan 12 03:26:59.197982 2015] [:error] [pid 4112] [client 108.162.238.215:43815] PHP Notice: Undefined index: player in /var/www/html/stats.php on line 10
[Mon Jan 12 03:26:59.197992 2015] [:error] [pid 4112] [client 108.162.238.215:43815] PHP Notice: Undefined index: player in /var/www/html/stats.php on line 20
[Mon Jan 12 03:26:59.198047 2015] [:error] [pid 4112] [client 108.162.238.215:43815] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/session.php on line 3
[Mon Jan 12 03:27:03.942299 2015] [:error] [pid 4111] [client 108.162.238.215:51061] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/api.php on line 9
[Mon Jan 12 03:27:16.010513 2015] [:error] [pid 4110] [client 108.162.238.215:42175] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/api.php on line 9
If somebody out there could re-write the entire PHP code I posted above in PHP 5 format so that I know where to start that would be awesome. Currently Apache2 is just a blank site with only a couple HTML elements working here and there. Sorry if this sounds like a noob question I'd just really like a reference.
There is two php.ini files. One is in /etc/php5/apache2
PHP INI ATTACHED EXTERNALLY BECAUSE I DON'T HAVE ENOUGH ROOM TO POST IT HERE
http://pastebin.com/UpwuC2Hj
you appear to be missing the mysql modules for php. installing them should get your site back up again, then you can start on upgrading your code.
read the comments in the section Dynamic Extensions of the ini file and uncomment the correct line.

Categories