Jump to content

Archived

This topic is now archived and is closed to further replies.

Antonio Garcia

From windows to unix

Recommended Posts

Some easy questions:

 

May I velepop my eCommerce website into a local server (in windows) and after that upload it to a server in unix?

 

Is better to install eCommerce into the web (not local) to avoid problems and develop there?

 

What is the difference from a php written in windows or unix? (I saw two installations depending the server)

 

May I update from the files written in 'windows' to 'unix' (the changes I made until now)?

 

I'm asking this because I try to run a simple script as:

 

$log_handle = fopen("d:/mylocalfolder/mytestfile.txt", "r");

 

Into the future web server (unix) I get:

 

Warning: fopen(d:/mylocalfolder/mytestfile.txt): failed to open stream: No such file or directory

 

... and don't work at all (In windows work ok).

 

All the best.

 

Antonio :huh:


Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

No pierdas el tiempo. Si quieres usar la versión más estable de osCommerce (la realizada por la comunidad, que además es 'responsive', la 2.3.4.1BS Edge) pincha aquí y aquí para descargarte el idioma Español.

Share this post


Link to post
Share on other sites

Yes, you can develop on Windows and then upload to *nix. Actually lots of people do so. As for OsCommerce you usually have to keep only too files different: configure.php in catalog/includes and configure.php for admin/includes.

 

To make it completely safe just make sure that you have same versions of Apache, MySql and PHP both on *nix and Windows.

Share this post


Link to post
Share on other sites
I'm asking this because I try to run a simple script as:

 

$log_handle = fopen("d:/mylocalfolder/mytestfile.txt", "r");

 

Into the future web server (unix) I get:

 

Warning: fopen(d:/mylocalfolder/mytestfile.txt): failed to open stream: No such file or directory

This problem is not really really because of *nix and Windows.

This is just because of different computer.

 

No such file or directory

Exactly! Check your server directory, there is no d:/mylocalfolder/mytestfile.txt, you uploaded it to some other folder. Actually there even cannot be any "D:: drive on *nix machine, they don't use the idea of having drives named with letter

Share this post


Link to post
Share on other sites

Thanks Doctor for tour sugestions:

 

So: fopen() only works if the files are IN THE SAME MACHINE that make the scrip.

If there are into a URL don't matter...

 

I try to make a script that do a connection from my domain to my local machine.

I need automate uploading files (not only 1) to update my big database (1100 files 100kbits/each, a lot ot time if I try with phpMAdmin).

 

I would like to avoid upload all the files first and then run the scrip only I there a re a way to read from 'my domain' the files without upload (We gain one step).

 

May you sugest how I may do that?

 

(I have a local server, May be it would be easy to put these files into a directory of this server so fopen() will run as 'URL' insead 'file').

 

Sugestions will be welcome. :unsure:

 

Antonio


Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

No pierdas el tiempo. Si quieres usar la versión más estable de osCommerce (la realizada por la comunidad, que además es 'responsive', la 2.3.4.1BS Edge) pincha aquí y aquí para descargarte el idioma Español.

Share this post


Link to post
Share on other sites
So: fopen() only works if the files are IN THE SAME MACHINE that make the scrip.

If there are into a URL don't matter...

Of course not...

fopen() works even if the files are not in the same machine...

I think your pb comes from a bad URL. Also, be sure that "allow_url_fopen " is enabled in your php_ini file.

 

An other thing different between Windows and Unix: Unix is case sensitive for the name of the directory, not Windows...

It can be the reason of numerous pb if you have directory named on windows with upper case, then, whem uploaded on Unix, they are not recognized...

 

Regards...


JeanLuc

OsC: MS2

Share this post


Link to post
Share on other sites

×