php-ini

php file upload error of 1 - What is correct way to use php_ini?

扶醉桌前 提交于 2020-12-09 19:27:06
问题 I'm having issues uploading a pdf to my server. The upload_max_filesize is 2M and the file(s) are more then that, around 4M. I found a post with a similar issue to mine here $_FILE upload large file gives error 1 even though upload_max_size is bigger than the file size What I can gather from php.net for the correct usage of ini_set commands is this, which I am currently using. ini_set('upload_max_filesize', 100000000); ini_set('post_max_size', 110000000); ini_set('memory_limit', 120000000);

Why are PHP errors printed twice?

与世无争的帅哥 提交于 2020-05-24 08:29:26
问题 Summary Amazingly I could find nothing about this on Google or SO. When I throw an exception in PHP it appears in my console twice, complete with error message and stack trace. The first time it's printed it says "PHP Fatal error: ..." and the second time it just says "Fatal error: ...". I haven't tested this is the Apache plugin version. Example With some namespaces and paths shortened with '...' for safety: $ php code/com/.../tabular_data.php PHP Fatal error: Uncaught exception 'Exception'

Can you Force Type Casting in PHP?

我们两清 提交于 2020-05-23 21:41:31
问题 I have been doing some research online and it appears that the answer to my question is no, but I realize there are times when I might miss something or search for something incorrectly. I know in languages like C++, when a variable is declared it can be declared as int or string. Is it possible to force this in PHP? For Example: <?php (int)$var = 5; ?> will be validated and not cause an error in PHP, but: <?php $var = 5; ?> will cause an error because it was not cast as a type string, int,

/var/php_sessions not being recognized

六月ゝ 毕业季﹏ 提交于 2020-01-24 22:45:32
问题 I'm trying to set up Joomla as a CMS for a web site I made. I have the site hosted with Globat. When I try to install Joomla, I get this message. Warning: Unknown: open(/var/php_sessions/sess_cc24fb3a1ba0e66a653237dd88762ac6, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/php_sessions) in Unknown on line 0 I checked the PHP ini file for the

PHP - date() vs. date.timezone / date_default_timezone_set()

瘦欲@ 提交于 2020-01-22 20:18:05
问题 I've just got a new computer, and I've been setting up PHP/MySQL/databases etc... I think I'm just about there, except it's thrown this curveball. My login script was working fine, but now it's spitting the following warning (which messes up the JSON). Warning : date() [function.date]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still

PHP remove/fix module not found or already loaded warnings?

女生的网名这么多〃 提交于 2020-01-19 05:38:27
问题 When i run a php script from the command line like below php test.php i get following output PHP Warning: Module 'memcache' already loaded in Unknown on line 0 PHP Warning: Module 'apc' already loaded in Unknown on line 0 how do i fix or remove these module warnings ? I checked the php.ini in etc/php.ini output of php -i | grep php.ini PHP Warning: Module 'memcache' already loaded in Unknown on line 0 PHP Warning: Module 'apc' already loaded in Unknown on line 0 Configuration File (php.ini)

How to set and use PHP_INI_SCAN_DIR environment variable in PHP? [duplicate]

走远了吗. 提交于 2020-01-13 05:47:08
问题 This question already has answers here : Is it mandatory to configure PHP in order to scan configuration INI files on a per-directory basis(i.e. .htaccess files in my case) by PHP? (1 answer) How do I include a php.ini file in another php.ini file? (7 answers) how to set environment variables in apache xampp ? (1 answer) Closed 2 years ago . I've installed PHP 7.2.3 on my machine running on Windows 10 . I've installed PHP and Apache httpd 4.29 using latest copy of XAMPP package . I come

Mcrypt PHP extension required on Mac OS X Mojave

左心房为你撑大大i 提交于 2020-01-02 20:24:08
问题 I just update my to Mac OS X Mojave. My local site now stop loading. I kept getting Mcrypt PHP extension required. I tried brew update brew upgrade brew tap homebrew/dupes brew tap josegonzalez/homebrew-php brew install php54-mcrypt php --version // To Test your php I got Error: php54-mcrypt: cannot load such file -- /usr/local/opt/php54-mcrypt/Abstract/abstract-php-extension I tried reload my site I still get this Mcrypt PHP extension required. My set up details php --version , I got PHP 7.1

Vagrant + Xdebug + Atom

▼魔方 西西 提交于 2019-12-31 07:11:05
问题 I have a vagrant box with xdebug installed, running on OSX, but Im struggling to get the Atom xdebug plugin ( php-debug ) to connect to it. I pasted the phpinfo(); data into the xdebug validation site and it said all was good. And you can see all the xdebug settings. I have mapped port 9000 in the vagrant file. config.vm.network :forwarded_port, guest: 9000, host: 9000 The vagrant box has host only network that exposes 192.168.10.100 as the IP of the server. And I've tried all manner of