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 743625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:53:08+00:00 2026-05-14T08:53:08+00:00

Apologies for my longest question on SO ever. I’m trying to interface with a

  • 0

Apologies for my longest question on SO ever. I’m trying to interface with a php frontend for a mysql database in ROOT (a CERN framework in C++ for high energy physics analysis). To start off with, I tried to get this php interface to play nice with wget and curl first because I’m more familiar with them. The following command works:

wget --post-data "hostname=localhost:3306&un=joeuser&pw=psswd&myquery=show_spazio_databases;" http://some.host.edu/log/log_query_matlab.php

The results are:

database1

database2

That’s good. If I leave out the --post-data then I get the result:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'admin'@'localhost' (using password: NO) in /log/log_query_matlab.php on line 6
i'm dead! Access denied for user 'admin'@'localhost' (using password: NO) 
Warning: mysql_query() [function.mysql-query]: Access denied for user 'admin'@'localhost' (using password: NO) in /log/log_query_matlab.php on line 29

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /log/log_query_matlab.php on line 29

I have access to the php script (read only), but the error itself isn’t too important. What matters it that using ROOT, I use a function called as socket.SendRaw(message, message.Length()) (socket is a TSocket) and this gives me the same “error” as wget without the post data switch if my “message” is

"POST http://some.host.edu/log/log_query_matlab.php?hostname=localhost:3306&un=joeuser&pw=psswd&myquery=show_spazio_databases"

This may be in vain, but does someone knows a way I should format the “message” that includes something that is equivalent to the --post-data switch. Or, is there a standard way to format POST requests in a single line (I’ve seen multi-line stuff. Is that right?) Sorry I’m clueless!

PS. The mysql query is show databases but the space has been replaced with _spazio_, Italian for space. The author of the db and php interface requires it (and various replacements for symbols), but has anyone seen this before? Trying to troubleshoot that was terrible!

  • 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-14T08:53:09+00:00Added an answer on May 14, 2026 at 8:53 am

    The correct “one liner” (had to be multiline) was:

    POST http://some.host.edu/log/log_query_matlab.php HTTP/1.1
    Host: some.host.edu
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 73
    
    hostname=localhost:3306&un=joeuser&pw=psswd&myquery=show databases
    

    The end of each line has \r\n. The gap after content-length has two sets of those.

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

Sidebar

Related Questions

Apologies in advance for the long-winded question. I'm really a database programmer, but have
Good morning, Apologies for the newbie question. I'm just getting started with ASP.NET internationalization
I am just checking out F#, so apologies if this is a silly question,
Apologies for the recursive nature of this question but the chosen answer to a
Apologies for the long intro - just trying to suitably set the scene to
Apologies for the noob Python question but I've been stuck on this for far
Apologies if any of what I'm about to say makes no sense or overlooks
Apologies for the long post, but I wonder if I could get some more
Apologies if I get the terminology wrong. How do I define a constraint in
I am just getting started with IoC containers so apologies if this is a

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.