1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Bad Gateway error after update

Discussion in 'Plesk for Windows - 8.x and Older' started by RobertS, Jun 23, 2006.

  1. RobertS

    RobertS Guest

    0
     
    Bad Gateway error + php_curl.dll error after update

    After updating from 7.5.6 to 7.6 one of my PHP scripts gives constanly an error:
    502 Bad Gateway
    Web server received an invalid response while acting as a gateway or proxy server.

    The PHP script is 100% correct, also phpinfo(); gives an error at the end:

    PHP Warning: Unknown(): Unable to load dynamic library 'D:\SWsoft\Plesk\Additional\Php\extensions\php_curl.dll' - Access is denied. in Unknown on line 0

    In the php.ini the php_curl.dll extention is loaded, alse the extention folder is correct listed.
    These 2 errors must be related to each other, both occurred after the update.

    I allready ran the reconfigurator to try to fix it but this had no effect.

    Could please someone tell me what is wrong and how to fix this?
     
  2. Gris@

    Gris@ Guest

    0
     
    Add psacln and psaserv groups to php folder ACL
     
  3. RobertS

    RobertS Guest

    0
     
    What is ACL ?
    I do not have an folder named ACL, where must this folder be?

    If you mean the \SWsoft\Plesk\Additional\Php folder then the 2 users are allready listed, also the dll file itself has the correct security, I even comapred it with an other dll file which works fine.

    So please explain what you mean.
     
  4. duckbert

    duckbert Guest

    0
     
    i am getting bad gateway errors from mambo and joomla (i have tried both) when i attempt to access an outside file of any type.

    Some more info here would be greatly appreciated.
     
  5. RobertS

    RobertS Guest

    0
     
    This caused due to changes in the Plesk secerity setup.
    The error is proberly caused because the PHP script uses fopen to open remote files.

    When this is done several times then you get an error from plesk (bad gateway), in release 7.6 they changed a lot of file rights of the user psaadm and psacln so they cannot open files anymore to make plesk more secure.

    So look into your script if there are fopen commands used, if so rewrite the script with other commands.

    I changed fopen into curl, this change worked and now the errors are gone. (this after the advise I got from Sw-soft support it self)
     
  6. duckbert

    duckbert Guest

    0
     
    Thats all very good but i care more about functionality than security. Whats the point of having something noone can break if its already broken?

    I don't want to have to scan every bit of open source code i put on the server *in case* it happens to throw a bad gateway exception. Is there any way to change plesks security setting, rather than changing the code?
     
  7. RobertS

    RobertS Guest

    0
     
    Nope.

    According to the plesk support engineer who helped me he had to make report to the developers to fix this if I could not change the code.
    Luckely I could change my code.

    On almost all plesk files of plesk the user rights have been changed from allow to deny, so it is almost impossible to find out which files you need to change the rights.
    Just changing them would not be that smart, it would completely open your webserver for any hacker or scriptkiddy arround.

    If you really need it to be fixed it would be better to send in a support ticket to sw-soft, if you do not have a support license you always can buy an 1 incident support linsence in the online swsoft shop.

    I bought a new license to fix this problem, my old lincense was leased until 30-6-2006 so I got a new one directly from SW-Soft itself. (the also got now a special offer, free 3 smartertools lisences included)
     
  8. asantana

    asantana Guest

    0
     
    I updated from 7.0.3 to 7.5.6 and now get a similar error when I boot into Windows Server 2003.

    When first booting up, at the login in screen I get a WARNING window stating:

    "Unknown(): Unable to load dynamic library 'C:\Program Files\SWsoft\Plesk\Additional\Php\extensions\php_curl.dll' - Access is denied"

    It this problem also related to the new security changes?

    I get the same error for:
    php_gd2.dll
    php_gettext.dll
    php_iconv.dll
    php_imap.dll
    php_mssql.dll
    php_sockets.dll

    Any clue on how to get rid of these WARNING messages? After clicking OK on all of them, PHP works fine.

    Thanks.
     
  9. duckbert

    duckbert Guest

    0
     
    I found a way to fix the problem, I updated to php 5x.

    A word of warning - make sure you backup the php.ini, i replaced the new one with the old one and then reconfigured it afterwards

    check out the swsoft KB article

    http://kb.swsoft.com/article_149_1048_en.html

    I'd proably only do this if you are desperate and just started with your server, it took ages and i went around in circles uninstalling & troubleshooting, but, if you follow the tutorial to the T you should be right - and hey, you got a better version of php

    I'm thinking of updating mysql now that I have done this....

    Goood luck
     
  10. Tiago@

    Tiago@ Guest

    0
     
    You changed fopen into curl, How?
     
  11. RobertS

    RobertS Guest

    0
     
    I mean I changed commands which used fopen into commands using curl
    I used the fopen command to access a url, so I could change this into curl which does the same.
     
  12. Tiago@

    Tiago@ Guest

    0
     
    Ok, thanks for the reply.
     
  13. CryoGenID

    CryoGenID Regular Pleskian

    25
    90%
    Joined:
    Apr 14, 2004
    Messages:
    150
    Likes Received:
    0
    Hey :)

    Just to bring that problem here up again...

    I am using Typo3 and since the update to the new Plesk-Version, that is not working well anymore... yep, the "Bad Gateway"-Error...

    Why don't the engineers at swsoft test their software before it is released?
    And why is no update available to fix that issue? (Not even the "new" 7.6.1 Update fixes that!)

    And to get things straight:
    If I upgrade to PHP5 will that "Bad Gateway" be solved without the need to change the PHP-Files?

    Thanks for your help and replies :)

    Chris
     
  14. CryoGenID

    CryoGenID Regular Pleskian

    25
    90%
    Joined:
    Apr 14, 2004
    Messages:
    150
    Likes Received:
    0
    We've now upgraded to PHP5, following the KB-Article posted here in this thread.

    After the update the "Bad Gateway"-Situtation got even worse :-/
    (NO PHP-Scripts worked anymore)

    The only workaround we have now found is to go into Plesk (after the PHP5-Install) and make the group operation "PHP Support" and "Run PHP as ISAPI extension"...

    Now the PHP-Stuff seems to be working again...

    But we still want to use PHP as CGI and not ISAPI...

    Well, we're waiting for an answer from the tech-support of swsoft...

    If we get an answer, we'll post it here!

    Best regards,

    Christian
     
  15. CryoGenID

    CryoGenID Regular Pleskian

    25
    90%
    Joined:
    Apr 14, 2004
    Messages:
    150
    Likes Received:
    0
    If you find ImageMagick is not working any more, you have to give the User
    "IIS WP User" (IWPD_xx) the correct user-rights for the "typo3temp"-Directory...

    Just to save you hours of searching for a solution why Typo3 sais "No output from ImageMagick detected" ;)

    Best regards,

    Chris
     
  16. intermedia

    intermedia Guest

    0
     
    Please an urgent patch is required

    Hi,

    When you have a serious hosting business you need support in all tools that you paid.
    My customers are using cms as phpnuke, mambo, moddle and many more.

    So i need to restart more than twice a day, because this problem occurs frecuently.

    By now i had upset customers, Bad Gateway message appears in their websites, and we dont have support by sw-soft.

    Please, please, please, post an answer o a patch to correct this problem.

    Thank you.
     
  17. CryoGenID

    CryoGenID Regular Pleskian

    25
    90%
    Joined:
    Apr 14, 2004
    Messages:
    150
    Likes Received:
    0
    As the support needed over 24 hours to just respond to our support query, we had to solve the problem ourselves....

    Our solution is two posts above this one...

    We also had to fix webmail, where the solution was to change the website-isapi-part from "php.exe" to the corresponding dll...

    Now everything works fine again here :)
     
  18. intermedia

    intermedia Guest

    0
     
    Hi Forum members

    I upgraded to PHP5, following the KB-Article posted here in this thread too,
    And of course my scrips arent working, even horde is not working.
    CryoGenID said:"The only workaround we have now found is to go into Plesk (after the PHP5-Install) and make the group operation "PHP Support" and "Run PHP as ISAPI extension"...
    ", but I really cant understand or I cannot find where in plesk panel or ISS can Run PHP as ISAPI extension.

    Please i really appreciate for help.

    Thank you.

    Ruben

     
  19. CryoGenID

    CryoGenID Regular Pleskian

    25
    90%
    Joined:
    Apr 14, 2004
    Messages:
    150
    Likes Received:
    0
    Ruben,

    just log into Plesk, when you have all the domains listed, select them all and select "Group Operations" from above the Domain List.
    Then you can choose to "enable" PHP and "Run PHP as ISAPI".
    Then click on OK and wait a _long_ time (if you have lots of domains)...

    Horde can be repaired by following our post from 4.August :)

    Good Luck!

    Best regards,

    Christian
     
  20. intermedia

    intermedia Guest

    0
     
    Hi Cristian

    Those errors appears in websites:

    Notice: Undefined variable: HTTP_USER_AGENT in D:\inetpub\vhosts\colombiaaudio.com\httpdocs\mainfile.php on line 28

    Notice: import_request_variables() [function.import-request-variables]: No prefix specified - possible security hazard in D:\inetpub\vhosts\colombiaaudio.com\httpdocs\mainfile.php on line 51

    Warning: include(db/mysql.php) [function.include]: failed to open stream: No such file or directory in D:\inetpub\vhosts\colombiaaudio.com\httpdocs\db\db.php on line 63

    Warning: include() [function.include]: Failed opening 'db/mysql.php' for inclusion (include_path='.;C:\php5\pear') in D:\inetpub\vhosts\colombiaaudio.com\httpdocs\db\db.php on line 63

    Fatal error: Class 'sql_db' not found in D:\inetpub\vhosts\colombiaaudio.com\httpdocs\db\db.php on line 96

    Do i have paremeters missing? as pear path??

    Please write me to my email info@intermediacolombia.com to show you phpinfo()


    Thank you,


    Ruben
     
Loading...