Unable to turn off strict standards warnings, XAMMP, PHP 5.4.7 - warnings

I'm trying to get some third-party PHP software to run on Windows (it runs on Ubuntu).
I'm using XAMMP with Apache/2.4.3, PHP/5.4.7
The php.ini file, C:\xampp\php\php.ini, is set to not report strict warnings as shown below:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
I know that PHP is reading this it's reported as the loaded configuration file in phpinfo() and if I intentionally put an error into it, apache can't restart.
This question has an answer that suggests modifying the root .htaccess as follows:
php_value display_errors 0
php_value error_reporting 30719
This also had a comment which says that's the .htaccess is the only solution that worked for PHP 5.4.7.
However, still no luck. Short of switching to WAMP, is there anything else I should try?

I know that some WAMP packages will copy php.ini in C:\Windows. Run php -i and make sure that php is actually using C:\xampp\php\php.ini. Also remember that starting with PHP 5.4.0, E_STRICT became part of E_ALL.

It's possible that this third-party software you mention overrides the error reporting level itself after you and therefore "wins". Check for this and if that's what happens, configure it appropriately or make sure to override the settings last.

Related

Enable Tidy on openshift

I'm trying to get the Tidy module to load for my PHP app that I'm hosting on Openshift. Editing the PHP.ini seems to not be allowed as when I restart the app, the file reverts to the old content.
I've tried adding the following to my php script but it doesn't seem to work:
ini_set('tidy.clean_output', '1');
I've also added this to the .htaccess
<IfModule mod_php5.c>
php_value tidy.clean_output On
</IfModule>
Any help gratefully appreciated.
According to this page (http://php.net/manual/en/tidy.installation.php), Tidy must be installed using the "--with-tidy" option when configuring PHP, along with, on Red Hat Linux, installing both libtidy and libtidy-devel. If you create a phpinfo page (http://php.net/manual/en/function.phpinfo.php) you can see by the generated output that Tidy is not enabled. You would not be able to enable this module just by updating your php.ini.
The best option would be to visit openshift.uservoice.com and add Tidy as a feature that you would like to have enabled, then you can have other users go vote on it.
Even if you compiled your own version of PHP on your gear Tidy would not work unless those two packages were installed as listed above.

500 internal server error while trying to install Bolt 2.0.5

I'm getting a 500 Internal Server Error while trying to install Bolt.
First time Bolt user (been using Drupal for a few years).
I'm running on a VPS (with cPanel/WHM).
PHP version 5.4.37, Apache version 2.4.12
PHP memory_limit = 128M
PDO extension, curlssl extension, and GD extension are enabled
Chrome version 40.0.2214.111
mod_rewrite, SQLite, and MySQL 5.6.22
Downloaded the latest version and installed the traditional way (FTP)
Unzipped and updated permissions
.htaccess is there and looks the same as the one referenced on the Bolt installation page
I tried MySQL database and as-is to use SQLite database
Checked host configuration and AllowOverrides is enabled
tried enabling RewriteBase in .htaccess as well as the "FallbackResource /index.php" method
Bolt is in the root directory (not a subfolder)
I have PHP compiled as FCGI with suEXEC on and Ruid2 off.
All I get is the 500 Internal Server Error. What am I missing?
Have the same problem with Bolt 3.0.0 today.
Was solved by removing
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
from .htaccess
Looks like I just figured it out.
I disabled "Zend Guard Loader" on my VPS (cPanel/WHM >> EasyApache) and now I'm good to go!
I had a similar problem with Bold 2.2.20 today. If you're using cPanel, look for something like 'jail php for WordPress'. Disable that and you'll be ready to go.
Here's the description shown:
This plugin will jail anonymous web page requests from users that are not logged in. Jailed requests will be read only, and linux will prevent writes to the filesystem. This will prevent almost all hacks.

why Coldfusion-MySQL-Apache isn't running on localhost if everything is setup and connected?

Newbie question - my first attempt at Coldfusion/MySQL and getting it to run locally.
I'm running Apache Webserver (2.2), I have importet two .sql files into MySQL (5.2.) workbench, forward engineered a database from these, setup working database connection and MySQL Server. This is also running. In Coldfusion8 Admin I added my database as a data source.
I thought this would be enough :-)
Still, on http://localhost I'm still only getting an index of all files in my Apache htdocs folder. If I open one of the files it just shows the Coldfusion Markup/HTML source code. Nothing parsed.
Thanks for any hints on what I could be missing?
EDIT:
Three questions trying to implenent:
1. Can I load modules using absolute paths, like D:/Coldfusion8/lib...?
2. My lib/wsconfig folder only contains a dll file named jrunwin32.dll. Trying to use this?
3. The lib/wsconfig folder does not contain a jrunserver.store file. Not sure what to do here
It sounds as if your Apache config is not correct, as it doesn't sound as if it's having the cfm files handled correctly.
First of all, is there a specific reason for using CF8? CF9 has been around for a while, so if going from scratch then I'd advise taking a look at that instead.
That aside, I'd check for the following in your httpd.conf (or whatever your apache config file is named)
Firstly, that .cfm is acceptable as a DirectoryIndex (can have other indexes as well)
DirectoryIndex index.cfm
Secondly, that the JRUN handler is configured properly (so again, in httpd.conf)
LoadModule jrun_module /opt/coldfusion8/runtime/lib/wsconfig/1/mod_jrun22.so
<IfModule mod_jrun22.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore /opt/coldfusion8/runtime/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 127.0.0.1:51801
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>
This is taken from my development VM, I have CF8 as a single-server install in /opt/coldfusion8/
Once you have those lines in (with the paths/ports etc appropriate for your environment) restart apache and it should work fine.
If you have installed CF8 in a Multiserver etc. install then please specify and will look to adjust my advice accordingly

Fatal error: Call to undefined function mysqli_init()

I have a really strange error. My httpd server have been working fine until last Wednesday, when I uninstalled the MS SQL and visual studio C#. When I restarted the PC, Ii discovered that some parts of the Environment variable PATH disappeared...Almost all the problems where recovered, The only one that cannot be adjusted is my httpd server... or the PHP configuration, I don't know.
I have already uninstalled the Apache server, PHP and MySql and resintalled them again... I have done this lots of times on other PCs so I'm sure that it should work...but I'm missing something.
The worst thing is that the data I get when I do in cmd "php -i" is different form the data I get form a page info.php like this:
<?php
phpinfo();
?>
The page doesn't show any info about the mysqli configuration...
can any body help me?
I'm trying anything to avoid formatting the PC!!!
Thanks in advance
Update::::::::::::::::::::::::::
With phpinfo I find:
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File C:\PHP\php.ini
In C:\windows there's no php.ini file. Where else can PHP find other configurations?
Open the folder you installed PHP
Edit php.ini file
If no php.ini exists, copy one of the php.ini/Production/Development to php.ini
uncomment
extension=php_mysqli.dll
if you have not installed php in the default folder...
or if you have the php extensions in a separated folder
change the extension_dir to the correct path
change
extension_dir = "C:/APL/php/ext/"

Why won't PHP 5.2.14 display any errors (even from the command line)?

I have PHP 5.2.10 and PHP 5.2.14 (x86 non-threadsafe Win32 builds) installed on a Windows 2008 R2 server and on Windows 7 64 bit.
For some reason PHP 5.2.14 refuses to show error messages.
Even when I set the following settings in php.ini I don't get any errors reported if I use 5.2.14:
error_reporting = E_ALL
display_errors = On
This happens even when running a test script from the command line using php.exe with a deliberate syntax error:
c:\php>php test.php
PHP is using the correct php.ini file because I can see my settings change when I run php.exe -i.
I also notice that php.exe in PHP 5.2.14 is very slow to start up.
When I perform the same set of tests using PHP 5.2.10 on the same machines I get error messages reported just fine.
Both of the php.ini files are stock (based off of php.ini-recommended) but with the error_reporting and display_errors settings modified.
I have found this truly annoying, so here's a strategy for checking the syntax from the command line:
Don't load the ini file.
Turn on display_errors and display_startup_errors explicitly.
php -n -l -d display_errors -d display_startup_errors path/to/your/phpfile.php
$ php -h
-n No php.ini file will be used
-l lint, syntax checking only
-d foo[=bar] Define INI entry foo with value 'bar'
I'm running a later PHP (5.4.24), but these other answers lack the -d option I found exemplified elsewhere that makes PHP display intelligible parsing errors when running from the command line:
php -d display_errors test.php
This is the best answer to the question I was googling. Running the linter with -l only tells you "Errors parsing foo.php".
You might have to enable display_startup_errors as well:
display_startup_errors boolean
Even when display_errors is on, errors that occur during PHP's startup sequence are not displayed. It's strongly recommended to keep display_startup_errors off, except for debugging.
You can also try to lint the file with c:\php>php -l test.php to test for syntax errors.
Lately, I had to work on someone else's project... Not being able to debug, I had no choice but to check for this:
error_reporting(0);
So, check on your source code. Search for something like this: "error_reporting(0);".
Once you've found it, comment it!!!
Normally, you don't have to put that in the source code, but in the php.ini file.