PDA

View Full Version : PHP now working... or what?


Nejko
21st January 2006, 07:53
If i create file for test with phpinfo(); everything is cool, it shows me all the data, but if i open any other php file on my server it doesn't work? What's the problem? :S

themachine
21st January 2006, 07:56
what does the file look like that you are trying to open? Perhaps there is an error in the page. Note that anything in between "<?php" and "?>" will be parsed as PHP and therefore all syntax needs to be PHP complient... do you have an error log? Do you have error loggin enabled in '/etc/php.ini"?? That would be a good start to determine what the problem is.

Nejko
21st January 2006, 07:59
http://nero-server.homelinux.org/phpinfo.php here's my phpinfo

i don't think, that i messed something. becouse i want install... hmm, phpbb? and it gave me blank screen...

till
21st January 2006, 10:39
Did you get any errors in your apache error log when you open the phpBB page in a browser?

Nejko
21st January 2006, 11:21
yes:

[client 192.168.2.1] PHP Notice: Undefined index: kaj in /home/nejc/public_html/slike/index.php on line 7, referer: http://nero-server.homelinux.org/

it's not phpbb, but it's microblog fot that (http://www.stamcar.com/projekti/microblog/)

till
21st January 2006, 11:57
Hmm, that is only a notice. this should not stop your script. If you enabled php safemode, please try to disable it.

Nejko
21st January 2006, 12:53
;
; Safe Mode
;
safe_mode = Off

i din't :(

till
21st January 2006, 13:15
If you use ISPConfig, you will have to disable safemode there, not in php.ini.

Nejko
21st January 2006, 13:21
i'm not using it YET :) so what could be wrong? :S

themachine
21st January 2006, 16:55
My unprofessional opinion would be this:

This page you are trying to go to and getting a "blank page" is 'index.php'. However, are trying to go to 'domain.com/application/index.php' directly or just going to 'domain.com/application'? It is possible that you have not added 'index.php' to you list of DirectoryIndexes in your Apache Configuration... it looks something like:

DirectoryIndex index.html index.htm index.php index.cgi index.pl


This is found somewhere like:

Debian: /etc/apache2/apache2.conf
RedHat: /etc/httpd/conf/httpd.conf

Or specifically in your VirtualHost's directive where ever that may be.


Hope this might help... it is worth checking anyway.

falko
21st January 2006, 17:12
yes:

[client 192.168.2.1] PHP Notice: Undefined index: kaj in /home/nejc/public_html/slike/index.php on line 7, referer: http://nero-server.homelinux.org/

it's not phpbb, but it's microblog fot that (http://www.stamcar.com/projekti/microblog/)
What's in line 7 of /home/nejc/public_html/slike/index.php?

You might have to use another value for error reporting in your php.ini. Have a look here: http://au3.php.net/manual/en/ref.errorfunc.php
If you change your php.ini, don't forget to restart Apache afterwards.

themachine
21st January 2006, 17:30
what do you have in your php.ini for the following setting?

error_reporting = E_ALL & ~E_NOTICE


You may need to change your setting to "E_ALL" to actually get better error message output.

Nejko
21st January 2006, 17:35
i added index.php to directory indexes, but no effect :( also tried php.ini error reporting... nothning

edit: authour of themicroblog told me same.. i should try error reporting, but nothing :(

edit: my script for uptime works :S

<?
function linuxUptime() {
$ut = strtok( exec( "cat /proc/uptime" ), "." );
$days = sprintf( "%2d", ($ut/(3600*24)) );
$hours = sprintf( "%2d", ( ($ut % (3600*24)) / 3600) );
$min = sprintf( "%2d", ($ut % (3600*24) % 3600)/60 );
$sec = sprintf( "%2d", ($ut % (3600*24) % 3600)%60 );
return array( $days, $hours, $min, $sec );
}
$ut = linuxUptime();

echo "Server že dela neprestano : $ut[0] dni, $ut[1] ur, $ut[2] minut";
?>

http://nero-server.homelinux.org/server.php

that's all too strange :S

falko
21st January 2006, 18:43
i added index.php to directory indexes, but no effect :( also tried php.ini error reporting... nothning


Did you restart Apache?

Nejko
21st January 2006, 18:44
sure... i did :(
no one has no idea what's wrong? :?(

An error has occurred during installation
The PHP configuration on your server doesn't support the database type that you chose

hmm, :(


edit: can i give to someone of you experts shell or mybe webmin root acess? if it would help...

falko
22nd January 2006, 08:30
An error has occurred during installation
The PHP configuration on your server doesn't support the database type that you chose


I guess your application uses a MySQL database. Is MySQL supported by your PHP installation? Do you see MySQL mentioned when you run a PHP script with phpinfo(); in it?

Nejko
22nd January 2006, 08:44
no :)

http://nero-server.homelinux.org/phpinfo.php

Configure Command:.....--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba'

till
22nd January 2006, 12:16
Have you thought about using one of the perfect setup guides together with ISPConfig to get a working webserver setup? Without a good linux knowledge it is not easy to setup a working server manually.

Nejko
22nd January 2006, 12:32
yes, i did everything like it said, but php just don't want mysql :S how can i reconfigure?

till
22nd January 2006, 12:37
Just install the php4-mysql package from your linux distribution and restart your webserver.

Nejko
22nd January 2006, 12:45
ok, i did:

yum install php-mysql

my server is rebooting.... but still :S

http://nero-server.homelinux.org/phpinfo.php


edit: but i was able to install phpbb :D yeey. will report later if there are any problems ;)

till
22nd January 2006, 13:23
MySQL and MySQLi extension where both installed and workin. You have to scroll down the page to see the mysql extensions.

Nejko
22nd January 2006, 13:41
well, thanx for all your help (again) :) :D love that forum :) i have no problems any more, forum is working fine... keep up good work ;)