-
☆ A M B ☆
- 24,524 Posts
You can also see which version of PHP you have in the Manager; go to Reports -> System Info, then click the phpinfo() view link (third line). The Server API section (fourth item) in the resulting display will specify how your PHP is running. For example, my local MAMP server says
Apache 2.0 Handler
while my live VPS in the UK says
CGI
-
☆ A M B ☆
- 476 Posts
Hey Susan,
Thanks for the advice. After doing what you suggested, here’s what I got:
Server API...Apache 2.0 Handler
Now what?
Precision Web Development ... SmashStack.com
-
MODX Staff
- 2,502 Posts
Well your php should accept items with the php_flag keyword from an .htaccess file BUT you need to make sure that there is not already an .htaccess file in your root directory. Having two may cause the other to be overwritten and not work and could cause the 500 Internal Server Error.
In the php_info() file that Susan mentioned you should look down the page for Apache’s Installed Modules and look to see if mod_rewrite is enabled. I have googled on ".htaccess godaddy shared" and it is unclear as to how their servers are set up because I have read on some forums that you will need a php.ini or (if you are using php5) php5.ini as well as adjustments to the root .htaccess file on the server.
It is common for hosts to already have an .htaccess file on your server and there is a possibility that the sever may have Apache’s AllowOverride set to NONE in which case you may have to call to ask how to turn register_globals off. In fact this may be the way to go. A five minute call or email could save you a whole lot of wasted guessing.
All the best,
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
Quote from: smashingred at Sep 12, 2007, 02:03 PM
It is common for hosts to already have an .htaccess file on your server and there is a possibility that the sever may have Apache’s AllowOverride set to NONE in which case you may have to call to ask how to turn register_globals off. In fact this may be the way to go. A five minute call or email could save you a whole lot of wasted guessing.
Note also that many hosting services have a forum that you could search for register_globals and find an answer.
Bob
-
☆ A M B ☆
- 476 Posts
After speaking with Godaddy hosting tech support today (which rushed me off the phone with little help), I was instructed to simply upload my own php.ini file with Global settings to off in the directory containing MODx. I am an extreme Newbie (never have coded 1 line of PHP in my life) so this advice Godaddy gave me wasn’t much of a help either.
So I guess where I’m at now in this process is do I simply download a generic php.ini file (and if so, where would I get that?), set The Register Globals to off (theregister_globals = Off), and then upload the file into the directory containing MODx?
Thanks!
Precision Web Development ... SmashStack.com
Quote from: flinx at Sep 21, 2007, 11:11 AM
After speaking with Godaddy hosting tech support today (which rushed me off the phone with little help), I was instructed to simply upload my own php.ini file with Global settings to off. I am an extreme Newbie (never have coded 1 line of PHP in my life) so this advice Godaddy gave me wasn’t much of a help either.
So I guess where I’m at now in this process is do I simply download a generic php.ini file (and if so, where would I get that?), set The Register Globals to off (theregister_globals = Off), and then upload the file into the directory containing MODx?
Thanks!
It’s even easier than that. If you don’t already have a php.ini file, just copy the following line into a new text file, save it as php.ini (or php5.ini if they’re using PHP5) and upload it:
register_globals off
That will probably take care of your problem but if it doesn’t you might want to create a page containing the following PHP code. Going to that page will list all the php-related info. It will tell you where it’s looking for the php.ini file. Yours should be in that location.
<?php
phpinfo();
?>
Bob
-
☆ A M B ☆
- 476 Posts
Hello Bob,
Thank you for your advice. I uploaded a page with the php coding you suggested:
<?php
phpinfo();
?>
If you look here, you can see the information:
http://rent2ownhomesonline.com/info.php
Here’s the file path which it shows where the php.ini file should reside:
/web/conf/php.ini
I uploaded a file named php.ini with the register_globals = OFF into both the top directory with MODx and into the directory /web/conf/php.ini...neither of which did anything. And by the way, the only text I only had to put was "register_globals = OFF" in the php.ini file, right?
Any advice would be greatly appreciated. Thanks again for your help thus far.
Precision Web Development ... SmashStack.com
The syntax for doing this in a php.ini file is different from when you do it in an .htaccess file. All you want in your php.ini file is the following:
No equals sign, and of course no quotes.
I’ve done this on GoDaddy before and it’s worked fine, although I believe they offer many different types of servers.
-
☆ A M B ☆
- 476 Posts
Hello Zap,
Thank you for your suggestion. I changed the php.ini settings to register_globals off and still it’s not working. Also, as I stated earlier, I’ve never worked with php files, so the php.ini file should only have 1 line of coding, register_globals off, correct? In other words, if you open the file with a text editor, there will be absolutely no other text, correct? Sorry for such newbie questions, but...
Thanks again for any suggestions you would have to offer.
Precision Web Development ... SmashStack.com