Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by PFMaBiSmAd

  1. Sadly, it appears that the code is dependent on register_globals being on (POST/GET... data magically appears in program variables.) Since it is unlikely that you will be able to go through the code and find and correct all the issues with it until you have a better understanding of php, your best short term fix would be to turn register_globals on.

     

    If you have access to the php.ini file, turn on register_globals in php.ini. Stop and start the web server to get any change made to php.ini to take effect.

     

    If you don't have access to the php.ini file and this is on an Apache web server and the web host has not specifically prevented you from turning on register_globals in this way, add the following line to a .htaccess file -

     

    php_flag register_globals on

     

    Note: This in only a temporary fix, because register_globals have been completely eliminated in PHP6. So, it will be necessary at some point, to keep the code working, to go through it and fix everything that is depended on register_globals being on.

  2. PHP code that is inside of <?php ?> tags in a file that is parsed by the php language engine is not visible when you browse to the file. You only get any output that is echoed/printed... by php. Unless you have an echo "the database password is pass"; in your php code, no one can see what it is through a browser.

  3. If the endlesssummermaui.com domain is the actual domain, there are 2-3 mail related problems with the DNS records for that domain that would get an ISP like AOL to reject mail from the mail server. The mail server for that domain did not appear on any of the common spam databases, but that does not mean that AOL is not banning it based on its' own record of abuse.

  4. To the best of my knowledge, receiving email servers are not yet checking domain registration information.

     

    However, your email will get rejected if your DNS records have problems - check your domain at www.dnsreport.com - or you are on a shared host and others have gotten the mail server banned due to spamming.

     

    Each of the major ISP's have a "postmaster" web site with information concerning getting mail sent to them accepted and accepted and not voted as spam/junk. You can also submit your mail server/domain to them to be "white" listed, if all else fails.

  5. From the mysql manual -

     

    The error (2003) Can't connect to MySQL server on 'server' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, the network port you specified is the one configured on the server, and that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.
  6. Post the actual error and the code with the line causing the error.

     

    Create a php script with the following in it and browse to it.

     

    <?php
    phpinfo();
    ?>

     

    Near the top of the output there is a line that says what (if any) php.ini is being used. Make sure it is the one you are making changes to. Also, as has already been said in this thread, find the mysql section in the output to make sure the mysql extension is getting loaded.

  7. If you made a change to php.ini but it did not take effect, either you did not stop and start your web server afterwords or the php.ini that you made the changes to is not the one that php is using.

  8. BTW. The advice given at that link on coping various files around is out of date with the more simple current instructions that php.net gives.

     

    Short version of php.net installation instructions for PHP5 on Windows and Apache -

     

    To allow easier upgrades, all files should be left where they are at in the php installation folder. It is not necessary to copy any php core or extension files around to get anything to work.

     

    Add the path of your php installation folder (typically c:\php) to the Windows PATH statement. Restart your computer to get any changes made to the Windows PATH statement.

     

    Change Apache's httpd.conf per the php.net installation instructions, making sure that there is a PHPIniDir setting that points to where your php.ini is located, for example -  PHPIniDir "c:/php"

     

    For php as an Apache module, the following lines need to be in your httpd.conf file (change existing lines when present or add these whole lines as needed) -

     

    Add this line where other LoadModule statements are at: LoadModule php5_module "c:/php/php5apache2_2.dll"

     

    Add this line (immediately below the LoadModule line): PHPIniDir "C:/php"

     

    Find and modify this line: DirectoryIndex index.html index.php

     

    Add this line where other AddType statements are at (parses .html files as php too): AddType application/x-httpd-php .php .html

     

    Stop and start your web server to get any changes made to httpd.conf to take effect.

     

    Modify the php.ini for the proper extension_dir = setting to where the extension dll's are located and uncomment the extension=php_mysql.dll line. Stop and start your web server to get any changes made to php.ini to take effect.

     

    When upgrading php versions, there are often new core settings and new default settings in the the php.ini-recommended, so you should start with it as your php.ini and modify it with your own custom settings from your existing php.ini. Basically, account for any differences between what you have now and what is in a new version's php.ini. I have found that using the Winmerge program makes finding and copying settings between an existing php.ini and a new one easy and invaluable - http://winmerge.org/

  9. Stating that something "diidn't work" tells a forum no useful information to help you with. We only see exactly what you post. What is working? What do you see when you browse to a file? What have you done to troubleshoot what is or is not working on your system?

     

    Following the instructions in the link that wildteen88 gave in his post, as they apply to your setup, would not have stopped php from working or would have required you to reinstall php. The reason I emphasized "as they apply to your setup" is, if you completely overwrote your existing php.ini (which the instructions stated to do only if you don't have an existing php.ini) or you moved a file to a location where it had never been before, then yes, your system is probably going to stop working.

     

    If you cannot specifically list each thing you did, you are going to have to go back to step one -

     

    Make sure that the web server works.

     

    Get PHP working.

     

    Get the mysql extension enabled, which is what your original problem was (along with not checking your web server log for errors and turning on full php error reporting to get php to help you.)

  10. The wording of the error indicates in incorrect url or connection address.

     

    If you post the actual error, it would help pin down what is going on.

     

    I assume that you tested this code as you developed it and you must have some idea what was changed or introduced that triggered the error and what code is being executed when the error is produced.

     

    It is your responsibility as the programmer to at least narrow down the problem to a small section of code, at most 20-30 lines. Otherwise you are not really going to get anyone in a Forum to take their time to try and deduce what is going on based on the non specific information provided so far.

     

    xyn already asked that you check your web server log for errors. Have you done that?

  11. That would result in code that is not portable between servers, in case you might not have the ability to turn on short open tags. Most people don't like to write code twice, once on a development system and again when they put it on a different server.

     

    The following is the recommendation by php.net -

     

    ; NOTE: Using short tags should be avoided when developing applications or

    ; libraries that are meant for redistribution, or deployment on PHP

    ; servers which are not under your control, because short tags may not

    ; be supported on the target server. For portable, redistributable code,

    ; be sure not to use short tags.

  12. Start with making sure the basics are working -

     

    First, mysql_error() is spelled wrong in the code you just changed.

     

    Does the echo "test"; show up? If not, php is probably not working.

     

    Turn on full php error reporting (display_errors and error_reporting) in php.ini to get php to help you. Stop and start your web server to get any changes made to php.ini to take effect.

  13. I'll assume that you are just doing this on your development system. If doing this on your actual online data, make sure you have a working backup of your database in case anything goes wrong.

     

    It is better to add a column to your database, for example "sha_password", insuring that the column width is sufficient to hold a SHA1 value (just think what would happen if your existing column was not big enough to hold the SHA1 results and you blindly updated it, ouch, all those passwords would be lost.) Then run an UPDATE query to populate the new column with the SHA1 of the existing column. After you make sure that the new column contains what you expect and you have modified your code so that it puts new passwords into the new column with the proper SHA1 encoding and is able to query and/or retrieve the SHA1 passwords from the new column, then and only then should you remove the old password column from the database.

     

    See the following query for an example of how to populate the new column with the SHA1 value of the old password column (untested) -

     

    UPDATE users SET sha_password = SHA1(password) WHERE 1 = 1

  14. Blank pages are usually caused by fatal parse or runtime errors. In this case the include_once() statement is missing the semi-colon ; at the end of the statement.

     

    When learning, developing code, or debugging code, always check your web server log for errors and/or turn on full php error reporting in php.ini or .htaccess (fatal parse errors won't be output to the browser if you attempt to turn on error reporting in your script.)

  15. Most mail servers have an API that allows you to dynamically add users... and a web interface for users to access email.

     

    If you are talking about 5k-10k accounts, the following might give you a starting place (I have not personally used this.) Here is a link to a free Windows based mail server that says it does most of what you would normally want to do if hosting free email accounts - http://www.hmailserver.com/?page=frontpage

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.