evil turnip Posted September 10, 2009 Share Posted September 10, 2009 HI im revisiting php after along time away .. did have it as a ISAPI server but under another thread advised to install as FAST cgi etc...so have done ... So would it change my code or how it works ...not done this in years but here is the code snippet test im trying to get working <?php $file = '\\\\testme\tmp\intake.htm'; $newfile = '\\\\test\test2.php.bak'; if (!copy($file, $newfile)) { echo "failed to copy $file...\n"; } ?> <?php include '\\\testme\tmp\intake.htm';?> PHP Warning: copy(\\testme\tmp\intake.htm) [function.copy]: failed to open stream: Invalid argument in C:\Inetpub\wwwroot\test.php on line 9 PHP ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. allow_url_fopen = On ; Whether to allow include/require to open URLs (like http:// or ftp://) as files. allow_url_include = on This code worked fine when on the old ISAPI box any pointers or tips ... ? Thanks Link to comment https://forums.phpfreaks.com/topic/173768-my-old-code-now-wont-work-on-fast-cgi-box/ Share on other sites More sharing options...
evil turnip Posted September 10, 2009 Author Share Posted September 10, 2009 Im sure its a setting to get the includes to work I may have to fire up the old server if it still works to see what Im missing Link to comment https://forums.phpfreaks.com/topic/173768-my-old-code-now-wont-work-on-fast-cgi-box/#findComment-916035 Share on other sites More sharing options...
PFMaBiSmAd Posted September 10, 2009 Share Posted September 10, 2009 Those are not URL's, so the settings you mentioned have nothing to do with an error about an Invalid argument. Those are not a valid file system paths either. You either need to use / (on Windows, php converts / to \) or you need to use \\ for each \ to escape the \. Where did you came up with \\\\ for a local file path? Link to comment https://forums.phpfreaks.com/topic/173768-my-old-code-now-wont-work-on-fast-cgi-box/#findComment-916040 Share on other sites More sharing options...
evil turnip Posted September 10, 2009 Author Share Posted September 10, 2009 Im trying to include a static file from a unix box this worked 2 years ago on the ISAPI server..that has now sadly died ... I tried // and still no joy Link to comment https://forums.phpfreaks.com/topic/173768-my-old-code-now-wont-work-on-fast-cgi-box/#findComment-916045 Share on other sites More sharing options...
evil turnip Posted September 10, 2009 Author Share Posted September 10, 2009 <?php include '\\\\testme\\tmp\\intake.htm';?> produces PHP Warning: include(\\testme\tmp\intake.htm) [function.include]: failed to open stream: Invalid argument in C:\Inetpub\wwwroot\index5.php on line 317 PHP Warning: include() [function.include]: Failed opening '\\testme\tmp\intake.htm' for inclusion (include_path='.;C:\php5\pear') in C:\Inetpub\wwwroot\index5.php on line 317 Notice \\\\ = \\ when it resolves which is correct for windows browsing Change it to \\ you get one \ see my confusion ... like i said im revisiting php after a long time away Link to comment https://forums.phpfreaks.com/topic/173768-my-old-code-now-wont-work-on-fast-cgi-box/#findComment-916054 Share on other sites More sharing options...
evil turnip Posted September 14, 2009 Author Share Posted September 14, 2009 Can anyone help ? Link to comment https://forums.phpfreaks.com/topic/173768-my-old-code-now-wont-work-on-fast-cgi-box/#findComment-918127 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.