Trying to setup PHP on apache keep getting errors....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Search your entire system for php.ini. My system has like eight different php.ini files in it. This is because I installed Zend Studio client, Zend Studio Server and a few other apps that all wanted to add stuff to the php.ini. But take a look in your system because there is a chance that your PHP is reading a different INI file from the one you'd expect.
user51564
Forum Newbie
Posts: 16
Joined: Sun Apr 30, 2006 3:39 pm
Location: Ok
Contact:

my apache conf for php.....

Post by user51564 »

Action application/x-httpd-php "/php/php-cgi.exe"
SetEnv PHPRC "C:/php"
LoadModule php5_module c:\php\php5apache2.dll
AddType application/x-httpd-php .php
<Directory /hsphere/local/home/wwwuser>
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_admin_flag safe_mode off
php_admin_value upload_tmp_dir "/tmp"
php_admin_value session.save_path "/tmp"
</IfModule>
</Directory>

<Directory /hsphere/shared/apache/htdocs/horde>
<IfModule mod_php5.c>
php_admin_flag safe_mode off
php_admin_value upload_tmp_dir "/tmp"
php_admin_value session.save_path "/tmp"
</IfModule>
</Directory>

<Directory /hsphere/shared/apache/htdocs/webshell5>
<IfModule mod_php5.c>
php_admin_flag safe_mode off
php_admin_value upload_tmp_dir "/tmp"
php_admin_value session.save_path "/tmp"
</IfModule>
</Directory>
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

What files do you have in your C:\PHP\ext\ folder?
user51564
Forum Newbie
Posts: 16
Joined: Sun Apr 30, 2006 3:39 pm
Location: Ok
Contact:

all the dll's appear to be in ext...

Post by user51564 »

php_bz2.dll...php_mysql.dll...etc
User avatar
php3ch0
Forum Contributor
Posts: 212
Joined: Sun Nov 13, 2005 7:35 am
Location: Folkestone, Kent, UK

Post by php3ch0 »

if you type

Code: Select all

phpinfo();
it will tell you the location of your php.ini
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

OK Post the section of your php.ini file that handles extensions.
user51564
Forum Newbie
Posts: 16
Joined: Sun Apr 30, 2006 3:39 pm
Location: Ok
Contact:

ext...in php.ini c:\windows

Post by user51564 »

;extension=php_mbstring.dll
extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
user51564
Forum Newbie
Posts: 16
Joined: Sun Apr 30, 2006 3:39 pm
Location: Ok
Contact:

apache server info mod_php5...

Post by user51564 »

Module Name: mod_php5.c
Content handlers: yes
Configuration Phase Participation: Create Directory Config, Merge Directory Configs
Request Phase Participation: none
Module Directives:
php_value - PHP Value Modifier
php_flag - PHP Flag Modifier
php_admin_value - PHP Value Modifier (Admin)
php_admin_flag - PHP Flag Modifier (Admin)
PHPINIDir - Directory containing the php.ini file
Current Configuration:
PHPINIDir "C:/WINDOWS/php.ini"
<Directory "C:/Program Files/Apache Group/Apache2/htdocs">
php_admin_flag safe_mode off
php_admin_value upload_tmp_dir "C:/Program Files/Apache Group/Apache2/tmp"
php_admin_value session.save_path "C:/Program Files/Apache Group/Apache2/tmp"
</Directory>
<Directory "C:/Program Files/Apache Group/Apache2/htdocs/horde">
php_admin_flag safe_mode off
php_admin_value upload_tmp_dir "C:/Program Files/Apache Group/Apache2/tmp"
php_admin_value session.save_path "C:/Program Files/Apache Group/Apache2/tmp"
</Directory>
<Directory "C:/Program Files/Apache Group/Apache2/htdocs/webshell5">
php_admin_flag safe_mode off
php_admin_value upload_tmp_dir "C:/Program Files/Apache Group/Apache2/tmp"
php_admin_value session.save_path "C:/Program Files/Apache Group/Apache2/tmp"
</Directory>
user51564
Forum Newbie
Posts: 16
Joined: Sun Apr 30, 2006 3:39 pm
Location: Ok
Contact:

its the apache....?

Post by user51564 »

the apache is not loading the php.ini why???
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

And you have already restarted Apache? This is indeed odd. If the extension is uncommented then the server should be picking it up. The only other thing I can think of is to restart the machine and see what happens.
Post Reply