It's pretty much in the title. I've tried everything I can think of but Apache2 is doing a restart every 1min and 3seconds - without fail. It's not doing a graceful restart, as every time it restarts the client can not connect, and are met with "This site can't be reached" in Chrome.
This is happening on a VPS hosted on Linode with the Ubuntu 16.04 image. As far as I know everything was setup as default. (I inherited the site, but trying to figure out this odd issue. )
Apache is version 2.4.18.
PHP is version 7.0.30
The site does not see a lot of traffic (maybe 1k hits/month) - so traffic should not be causing this either.
Below are the logs that I'm seeing from the Apache2 error.log
[Mon Aug 27 23:04:56.015029 2018] [core:notice] [pid 32672] AH00094: Command line: '/usr/sbin/apache2'
[Mon Aug 27 23:05:56.492903 2018] [mpm_prefork:notice] [pid 32672] AH00169: caught SIGTERM, shutting down
[Mon Aug 27 23:05:58.000463 2018] [:notice] [pid 32730] ModSecurity for Apache/2.9.0 (http://www.modsecurity.org/) configured.
[Mon Aug 27 23:05:58.001156 2018] [:notice] [pid 32730] ModSecurity: APR compiled version="1.5.1"; loaded version="1.5.2"
[Mon Aug 27 23:05:58.001857 2018] [:warn] [pid 32730] ModSecurity: Loaded APR do not match with compiled!
[Mon Aug 27 23:05:58.001959 2018] [:notice] [pid 32730] ModSecurity: PCRE compiled version="8.35 "; loaded version="8.38 2015-11-23"
[Mon Aug 27 23:05:58.002041 2018] [:warn] [pid 32730] ModSecurity: Loaded PCRE do not match with compiled!
[Mon Aug 27 23:05:58.002155 2018] [:notice] [pid 32730] ModSecurity: LUA compiled version="Lua 5.1"
[Mon Aug 27 23:05:58.002230 2018] [:notice] [pid 32730] ModSecurity: YAJL compiled version="2.1.0"
[Mon Aug 27 23:05:58.002300 2018] [:notice] [pid 32730] ModSecurity: LIBXML compiled version="2.9.2"
[Mon Aug 27 23:05:58.002460 2018] [:notice] [pid 32730] ModSecurity: StatusEngine call: "2.9.0,Apache/2.4.18 (Ubuntu),1.5.1/1.5.2,8.35/8.38 2015-11-23,Lua 5.1,2.9.2,<removed_for_SO>"
[Mon Aug 27 23:05:58.060493 2018] [:notice] [pid 32730] ModSecurity: StatusEngine call successfully sent. For more information visit: http://status.modsecurity.org/
[Mon Aug 27 23:05:58.105989 2018] [:notice] [pid 32734] FastCGI: process manager initialized (pid 32734)
[Mon Aug 27 23:05:59.016019 2018] [mpm_prefork:notice] [pid 32731] AH00163: Apache/2.4.18 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Aug 27 23:05:59.017563 2018] [core:notice] [pid 32731] AH00094: Command line: '/usr/sbin/apache2'
[Mon Aug 27 23:06:59.489457 2018] [mpm_prefork:notice] [pid 32731] AH00169: caught SIGTERM, shutting down
I see the issues with APR and PCRE not having the same version, but I had read in a different thread that this should not be causing the issue I am seeing.
If there is anything else I can setup to help figure this out - that would be appreciated, or if someone else has run across something similar that would be helpful too.
I've already tried looking at HTOP to see what processes are running - nothing out of the ordinary there, I do see a CPU spike AFTER I see the restart command (Which makes sense given apache is restarting)
We do have logrotate installed (another common thing I have seen) however logrotate is set to run weekly, so I don't think that its causing this either.
We're hosting wordpress on the site as well.
Let me know if there is anything else I can add to this that might help.
EDIT: Checked on cronjobs as well - no cronjobs
Related
BEFORE YOU MARK THIS A DUPLICATE READ PLEASE
I've read dozens of threads both on this site and other with possible solutions to my problem however none have helped.
I switched to a GoDaddy VPS and I cannot get php to log errors what so ever. I went to their chat support and they basically told me I was on my own. My current php.ini settings below.
error_reporting = E_ALL
display_startup_errors = On
log_errors = On
track_errors = On
error_log = error_log
display_errors = On
Current php version I have installed php 7.0 and the extensions that are installed below. (Not sure if this info is beneficial)
php70-libc-client I
php70-pear
php70-php-bcmath
php70-php-calendar
php70-php-cli
php70-php-ftp
php70-php-fpm
php70-php-devel
php70-php-curl
php70-php-common
php70-php-gd
php70-php-imap
php70-php-mcrypt
php70-php-mysqlnd
php70-php-pdo
php70-php-posix
php70-runtime
php70-php-xml
php70-php-sockets
More Information (might be useful)
- I restarted my server multiple times.
- Using mysqli as data storage.
Error Logs That Exist
- /usr/local/cpanel/logs/error_log /usr/local/apache.ea3/logs/error_log
- /opt/cpanel/ea-php70/root/usr/share/pear/error_log
- /var/installatron/logs/error_log /var/log/httpd/error_log
- /var/log/apache2/error_log /home/server1/public_html/css/error_log
- /home/server1/public_html/php/error_log
- /home/server1/public_html/contact/error_log /home/server1/.trash/error_log
- /home/server2/public_html/error_log /home/server2/public_html/php/error_log
- /home/server2/public_html/faq/error_log
which one would be the main one?
With the help of Max (below) I found some error logs.
[Tue Nov 29 14:58:23.876535 2016] [:notice] [pid 1072] ModSecurity: APR compile$
[Tue Nov 29 14:58:23.876543 2016] [:notice] [pid 1072] ModSecurity: PCRE compil$
[Tue Nov 29 14:58:23.876548 2016] [:notice] [pid 1072] ModSecurity: LUA compile$
[Tue Nov 29 14:58:23.876552 2016] [:notice] [pid 1072] ModSecurity: LIBXML comp$
[Tue Nov 29 14:58:23.876555 2016] [:notice] [pid 1072] ModSecurity: Status engi$
[Tue Nov 29 14:58:23.901172 2016] [ssl:warn] [pid 1073] AH01909: s104-238-126-2$
[Tue Nov 29 14:58:23.902445 2016] [:notice] [pid 1073] mod_ruid2/0.9.8 enabled
[Tue Nov 29 14:58:23.905483 2016] [mpm_prefork:notice] [pid 1073] AH00163: Apac$
[Tue Nov 29 14:58:23.905502 2016] [core:notice] [pid 1073] AH00094: Command lin$
(XID sda356) Database Connect Error: Access denied for user 'leechprotect'#'localhost' (using password: YES)
So today, I was trying to do two things: get rid of extensions like .php in my domains, and use an A record to point a subdomain I have to the IP of the server on which the site I am developing is running on.
I did both at the same time, then restarted httpd, but when it came back up - I couldn't access the website at all. httpd claims it is running fine. I decided to remove the rewrite rules to see if I had somehow introduced a bug into httpd.conf, but after another restart, it still didn't serve webpages. I tried restarting the server instance - no luck again.
I hadn't changed anything else and the server was serving webpages fine before this. I am trying to access the page using just the IP address, so I don't think the A record could have made a difference either.
The output in httpd's error log is the following:
[Wed Aug 10 16:39:44.263098 2016] [suexec:notice] [pid 1843] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Wed Aug 10 16:39:44.308130 2016] [auth_digest:notice] [pid 1843] AH01757: generating secret for digest authentication ...
[Wed Aug 10 16:39:44.308701 2016] [lbmethod_heartbeat:notice] [pid 1843] AH02282: No slotmem from mod_heartmonitor
[Wed Aug 10 16:39:44.662464 2016] [mpm_prefork:notice] [pid 1843] AH00163: Apache/2.4.18 (Amazon) configured -- resuming normal operations
[Wed Aug 10 16:39:44.662486 2016] [core:notice] [pid 1843] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Aug 10 16:40:02.960708 2016] [mpm_prefork:notice] [pid 1843] AH00171: Graceful restart requested, doing restart
[Wed Aug 10 16:40:03.042697 2016] [auth_digest:notice] [pid 1843] AH01757: generating secret for digest authentication ...
[Wed Aug 10 16:40:03.043290 2016] [lbmethod_heartbeat:notice] [pid 1843] AH02282: No slotmem from mod_heartmonitor
[Wed Aug 10 16:40:03.105719 2016] [mpm_prefork:notice] [pid 1843] AH00163: Apache/2.4.18 (Amazon) configured -- resuming normal operations
[Wed Aug 10 16:40:03.105729 2016] [core:notice] [pid 1843] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Aug 10 16:40:03.105750 2016] [mpm_prefork:warn] [pid 1843] AH00167: long lost child came home! (pid 1968)
Any help?
Edit: I used dig on the domain that I pointed with the A-record, and it resolves to the IP (which currently times out but is otherwise the right IP). So it seemingly isn't an issue there, either. I can connect to the server with SSH fine.
I installed PHP 5.2.17 as per the following tutorial
http://zgadzaj.com/how-to-install-php-53-and-52-together-on-ubuntu-1204
apt-get installed PHP5.5 and apache 2.4.7
PHPINFO reports that the php version of the set host is still 5.5.9
when I restart apache2 service, I get the following in error.log.
[Thu Mar 19 14:18:53.648697 2015] [mpm_prefork:notice] [pid 23518] AH00169: caught SIGTERM, shutting down
[Thu Mar 19 14:18:54.741836 2015] [:notice] [pid 5543] FastCGI: process manager initialized (pid 5543)
[Thu Mar 19 14:18:54.754243 2015] [mpm_prefork:notice] [pid 5541] AH00163: Apache/2.4.7 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 PHP/5.5.9-1ubuntu4.6 configured -- resuming normal operations
[Thu Mar 19 14:18:54.754317 2015] [core:notice] [pid 5541] AH00094: Command line: '/usr/sbin/apache2'
Removing php5.5 solved the problem.
The problem probably was a conflict between the two PHP versions, using same fastcgi implementation.
I am getting the blank screen. No errors in the Apache logs, nothing.
I was thinking there may be a php syntax error and it quietly dies, but I have configured php.ini to display errors:
display_errors=On
html_errors=On
error_reporting=E_ALL | E_STRICT
display_startup_errors=On
here are relevant php configurations loaded:
display_errors On On
display_startup_errors On
enable_dl Off Off
enable_post_data_reading On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 22527
Why is there no Apache error logs? How to trace Apache execution? any help is much appreciated. Thank you
Update:
I was wrong, Apache writes log only once on restart at the time of restart at the location specified by ErrorLog in the Apache Configuration, but nothing is written afterwards even when I get the blank site. Here logs from ErrorLog:
[Tue Nov 18 17:08:20.372970 2014] [mpm_prefork:notice] [pid 1601] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.4 configured -- resuming normal operations
[Tue Nov 18 17:08:20.376988 2014] [mpm_prefork:info] [pid 1601] AH00164: Server built: Jul 22 2014 14:36:39
[Tue Nov 18 17:08:20.377699 2014] [core:notice] [pid 1601] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 18 17:19:32.301203 2014] [mpm_prefork:notice] [pid 1643] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.4 configured -- resuming normal operations
[Tue Nov 18 17:19:32.313839 2014] [mpm_prefork:info] [pid 1643] AH00164: Server built: Jul 22 2014 14:36:39
[Tue Nov 18 17:19:32.314481 2014] [core:notice] [pid 1643] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 18 17:50:22.848631 2014] [core:info] [pid 1643] AH00096: removed PID file /var/run/apache2/apache2.pid (pid=1643)
[Tue Nov 18 17:50:22.848631 2014] [mpm_prefork:notice] [pid 1643] AH00169: caught SIGTERM, shutting down
[Tue Nov 18 17:50:25.288368 2014] [mpm_prefork:notice] [pid 3313] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.4 configured -- resuming normal operations
[Tue Nov 18 17:50:25.290696 2014] [mpm_prefork:info] [pid 3313] AH00164: Server built: Jul 22 2014 14:36:39
[Tue Nov 18 17:50:25.291613 2014] [core:notice] [pid 3313] AH00094: Command line: '/usr/sbin/apache2'
How to make Apache log for PHP errors or anything for that matter to be able troubleshoot issues?
It turns out this was neither Apache nor PHP error, but an application level issue where there is ErrorHandler function declared that does hide all the php errors as described here:
PHP's white screen of death
I came to conclusion to the fact that it is neither Apache nor PHP configurations by changing ErrorLevel to trace8 in virtual host settings:
LogLevel trace8
ErrorLog ${APACHE_LOG_DIR}/dev-virtual/error.log
Afterwards, I tail the logs specified in ErrorLog from command line and make requests. The logs showed:
[Tue Nov 18 18:16:37.398720 2014] [http:trace3] [pid 4054] http_filters.c(977): [client 10.88.12.0:49378] Response sent with status 200, headers:
...
[Tue Nov 18 18:16:37.399243 2014] [http:trace4] [pid 4054] http_filters.c(806): [client 10.88.12.0:49378] Content-Length: 0
...
Here, the logs shows 200 response with Content-Length:0. The 200 is good response from Apache, so its not Apache error responsible for the blank page. Seeing the Content-Lenght set to 0, made me think there is something more than PHP setup/configuration issue. It was the ErrorHandler at the Application level.
My first post, hope someone can help......!
Firstly the context & my situation: I've worked in IT since 1972 (so can guess my age!), started off programming in COBOL & Assembler. My career progressed through development roles into IT management (Project/Programme/IT Director). Became unemployed in 2012 and have not been able to land a job in IT management role, so have decided to explore other avenues - return to my developer roots and update my skills & self-learn web technologies. After a bit of research, decided that PHP, Apache and MYSQL was the most cost-effective & opportunity enhancing way to go. Now I mention my background to make readers aware that although I have a good understanding of most IT Concepts and techniques my specific tech skills are very out of date, having been a driver rather than a mechanic for at least the last 25 years!.
So armed with lots of books on the subject borrowed from the library and several viewed youtube videos, I am trying to set up a PHP/Apache/MYsQL dev environment on my Windows 8 PC to learn and develop a proof-of-concept app for an idea that I have.
So here's the problem that I has stumped me:
- I have installed Apache 2.4.9, PHP 5.4 and Mysql 5.6 on my windows 8 pc
- I have edited the php.ini and httpd.conf file as per instructions
- I have created an index.php which contains phpinfo () surrounded by the php tags
- I Enter localhost in to browser (chrome) and phpinfo executes OK
- I create a .php file and put in phpinfo () surrounded by the php tags and it finds the file and executes OK
- Now If I edit said .php and put some valid php echo statements in before the phpinfo, they display OK, along with the phpinfo output
- but if I edit said .php file and remove the phpinfo () statement, the browser returns ...the requested web page is not available!
- if I edit the said .php file to put some valid php echo statements in after the phpinfo, the phpinfo output appears but not the php echo outputs
- NB Browser executes an html_test.htm file OK
- same occurs if I substitute phpcredits () for phpinfo ()
- I 've tried putting in an mysqli statement in a file with a phpinfo () and that returned web page is not available (i'm sure the Mysql integration will present another challenge!)
I checked / rechecked the basics of the set up and tried everything I know to get it working but to no avail - I'm sure its something quite simple and obvious but it's escaping me (suspect that it might be something to do with the php error handling but just don't know how to check)
Happy to provide more detailed info on request...
Can any young-gun help the old dinosaur out of the swamp?
Rgds
OK - Here's the code for file a) php_name_with_phpinfo.php:
$surname = "Mysurname";
$firstname = "Myfirstname";
echo $firstname . " " . $surname;
phpinfo ();
and here's the code for file b) php_name_without_phpinfo.php:
$surname = "Mysurname";
$firstname = "Myfirstname";
echo $firstname . " " . $surname;
Assure you that the php start and end tags are around both these bits of code but I can get them to apopear in this question (despite trying to enclose in " or 's)
file a) outputs
Myfirstname Mysurname and then the PHP Version 5.5.8 table
file b) outputs:
This web page is not available
I'm mystified
Here's the Apache logs from the last test:
[Sun Apr 13 19:32:15.005429 2014] [:error] [pid 6472:tid 1180] [client ::1:49856] PHP Warning: phpinfo(): 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 C:\Apache24\htdocs\index.php on line 5
[Sun Apr 13 19:32:15.671297 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 6472 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:15.809554 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:15.809554 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:15.809554 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:15.810555 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 3440
[Sun Apr 13 19:32:16.169793 2014] [mpm_winnt:notice] [pid 3440:tid 684] AH00354: Child: Starting 64 worker threads.
[Sun Apr 13 19:32:39.679326 2014] [:error] [pid 3440:tid 1160] [client ::1:49860] PHP Warning: phpinfo(): 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 C:\Apache24\htdocs\php_name_with_phpinfo.php on line 8
[Sun Apr 13 19:32:39.998571 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 3440 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:40.080627 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:40.080627 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:40.080627 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:40.081628 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 3500
[Sun Apr 13 19:32:40.463914 2014] [mpm_winnt:notice] [pid 3500:tid 372] AH00354: Child: Starting 64 worker threads.
[Sun Apr 13 19:32:50.459089 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 3500 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:50.548148 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:50.549151 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:50.549151 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:50.550149 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 6552
[Sun Apr 13 19:32:50.885418 2014] [mpm_winnt:notice] [pid 6552:tid 388] AH00354: Child: Starting 64 worker threads.
[Sun Apr 13 19:32:51.031514 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 6552 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:51.181935 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:51.181935 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:51.181935 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:51.183934 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 6580
[Sun Apr 13 19:32:51.532238 2014] [mpm_winnt:notice] [pid 6580:tid 668] AH00354: Child: Starting 64 worker threads.
[Sun Apr 13 19:32:53.098367 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 6580 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:53.185426 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:53.185426 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:53.185426 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:53.187427 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 6820
[Sun Apr 13 19:32:53.567752 2014] [mpm_winnt:notice] [pid 6820:tid 676] AH00354: Child: Starting 64 worker threads.
[Sun Apr 13 19:32:53.712849 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 6820 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:53.823924 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:53.823924 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:53.823924 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:53.824925 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 4068
[Sun Apr 13 19:32:54.201196 2014] [mpm_winnt:notice] [pid 4068:tid 640] AH00354: Child: Starting 64 worker threads.
More info from testing for anyone who is listening:
- syntactically correct php statements appearing before phpinfo () in file process OK
- syntactically correct php statements appearing after phpinfo () in file don't process, just the table is output
- a file that contains syntactically correct php statements but no phpinfo () returns The Web Page is not available'
- a file that contains syntactically incorrect php statements (e.g eco) and a phpinfo () returns the Web page is unavailable.
- Firefox and IE seem to process a valid php file containing phpinfo () but it quickly disappears from the screen and returns the server not found page (is this a clue?)
Still feel its something to with handling of errors but can't see anything in php.ini or apache 2.4 settings that would help me diagnose further.
Shall I give up and use XAMPP?
I tried to de/then reinstall Apache 2.4 and PHP 5.4 but it only made things worse!, so after a few more days of messing around, I deinstalled the lot and went with XAMPP which was quite straightforward to set up and seems to be working well....anyway, as far as my limited knowledge can tell. In hindsight I wish I had known about and used XAMPP from the start and saved myself alot of anguish, frustration and wasted time!.
Thanks & Rgds.
Most likely you spoiled some PHP syntax while removing phpinfo call.
Edit your php.ini again and set display_errors to on - this way you will see a syntax error message instead of generic error page.
Try to use the below code and check for error if there is any. It should work as shown below :
<?php
error_reporting(E_ALL);
$surname = "Mysurname"; $firstname = "Myfirstname";
echo $firstname . " " . $surname;
?>