Current time: 05-03-2024, 12:04 AM Hello There, Guest! (LoginRegister)


Post Reply 
php.ini issue
Author Message
syslin Offline
Newbie
*

Posts: 9
Joined: Oct 2010
Reputation: 0
Post: #1
php.ini issue
Hello all,
I copied my phpBB3 system to my new server that running ispCP on CentOS server but I'm having trouble with PHP 5.3 and the old phpBB3 version.

So after find the solution, and testing it on my development server I have to change the "request_order" parameter from GP to GPC to allow the using of old PHP session method.

I tried to to change this parameter on /var/www/fcgi/<mydomain.com>/php5/php.ini , restart the Apache server (service httpd restart) but it's look like it does not effect.

So, I tried to to change this parameter on /var/www/fcgi/master/php5/php.ini , restart the Apache server (service httpd restart) but it's look like it does not effect.

So, I tried to create an .htaccess file on the phpBB3 root with the following code (which work on the development server that does not running ispCP):
I tried to to change this parameter on /var/www/fcgi/<mydomain.com>/php5/php.ini , restart the Apache server (service httpd restart) but it's look like it does not effect.
Code:
<IfModule mod_php5.c>
   php_flag register_globals Off
   php_flag magic_quotes_gpc Off
   php_value request_order GPC
</IfModule>

But this didn't helped too, the website refuse to use it.

Then I add the above lines:
php_flag register_globals Off
php_flag magic_quotes_gpc Off
php_value request_order GPC

to the /etc/httpd/vhosts/ispcp.conf (restart the Apache server) but this didn't help too.

Where is the right php.ini ??? What's going on?

Any idea? Please help.
Thanks,
Miki
01-15-2011 12:25 AM
Find all posts by this user Quote this message in a reply
motokochan Offline
Member
***

Posts: 274
Joined: Jul 2008
Reputation: 1
Post: #2
RE: php.ini issue
(01-15-2011 12:25 AM)syslin Wrote:  I tried to to change this parameter on /var/www/fcgi/<mydomain.com>/php5/php.ini , restart the Apache server (service httpd restart) but it's look like it does not effect.

Don't just restart the service. Stop it and start it. You can also run "pkill php-cgi" as root, which should force fcgid to re-start the PHP processes.


(01-15-2011 12:25 AM)syslin Wrote:  So, I tried to to change this parameter on /var/www/fcgi/master/php5/php.ini , restart the Apache server (service httpd restart) but it's look like it does not effect.

That is correct, that file is not used for individual websites.


(01-15-2011 12:25 AM)syslin Wrote:  So, I tried to create an .htaccess file on the phpBB3 root with the following code (which work on the development server that does not running ispCP):
I tried to to change this parameter on /var/www/fcgi/<mydomain.com>/php5/php.ini , restart the Apache server (service httpd restart) but it's look like it does not effect.
Code:
<IfModule mod_php5.c>
   php_flag register_globals Off
   php_flag magic_quotes_gpc Off
   php_value request_order GPC
</IfModule>

But this didn't helped too, the website refuse to use it.

Won't work, you're not running PHP as an Apache module.


(01-15-2011 12:25 AM)syslin Wrote:  Then I add the above lines:
php_flag register_globals Off
php_flag magic_quotes_gpc Off
php_value request_order GPC

to the /etc/httpd/vhosts/ispcp.conf (restart the Apache server) but this didn't help too.

That won't work as you're not running PHP as a module.


(01-15-2011 12:25 AM)syslin Wrote:  Where is the right php.ini ??? What's going on?

Any idea? Please help.

ispCP uses PHP as a CGI process via Fcgid. This helps with security while not affecting speed considerably. In my experience, doing a simple restart of Apache often won't stop the PHP processes. You want to make sure all the PHP processes are stopped so that they are re-launched and read the updated php.ini. I have found a simple pkill command while Apache is running will solve the issue of reading the new php.ini file. The downside is that PHP has to start back up, but such would be the case with restarting the whole web service.
01-15-2011 02:13 AM
Visit this user's website Find all posts by this user Quote this message in a reply
syslin Offline
Newbie
*

Posts: 9
Joined: Oct 2010
Reputation: 0
Post: #3
RE: php.ini issue
Thanks for the help,
I tried again but still does not resolve the issue.

I edit the file: /var/www/fcgi/mydomain.com/php5/php.ini
and change the line from
request_order = "GP"
to
request_order = "GPC"
save this php.ini file

stop the Apache service:
service httpd stop
Stopping httpd: [ OK ]

kill all php-cgi process:
ps -ef | grep cgi
root 5146 4882 0 21:34 pts/1 00:00:00 grep cgi

Then start the httpd service again:
service httpd start
Starting httpd: [ OK ]

and check what's up with php?
ps -ef | grep cgi
vu2011 5185 5172 10 21:35 ? 00:00:00 /usr/bin/php-cgi
vu2011 5186 5185 8 21:35 ? 00:00:00 /usr/bin/php-cgi
vu2011 5187 5185 2 21:35 ? 00:00:00 /usr/bin/php-cgi
root 5191 4882 0 21:35 pts/1 00:00:00 grep cgi

But still the phpBB system does not working as expecting. Changing the php.ini file on my development server (without ispCP) works great.

Any idea?
Thanks,
Miki

Hi again,
Changing the /var/www/fcgi/master/php5/php.ini and restart the php-cgi processes didn't solve the issue too Sad

Still need some help here.
Thanks,
Miki
(This post was last modified: 01-15-2011 05:43 AM by syslin.)
01-15-2011 05:36 AM
Find all posts by this user Quote this message in a reply
syslin Offline
Newbie
*

Posts: 9
Joined: Oct 2010
Reputation: 0
Post: #4
RE: php.ini issue
So... I checked again

I changed the request_order = "GPC" in the php.ini file, shutdown the Apache and start it again and now the phpinfo it's looking like this:
Code:
Core
PHP Version     5.3.3

Directive    Local Value    Master Value
allow_call_time_pass_reference    Off    Off
allow_url_fopen    On    On
allow_url_include    Off    Off
always_populate_raw_post_data    Off    Off
arg_separator.input    &    &
arg_separator.output    &    &
asp_tags    Off    Off
auto_append_file    no value    no value
auto_globals_jit    On    On
auto_prepend_file    no value    no value
browscap    no value    no value
default_charset    no value    no value
default_mimetype    text/html    text/html
define_syslog_variables    Off    Off
disable_classes    no value    no value
disable_functions    no value    no value
display_errors    Off    Off
display_startup_errors    Off    Off
doc_root    no value    no value
docref_ext    no value    no value
docref_root    no value    no value
enable_dl    Off    Off
error_append_string    no value    no value
error_log    no value    no value
error_prepend_string    no value    no value
error_reporting    22527    22527
exit_on_timeout    Off    Off
expose_php    Off    Off
extension_dir    /usr/lib64/php/modules    /usr/lib64/php/modules
file_uploads    On    On
highlight.bg    #FFFFFF    #FFFFFF
highlight.comment    #FF8000    #FF8000
highlight.default    #0000BB    #0000BB
highlight.html    #000000    #000000
highlight.keyword    #007700    #007700
highlight.string    #DD0000    #DD0000
html_errors    Off    Off
ignore_repeated_errors    Off    Off
ignore_repeated_source    Off    Off
ignore_user_abort    Off    Off
implicit_flush    Off    Off
include_path    .:/usr/share/pear:/usr/share/php    .:/usr/share/pear:/usr/share/php
log_errors    Off    Off
log_errors_max_len    1024    1024
magic_quotes_gpc    Off    Off
magic_quotes_runtime    Off    Off
magic_quotes_sybase    Off    Off
mail.add_x_header    On    On
mail.force_extra_parameters    no value    no value
mail.log    no value    no value
max_execution_time    30    30
max_file_uploads    20    20
max_input_nesting_level    64    64
max_input_time    60    60
memory_limit    128M    128M
open_basedir    /var/www/virtual/mydomain.com/:/usr/share/pear/    /var/www/virtual/mydomain.com/:/usr/share/pear/
output_buffering    4096    4096
output_handler    no value    no value
post_max_size    8M    8M
precision    14    14
realpath_cache_size    16K    16K
realpath_cache_ttl    120    120
register_argc_argv    Off    Off
register_globals    Off    Off
register_long_arrays    Off    Off
report_memleaks    On    On
report_zend_debug    On    On
request_order    GPC    GPC
safe_mode    Off    Off
safe_mode_exec_dir    no value    no value
safe_mode_gid    Off    Off
safe_mode_include_dir    no value    no value
sendmail_from    no value    no value
sendmail_path    /usr/sbin/sendmail -t -i -f webmaster@mydomain.com    /usr/sbin/sendmail -t -i -f webmaster@mydomain.com
serialize_precision    100    100
short_open_tag    Off    Off
SMTP    localhost    localhost
smtp_port    25    25
sql.safe_mode    Off    Off
track_errors    Off    Off
unserialize_callback_func    no value    no value
upload_max_filesize    2M    2M
upload_tmp_dir    /var/www/virtual/mydomain.com/phptmp/    /var/www/virtual/mydomain.com/phptmp/
user_dir    no value    no value
user_ini.cache_ttl    300    300
user_ini.filename    .user.ini    .user.ini
variables_order    GPCS    GPCS
xmlrpc_error_number    0    0
xmlrpc_errors    Off    Off
y2k_compliance    On    On
zend.enable_gc    On    On

That mean that the parameter "request_order" is now GPC but the system still not working.

Any idea?
Thanks,
Miki
01-15-2011 07:59 PM
Find all posts by this user Quote this message in a reply
motokochan Offline
Member
***

Posts: 274
Joined: Jul 2008
Reputation: 1
Post: #5
RE: php.ini issue
Well, it's obviously something else then. Have you asked the phpBB folks?
01-18-2011 01:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
syslin Offline
Newbie
*

Posts: 9
Joined: Oct 2010
Reputation: 0
Post: #6
RE: php.ini issue
Hello,
Yes I already post a topic on phpBB board, but as I wrote I tested the same system (files and DB) on my secondary server that running PHP 5.3 too without ispCP and it had same behavior before I changed the request_order to "GPC" in the php.ini file (on the development server). After I changed the request_order from "GP" to "GPC" on that php.ini file all is running well (on the dev. server) so I don't think it's a phpBB failure, it's something related to the PHP that running with ispCP that somehow ignore the request_order = "GPC" parameter although it complain it use it.


Thanks,
Miki
01-19-2011 07:09 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)