Go Back   HostGator Peer Support Forums > HostGator Announcements > General Announcements

Notices

Reply
 
Thread Tools
  #151  
Old 11-17-2007, 06:14 AM
duskosavic duskosavic is offline
Hatchling Croc
 
Join Date: Dec 2006
Posts: 1
Default Fixing Joomla global registers on/off

Hi

One of the ways to eliminate this message is to install the line

AddHandler application/x-httpd-php5 .php

into every root .htaccess file, for each domain, be it on reseller plan or not. This will activate php5, in which global variables are by default off. This eliminates the annoying yellow message from Joomla admin panel.

Also see a sticky

http://forums.hostgator.com/showthread.php?t=13423

about installing php 5 on phpsuexec on hostgator.
__________________
Use energy healing to avoid hysterectomy
http://www.how-to-avoid-hysterectomy.com/
Reply With Quote
  #152  
Old 01-03-2008, 09:55 PM
digiweb digiweb is offline
Hatchling Croc
 
Join Date: Jan 2008
Posts: 1
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

I moved a customer to hostgator, we are getting a syntax error I assume is a PHP version mismatch issue but I can't debug it.

Lines 1,2,3
class id3v2{
var $TargetSrcFile;
var $TargetNamFile;

Error
PHP Parse error: syntax error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in [the file] on line 1


I changed var to public, private, and as far as I know the var syntax is working elsewhere on the site.


thoughts on why this is happening?
Reply With Quote
  #153  
Old 01-04-2008, 03:51 AM
pixel_lab pixel_lab is offline
Hatchling Croc
 
Join Date: Jul 2005
Location: Bristol, UK
Posts: 32
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

you need to pop this into the first line of your .htaccess file:

Code:
AddHandler application/x-httpd-php5 .php
Reply With Quote
  #154  
Old 01-30-2008, 06:47 AM
silentflute silentflute is offline
Hatchling Croc
 
Join Date: May 2005
Posts: 13
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

I know this sounds like a stupid question but, how do you know if your server, reseller or otherwise, has PHPSuExec installed -- I put on phpinfo() but I find no occurance of it -- is PHPSuExec referenced by another name?

Do I need to switch PHPSuExec on in my htaccess file, or is it switched on in my php.ini or is it switched on automatically?
Reply With Quote
  #155  
Old 01-30-2008, 06:50 AM
ghpk ghpk is offline
King Croc
 
Join Date: Nov 2006
Posts: 1,238
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

if in phpinfo you see
Server API CGI Means PHPSuExec is enabled
Server API Apache Means non-PHPSuExec
Reply With Quote
  #156  
Old 02-07-2008, 04:21 AM
corestudio corestudio is offline
Hatchling Croc
 
Join Date: Feb 2008
Posts: 9
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

I am on shared hosting.
I understand that I can define such configuration options as register_globals in my php.ini file because of PHPSuExec. I have two questions:

1) Does this mean that I have to create a php.ini for EVERY directory that has a PHP script in it? Is there no work around to it? like a single php.ini configurations that covers the current directory and subdirectories? It is would be very cumbersome to create php.ini files for every directory that runs php. A .htaccess file had recursive implications unlike this setup, if thats the case.

2) Do I have to create a php.ini file which is identical to that defined by the server's php.ini file (which I do not have access to. If so, where do I get it). If I have one configuration option and its value in the php.ini file (e.g. just register_globals off ), what happens to the other values? Is there some default override on non-specified values?

Please assist

Thank-yoU!
Reply With Quote
  #157  
Old 02-07-2008, 05:30 AM
zapthis zapthis is offline
Hatchling Croc
 
Join Date: Jan 2008
Posts: 2
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

I'm new to hostgator and it has been a pain in the butt with this phpsux program running, the PHP.ini does not work well. Safe mode is still off and register globals is also still off. Can we turn this program off?
Reply With Quote
  #158  
Old 02-07-2008, 07:12 AM
gtgeorge's Avatar
gtgeorge gtgeorge is offline
Emperor Croc
 
Join Date: Mar 2005
Posts: 2,258
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

phpSUEXEC is not a HG problem as it is handled but actually a benefit do to the security thay it offers. Unfortunately php.ini will need to be placed in any directory that you need to override the default setting that runs .php files. It is best to do a copy of the .ini with your overrides as some items are lost if not.

Support can symlink your .ini if you need it done or with root access you can copy it throughout yourself.

For more about how to get a copy and keep it up to date with your server look here:
http://forums.hostgator.com/showpost...8&postcount=45
(Same link that I posted earlier in this thread!)
__________________
best regards,
George

Last edited by gtgeorge; 02-07-2008 at 07:16 AM.
Reply With Quote
  #159  
Old 02-24-2008, 01:44 AM
Buckshot's Avatar
Buckshot Buckshot is offline
Junior Croc
 
Join Date: Oct 2003
Posts: 116
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

Issue on 1 site after ugrade to PHPSuExec.

One of the sites on the server is having issues with their images on the guestbook now.

This is what the php coding for the images are coded like:

Code:
<img src="$GB_PG[base_url]/img/signing.gif" width="90" height="30" border="0">
Since the PHPSuExec upgrade, images can no longer be seen on /comment/ but if you type it in the address bar this way, /comment/index.php, the images show.

NO files are set at 777.

Before the PHPSuExec, images showed.

I haven't figured out how to make them show on /comment/ like before.
Reply With Quote
  #160  
Old 02-24-2008, 02:44 AM
slapshotw's Avatar
slapshotw slapshotw is offline
Veteran Croc
 
Join Date: Jun 2006
Posts: 5,163
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

Are you sure this is a phpsuexec problem? Was your server just upgraded? These upgrades were done a long time ago.

This sounds like it could also be tripping a mod_security rule. Is anything coming up in the php error log? Can you ask support to check their logs?
__________________
Follow me on Twitter! http://twitter.com/mrw
Reply With Quote
  #161  
Old 02-24-2008, 04:35 AM
whatrevolution whatrevolution is offline
Royal Croc
 
Join Date: Feb 2008
Posts: 509
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

Quote:
Originally Posted by Buckshot View Post
Code:
<img src="$GB_PG[base_url]/img/signing.gif" width="90" height="30" border="0">
Sure, perhaps that code worked at some point, but it looks fragile to me.

What command is that inside of? I assume print or echo... taking my assumption, for example, I would expect it to look like this instead:

PHP Code:
echo '<img src="'.$GB_PG['base_url'].'/img/signing.gif" width="90" height="30" border="0">'
Especially that associative array reference, since without 'quoting' the string, it's being checked to see if there's a constant with that name, first, as I recall.
Reply With Quote
  #162  
Old 02-24-2008, 09:08 AM
Buckshot's Avatar
Buckshot Buckshot is offline
Junior Croc
 
Join Date: Oct 2003
Posts: 116
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

Quote:
Originally Posted by slapshotw View Post
Are you sure this is a phpsuexec problem? Was your server just upgraded? These upgrades were done a long time ago.

\
Yes I am sure as I upgraded phpsuexec last night on the dedicated server. Issue wasn't there before the upgrade.
Reply With Quote
  #163  
Old 02-24-2008, 09:10 AM
Buckshot's Avatar
Buckshot Buckshot is offline
Junior Croc
 
Join Date: Oct 2003
Posts: 116
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

Quote:
Originally Posted by whatrevolution View Post
Sure, perhaps that code worked at some point, but it looks fragile to me.

What command is that inside of? I assume print or echo... taking my assumption, for example, I would expect it to look like this instead:

PHP Code:
echo '<img src="'.$GB_PG['base_url'].'/img/signing.gif" width="90" height="30" border="0">'
Especially that associative array reference, since without 'quoting' the string, it's being checked to see if there's a constant with that name, first, as I recall.
It is Advance Guestbook.

Here is more of the coding:

Code:
<form method="post" action="$GB_PG[index]">
 <table border="0" cellspacing="0" cellpadding="2" align="center" width="$VARS[width]">
  <tr>
    <td width="56%"> </td>
    <td width="44%" align="right" class="font2"><img src="$GB_PG[base_url]/img/signing.gif" width="90" height="30" border="0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
      <img src="$GB_PG[base_url]/img/sign.gif" width="9" height="12"> <a href="$GB_PG[addentry]"><b>$LANG[BookMess3]</b></a>
      <b>| <img src="$GB_PG[base_url]/img/lock.gif" width="9" height="11"> <a href="$GB_PG[admin]">$LANG[BookMess5]</a></b>
    </td>
   </tr>
   <tr>
     <td width="56%" class="font2">$TPL[GB_TIME]<br>$LANG[BookMess6]</td>
     <td width="44%" valign="bottom" align="right">

<!--Start JumpMenu -->

$TPL[GB_JUMPMENU]

<!--End JumpMenu -->
I know before I upgraded to phpsuexec it was working and now it's not.

It is also the "ghost account" in my WHM Bandwidth Usage that support is having hard time reading the ticket to know which account is missing -- even though I have told them multiply times, they are regenerating WHM Bandwidth Usage for the wrong account -- go figure.

Last edited by Buckshot; 02-24-2008 at 09:13 AM.
Reply With Quote
  #164  
Old 02-24-2008, 05:00 PM
Buckshot's Avatar
Buckshot Buckshot is offline
Junior Croc
 
Join Date: Oct 2003
Posts: 116
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

Client emailed me this afternoon and said counters were not working on 2 of his sites.

I upgraded to phpsuexec last night.

I checked /var/cpanel/Counters/counter.dat permissions are 0644 and the owner and group is their respective user.

I set all permissions to 777 to counter´s .dat files and they are all now working.

I thought 777 was not to work with phpsuexec??
Reply With Quote
  #165  
Old 02-24-2008, 05:14 PM
quietFinn's Avatar
quietFinn quietFinn is offline
Emperor Croc
 
Join Date: Feb 2005
Posts: 2,764
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

Quote:
Originally Posted by Buckshot View Post

I thought 777 was not to work with phpsuexec??
If you are running phpSuExec you can't execute php scripts with 777 permissions or php scripts residing in a directory with 777 permissions.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #166  
Old 02-24-2008, 05:46 PM
Buckshot's Avatar
Buckshot Buckshot is offline
Junior Croc
 
Join Date: Oct 2003
Posts: 116
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

Quote:
Originally Posted by quietFinn View Post
If you are running phpSuExec you can't execute php scripts with 777 permissions or php scripts residing in a directory with 777 permissions.
When I view phpinfo it shows I am running phpSuExec yet I was able to set all permissions to 777 in counter´s .dat files.

If I am not mistaken, doesn't Server API showing CGI mean that you are running phpSuExec?

I did an Apache Rebuild last night with phpSuExec.

Some files on some sites that had 777 permissions had to be change because of phpSuExec.

I am confused about 777 working in /var/cpanel/Counters/ with phpSuExec running.
Reply With Quote
  #167  
Old 02-25-2008, 03:59 PM
eggman37 eggman37 is offline
Hatchling Croc
 
Join Date: Feb 2008
Posts: 1
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

this seems to only work if you are using php 5 in by use of the following in your .htaccess:

AddHandler application/x-httpd-php5 .php

I found that only after this will your php.ini be recognized
Reply With Quote
  #168  
Old 05-31-2008, 11:59 AM
babyfish babyfish is offline
Hatchling Croc
 
Join Date: Oct 2007
Posts: 2
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

When i put php.ini (just setup register_globals =Off)to /public_html but the PDO function seem to got a error just like below:
Fatal error: Class 'PDO' not found in /home/itadmin/public_html/isearch.php on line 12
How can i do to fix it ? thanks !
Reply With Quote
  #169  
Old 06-01-2008, 02:29 AM
babyfish babyfish is offline
Hatchling Croc
 
Join Date: Oct 2007
Posts: 2
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

I sent a ticket to support@hostgator.com and they had solve this problem for me.
Reply With Quote
  #170  
Old 07-17-2008, 02:34 AM
gerzok gerzok is offline
Hatchling Croc
 
Join Date: Jul 2008
Posts: 1
Thumbs up Re: PHPSuExec being installed on existing servers »» Tips and tricks

Quote:
Originally Posted by Vidar View Post
Something that worked for me to turn off register globals once and for all (not sure if this is just a Joomla thing though):

Put a copy of the php.ini file into your 'administrator' folder which is located in your list of directories on the server. The other php.ini file should go in your public_html root.

Both files should ofcourse have the code in it to turn off register globals (and whatever else you want to put in there)...

After this, Joomla will no longer display the message that php globals is on.

Hope this helps someone. Thanks to the ticket support team at hostgator for telling me this. You guys rock (and answer came in about 3 minutes flat!).
Hey!!! you're a genius, that work for me!!!

Tnx a lot
Reply With Quote
  #171  
Old 03-21-2009, 11:07 PM
tk1075 tk1075 is offline
Hatchling Croc
 
Join Date: Mar 2009
Posts: 3
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

I am trying to setup a new site with joomla and I am having the same problem. It keeps saying I have global registers on. I have put a php.ini file in the public_html folder and the admin folder of the site that will be using joomla. I am on a shared hosting accout if you need to know that. I am a noob so any help will be appreciated.

Never mind I got it.
Reply With Quote
  #172  
Old 03-22-2009, 01:16 AM
virtvir5's Avatar
virtvir5 virtvir5 is offline
Swamp Croc
 
Join Date: Feb 2009
Location: Parry Sound, Canada
Posts: 339
Default Re: PHPSuExec being installed on existing servers »» Tips and tricks

Your problem has been answered in another thread. Please don't cross-post -- especially not in announcements. Some of us old codgers get tired just reading things once.
__________________
Regards, Richard
VIRtech.org
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 01:48 AM.

 
Forum SEO by Zoints