Sentora Support Forums

Full Version: PHP Can't Seem to Upload
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey Guys,

I have Sentora installed on an amazon EC2 instance (Centos 6.5). I am not entirely sure if this is directly Sentora related or not but for some strange reason I am unable to upload any files within PHP. For example uploading images inside Joomla CMS or Wordpress. Eevrything else works fine. I have tried everything I can think of to solve the problem.

At first I thought it was simply a permissions issue on the folders so tried setting them to 777, my next thought was to look at php.ini but everything from post value / max upload & executive times are all set within reasonable limits that should not prevent any files uploading.

Could it be something to do with the Open Base Directory?

I am really running out of idea's.

Best Regards,

Mark
Greetings @[fitzuk],
Please provide us more information in order to help you.
- What php.ini are you editing?
- What is exactly the error you get?
- What's the directory structure you have? (to check if it is not OpenBaseDir, but I doubt it is).
- What is your php.ini php_value post_max_size value?
Hey,

Thanks for getting back to me.

I am editing the etc/php.ini

I have also tried adding a php.ini in the root off the domain directory setting the values. I am pretty sure I am editing the correct file as I created a simple phpinfo file and the values I changed were updated within that.

Not sure what you mean by directory structure, I have kept it pretty standard.

The values I set are (just to be sure):

upload_max_filesize = 250M
post_max_size = 250M
max_execution_time = 300

I created a simple php upload script outside of any CMS & its almost like it thinks the file is empty or not an image.

Warning: getimagesize(): Filename cannot be empty in . . .

But inside Joomla, it thinks the files are not images by saying "vmError: Sorry,It's not a valid media file"

Any help would be greatly appreciated.

Mark
1. php.ini don't work in website root like cpanel, as php runs using mod_php5 not in php CGI mode!

2. centos 6.5 ships with php 5.3, while latest joomla require php 5.4. Take care over this.

3. Take care for openbase_dir and temp directory.

4. did you add caching or any such into VPS?

5. Check PHP Error logs for the domain under /var/sentora/logs/domains/{mydomain} that would help a lot.

M B
I cleared the log and ran the simple upload script and nothing is in the log. I am aware of the latest version being 5.4 but 2.5 works fine.

Any other ideas of where I can check. Its almost like it doesnt think its an image. Could it be anything to do with suhosin
It can be suhosin too.... but strange not log error.

Basic hosting should have no issue with upload, otherwise everybody will notice it, and you will see a lot of bugs complains here.

Did you add anything php plugin in your LAMP stack? Any modifications?
I had same error, can not upload in both joomla and wordpress source code. My server is centos 5.7 and php 5.4.45.
(10-16-2015, 02:58 PM)td2000 Wrote: [ -> ]I had same error, can not upload in both joomla and wordpress source code. My server is centos 5.7 and php 5.4.45.

Did you check the permissions for the folders the files are being uploaded too?
(10-16-2015, 05:50 PM)TGates Wrote: [ -> ]
(10-16-2015, 02:58 PM)td2000 Wrote: [ -> ]I had same error, can not upload in both joomla and wordpress source code. My server is centos 5.7 and php 5.4.45.

Did you check the permissions for the folders the files are being uploaded too?


The permission is ok.
As some guy refer to suhosin, I check with php - v as results as follow:

# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/suhosin.so' - /usr/lib/php/modules/suhosin.so: undefined symbol: php_checkuid in Unknown on line 0
PHP 5.4.45 (cli) (built: Sep 30 2015 15:09:38)
Copyright © 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright © 1998-2014 Zend Technologies

What is problem?
do you have update your php to a new version
Pages: 1 2