# my PHP doesn't work,why?



## robinwei (Jan 11, 2003)

when I open .php file by IE, always show php-code.i have edit the file of "httpd.conf",edit code
"DirectoryIndex index.html"  to "DirectoryIndex index.php"
but ,my PHP  doesn't work still. why?

who can tell me, what will i do?


----------



## phatcactus (Jan 11, 2003)

There are very easy-to-follow instructions for a PHP installation at http://www.entropy.ch/software/macosx/php/ , though I can't access it right now.  I'd try later today or tomorrow.

- Brian


----------



## robinwei (Jan 12, 2003)

sorry,I cann't connect this URL.have any other methods or URL?


----------



## octane (Jan 12, 2003)

have you tried restarting Apache?

you can do it from the command line; apachectl graceful

or you can just do it through the System Preferences

I've had the same thing before, when I was a newbie

I'm an old hand to installing php .. made all the mistakes, done all of the reinstalls!


----------



## David Rodger (Jan 12, 2003)

Speaking of PHP not working, I found a problem in my installation.  I just managed to download Marc Liyanage's PHP4.2.2 module for 10.1 (his www2 subdomain still works):
http://www2.entropy.ch/download/libphp4.so.gz-10.1

Now, he notes on his instruction page (if you could ever get to it!) that there is no php.ini file, yet all of the configs show up in phpinfo();

I've found that I can get a config using cfg_var_get() or ini_get(), but that I cannot set it using ini_set() -- makes *no* difference.

Is anyone able to account for this?  Is it due to the lack of php.ini?
(If it is, we might have to download the source and copy the php.ini-dist file.)

Thanks, David


----------



## octane (Jan 12, 2003)

no, the lack of a php.ini will not stop php from working, it'll just kill some of the features you're used to

creating a php.ini file is quite easy, just use pico on the command line. you might have to create the correct directory / folder for it first, though


----------



## robinwei (Jan 12, 2003)

Thanks everybody,I have solve this problem.

Thanks again~

But I have a new problem,Please look here:

http://www.macosx.com/forums/showthread.php?s=&threadid=27299


----------

