Tips and Tricks HQ Support
Support site for Tips and Tricks HQ premium products

Cannot re-assign auto-global variable _POST
Tips and Tricks HQ Support Portal › Forums › WP eMember › Cannot re-assign auto-global variable _POST
- Author Posts
can not activate the plug in. i am working on doing some dev with xampp and php 5.4.4 and it looks like this is a common error with that version of PHP.
Hi, None of our products work on non live site (local installation). Mainly because there are too many factors involved that require direct access to URLs and outside server connection. You can’t do that in a local installation. We can’t provide support until you install the plugin on a live server where we can access your site via a URL. This is explained in our terms and conditions.
Anyway, I have taken a wild guess and made a slight change in some code which might fix this issue. I have sent you an email with an update.
That worked thank you! I understand you can not support local dev installs. thank you for taking a stab at this
I got the same problem I try to install eMember in local with the last version of Easyphp and i got this :
Fatal error: Cannot re-assign auto-global variable _POST in C:Program FilesEasyPHP-12.0wwwMy.afroconscientwp-contentpluginswp-eMemberwp_eMember1.php on line 1209
I know that you are not supposed to help me since it’s a local installation but can you forward me the email you sent to xpunkx ? May be you can share this information for everyone who need to do this so you don’t have to send your solution again, again and again.
Anyway, when your site is important, you know that we have to test our changes before making them live. So what advice can you give to people like me who have bought your product and want to check that everything will be safe (no conflict with other plugins for instance) before putting everything live ?
I have committed the change to the plugin core so if you load a fresh build of the plugin now, you will get the change I made:
https://support.tipsandtricks-hq.com/forums/topic/re-install-or-load-a-fresh-build-of-the-plugins
There is nothing wrong with putting the plugin on a local install for testing but you just need to keep in mind that this plugin is different than other plugins you may have installed. For example, this plugin needs access to the payment gateway which you don’t have in a local install. So all testing related to that functionality will fail.
The best option for testing a plugin that needs to be online is to create a test install of WordPress in one of your domains. For example, you can create a sub-domain called "test.your-domain.com" and then install WordPress there along with other plugins. You can even install WP in a sub-folder on your site and test there too (example, "your-domain.com/test/" .
I have just sent an email regarding this situation. please disregard. Thanks for the new plug-in. will upload today.
I am glad you got this working. I took care of the email for you.
- You must be logged in to reply to this topic.
Support » Plugin: VR-Frases (collect & share quotes) » Fatal error: Cannot re-assign auto-global variable _GET
Fatal error: Cannot re-assign auto-global variable _GET
9 years ago
I get this error:
Fatal error: Cannot re-assign auto-global variable _GET in wp-content/plugins/vr-frases/includes/vr-frases-functions.php on line 32
This is actually not a wordpress version problem per se. It seems to be related to PHP, the plugin should not be passing $_GET in as a param into a param named $_GET.
If you modify the following file, it solves this error:
- The topic ‘Fatal error: Cannot re-assign auto-global variable _GET’ is closed to new replies.

- VR-Frases (collect & share quotes)
- Frequently Asked Questions
- Support Threads
- Active Topics
- Unresolved Topics
- In: Plugins
- 1 participant
- Last reply from: mgrant
- Last activity: 9 years ago
- Status: not resolved
- Topics with no replies
- Non-support topics
- Resolved topics
- Unresolved topics
PICTURES PRO
- Overview - Start Here
- Event & Client Galleries
- Booking Calendar
- Pre-Order Sales
- Wall Designer
- Project Proofing
- Green Screen Proofing
- Design Features
- Integrated Payment Options
- Hosting Requirements
- Sytist Demo
- Free Test Drive
- Buy or Subscribe
- SYTIST FEATURES OVERVIEW
- FREE TEST DRIVE
- CLIENT & EVENT GALLERIES
- BOOKING CALENDAR
- PRE-ORDERING
- WALL DESIGNER
- PROJECT PROOFING
- DESIGN FEATURES
- INTEGRATED PAYMENT OPTIONS
- FEATURED WEBSITES
- HOSTING REQUIREMENTS
- TESTIMONIALS
- BUY OR SUBSCRIBE
Support Forum > Photo Cart
If your Photo Cart is suddenly getting a 500 error or only displaying a blank page then you or your hosting company has updated the PHP (programming language) to PHP 7 which Photo Cart is not compatible with (and will not be compatible with) mainly because of the removal of the my_sql functions which are replaced with my_sqli functions.
You would need to have the PHP version downgraded to 5.6 in order for Photo Cart to work. If downgrading the PHP doesn't work then you may have to update Photo Cart to the last version of 7. Download Photo Cart 7 upgrade files . Upgrade instructions .
Photo Cart was retired in 2015. Check out Sytist .
Help- Getting This Error Fatal Error: Cannot Re-assign Auto-global Variable _req
Sign up for email promotions.
Your information is safe with us and won't be shared.
Thank you for signing up!
- Self-Hosting Requirements
- PicturesPro
- Testimonials
- Sytist on Facebook
- Photo Cart (retired)
- Sytist Support Forum
- Photo Cart Support Forum
- Sytist Manual
- Sytist Video Tutorials
- Sytist Articles
By continuing to browse or by clicking Accept Cookies, you agree to the storing of cookies on your device necessary to provide you with the services available through our website.

- Today's Posts
- Member List
- Mark Forums Read
- View Forum Leaders
- What's New?
- vShare Demo
- Requirements

- vShare YouTube Clone
- Frequently Asked Questions
FIX: Cannot re-assign auto global variable $_FILES
- If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Thread: FIX: Cannot re-assign auto global variable $_FILES
Thread tools.
- Show Printable Version
- Email this Page…
- Linear Mode
- Switch to Hybrid Mode
- Switch to Threaded Mode
- View Profile
- View Forum Posts
- Private Message

Open include/functions.php Find PHP Code: function upload_jpg ( $_FILES , $var_name , $file_name , $img_width = 128 , $dir = "upload/" , $rename = '' ) { if ( $_FILES [ $var_name ][ 'name' ]) { $file_url = $dir . uniqid ( "" ) . tmp ; $ext = strrchr ( $_FILES [ $var_name ][ 'name' ], '.' ); move_uploaded_file ( $_FILES [ $var_name ][ 'tmp_name' ], $file_url ); if ( $_FILES [ $var_name ][ 'error' ] > 0 ) { $err = 'Error occurs while uploading file' ; } else if ( strtolower ( $ext ) == '.jpg' ) { $img = @ imagecreatefromjpeg ( $file_url ); $size = @ getimagesize ( $file_url ); $width = $size [ 0 ]; $height = $size [ 1 ]; if ( $width > $img_width ) { $percentage = $img_width / $width ; $width *= $percentage ; $height *= $percentage ; $img_r = @ imagecreatetruecolor ( $width , $height ); @ imagecopyresampled ( $img_r , $img , 0 , 0 , 0 , 0 , $width , $height , $size [ 0 ], $size [ 1 ]); } else { $img_r = $img ; } $pic_name = $dir . $file_name ; @ ImageJpeg ( $img_r , $pic_name , 100 ); // rename("$pic_name", "$dir"."$rename"); @ unlink ( $file_url ); } else { @ unlink ( $file_url ); $err = 'File must be as .jpg format' ; } } return $err ; } Replace With PHP Code: function upload_jpg ( $my_file , $var_name , $file_name , $img_width = 128 , $dir = "upload/" , $rename = '' ) { if ( $my_file [ $var_name ][ 'name' ]) { $file_url = $dir . uniqid ( "" ) . tmp ; $ext = strrchr ( $my_file [ $var_name ][ 'name' ], '.' ); move_uploaded_file ( $my_file [ $var_name ][ 'tmp_name' ], $file_url ); if ( $my_file [ $var_name ][ 'error' ] > 0 ) { $err = 'Error occurs while uploading file' ; } else if ( strtolower ( $ext ) == '.jpg' ) { $img = @ imagecreatefromjpeg ( $file_url ); $size = @ getimagesize ( $file_url ); $width = $size [ 0 ]; $height = $size [ 1 ]; if ( $width > $img_width ) { $percentage = $img_width / $width ; $width *= $percentage ; $height *= $percentage ; $img_r = @ imagecreatetruecolor ( $width , $height ); @ imagecopyresampled ( $img_r , $img , 0 , 0 , 0 , 0 , $width , $height , $size [ 0 ], $size [ 1 ]); } else { $img_r = $img ; } $pic_name = $dir . $file_name ; @ ImageJpeg ( $img_r , $pic_name , 100 ); // rename("$pic_name", "$dir"."$rename"); @ unlink ( $file_url ); } else { @ unlink ( $file_url ); $err = 'File must be as .jpg format' ; } } return $err ; }
HelpDesk vShare Youtube Clone
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
- BB code is On
- Smilies are On
- [IMG] code is On
- [VIDEO] code is On
- HTML code is Off
Forum Rules

Fatal error: Cannot re-assign auto-global variable _FILES
What are your feelings, share this article :, how can we help.
Powered by BetterDocs
Leave a Reply Cancel reply
Your email address will not be published.Required fields are marked *
Hit enter to search or ESC to close

- Stack Overflow Public questions & answers
- Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
- Talent Build your employer brand
- Advertising Reach developers & technologists worldwide
- About the company
Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Fatal error: Cannot re-assign auto-global variable
Fatal error: Cannot re-assign auto-global variable _FILES in C:\xampp\htdocs\user\utils\CommonUtils.php on line 1395
The code on line 1395 is
- 1 I've removed the mysql tag. Please note that tags are supposed to describe your question, not your project. – Álvaro González Feb 19, 2013 at 9:51
4 Answers 4
you can't use $_FILES for function parameter it's reserved word, use this instead of
and for calling pass the $_FILES like this
You can also directly access the $_FILES without passing it in function parameter inside function.

You're trying to set a variable called $_FILES in local scpe as an argument to the saveAvatar() method; but can't because it's one of the special superglobals.
Change the line to
The $_FILES superglobal will still be available to that method simply because it is a superglobal

I was also facing the same problem. Then I just removed the $_FILES variable from list of variables and my website started working again.

- 1 Thank-you style answers which just repeat an already posted answer are not suited for this site. – bwoebi Dec 29, 2016 at 22:24
Normally we can't reassign the $_Files, which means we can't pass the auto super global variable as argument -or function. But we have an alternate solutions.
Pass the file as parameter
Call the function with auto global-variable as argument.
Form for upload
Your Answer
Sign up or log in, post as a guest.
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy
Not the answer you're looking for? Browse other questions tagged php or ask your own question .
- The Overflow Blog
- How Intuit democratizes AI development across teams through reusability sponsored post
- The nature of simulating nature: A Q&A with IBM Quantum researcher Dr. Jamie...
- Featured on Meta
- We've added a "Necessary cookies only" option to the cookie consent popup
- Launching the CI/CD and R Collectives and community editing features for...
- The [amazon] tag is being burninated
- Temporary policy: ChatGPT is banned
- Staging Ground Beta 1 Recap, and Reviewers needed for Beta 2
Hot Network Questions
- Is it possible to rotate a window 90 degrees if it has the same length and width?
- Is it suspicious or odd to stand by the gate of a GA airport watching the planes?
- Relation between transaction data and transaction id
- Difficulties with estimation of epsilon-delta limit proof
- Euler: “A baby on his lap, a cat on his back — that’s how he wrote his immortal works” (origin?)
- How Do Subclass Spells Work?
- How do you ensure that a red herring doesn't violate Chekhov's gun?
- FAA Handbooks Copyrights
- Do "superinfinite" sets exist?
- Isolate page to turn off header
- Batch split images vertically in half, sequentially numbering the output files
- Short story taking place on a toroidal planet or moon involving flying
- What is \newluafunction? How can I use it?
- Using Kolmogorov complexity to measure difficulty of problems?
- Disconnect between goals and daily tasks...Is it me, or the industry?
- Why do we calculate the second half of frequencies in DFT?
- Does a summoned creature play immediately after being summoned by a ready action?
- Linear regulator thermal information missing in datasheet
- What does associativity mean for orders?
- "After the incident", I started to be more careful not to trip over things. - the incident has nothing to do with me; can I use this this way?
- What sort of strategies would a medieval military use against a fantasy giant?
- What is the point of Thrower's Bandolier?
- Do new devs get fired if they can't solve a certain bug?
- Knocking Out Zombies
Your privacy
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

IMAGES
VIDEO
COMMENTS
Fatal error: Cannot re-assign auto-global variable _POST in C:Program FilesEasyPHP-12.0wwwMy.afroconscientwp-contentpluginswp-eMemberwp_eMember1.php on line 1209
[This thread is closed.] I get this error: Fatal error: Cannot re-assign auto-global variable _GET ... Fatal error: Cannot re-assign auto-global variable _GET in wp-content/plugins/vr-frases/includes/vr-frases-functions.php on line 32
Problem: Cannot re-assign auto-global variable _post. Answer:You can't use a superglobal as the variable name for a function argument
I get the following error: Fatal error: Cannot re-assign auto-global variable _POST in C:\Program Files (x86)\Zend\Apache2\htdocs\includes\class-insert.php on line 47 when trying to access my class-insert.php page (or most of my other pages)
I have a gallery and all of a sudden when trying to add/change/delete gallery items I am getting this error "Fatal error: Cannot re-assign auto-global variable _REQUEST in /home1/shannonc/public_html/photocart
function upload_jpg($_FILES, $var_name, $file_name, $img_width = 128, $dir = "upload/", $rename = '')
Hi i got after a Update to PHP 5.5.9 a Problem with my PHP Code. What this error is saying is that you are attempting to name a variable in the
Fatal error: Cannot re-assign auto-global variable _FILES in /home/myairline/public_html/phpvms/core/common/PilotData.class.php on line 436 Go to that file, /phpvms/core/common/PilotData.class.php and head on over to what line it says has an error
Fatal error: Cannot re-assign auto-global variable _FILES in C:\xampp\htdocs\user\utils\CommonUtils.php on line 1395. Normally we can't reassign the $_Files, which means we can't pass the auto super global variable as argument -or function