Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> FAQ - PHP5 w/phpSuExec Conversion From PHP4
Poll
Was this helpful?
Yes
100%
 100%  [ 2 ]
No
0%
 0%  [ 0 ]
Total Votes : 2


Author Message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue Nov 27, 2007 1:09 am Reply with quote

Example Errors:
Example items in your cPanel error log (cPanel > Error log) will be like:
- Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration
- Invalid command 'php_value, perhaps mis-spelled or defined by a module not included in the server configuration

The script(s) you are using assumes that PHP is installed as a module. PHP is now installed as a CGI on our servers. Your script(s) should have documentation for how to install it on servers that run PHP as a CGI. This is sometimes referred to as PHP SuExec or SuPHP. Instead of adding these directives to your .htaccess file, add them into a file called php.ini and place this file in the same directory that your script runs in. Most often this will be public_html, but in some cases you will install your script in a subdirectory. Wherever your script runs, this is the place for your php.ini file. You will need to drop the "php_flag" and "php_value" prefix. You will also need to put an equals (=) sign between the setting and the value.

For example, if your script recommends these settings in a .htaccess file:
__________________________________________
php_value upload_max_filesize 10M
php_value post_max_size 10M
php_value max_execution_time 60

php_flag register_globals off
__________________________________________

Put them in a php.ini file instead. Here is the proper syntax:
__________________________________________
upload_max_filesize = 10M
post_max_size = 10M
max_execution_time = 60

register_globals = off
__________________________________________
 
View user's profile Send private message
djmaze
Subject Matter Expert



Joined: May 15, 2004
Posts: 727
Location: http://tinyurl.com/5z8dmv

PostPosted: Mon Nov 22, 2010 2:36 pm Reply with quote

Just use
Code:
<IfModule mod_php5.c>

   # speed up PHP
   php_flag magic_quotes_gpc 0
   php_flag magic_quotes_sybase 0
   php_flag output_buffering 0
   php_flag register_argc_argv 0
   php_flag register_globals 0
   php_flag register_long_arrays 0
   php_flag short_open_tag 0
   php_flag asp_tags 0
   php_flag session.auto_start 0
   php_flag zlib.output_compression 0
   php_value mbstring.internal_encoding UTF-8
   php_value iconv.input_encoding UTF-8
   php_value iconv.internal_encoding UTF-8
   php_value iconv.output_encoding UTF-8
   # Debugging
   php_flag display_errors 1
   php_flag html_errors 0
#   php_flag log_errors 1
#   php_value error_log poodle_sites/default/cache/php_error.log
   php_value error_reporting 2147483647
   php_value log_errors_max_len 0
</IfModule>

_________________
$ mount /dev/spoon /eat/fun auto,overclock 0 1
ERROR: there is no spoon [ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Mon Nov 22, 2010 3:18 pm Reply with quote

Going back in time a ways.

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
rovshan
Hangin' Around



Joined: Nov 26, 2005
Posts: 39

PostPosted: Sat Aug 27, 2011 3:25 am Reply with quote

in my case these couple line of code in htaccess file created 500 problem:

#Options All -Indexes
#DirectoryIndex index.php index.htm index.html

Just delete them and add after:
Options +FollowSymLinks
these two lines:
Options +Indexes
Options -Multiviews

Very useful for Godaddy.com hosting funs! Smile
 
View user's profile Send private message
bobbyg
Worker
Worker



Joined: Dec 05, 2007
Posts: 212
Location: Tampa, Florida

PostPosted: Sat Aug 27, 2011 11:12 pm Reply with quote

I resell and host on GoGaddy with no problems with those. Are you sure that is your real problem.

# 'Options +FollowSymLinks' is required for use of mod_rewrite.
# Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

# 'Options +Includes' is required for use of Server Side Includes (SSI), such as custom error pages (like 403.shtml).
# Can be commented out if causes errors, see notes above.
#Options +Includes

# 'Options -Indexes' is used for controlling directory listings if there is not an index file in a directory (and said directory is readable by the web server).
# A directory index will be automatically generated and this can prove to be a dangerous security issue.
# To disable this feature, use: 'Options -Indexes'
# To enable this feature (not advised), use: 'Options +Indexes'
# Can be commented out if causes errors, see notes above.
Options -Indexes

# -------------------------------------------
# Set search order for index files
# -------------------------------------------
DirectoryIndex index.php index.htm index.html
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> FAQ - PHP5 w/phpSuExec Conversion From PHP4

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©