# PHP suggested USE flags?

## jafar00

Hi

I'm trying to get PHP working properly on my server and as far as I know, everything is correctly set up in apache for it to work.

On loading the page http://moonlife-records.com/phpchat/install.php I get the error,

Fatal error: Call to undefined function session_save_path() in /var/www/moonlife-records.com/htdocs/phpchat/config.inc.php on line 98

On a google search it was suggested that PHP has not been built with session support which causes the error?

Here is my emerge output showing the flags I use..

```
tethys apache2 # emerge -pv dev-lang/php

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] dev-lang/php-5.1.6-r6  USE="apache2 berkdb cgi crypt force-cgi-redirect ncurses pic readline snmp ssl xml -adabas -apache -bcmath -birdstep -bzip2 -calendar -cdb -cjk -cli -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filepro -firebird -flatfile -frontbase -ftp -gd -gd-external -gdbm -gmp -hardenedphp -hash -hyperwave-api -iconv -imap -informix -inifile -interbase -iodbc -ipv6 -java-external -kerberos -ldap -libedit -mcve -memlimit -mhash -ming -msql -mssql -mysql -mysqli -nls -oci8 -oci8-instant-client -odbc -pcntl -pcre -pdo -pdo-external -posix -postgres -qdbm -recode -reflection -sapdb -sasl -session -sharedext -sharedmem -simplexml -soap -sockets -solid -spell -spl -sqlite -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -truetype -unicode -vm-goto -vm-switch -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip -zlib" 0 kB
```

Should I rebuild with additional flags set to enable session support?

----------

## jafar00

Update, other php pages show up blank. :s 

Is there a way to get some debugging info out?

Example of blankness..

http://moonlife-records.com/blab/install.php

This page loads ok, hit next, and the page comes out blank. :s

If you want info about my php setup go to http://moonlife-records.com/phpinfo.php

----------

## jafar00

Ok, added session use flag and it half works.

Now need to rebuild with pcre extension.

What are the suggested USE flags for a fully working PHP install?

----------

## jafar00

Now re-built with pcre flag and a previously 1/2 working php now just shows php pages as code lol

----------

## leonglass

 *Quote:*   

> Warning: require_once(config.inc.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/moonlife-records.com/htdocs/phpchat/install.php on line 2
> 
> Fatal error: require_once() [function.require]: Failed opening required 'config.inc.php' (include_path='.:/usr/share/php5:/usr/share/php') in /var/www/moonlife-records.com/htdocs/phpchat/install.php on line 2
> 
> 

 

Thats what I got when I tried to access the page you linked. Have you uploaded all the files you require to the server?

----------

## jafar00

 *leonglass wrote:*   

>  *Quote:*   Warning: require_once(config.inc.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/moonlife-records.com/htdocs/phpchat/install.php on line 2
> 
> Fatal error: require_once() [function.require]: Failed opening required 'config.inc.php' (include_path='.:/usr/share/php5:/usr/share/php') in /var/www/moonlife-records.com/htdocs/phpchat/install.php on line 2
> 
>  
> ...

 

I've re emerged PHP with more USE flags and I have more things working. 

http://moonlife-records.com/blab works.

http://moonlife-records.com/x7chat2 works.

I'm convinced PHP is now fully working. I think it's just a problem with Open PHP Chat I guess. The file it wants is there. It just can't find it for some reason. :s

I'll keep trying. 

Thanks for your help.

----------

## leonglass

First link seemed ok but I got a 404 for the second link you posted. I think you are correct when you say that PHP is working this is something else. For instance you mentioned earlier that you got blank screens. I had that once and it was my server sending a 304 response which can cause caching problems resulting in blank pages. Are you sure that you are not testing on one system and not updating the live one correctly. It is always worth checking everything from the start.

----------

## jafar00

 *leonglass wrote:*   

> First link seemed ok but I got a 404 for the second link you posted. I think you are correct when you say that PHP is working this is something else. For instance you mentioned earlier that you got blank screens. I had that once and it was my server sending a 304 response which can cause caching problems resulting in blank pages. Are you sure that you are not testing on one system and not updating the live one correctly. It is always worth checking everything from the start.

 

I've fixed the second link. It was wrong hehe.  The earlier blank screens problem appears to have vanished I think due to the extra use flags I added when I re emerged PHP.

The server I am using is not very powerful being just a PIII 800Mhz laptop with just 128Mb RAM so the use flags I use for the whole thing are rather minimal.

For future reference, the PHP use flags I used were..

```
apache2 berkdb cgi crypt mysql ncurses pcre pic readline session snmp ssl truetype unicode xml
```

I don't have any more problems with PHP itself. Just Open PHP Chat which I think I will re download and start from scratch to try and work out why it can't find certain files.

Cheers

----------

