0

I can't find the php.ini but I need to turn short_open_tag to off. How else can I do it?

This is where the file is located But I have no clue how to access it.
loaded Configuration File /usr/local/etc/php5/cgi/php.ini

What I really want to do is to change short_open_tag to off. I tried to upload a new php.ini but it doesn't do anything.

minjiera
  • 336
  • 3
  • 16
  • 1
    possible duplicate of [How to enable PHP short tags?](http://stackoverflow.com/questions/2185320/how-to-enable-php-short-tags) (Just do the opposite On -> Off) – Rizier123 Mar 01 '15 at 22:28

2 Answers2

1

in .htaccess

<IfModule mod_php5.c>
  php_value short_open_tag 1
</IfModule>

php.net

Nik Drosakis
  • 2,258
  • 21
  • 30
0

On the console:

vim /usr/local/etc/php5/cgi/php.ini

Alternatively, open up putty and log the entire output, then run:

cat /usr/local/etc/php5/cgi/php.ini

copy the putput to a new textfile, make the changes, copy the content and run:

echo "" > /usr/local/etc/php5/cgi/php.ini --> make the php.ini empty

then:

vim /usr/local/etc/php5/cgi/php.ini

once vim is up , hit "i" and right click , then once more enter, then :

":q" to save and quit

halfer
  • 19,824
  • 17
  • 99
  • 186
Flo draven
  • 85
  • 4