Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 663299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:28:28+00:00 2026-05-13T23:28:28+00:00

When I moved my sites to a dedicated server from HostGator, several things were

  • 0

When I moved my sites to a dedicated server from HostGator, several things were broken and all are broken involving type coercion. If $_POST[‘var’] is 0, it is not considered to be an integer and fails a comparison with another integer.

I went through and forced int types on all of those broken places on the site I found, but I’m sure there are more I didn’t find. I’m not crazy familiar with PHP.ini configuration, but perhaps you are and can tell me how I can fix this?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:28:28+00:00Added an answer on May 13, 2026 at 11:28 pm

    No – you can’t change PHPs type conversion functionality, but you can write your code to better deal with PHP’s dynamic type conversion.

    All request vars are automatically treated as strings. Without seeing your code it’s rather hard to establish what your criteria for “fails a comparison” are.

    If I run:

    print var_export((0=="0"), true) . "\n";
    print var_export(("0"==0), true) . "\n";
    print var_export((0==(integer)"0"), true) . "\n";
    print var_export((0==="0"), true) . "\n";
    

    Then I get

    true
    true
    true
    false
    

    i.e. the only time the integer comparison fails is when I ask for a match on type as well as value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it safe to move my modules From sites/all/modules/ To sites/all/modules/contrib and sites/all/modules/custom on
Moved from preview 2 to preview 5 and now my Html.ActionLink calls are all
I just moved a django project to a deployment server from my dev server,
I recently moved a files/images folder on my site (a Drupal installation) from /sites/default/files/
This morning I moved a .NET website from our local server to live (not
I recently moved a wordpress site from media temple's gs to their dedicated virtual
I recently moved some sites resp. I backuped them and did a fresh (ubuntu)server
I have moved a web site from one server to another and I copied
Capistrano and Git worked properly till I moved my site to another server. My
As a web developer looking to move from hand-coded PHP sites to framework-based sites,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.