NEED HELP! Added allow_url_fopen=On and browser now blank!

Discussions about the different types of Hostings, Hosters and Registrars. Free, Paid, Shared, Dedicated ...

Moderator: Moderators

NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby pityocamptes » Tue Nov 10, 2009 7:05 pm

I am running phpbb3 3.05 on Godaddy Winblows IIS7 server. I bought a small news ticker script that requires allow_url_fopen and magic_quotes_gpc both be "ON" to pull in the rss feed. I created a php5.ini, according to Godaddy tech support, copied it to the root, and also added a phpinfo.php file to check to see if the changes occurred. When both of these were false my phpbb3 forum ran PERFECT. Now, with them both set to true when I access the index page nothing appears - everything is BLANK!! How do I fix this? I set them back to false and am waiting for the server to pick up the changes. How, though, do I set these to true without my forum going blank?!?!? Thanks!


**Edit - OK, checked again with the software maker, appearently someone screwed up. I only needed allow_url_fopen set to true NOT magic_quotes_gpc. Am I getting a blank browser page because of the magic_quotes_gpc set to true?????? Thanks again!
pityocamptes
 
Posts: 15
Joined: Fri Nov 06, 2009 3:08 am

Advertisement

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby SeO » Tue Nov 10, 2009 7:26 pm

pityocamptes wrote:Am I getting a blank browser page because of the magic_quotes_gpc set to true?????? Thanks again!


It should not be the case. Have you tried to activate phpBB debug to see if you get any helpful error message ?
You could set up a test site to find out more about this without screwing your real site, but if magic_quotes_gpc is not required, you do not necessarily need to investigate further, phpBB works fine without it, and more, php6 will just get rid of it.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby pityocamptes » Tue Nov 10, 2009 7:30 pm

SeO wrote:
pityocamptes wrote:Am I getting a blank browser page because of the magic_quotes_gpc set to true?????? Thanks again!


It should not be the case. Have you tried to activate phpBB debug to see if you get any helpful error message ?
You could set up a test site to find out more about this without screwing your real site, but if magic_quotes_gpc is not required, you do not necessarily need to investigate further, phpBB works fine without it, and more, php6 will just get rid of it.



Thanks! I have not done the debugging, if setting allow_url_fopen = on does the same thing then I will to see what is happening. What exactly does magic_quotes_gpc = on do???

Also, could you please reply to my thread for the gymsite map mod? I do not understand the code changing process, specifically which files to change and with what code. The text doc was not clear to me. Thanks again!
pityocamptes
 
Posts: 15
Joined: Fri Nov 06, 2009 3:08 am

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby pityocamptes » Tue Nov 10, 2009 7:47 pm

I activated the debugging to see what was going on. Nothing!! It only showed a blank page... thoughts? Still waiting for the server to accept the changes... took about an hour last night...
pityocamptes
 
Posts: 15
Joined: Fri Nov 06, 2009 3:08 am

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby austin881 » Tue Nov 10, 2009 8:01 pm

First question... WHY IN THE WORLD ARE YOU ON WINBLOWS SERVER? Get linux.

I am on Godaddy linux hosting and can set both of these values on with no problems. Are you sure your *.ini file is at the root of the web server? Make sure you either have a php.ini or a php5.ini file. When you have both they tend to conflict. Either that, or you forget what you have set in which.

magic_quotes_gpc, generally speaking, is the process of escaping special characters with a '\' to allow a string to be entered into a database. This is considered 'magic' because PHP can do this automatically for you if you have magic_quotes_gpc turned on.
More specifically if magic_quotes_gpc is turned on for the copy of PHP you are using all Get, Post & Cookie variables (gpc, get it?) in PHP will already have special characters like ", ' and \ escaped so it is safe to put them directly into an SQL query.

Like SeO said, magic_quotes_gpc has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.

I have a feeling your php.ini is not the problem. You've got something else wrong.
My dev playground: Whoa.co
Appreciate my assistance? You can thank me by linking to my Chevrolet Astro forums.
User avatar
austin881
phpBB SEO Team
phpBB SEO Team
 
Posts: 249
Joined: Wed Oct 28, 2009 12:16 am
Location: Boise, Idaho USA

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby pityocamptes » Tue Nov 10, 2009 8:23 pm

I'm running Winblows because I am running a .asp shell (main site) that links out to my forum and osCommerce.

Well I know yesterday I added the allow_url and magic_quotes and the site went down. Changed them back to "off" and the site came back up within about an hour. Site ran perfect all night. Added the same two files back into the .ini file his morning, set to On, and then realized that the !*@% at the software company I bought the script from were wrong and I only needed the allow_url_fopen set to on. So as of right now I changed magic_quotes back to false and am waiting on the server update.

As a side, I found this:

If anyone is interested found this out about magic_quotes:

10. Double escaping quotes
Have you ever seen a web page display a text with \' or \" , it usually happens when a script is made for magic_quotes of (php.ini) and is deployed on a site with magic_quotes on. First PHP runs addslashes() on all GET, POST and COOKIE data then afterwards one more time when the data is being stored.

Original text:
It's a string

After magic quotes on script start:
It\'s a string

On query storage:
It\\'s a string

HTML output:
It\'s a string



Another scenario that makes this occur is when a user tries to sign up and inputs invalid data, the user then get presented to the same form, this time with the input escaped, the second time the user posts with the valid data the input is escaped another time.




Also, id running allow_url_fopen a major security risk? The company I bought the software from indicated that allow_url_fopen MUST be set to On or the rss feed will NOT work. Thanks again!
pityocamptes
 
Posts: 15
Joined: Fri Nov 06, 2009 3:08 am

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby SeO » Wed Nov 11, 2009 10:40 am

allow_url_fopen is not a security threat in itself, it's only allowing php to connect to the internet to retrieve some data. When it's disabled by hosts it's mostly to save some resources since some script could use it massively. It would not be meant to protect you, but rather to limit what you could do.

So of course, if a hacker makes it to put some php script for example using file_get_contents he could use it to get more things to use on your server, but if he reached the point where he can add or alter files, he has already everything he needs to take full control of the server, so, disabling file_get_contents would actually not help much, if not at all.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby pityocamptes » Mon Nov 16, 2009 6:57 pm

austin881 wrote:First question... WHY IN THE WORLD ARE YOU ON WINBLOWS SERVER? Get linux.

I am on Godaddy linux hosting and can set both of these values on with no problems. Are you sure your *.ini file is at the root of the web server? Make sure you either have a php.ini or a php5.ini file. When you have both they tend to conflict. Either that, or you forget what you have set in which.

magic_quotes_gpc, generally speaking, is the process of escaping special characters with a '\' to allow a string to be entered into a database. This is considered 'magic' because PHP can do this automatically for you if you have magic_quotes_gpc turned on.
More specifically if magic_quotes_gpc is turned on for the copy of PHP you are using all Get, Post & Cookie variables (gpc, get it?) in PHP will already have special characters like ", ' and \ escaped so it is safe to put them directly into an SQL query.

Like SeO said, magic_quotes_gpc has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.

I have a feeling your php.ini is not the problem. You've got something else wrong.



Thanks! Yea, I'm changing over. Like I said earlier, no PHP5.INI file existed in my root, I had to find one on the web and mirror it to the settings shown on Godaddys server (phpinfo.php). Would you mind posting your php.ini file, so that I can go off of that? Not sure about the settings on the .ini.

Also, when I change over to Linux I assume that I have to reset the security settings for my files? For phpbb3 3.05 what files are read only, write, read/write, etc.????? Thanks again!
pityocamptes
 
Posts: 15
Joined: Fri Nov 06, 2009 3:08 am

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby austin881 » Mon Nov 16, 2009 7:10 pm

php.ini (I'm not using a php5.ini)
Code: Select all
register_globals = off
allow_url_fopen = off

expose_php = Off
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

[Zend]
zend_extension=/usr/local/zo/ZendExtensionManager.so
zend_extension=/usr/local/zo/4_3/ZendOptimizer.so


I'm not sure how your files are handled when you change over to Linux. I've never done it before. Maybe GoDaddy's servers are smart enough to interpret the current settings in Windoze and set them accordingly in Linux, I don't know for sure. I'm betting that there will be a lot of things you will need to reconfigure: your database?, your config.php file?, etc.

That is the problem with Windoze servers, one you get sucked into their .asp, proprietary software, ridiculous extension hassles, frontpage blah blah, it is hard to pull you from the quicksand. If it were me I'd start over fresh on Linux and never look back. :)
My dev playground: Whoa.co
Appreciate my assistance? You can thank me by linking to my Chevrolet Astro forums.
User avatar
austin881
phpBB SEO Team
phpBB SEO Team
 
Posts: 249
Joined: Wed Oct 28, 2009 12:16 am
Location: Boise, Idaho USA

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby pityocamptes » Mon Nov 16, 2009 7:22 pm

austin881 wrote:php.ini (I'm not using a php5.ini)
Code: Select all
register_globals = off
allow_url_fopen = off

expose_php = Off
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

[Zend]
zend_extension=/usr/local/zo/ZendExtensionManager.so
zend_extension=/usr/local/zo/4_3/ZendOptimizer.so


I'm not sure how your files are handled when you change over to Linux. I've never done it before. Maybe GoDaddy's servers are smart enough to interpret the current settings in Windoze and set them accordingly in Linux, I don't know for sure. I'm betting that there will be a lot of things you will need to reconfigure: your database?, your config.php file?, etc.

That is the problem with Windoze servers, one you get sucked into their .asp, proprietary software, ridiculous extension hassles, frontpage blah blah, it is hard to pull you from the quicksand. If it were me I'd start over fresh on Linux and never look back. :)



Thanks! I'm currently using mysql db's for my oscommerce and phpbb3 forum. I have backed up the db's and files on my root. Are you saying that my forum and oscommerce or going to go south when I merge over to Linux???? God I hope not... that would suck for business...
pityocamptes
 
Posts: 15
Joined: Fri Nov 06, 2009 3:08 am

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby austin881 » Mon Nov 16, 2009 7:28 pm

Like I said, I have no clue. I've never moved from Windows to Linux on GoDaddy. As far as I know your mySQL databases are on a separate server so everything should be fine. I'll cross my fingers for ya.
My dev playground: Whoa.co
Appreciate my assistance? You can thank me by linking to my Chevrolet Astro forums.
User avatar
austin881
phpBB SEO Team
phpBB SEO Team
 
Posts: 249
Joined: Wed Oct 28, 2009 12:16 am
Location: Boise, Idaho USA

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby pityocamptes » Mon Nov 16, 2009 7:33 pm

austin881 wrote:Like I said, I have no clue. I've never moved from Windows to Linux on GoDaddy. As far as I know your mySQL databases are on a separate server so everything should be fine. I'll cross my fingers for ya.


Thanks... :lol: Do you know which files, or where I can look, for phpbb3 should be read, write, etc.? I'm hoping everything changes over, but I would rather check to make sure my site remains secure. Thanks again!
pityocamptes
 
Posts: 15
Joined: Fri Nov 06, 2009 3:08 am

Re: NEED HELP! Added allow_url_fopen=On and browser now blank!

Postby dcz » Tue Nov 17, 2009 10:13 am

phpBB needs to be able to write in :
Code: Select all
cache/
store/
files/

If the last two are not empty, you will need to as well give writing priviledges to the files, for the cache/ dir, you can just delete all the content except the .htaccess.
Then, Ultimate SEO Url will need to be able to write in :
Code: Select all
phpbb_seo/cache/

Don't empty it, but rather make sure that both the directory and the files inside are writable.
And GYM sitemaps will need writing priviledges in :
Code: Select all
gym_sitemaps/cache/

For this one, you can delete all files except the .htaccess and chmod the dir.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21373
Joined: Fri Apr 28, 2006 9:03 pm


Return to Hosting

Who is online

Users browsing this forum: No registered users and 2 guests