# test.php gives me a blank page



## pds (Oct 22, 2006)

I am running 10.4.8 on an 1.33 iBook with a gig of RAM. 

I don't remember  what I used to install php5, but it's there and it works fine with a few local test sites I fool around with. (install location seems to be /usr/local/php5. MySQL is there in the same folder - works fine.

Contents of php5 folder are

```
/usr/local/php5 paul$ ls
bin             httpd.conf.php  info            libphp5.so      share
etc             include         lib             man
```

I want to install YAZ - to see about making entry into a library database simpler - but when I open test.php, Safari thinks about it for a while and then just gives me a blank page.

text of the test.php file is 

```
<?
phpinfo();
?>
```

I have tried it both in my sites folder and the documents folder of the webserver (library/webserver/documents) with the same result. Apache 1.3 is running.

Any clues about what I need to tweak to be able to see phpinfo()?

Any suggestions about installing YAZ and just forgetting about being able to see it (if it works, why fix it? ) 


(ps - looking at the httpd.config.php file, seems the php istall is from Marc Lynage's entropy page)


----------



## pds (Oct 22, 2006)

sorry for the cross posting. I should have put *** (edit - or not).

So now a six-post auto-thread


----------



## pds (Oct 23, 2006)

I reinstalled php - upgrading from 5.1.2 to 5.1.6

I made a new test.php file too, using <?php phpinfo() ?> (looks like it dropped the semicolon) and now it works.

Now to the process of figuring out how to install yaz as a pecl


----------



## pds (Oct 24, 2006)

Well - problem seems to have been an errant semi-colon, anyway phpinfo() now shows the installation and I'm working on getting yaz working.

How To's on the subject assume more knowledge than I have, and have left me confused. 

Best I can suss out is that since php5 this extension needs to be installed as a PECL and can be installed using pear on the command line. But pear fails when it can't find directories and existing files. Below is the result of a trip to the command line.

(this is on a 1.33 iBook with a gig of RAM and 10.4.8)

```
icebook:/usr/local/php5 paul$ sudo pear install yaz
Password:
downloading yaz-1.0.7.tgz ...
Starting to download yaz-1.0.7.tgz (16,350 bytes)
......done: 16,350 bytes
5 source files, building
running: phpize
grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.

`phpize' failed
```

Should I just create the include directory and its sub-directories or is there a script I need to run before pear install? 

Thanks in advance.


----------



## pds (Oct 24, 2006)

the saga continues in the proper forum, ******

___________
thanks for sorting out where this belongs


----------



## bbolin (Nov 1, 2006)

pds said:


> I am running 10.4.8 on an 1.33 iBook with a gig of RAM.
> 
> I don't remember  what I used to install php5, but it's there and it works fine with a few local test sites I fool around with. (install location seems to be /usr/local/php5. MySQL is there in the same folder - works fine.
> 
> ...



1) You need to have apache compiled with php support.  Usually done now days with modules.  Verify the modules are loading in httpd.conf

2) You need to add this to your httpd.conf file -

AddType application/x-httpd-php        .php
AddType application/x-httpd-php-source .phps

Also helps if you set your directory indexing correctly to include php support.


----------

