FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Joomla 3.0 Magic Quotes GPC Off





Pande
I did search here, and found out that I need this to be set by an admin for me as various methods of enabling it aren't available as a sub-user.

I would downgrade to 2.5, which would be good enough, however the features of 3.0 such as cross-device responsiveness and faster user management are something I would find essential for my site.

I was wondering if I could have it enabled, but I also might suggest that the official Joomla installation sticky is changed to reflect the new versions, it's all fine except that it should tell you what to do for 3.0 and 2.5 respectively.
bogisha
Same thing here, we just can't run joomla 3 on this host... I'm disappointed.
RoylanM
You can run 3.0 you just have to request Bondings or another account/host administrator turn off magic quotes. There is no need to be disappointed and I'm sure the staff will help you as soon as they possibly can.
Peterssidan
I know that Bondings has turned off magic quotes for at least one person but I have also seen a lot of people recently asking magic quotes to be turned off without any response from Bondings so I would not wait for him to come along and do it.
RoylanM
If Mr.B doesn't handle this soon then just try making a php.ini file to turn it off.
Peterssidan
It's not possible to edit the php.ini file.
Qantas94Heavy
Pande wrote:
I did search here, and found out that I need this to be set by an admin for me as various methods of enabling it aren't available as a sub-user.

I would downgrade to 2.5, which would be good enough, however the features of 3.0 such as cross-device responsiveness and faster user management are something I would find essential for my site.

I was wondering if I could have it enabled, but I also might suggest that the official Joomla installation sticky is changed to reflect the new versions, it's all fine except that it should tell you what to do for 3.0 and 2.5 respectively.


For Joomla 3.0 a .user.ini file MUST be placed in the joomla directory or any of its parents, up to the document root (public_html). An example of a .user.ini file for Joomla 3.0 would be the following (in public_html):

Code:
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
display_errors = Off
output_buffering = Off


Make sure you deny access to the file by using .htaccess, or (if you want to be cheeky) fake a 404 page. This works as Frihost uses FastCGI for the servers.
Pande
No the above doesn't work, we don't have access to that API.
Qantas94Heavy
Pande wrote:
No the above doesn't work, we don't have access to that API.


What server are you on? I'm currently using that code to run a Joomla 3.0 page on Frihost's Server 4, so that's odd. Have you actually tried using that? Note that this is a .user.ini file, not a php.ini file.
Peterssidan
That is good news Qantas94Heavy. I didn't know about .user.ini files. .user.ini files was introduced in PHP 5.3 so it doesn't work for me on server 2 but server 4 has PHP 5.3.22. Sad that we didn't know this earlier because there has been a lot of people asking about it.
manfer
I suppose php.ini must be disable for security reasons (don't know in which servers but at least it seems in server 2 -as for previous message- and 4 -I can confirm that-, and I bet server 3 too).

I didn't knew about .user.ini but what I realize is that it is much safer than php.ini because you have control over far less directives with .user.ini and besides doesn't override all the configuration as php.ini does (any directive you don't configure in a php.ini file gets default values).

Besides .user.ini file works as .htaccess in the sense that the configuration is inherited by subfolders. On the other hand php.ini configuration is not inherited (though the configuration with suPHP_ConfigPath in suPHP servers -if it hasn't been disabled- is inherited on subfolders).
miteY
Pande wrote:
I did search here, and found out that I need this to be set by an admin for me as various methods of enabling it aren't available as a sub-user.

I would downgrade to 2.5, which would be good enough, however the features of 3.0 such as cross-device responsiveness and faster user management are something I would find essential for my site.

I was wondering if I could have it enabled, but I also might suggest that the official Joomla installation sticky is changed to reflect the new versions, it's all fine except that it should tell you what to do for 3.0 and 2.5 respectively.

You don't need Bondings or a Mod to set Magic Quotes off for you.

If you still need to use Joomla 3 here, you can apply the method I used.

I solved the magic quotes problem by adding the following code to both the top of my index.php file and administrator/index.php file of my Joomla 3.1 website.
Code:
. . .


EDIT: Hacking of Joomla core code is considered dangerous. Please refer to my newer posts on this thread to see a better way of solving magic_quotes problem for Joomla 3.

Hope this helps. Cheers! Smile
manfer
There is no need to hack joomla code.

Refer to the following message for the way to turn magic quotes off. Or to the message on this thread that explains .user.ini files.

I doubt any of the frihost Servers has .user.ini turned off or php<5.3 so the method should work. Otherwise if any member is not able to make it work I suggest he reports in which of frihost Servers he is hosted so the admins can check if .user.ini is available or not.
miteY
manfer wrote:
There is no need to hack joomla code.

Refer to the following message for the way to turn magic quotes off. Or to the message on this thread that explains .user.ini files.

I doubt any of the frihost Servers has .user.ini turned off or php<5.3 so the method should work. Otherwise if any member is not able to make it work I suggest he reports in which of frihost Servers he is hosted so the admins can check if .user.ini is available or not.

I have not tried your method, so I can't condemn it, but have you tried it? The method I outlined works for me.
manfer
miteY wrote:

I have not tried your method, so I can't condemn it, but have you tried it? The method I outlined works for me.


The method I comment is just what joomla asks for. It asks for magic quotes gpc turned off. And the way to do that is by configuring php properly. There are several methods to configure php directives:

- With a custom php.ini file. This is disabled in frihost for security reasons.
- With ini_set on code for some directives. magic_quotes_gpc is not a directive that can be configured with ini_set.
- With .user.ini files since php 5.3.0 (php5.3.0+) for some directives if it is not disabled in php configuration. As far as I know .user.ini files are not disabled on frihost and magic_quotes_gpc is a directive that can be configured in .user.ini files.

Yes I know .user.ini works on frihost and joomla 3.x+ can be installed by disabling magic quotes gpc in .user.ini. But as frihost has several servers I can't ensure it works on all (though it should) that's why I suggest if for someone the .user.ini configuration file does not work report in which server his account is hosted so the admins can check it.

Hacking the joomla code is not recommended at all.

At least people must be clearly warned that the first thing to try is .user.ini configuration and if it doesn't work then they can try other solutions though I would still suggest to open a support request specifying the frihost Server.

By reading @Peterssidan post on 22th april it seems on Server 2 and 3 .user.ini were not working because the php version were less than 5.3.0 but that can have changed now.
miteY
^^^^ Ok. I will try what you said in my next project, though I'm not sure how soon that will be.

Thanks for the input.
miteY
@all, I just completed a Joomla 3 site. I previously tried all other suggestions but when they didn't work I decided to hack Joomla code as shown in my previous post.

However, creating a .user.ini file(as suggested by @manfer) in the root of your domain /public_html/ and putting the following code into it does the job without the need for hacking Joomla core code
Code:
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
display_errors = Off
output_buffering = Off


Once again thanks to @manfer. I will try to edit out my previous post.

Cheers
Related topics
Install Mambo 4.5.2 And Vbulletin 3.0.7
The Best EJB 3.0 Flash PPT
Joomla! 1.0.8
Convert BackslashQuote to Quote
Opera 9.5 & Firefox 3.0 Not working. IE 7 Working. !?Pro
Rosanova's Site ver. 3.0
How to turn Magic Quotes off
Disabling Magic Quotes
Joomla 3.x requiresments and reccomendations
Magic Quotes GPC Off for Joomla 3.0
Joomla! 3.0 support
Disabling magic_quotes - Joomla 3
Any Support for Joomla 3.0 Magic Qoutes problem?
Joomla 3.0 article image problem.. MAGIC QOUTES
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.