php.ini file creation in server
Posted
by tibin mathew
on Stack Overflow
See other posts from Stack Overflow
or by tibin mathew
Published on 2010-05-17T05:21:23Z
Indexed on
2010/05/17
5:30 UTC
Read the original article
Hit count: 518
Hi,
I am developing a php website.
I cant see php.ini file in my server. my host will not provide it.
So i'm now going to create a copy of that php.ini file.
so i have tried system()
i searched in google and i got this link. http://drupal.org/node/290592
Here they are using like this
system("cp /usr/local/php5/lib/php.ini /home/YOURUSERNAME/php.ini");
in my server when i looked the phpinfo my php.ini location is
/ms/svc/php5/conf/php.ini
and when i looked for the current directory of my server using this
$dir_path = str_replace( $_SERVER['DOCUMENT_ROOT'], "", dirname(realpath(FILE)) ) . DIRECTORY_SEPARATOR;
i got my current directory as
/netapp/whnas-swamp/s11/s11/01712/www.sample.com/webdocs/
so my system command will now look lke this
system("/ms/svc/php5/conf/php.ini /netapp/whnas-swamp/s11/s11/01712/www.sample.com/webdocs/php.ini");
i have named this page as getthephpini.php
and when i b rowse this page i got a blank page but no new php.ini file created in my server.
Is any mistake in that code??? Can any one show me the correct way
Please help me
Thanks
© Stack Overflow or respective owner