Edit php.ini with .htaccess - .htaccess

I'm slowly getting back into PHP, and now I run into a problem, I want to install some web software on our host and I need to have either the latest Zend (which they don't have) or IonCube on the server and IonCube requires enable_dl to be on in the php.ini. Now a colleague of mine thinks I can update this via an .htaccess file on the server. So I created a s.htaccess on my machine as Windows doesn't like emptiness before the file extension. So I added the line php_flag enable_dl On to the file uploaded it and renamed the file to just .htaccess on the server. When I refresh the file is gone, when I keep it as s.htaccess it's fine but my php info still shows it as Off.
What n00b mistake am I making?

The documentation says that this can only be set in the php.ini (not in .htaccess). You can see this by looking at the table where it says "PHP_INI_SYSTEM", which means - "Entry can be set in php.ini or httpd.conf".

Unix way to hide files is prepending it with a dot. The file is there, but it's just hidden. Your ftp-software should have a setting for showing hidden files. IIRC you can rename the file to .htaccess through cmd in windows. The .htaccess only has effect in the current dir and sub directories. This might also be (because of security) one of those settings that is only setable through php.ini

Related

Magento Installation Without .htaccess

I'm making a new Magento Installation and like always, access magento.com to download the installations files.
For my surprise, theres no more .htaccess in the compress files O.o
Someone can tell why or give any tip?
It is always there, but it's a hidden file so just change the setting of the Files Manager or Finder to see it.

whmcs cron not running says ioncube not installed

ioncube is installed on my server, this can be verified at http://www.webhostingmumbai.co.in/phpinfo.php
but when i run the cron at webhostingmumbai.co.in/manage/crons/cron.php , it gives me the following error:
Site error: the file /nfs/c04/h03/mnt/60142/domains/webhostingmumbai.co.in/html/manage/crons/cron.php requires the ionCube PHP Loader ioncube_loader_lin_5.3.so to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation.
in php.ini the ioncube installation has been mentioned at webhostingmumbai.co.in/ioncube/...
can someone help me what what needs to be done to make the cron work?
The php.ini file at /nfs/c04/h03/mnt/60142/etc/php.ini is the one being used by default. The server uses CGI, so a php.ini file found in the same location as the first page of a request may take precedence. See if you have php.ini files anywhere within your hosting area and ensure that the Loader is reference in each one just in case.
Kindly try to run following command via SSH to check which php.ini files are loaded on your server
php -i | grep -i 'php.ini'
and be sure that you add ioncube zend_extension path to all files which you get listed by this command.
Also check whether full path to whmcs installation directory is set or not in cron config.php
goto
whmcsfolder/crons/
you will see config.php file , add the complete path to whmcs installation directory like
$whmcspath = '/var/www/html/clientarea/';
where clientarea is whmcs root directory.
This will definitely help you.

Why .htaccess does not support in Windows?

Good evening to all my beloved friends and respected participants!
I had face this problem that windows does not support .htaccess file .May I know why Window does not support this file extension?
Windows can't use files without name, because the dot in the name means htaccess is an extension for it. Unfortunately it's not the case. .htaccess is the full name of the file. If you want to rename a txt file to .htaccess, you can use windows command line :
rename "file.txt" ".htaccess"

Install modx in a subfolder

I like my webspace tidy :)
Therefore if my root-folder is html/ I would like to install modx (version 2.2) in the subdirectory html/modx/
For my website-visitors everything should be the same as if I would have installed modx in the root folder (html/).
I also don't want to do without friendly urls.
To make it even more difficult: I also really like the builtin modx file browser and I would love to use it for every file and folder in the document root (so every file inside html/* should be displayed).
(How) is this possible?
Additional question: if it is possible, is it better to reinstall modx in the subfolder or to move my installation to the new location (html/modx). As my installation is only a few days old, either option would be fine.
What version of MODx are you using?
Usually you would do an advanced installation (a separate version of MODx). You can move the existing MODx install to your sub-directory but you will need to update all of the config.core.php files and MODX_CORE_PATH constants to reflect this. You will also need to leave and update at least the index.php file in your web root directory. The config files that would need updating include:
config.inc.php
manager/config.inc.php
connectors/config.inc.php
core/config/config.inc.php
core/config/config.inc.php is the most important file and you will want to make sure ALL of the paths listed in there are correct.
The file browser will work fine providing you check all the URL and filesystem paths are correct in the Manager settings.
Change your .htaccess setting:
RewriteBase /subfoldername/
and install it as typically you do.

HTML5 Boilerplate Build Script - .htaccess doesn't exist

I thought I'd try out the Build Script for HTML5 Boilerplate - it's aimed at front-end designers and developers so this should be fairly straightforward right?
I'm running with a Mac so I should have all I need according to Paul.
Tried it on a blank project and immediately hit a brick wall.
I ran the cd build command, pointing it to my local folder
Then I ran ant build. It seemed to go OK, with a load of jibberish about how it was Building a Production environment but got stuck when looking for the htaccess file...
BUILD FAILED
/Users/jaygeorge/Dropbox/Websites/Clients/HTML-Sandbox/build/build.xml:137:
The following error occurred while
executing this line:
/Users/jaygeorge/Dropbox/Websites/Clients/HTML-Sandbox/build/build.xml:673:
Replace: source file
/Users/jaygeorge/Dropbox/Websites/Clients/HTML-Sandbox/publish/.htaccess
doesn't exist
Well of course the .htaccess file doesn't exist because it didn't come with the Boilerplate download. Do I need to download the htaccess file from my website so that it sits locally? I don't really understand this stuff - Was hoping Paul Irish would make his instructions more comprehensive :-(.
There should be an .htaccess file in the root folder of the ZIP file you downloaded. Note that you may have to turn on 'view hidden files' or similar in your File Explorer to see it.
Try to make empty .htaccess file and copy/paste code from: http://html5boilerplate.com/

Resources