Koozali.org: home of the SME Server

primay ibay wont display php page

Offline nefkho

  • *****
  • 183
  • +0/-0
    • http://www.cagothonglines.com
primay ibay wont display php page
« on: October 16, 2004, 09:09:45 AM »
hi,

please help with this problem, my homepage wont display only blank whit page this is the message i get in the var/log/messages.log

Oct 16 15:09:06 fsci-gateway httpd: PHP Warning:  Unknown(): open_basedir restriction in effect. File(/home/e-smith/files/ibays/Primary/html/index.php) is not within the allowed path(s): (/) in Unknown on line 0
Oct 16 15:09:06 fsci-gateway httpd: PHP Warning:  Unknown(/home/e-smith/files/ibays/Primary/html/index.php): failed to open stream: Operation not permitted in Unknown on line 0
Oct 16 15:09:06 fsci-gateway httpd: PHP Warning:  (null)(): Failed opening '/home/e-smith/files/ibays/Primary/html/index.php' for inclusion (include_path='.:/usr/share/pear') in Unknown on line 0

thanks,
Nef Kho  :-) .........

pwalter

primay ibay wont display php page
« Reply #1 on: October 16, 2004, 09:57:30 AM »
nefkho,

Temporarily rename your index.php to indexold.php, then create a new index.php file with the following entries:
<?php
phpinfo()
?>
Then, look at your web page - do you see the php information? If yes, there is something wrong with your index page - if no, post your phpinfo entries here.

Peter

Offline nefkho

  • *****
  • 183
  • +0/-0
    • http://www.cagothonglines.com
primay ibay wont display php page
« Reply #2 on: October 16, 2004, 10:27:38 AM »
hi,

here is the content of my index.php after following your step.

<?php
phpinfo()
?>

i still dont get any anything just blank pages on the messages log still the same error posted. any other idea?  :cry:

thanks,
Nef Kho  :-) .........

pwalter

primay ibay wont display php page
« Reply #3 on: October 16, 2004, 10:49:17 AM »
Well, your php configuration is broken, then. What version of SME are you using? Have you made any server configuration changes lately, or have you had a recent system crash? What are the contents of /etc/php.ini?
When you issue the console command "find / -iname php.ini", what does it report? What does the command "php -v" report?

Skydiver

PHP index error
« Reply #4 on: October 16, 2004, 11:06:08 AM »
Would seem to be a permisions error on the html ibay for primary .. You might try chmoding the index.php file and try again. just a guess

Offline nefkho

  • *****
  • 183
  • +0/-0
    • http://www.cagothonglines.com
thanks
« Reply #5 on: October 16, 2004, 11:22:33 AM »
i am using sme 6.0.1.

find / -iname php.ini > just hang-up when i issued this command.

[root@fsci-gateway root]# php -v
PHP 4.3.8 (cli) (built: Jul 19 2004 19:30:39)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
[root@fsci-gateway root]#

this happen after a system crash.

index.php is set 644

thanks, guys, any other idea or should i fresh install it again?

php.ini ->
---------------------------------
;------------------------------------------------------------
; DO NOT MODIFY THIS FILE! It is updated automatically by the
; SME Server software. Instead, modify the source template in
; an /etc/e-smith/templates-custom directory. For more
; information, see http://www.e-smith.org/custom/
;
; copyright (C) 2002 Mitel Networks Corporation
;------------------------------------------------------------

[PHP]

engine         =   On
short_open_tag   =   On   ;
asp_tags      =   Off
precision      =   14
y2k_compliance   =   Off
output_buffering   = Off
output_handler      =
implicit_flush      = Off
allow_call_time_pass_reference   = On
safe_mode      =   Off
safe_mode_exec_dir   =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions   =
highlight.string   =   #DD0000
highlight.comment   =   #FF8000
highlight.keyword   =   #007700
highlight.bg      =   #FFFFFF
highlight.default   =   #0000BB
highlight.html      =   #000000
expose_php   =   On
max_execution_time = 30
memory_limit = 32M
error_reporting      = E_ALL & ~E_NOTICE
display_errors      = Off
display_startup_errors   = Off
log_errors      = On
error_log      = syslog
track_errors      = Off
warn_plus_overloading   = Off
variables_order      =   "EGPCS"
register_globals   =   On
register_argc_argv   =   On
post_max_size      =20M
gpc_order         =   "GPC"
magic_quotes_gpc   =   On
magic_quotes_runtime=   Off
magic_quotes_sybase   =   Off
auto_prepend_file   =
auto_append_file   =
default_mimetype = "text/html"

include_path        = ".:/usr/share/pear"
doc_root            =
user_dir            =
extension_dir       = /usr/lib/php4
enable_dl           = On
file_uploads   = On
upload_max_filesize = 10M
allow_url_fopen = Off

extension=imap.so
extension=ldap.so
extension=mysql.so
[Syslog]
define_syslog_variables   = Off

[mail function]
SMTP         =   localhost
sendmail_from   =   me@localhost.com

[Debugger]
debugger.host   =   localhost
debugger.port   =   7869
debugger.enabled   =   False

[Logging]

[Java]

[SQL]
sql.safe_mode   =   Off

[ODBC]
odbc.allow_persistent   =   On
odbc.check_persistent  =    On
odbc.max_persistent   =   -1
odbc.max_links         =   -1
odbc.defaultlrl   =   4096
odbc.defaultbinmode   =    1

[MySQL]
mysql.allow_persistent   =   On
mysql.max_persistent   =   -1
mysql.max_links         =   -1
mysql.default_port      =
mysql.default_socket   =
mysql.default_host      =
mysql.default_user      =
mysql.default_password   =

[mSQL]
msql.allow_persistent   =   On
msql.max_persistent      =   -1
msql.max_links         =   -1

[PostgresSQL]
pgsql.allow_persistent   =   On
pgsql.max_persistent   =   -1
pgsql.max_links      =   -1

[Sybase]
sybase.allow_persistent   =   On
sybase.max_persistent   =   -1
sybase.max_links      =   -1
sybase.min_error_severity   =   10
sybase.min_message_severity   =   10
sybase.compatability_mode   = Off

[Sybase-CT]
sybct.allow_persistent   =   On
sybct.max_persistent   =   -1
sybct.max_links         =   -1
sybct.min_server_severity   =   10
sybct.min_client_severity   =   10

[bcmath]
bcmath.scale   =   0

[browscap]

[Informix]
ifx.default_host      =
ifx.default_user      =
ifx.default_password      =
ifx.allow_persistent      =   On
ifx.max_persistent      =   -1
ifx.max_links         =   -1
ifx.textasvarchar      =   0
ifx.byteasvarchar      =   0
ifx.charasvarchar      =   0
ifx.blobinfile         =   0
ifx.nullformat         =   0

[Session]
session.save_handler      = files
session.save_path         = /tmp
session.use_cookies       = 1
session.name              = PHPSESSID  
session.auto_start        = 0
session.cookie_lifetime   = 0
session.cookie_path       = /
session.cookie_domain     =
session.serialize_handler = php
session.gc_probability    = 1
session.gc_maxlifetime    = 1440
session.referer_check     =
session.entropy_length    = 0
session.entropy_file      =
session.cache_limiter     = nocache
session.cache_expire      = 180
session.use_trans_sid     = 1
url_rewriter.tags         = "a=href,area=href,frame=src,input=src,form=fakeentry"

[MSSQL]
mssql.allow_persistent      =   On
mssql.max_persistent      =   -1
mssql.max_links         =   -1
mssql.min_error_severity   =   10
mssql.min_message_severity   =   10
mssql.compatability_mode   =  Off

[Assertion]

[Ingres II]
ingres.allow_persistent      =   On
ingres.max_persistent      =   -1
ngres.max_links         =   -1
ingres.default_database      =
ingres.default_user      =
ingres.default_password      =

[Verisign Payflow Pro]
pfpro.defaulthost      =    "test.signio.com"
pfpro.defaultport      =   443
pfpro.defaulttimeout      =   30

[Sockets]
sockets.use_system_read      =   On
---------------------------------------------
Nef Kho  :-) .........

Skydiver

Try
« Reply #6 on: October 16, 2004, 11:27:33 AM »
If you are runing phpnuke. try looking in your config.php file see if your database settings are correct. with password...  Just a guess . Trying to be helpful

Cheers
 :-o

pwalter

primay ibay wont display php page
« Reply #7 on: October 16, 2004, 11:33:09 AM »
1) Try the command "find / -iname php.ini" again. It will take a while to run (it is searching the entire filesystem) but it should eventually come back to you.

2) SME 6.0.1 is supplied with php version 4.1.2, I believe, and you have reported version 4.3.8. Did you attempt to upgrade php, and how did you do it?

3) issue the following command:
pico /etc/httpd/conf/httpd.conf
scroll down until you find the line that says:
<Directory /home/e-smith/files/ibays/Primary/html>
Under it should be three lines, one of which starts with "php_admin_value open_basedir ". What is the rest of the line?

Offline nefkho

  • *****
  • 183
  • +0/-0
    • http://www.cagothonglines.com
thanks
« Reply #8 on: October 16, 2004, 11:46:38 AM »
content of my httpd.conf ->

<Directory /home/e-smith/files/ibays/Primary/html>
    Options Indexes Includes
    Options +Includes
    AddType application/x-httpd-php .php .php3 .phtml

    AllowOverride None
    order deny,allow
    deny from all
    allow from all
</Directory>

<Directory /home/e-smith/files/ibays/Primary/html>
    AddType application/x-httpd-php .php .php3 .phtml
    AddType application/x-httpd-php-source .phps
    php_admin_value open_basedir /
</Directory>


[root@fsci-gateway root]# find / -iname php.ini
find: /proc/4140/fd: No such file or directory
/etc/e-smith/templates/etc/php.ini
/etc/e-smith/templates-custom/etc/php.ini
/etc/php.ini
[root@fsci-gateway root]#

any idea, thanks
Nef Kho  :-) .........

pwalter

primay ibay wont display php page
« Reply #9 on: October 16, 2004, 11:53:12 AM »
Your httpd.conf file is incorrect. The line I mentioned should read as follows:
php_admin_value open_basedir /home/e-smith/files/ibays/Primary

Manually edit the config file, save it, and try it again. If it now works, issue the following console commands:
/sbin/e-smith/signal-event post-upgrade
reboot (will reboot the server)

When your server comes up again, check the index.php display again. If it has reverted to not working, your e-smith templates are corrupted and need to be fixed.

Peter

pwalter

primay ibay wont display php page
« Reply #10 on: October 16, 2004, 11:58:55 AM »
An additional thought: After you manually edit the config file, restart your server first (or restart apache if you know how to do so)

Offline nefkho

  • *****
  • 183
  • +0/-0
    • http://www.cagothonglines.com
thanks
« Reply #11 on: October 16, 2004, 12:03:58 PM »
i did change it and reboot the box but my primary site wont display still

here is my log message error:

Oct 16 18:06:06 fsci-gateway httpd: PHP Warning:  Unknown(): open_basedir restriction in effect. File(/home/e-smith/files/ibays/Primary/html/index.php) is not within the allowed path(s): (/) in Unknown on line 0
Oct 16 18:06:06 fsci-gateway httpd: PHP Warning:  Unknown(/home/e-smith/files/ibays/Primary/html/index.php): failed to open stream: Operation not permitted in Unknown on line 0
Oct 16 18:06:06 fsci-gateway httpd: PHP Warning:  (null)(): Failed opening '/home/e-smith/files/ibays/Primary/html/index.php' for inclusion (include_path='.:/usr/share/pear') in Unknown on line 0
------------------

can you help me fix my template?  :evil:
Nef Kho  :-) .........

pwalter

primay ibay wont display php page
« Reply #12 on: October 16, 2004, 12:16:39 PM »
I will try - but it really would help if you explained if and how you upgraded php.

I notice you have the directory /etc/e-smith/templates-custom/etc/php.ini
Did you create or modify this directory (or the entries) yourself?

Try the following:
cd /etc/e-smith/templates/etc
mv php.ini phpbad.ini
/sbin/e-smith/expand-template /etc/php.ini
reboot

Then try it again.

pwalter

primay ibay wont display php page
« Reply #13 on: October 16, 2004, 12:20:00 PM »
Correction: Try the following:
cd /etc/e-smith/templates-custom/etc
mv php.ini phpbad.ini
/sbin/e-smith/expand-template /etc/php.ini
reboot

pwalter

primay ibay wont display php page
« Reply #14 on: October 16, 2004, 12:24:19 PM »
Actually, I must be tired - it is probably your apache configuration that is bad. Did you make any changes to Apache, perhaps? Did you upgrade Apache, too?