Web Server Alias and CGI File Search

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Web Server Alias and CGI File Search

305 Views
DebugMore
Contributor I

I am running MQX 5.0.2 and nio style mounts. I mount an SD card with:

a_fd = open("a:", O_ACCMODE); // O_RDWD works the same way

I run a cgi search from the web server with:
error_code = ioctl(a_fd,IO_IOCTL_FIND_FIRST_FILE,&search);

The search works. The link created on the web page and processed via Web alias to download works. Life is good.

As soon as I open a file in any normal task for the same a: drive, both web page cgi search and aliases stop working completely. Any ideas? Why can't web page cgi and alias coexist with normal tasks writing to an SD card? The normal tasks work just fine with the SD card.

Thank you!

0 Kudos
Reply
2 Replies

265 Views
DebugMore
Contributor I
Update: I can narrow it down that the web server and alias function only work when a drive is mounted as O_RDONLY. But that does not work for the rest of the application, which needs to write to the drive. How can I configure the web server to accept a O_RDWR mounted drive? Any ideas?
0 Kudos
Reply

156 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @DebugMore ,

Thank you for your post. Regarding the MQX questions, I recommend that you contact mqxsales@nxp.com for further support, as this is the appropriate channel.
Hope it helps.
 
BR
Celeste
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2358081%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EWeb%20Server%20Alias%20and%20CGI%20File%20Search%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2358081%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20running%20MQX%205.0.2%20and%20nio%20style%20mounts.%20I%20mount%20an%20SD%20card%20with%3A%3C%2FP%3E%3CP%3Ea_fd%20%3D%20open(%22a%3A%22%2C%20O_ACCMODE)%3B%20%2F%2F%20O_RDWD%20works%20the%20same%20way%3CBR%20%2F%3E%3CBR%20%2F%3EI%20run%20a%20cgi%20search%20from%20the%20web%20server%20with%3A%3CBR%20%2F%3Eerror_code%20%3D%20ioctl(a_fd%2CIO_IOCTL_FIND_FIRST_FILE%2C%26amp%3Bsearch)%3B%3C%2FP%3E%3CP%3EThe%20search%20works.%20The%20link%20created%20on%20the%20web%20page%20and%20processed%20via%20Web%20alias%20to%20download%20works.%20Life%20is%20good.%3C%2FP%3E%3CP%3EAs%20soon%20as%20I%20open%20a%20file%20in%20any%20normal%20task%20for%20the%20same%20a%3A%20drive%2C%20both%20web%20page%20cgi%20search%20and%20aliases%20stop%20working%20completely.%20Any%20ideas%3F%20Why%20can't%20web%20page%20cgi%20and%20alias%20coexist%20with%20normal%20tasks%20writing%20to%20an%20SD%20card%3F%20The%20normal%20tasks%20work%20just%20fine%20with%20the%20SD%20card.%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2358769%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Web%20Server%20Alias%20and%20CGI%20File%20Search%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2358769%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EUpdate%3A%20I%20can%20narrow%20it%20down%20that%20the%20web%20server%20and%20alias%20function%20only%20work%20when%20a%20drive%20is%20mounted%20as%20O_RDONLY.%20But%20that%20does%20not%20work%20for%20the%20rest%20of%20the%20application%2C%20which%20needs%20to%20write%20to%20the%20drive.%20How%20can%20I%20configure%20the%20web%20server%20to%20accept%20a%20O_RDWR%20mounted%20drive%3F%20Any%20ideas%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2360962%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Web%20Server%20Alias%20and%20CGI%20File%20Search%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2360962%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F262212%22%20target%3D%22_blank%22%3E%40DebugMore%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CDIV%3EThank%20you%20for%20your%20post.%20Regarding%20the%20MQX%20questions%2C%20I%20recommend%20that%20you%20contact%26nbsp%3Bmqxsales%40nxp.com%20for%20further%20support%2C%20as%20this%20is%20the%20appropriate%20channel.%3C%2FDIV%3E%0A%3CDIV%3EHope%20it%20helps.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3EBR%3C%2FDIV%3E%0A%3CDIV%3ECeleste%3C%2FDIV%3E%3C%2FLINGO-BODY%3E