Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
https and filesystem issue
Old 12-21-2005, 09:11 AM https and filesystem issue
Novice Talker

Posts: 12
Trades: 0
When using a secure connection (https) with PHP scripts, simple functions such as fopen, etc (filesystem objects and functions) do not work because of some security issues. Unfortunately, I need to read and write to local server files over a secure connection and cannot seem to find a way to do this without opening a port to an unsecure page in the same directory (thereby making this an unsecure method). Does anyone have a work-around on this issue, or is this another PHP brickwall?

Thanks in advance all!
synapsex is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-21-2005, 10:27 AM
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
You need to write to files on another server via HTTPS?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Old 12-21-2005, 12:28 PM tidbit
Novice Talker

Posts: 12
Trades: 0
no, the files are on the same server, same directory, but the allow_url_fopen is set to false on the hosting company's php settings for the domain. this is one of those php.ini settings that cannot be altered in a *.php script with built-in PHP functions.

Mainly, I get errors when trying to access any local files over https using the filesystem object. This is in place for some security reason in PHP. I'm just looking for some type of work-around without compromizing the secure connection.
synapsex is offline
Reply With Quote
View Public Profile
 
Old 12-21-2005, 02:56 PM
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
So if the files are in the same directory why are you trying to open them with a URL rather than using the filesystem?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Old 12-21-2005, 05:29 PM tidbit
Novice Talker

Posts: 12
Trades: 0
as stated earlier, for some reason, when I attempt to use the filesystem when accessing the page through a https connection, it doesn't work at all. I receive errors stating that the file cannot be read or file cannot be opened (using is_readable function and others). When accessing the same script via http, it works fine though. this is why the only work-around that i could come up with was to call the page via https and have the page open a Curl call to another page in the same domain over a http connection to import the file information. this of course is insecure and a complete pain to handle. I'm just looking for any ideas on another way to access the filesystem without having to do the above method.
synapsex is offline
Reply With Quote
View Public Profile
 
Old 12-21-2005, 05:42 PM
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
I'm not trying to be a pain but I just don't understand what could be happening (much like yourself) so please forgive me if these questions seem dumb.

So you have tried accessing this file using fopen and a local path....e.g.
PHP Code:
fopen('/home/user/www/file.txt'
And this works just fine when using http vs https? That is pretty confusing considering when you feed fopen a local path it is supposed to register it as such however if you feed it something like scheme:// it is supposed to register it as a URL and this is where allow_url_fopen would come into play.

If every question I have just typed is true then the only other thing I can think of is that your installation became corrupt or your possibly having some caching issues with your browser or php app. Some code would really help though.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to https and filesystem issue
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17852 seconds with 12 queries