PHP file not working on server

alexelixir

Verified User
Joined
Jun 9, 2011
Messages
36
Location
Russia
Hi all
When i execute the php file it show blank page and when i check view source it show the php code
i do restart http service
custombuild and upgrade the php 5.4.6
and then restart the http service
and nothing works
how can we fix this issue
 
and yes i forgot to mention when i run this
./build versions
i got this
Latest version of DirectAdmin: 1.41.1
Installed version of DirectAdmin: 1.41.1

Latest version of Apache: 2.2.22
Installed version of Apache: 2.2.22

Latest version of PCRE: 8.20
Installed version of PCRE: 8.20

Latest version of curl: 7.27.0
Installed version of curl: 7.27.0

Latest version of FreeType: 2.4.10
Installed version of FreeType: 2.4.10

Latest version of dovecot: 2.1.9
Installed version of dovecot: 2.1.9

Latest version of PHP (CLI): 5.4.6
Installed version of PHP (CLI): 5.4.6

Latest version of RoundCube webmail: 0.8.1
Installed version of RoundCube webmail: 0.7.2

RoundCube webmail 0.7.2 to 0.8.1 update is available.

Latest version of phpMyAdmin: 3.5.2.2-all-languages
Installed version of phpMyAdmin: 3.5.2.1-all-languages

phpMyAdmin 3.5.2.1-all-languages to 3.5.2.2-all-languages update is available.

Latest version of SquirrelMail: 1.4.22
Installed version of SquirrelMail: 1.4.22
 
Do you have php enabled on the user in directadmin?

What do you get when you try a php file with just
Code:
<?php phpinfo(); ?>

What do you see in the apache error log?
 
nothing comes in apache logs
and when i trying to execute <?php phpinfo(); ?> file it show blank screen and on the same blanck screen i try to view source button it show us the php code
 
Then enable php on the user in directadmin in modify user in list users.

If not then try:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build php d
./build rewrite_confs
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
/etc/init.d/httpd restart
 
Last edited:
Does this one work for you

<? phpinfo(); ?>

it might be a config error in your php.ini

short_open_tag = On
in php.ini to see if it works.
 
Then enable php on the user in directadmin in modify user in list users.

If not then try:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build php d
./build rewrite_confs
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
/etc/init.d/httpd restart

[root@server custombuild]#echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
[root@server custombuild]#/usr/local/directadmin/dataskq d
Debug mode. Level 10

dataskq: command: action=confirm%5Fremoved&type=httpd%2Econf&value=%2Fusr%2Flocal%2Fdirectadmin%2Fdata%2Fusers%2Faaaaa%2Fhttpd%2Econf
dataskq: command: action=confirm&type=httpd%2Econf&value=%2Fusr%2Flocal%2Fdirectadmin%2Fdata%2Fusers%2Fsecure%2Fhttpd%2Econf
dataskq: command: action=rewrite&value=httpd
dataskq: command: action=httpd&value=restart
dataskq: command: action=named&value=reload
dataskq: command: action=proftpd&value=reread
dataskq: command: action=sshd&value=reload

and the cmd screen hang no more moment in this
 
Please post the output of
Code:
# grep -i php /usr/local/directadmin/custombuild/options.conf
And also the output of
Code:
php < /path/to/phpinfo.php
where /path/to/phpinfo.php is the full path to your phpinfo.php file.

Jeff
 
Hi all
When i execute the php file it show blank page and when i check view source it show the php code
i do restart http service
custombuild and upgrade the php 5.4.6
and then restart the http service
and nothing works
how can we fix this issue
hi
i have same problem , please help me :(
Please post the output of
Code:
# grep -i php /usr/local/directadmin/custombuild/options.conf
And also the output of
Code:
php < /path/to/phpinfo.php
where /path/to/phpinfo.php is the full path to your phpinfo.php file.

Jeff

Code:
#PHP settings. default_php possible values - 5 or 6, php5_ver - 5.2, 5.3 or 5.4
default_php=5
php5_ver=5.2
php5_cli=yes
php5_cgi=no
php6_cli=no
php6_cgi=no
php_ini=no
php_ini_type=recommended
phpmyadmin=yes
And
Code:
MySQL Support => enabled
Active Persistent Links => 0
Active Links => 0
Client API version => 5.5.27
MYSQL_MODULE_TYPE => external
MYSQL_SOCKET => /var/lib/mysql/mysql.sock
MYSQL_INCLUDE => -I/usr/include/mysql
MYSQL_LIBS => -L/usr/lib -lmysqlclient

Directive => Local Value => Master Value
mysql.allow_persistent => On => On
mysql.connect_timeout => 60 => 60
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysql.trace_mode => Off => Off

mysqli

MysqlI Support => enabled
Client API library version => 5.5.27
Client API header version => 5.5.27
MYSQLI_SOCKET => /var/lib/mysql/mysql.sock

Directive => Local Value => Master Value
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.reconnect => Off => Off

openssl

OpenSSL support => enabled
OpenSSL Version => OpenSSL 1.0.0-fips 29 Mar 2010

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.20 2011-10-21

Directive => Local Value => Master Value
pcre.backtrack_limit => 100000 => 100000
pcre.recursion_limit => 100000 => 100000

PDO

PDO support => enabled
PDO drivers => mysql, sqlite, sqlite2

pdo_mysql

PDO Driver for MySQL, client library version => 5.5.27

pdo_sqlite

PDO Driver for SQLite 3.x => enabled
PECL Module version => (bundled) 1.0.1 $Id: pdo_sqlite.c 293036 2010-01-03 09:23:27Z sebastian $
SQLite Library => 3.3.7

posix

Revision => $Revision: 293036 $

Reflection

Reflection => enabled
Version => $Id: php_reflection.c 300129 2010-06-03 00:43:37Z felipe $

session

Session Support => enabled
Registered save handlers => files user sqlite
Registered serializer handlers => php php_binary wddx

Directive => Local Value => Master Value
session.auto_start => Off => Off
session.bug_compat_42 => Off => Off
session.bug_compat_warn => Off => Off
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => no value => no value
session.entropy_length => 0 => 0
session.gc_divisor => 1000 => 1000
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.hash_bits_per_character => 5 => 5
session.hash_function => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => no value => no value
session.serialize_handler => php => php
session.use_cookies => On => On
session.use_only_cookies => On => On
session.use_trans_sid => 0 => 0

SimpleXML

Simplexml support => enabled
Revision => $Revision: 299016 $
Schema support => enabled

soap

Soap Client => enabled
Soap Server => enabled

Directive => Local Value => Master Value
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400

sockets

Sockets Support => enabled

SPL

SPL support => enabled
Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException

SQLite

SQLite support => enabled
PECL Module version => 2.0-dev $Id: sqlite.c 298697 2010-04-28 12:10:10Z iliaa $
SQLite Library => 2.8.17
SQLite Encoding => iso8859

Directive => Local Value => Master Value
sqlite.assoc_case => 0 => 0

standard

Regex Library => Bundled library enabled
Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i

Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
safe_mode_allowed_env_vars => PHP_ => PHP_
safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH
url_rewriter.tags => a=href,area=href,frame=src,input=src,form=fakeentry => a=href,area=href,frame=src,input=src,form=fakeentry
user_agent => no value => no value

tokenizer

Tokenizer Support => enabled

wddx

WDDX Support => enabled
WDDX Session Serializer => enabled

xml

XML Support => active
XML Namespace Support => active
libxml2 Version => 2.7.6

xmlreader

XMLReader => enabled

xmlwriter

XMLWriter => enabled

zip

Zip => enabled
Extension Version => $Id: php_zip.c 305848 2010-11-30 11:04:06Z pajoye $
Zip version => 1.8.11
Libzip version => 0.9.0

zlib

ZLib Support => enabled
Stream Wrapper support => compress.zlib://
Stream Filter support => zlib.inflate, zlib.deflate
Compiled Version => 1.2.3
Linked Version => 1.2.3

Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value

Additional Modules

Module Name

thanks
 
Back
Top