Enable Tidy on openshift - 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.

Related

Enable LDAP on Xampp Windows

I want to enable LDAP module on my XAMPP Windows 10, here's the few solutions that I've tried :
Copy dll files to System and System32 and uncomment extension=php_ldap.dll in php.ini, both development and production.
Copy libsasl.dll to xampp/apache/bin
None of these working, when I opened phpinfo() there is no ldap info showing, which means the ldap hasn't been able to installed. I also added PHP in Windows Path with no success, but either my approach is wrong or that wasn't a solution. Any help appreciated.
Make sure the path\to\xampp\php directory has the following files
libeay32.dll
libsasl.dll
ssleay32.dll
Usually, you can find these files in path\to\xampp\sendmail - this library also uses them. But if not, try to search for them inside the xampp directory.
Uncomment or add the ldap extension in the php.ini (path\to\xampp\php\php.ini) file
extension=ldap
Restart the server
Make sure the path\to\xampp\php directory is set in the system environment variable PATH. To know how to do it, see this post.
I just ran into the same issue and the link you provided How to enable LDAP extension in XAMPP environment ended up being the solution for me.
I copied libeay32.dll and ssleay32.dll from C:/Ampps/php to C:/Windows/System32. I made sure neither of these files were in C:/Windows/System. From there I enabled extension=php_ldap.dll in the php.ini file. Ampps has a list you can enable php.ini dll's and if I remember right so does XAMPP. The last step is to just restart Apache and you should be good to go.
I'm using Windows 10 with Ampps instead of XAMPP but have to think they are pretty close.

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.

openshift : need to edit httpd.conf to enable or add directive according to my needs but it's not work

i've build my application on localhost and running it without any error. i choose openshift to host my application code but i have a problem to make it works perfectly like on my localhost.
i want to add directive of AllowEncodedSlashes and set it to On in my apache2 configuration file, i have tried to edit the file from ~/php/configuration/etc/conf/httpd.conf and then restart the server using ctl_all restart. but the result are http error code 400 (Bad Request). before i add this directive into httpd.conf the result are http error code 404, i am just not sure if the changes are in effect or not. or apache is bugging?
is there anyone knows howto make this work for me?
See if you can add it into .htaccess file instead of httpd.conf file. Also the best way to troubleshoot these problems would be by reviewing your application logs for errors. All you have to do is run "rhc tail {appName}" from your client machine (where the rhc client tools are installed). That gives you the current log entries.
To get to the entire log, you'll want to ssh onto the gear(s) on which the language framework/cartridge is installed using this FAQ and run: more ~/{cartridgeID}/logs/*.log
where {cartridgeID} is your framework cartridge like nodejs-0.6, or your embedded cartridge logs like mysql-5.1.
I created a feature request for this. See this Trello card and feel free to vote it up.

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

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.

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