php.ini

How do you create subdomains using PHP? Is is possible on shared hosting?

I'm interested to create subdomains on the fly directly from php. For example when an user create a new page I want that page to be newpage.mydomain.com. Is that possible without changing the php or apache configuration files (supposing I'm using a shared hosting account). Later Edit: I'm talking about my domain, and I have full access ...

Is it possible to enable an extension programmatically in PHP?

We can enable php_zip by uncomment it in php.ini as follows: ;extension=php_zip.dll How to do it programmably? I'm using PHP5.3 ...

PHP.ini overriding/not allowing set_ini or set_include_path directives

I'm not exactly sure why this is happening. I'm running MAMP on my local machine. And I decided to install PEAR locally. So I edited the PHP.ini file and uncommented the include_path directive. Now for some reason none of my ini_set or set_include path directives work: // trying to different methods ini_set( 'include_path', ini_get( 'in...

PHP file upload

I have big trouble with file uploads with php. My own tests are successful but my colleague is telling me that he cannot update "larger" (ca. 5mb) files. Phpinfo says: - max_execution_time 30 - memory_limit 32 Mb - post_max_size 8 Mb - upload_max_filesize 10 Mb Is it better to use FTP? The problem is that I cannot change these settings...

Include path of php.ini ignored by Eclipse

Hi all, I have a PHP script to run. If I run it from the command line, it works fine (include path is set correctly). If I want to run it inside Eclipse (Run as script), then the PHP include path of my php.ini is replaced by Eclipse, with all the libraries I've added to the project. I've configured my PHP executable in Eclipse. I've ...

how to get Apache to reload php.ini in WIndows XP?

I'm trying to install XDebug by registering it in php.ini but it isn't working. I'm thinking maybe my apache server is not reloading my changes properly. -from your friendly PHP noob ...

php -i | find "extension_dir" don't take effect after modified its value

i wanna using curl in php script and run it in command line mode. here is the script <?php //enable_dl("php_curl.dll"); $ch = curl_init(); $options=array( CURLOPT_URL=>"http://test.com/wp-content/themes/bluefocus/images/desc_img.jpg", CURLOPT_BINARYTRANSFER=>true, CURLOPT_VERBOSE=>true ); curl_setopt_array($ch,$options); ...

PHP - Plesk - Cron - Allowed memory size exhausted?

ini_set('max_execution_time',0); ini_set('memory_limit','1000M'); These are the first two lines at the very top of my script. I was under the impression if I ran something via cron memory limits didn't apply, but I was wrong. Safe mode is off and when I test to see if these values are being set they are but I keep getting the good ol'...

Problems debugging virtual host with Netbeans

I'm running Ubuntu 9.10 I installed apache2 and downloaded the php 5.3.2 tar.gz, untarred and compiled. I then installed xdebug via pecl. After that I installed mysql-server and PhpMyAdmin. PhpMyAdmin can change apache2 settings, and now, xdebug is no longer included in my phpinfo(); overview. I've done a search for all possible php.in...

Installing PHP extensions in Debian

I'm trying to install the PECL extension pecl_http so that I can use PHP's http_negotiate_language() function. I'm running PHP5 on Apache2 and Debian Lenny. I installed the php_http package from the debian repo, however, I still can't use that function in my php scripts! The package also doesn't show up under phpinfo(). I tried installi...

How can I make PHP display the error instead of giving me 500 Internal Server Error

This has never happened before. Usually it displays the error, but now it just gives me a 500 internal server error. Of course before, when it displayed the error, it was different servers. Now I'm on a new server (I have full root, so if I need to configure it somewhere in the php.ini, I can.) Or perhaps its something with Apache? I've...

mb_internal_encoding() not available though configured?

I'm having problem with mbstring in my Apache2.2/Win7/PHP5.3 setup, though I think it's correctly configured in my php.ini: extension_dir = "ext" extension=php_mbstring.dll I get the following: Fatal error: Call to undefined function mb_internal_encoding() in ... I did a manual installation (by the book) using the VC6 .zip. I'm run...

php.ini not being read with windows 7 installation

I have installed php successfully on a Windows 7 machine but I can not for the life of me get it to read the php.ini file. I have uncommented out the line for php to use mysql and when I run phpinfo(), it never shows up. I have checked to make sure there is only one php.ini file on my entire c:\ drive and it's sitting in my c:\windows ...

How to find the php.ini file used by the command line?

I need to enable pdo_mysql in my EasyPhp environment, so I went to php.ini file and uncommented the following line: extension=php_pdo_mysql.dll Unfortunately I still have the same problem. I'm using the CLI so I suppose I need to locate the php.ini file used by the CLI. How can I find it? ...

IP Blocking on error logs PHP

Is there a way to block error logging from a specific set of IP's ? Basically macafee carry out a range of testing on the server nightly and we don't want to record these in our error logs. Is there a good way to avoid this from happening ? Hope you can advice! ...

PHP+MYSQL Server Config

Hi guys, I am parsing an XML file with PHP and inserting the rows in a MYSQL database. I am using PHP simplexml_load_files to load the XML and a foreach to loop through the array and insert the rows into my database. It works perfectly fine with small files i am testing, but it comes to reality I need to parse a large 500mb XML file a...

PHP - a different open_basedir per each virtual host

Hi I've came across on this problem, I have a sever running apache and php. We have many virtual hosts but we've noticed that a potentially malicious user could use his web space to browse other user's files(via a simple php script) and even system files, this could happens due to the php permissions. A way to avoid it is to set the open...

How can i forbid php to access other folders ?

I am using godaddy shared linux hosting and i hosted multiple domains in same package. Last week one of my wordpress sites was infected from an malware. Then this worm code seperated to my all domains instantly. The quesiton is how can i forbid to access other domains (folders) from a domain (folder) with php.ini or any other solution ...

php.ini file creation in server

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/YO...

'Overwrite' php.ini settings

I have a folder, and for all php files in that folder (or even better, in that folder or any folders within it) I'd like to make some changes to the php settings. Can I just place a php.ini file in that folder with those settings I'd like to change? If so, any reason why this wouldn't be working for me? It's my own server. Thanks! edi...